diff --git a/src/main/java/dk/camelot64/kickc/passes/Pass1UnwindStructValues.java b/src/main/java/dk/camelot64/kickc/passes/Pass1UnwindStructValues.java index 0e6bb347b..63714d75c 100644 --- a/src/main/java/dk/camelot64/kickc/passes/Pass1UnwindStructValues.java +++ b/src/main/java/dk/camelot64/kickc/passes/Pass1UnwindStructValues.java @@ -4,7 +4,10 @@ import dk.camelot64.kickc.model.InternalError; import dk.camelot64.kickc.model.*; import dk.camelot64.kickc.model.iterator.ProgramValueIterator; import dk.camelot64.kickc.model.statements.*; -import dk.camelot64.kickc.model.symbols.*; +import dk.camelot64.kickc.model.symbols.Procedure; +import dk.camelot64.kickc.model.symbols.ProgramScope; +import dk.camelot64.kickc.model.symbols.StructDefinition; +import dk.camelot64.kickc.model.symbols.Variable; import dk.camelot64.kickc.model.types.SymbolType; import dk.camelot64.kickc.model.types.SymbolTypeInference; import dk.camelot64.kickc.model.types.SymbolTypeStruct; @@ -198,6 +201,7 @@ public class Pass1UnwindStructValues extends Pass1Base { private boolean unwindAssignment(StatementAssignment assignment, ListIterator stmtIt, ControlFlowBlock currentBlock) { LValue lValue = assignment.getlValue(); SymbolType lValueType = SymbolTypeInference.inferType(getScope(), lValue); + if(lValueType instanceof SymbolTypeStruct && assignment.getOperator() == null) { // Assignment to a struct @@ -207,11 +211,13 @@ public class Pass1UnwindStructValues extends Pass1Base { StatementSource source = assignment.getSource(); // Check if this is already a bulk assignment - if(assignment.getrValue2() instanceof MemcpyValue || assignment.getrValue2() instanceof MemsetValue) + if(rValue instanceof MemcpyValue || rValue instanceof MemsetValue) + return false; + if(rValue instanceof StructUnwoundPlaceholder) return false; - ValueSource lValueSource = getValueSource(lValue, assignment, stmtIt, currentBlock); - ValueSource rValueSource = getValueSource(rValue, assignment, stmtIt, currentBlock); + ValueSource lValueSource = getValueSource(getProgram(), getScope(), lValue, assignment, stmtIt, currentBlock); + ValueSource rValueSource = getValueSource(getProgram(), getScope(), rValue, assignment, stmtIt, currentBlock); List lValueUnwoundList = new ArrayList<>(); if(copyValues(lValueSource, rValueSource, lValueUnwoundList, initialAssignment, assignment, currentBlock, stmtIt)) { if(lValue instanceof VariableRef) { @@ -223,17 +229,9 @@ public class Pass1UnwindStructValues extends Pass1Base { return true; } - // Check for bulk assignable values - if(isBulkAssignable(lValue) && isBulkAssignable(rValue)) { - throw new InternalError("E!"); - //RValueUnwinding lValueUnwinding = getValueUnwinding(lValue, assignment, stmtIt, currentBlock); - //RValueUnwinding rValueUnwinding = getValueUnwinding(rValue, assignment, stmtIt, currentBlock); - //unwindAssignment(lValueUnwinding, rValueUnwinding, null, stmtIt, initialAssignment, source); - //stmtIt.remove(); - //return true; - } // Check for struct unwinding + if(1==1) throw new InternalError("E!"); StructUnwinding lValueUnwinding = getStructMemberUnwinding(lValue, assignment, stmtIt, currentBlock); if(lValueUnwinding == null) return false; @@ -251,9 +249,12 @@ public class Pass1UnwindStructValues extends Pass1Base { return true; List lValueUnwoundPlaceholder = new ArrayList<>(); for(String memberName : lValueUnwinding.getMemberNames()) { + /* RValueUnwinding lValueMemberUnwinding = lValueUnwinding.getMemberUnwinding(memberName, getScope()); RValueUnwinding rValueMemberUnwinding = rValueUnwinding.getMemberUnwinding(memberName, getScope()); unwindAssignment(lValueMemberUnwinding, rValueMemberUnwinding, lValueUnwoundPlaceholder, stmtIt, initialAssignment, source); + + */ } StructUnwoundPlaceholder unwoundPlaceholder = new StructUnwoundPlaceholder(lValueStructType, lValueUnwoundPlaceholder); if(lValue instanceof VariableRef) { @@ -320,146 +321,42 @@ public class Pass1UnwindStructValues extends Pass1Base { * @param currentBlock The current block * @return The value source for copying. null if no value source can be created. */ - private ValueSource getValueSource(Value value, Statement currentStmt, ListIterator stmtIt, ControlFlowBlock currentBlock) { - if(value instanceof VariableRef) { - Variable variable = getScope().getVariable((VariableRef) value); - if(variable.getType() instanceof SymbolTypeStruct) { - return new ValueSourceVariable(variable); + public static ValueSource getValueSource(Program program, ProgramScope programScope, Value value, Statement currentStmt, ListIterator stmtIt, ControlFlowBlock currentBlock) { + final SymbolType valueType = SymbolTypeInference.inferType(programScope, (RValue) value); + if(valueType instanceof SymbolTypeStruct && value instanceof CastValue && ((CastValue) value).getValue() instanceof ValueList) { + ValueList valueList = (ValueList) ((CastValue) value).getValue(); + final StructDefinition structDefinition = ((SymbolTypeStruct) valueType).getStructDefinition(programScope); + int numMembers = structDefinition.getAllVars(false).size(); + if(numMembers != valueList.getList().size()) { + throw new CompileError("Struct initialization list has wrong size. Need " + numMembers + " got " + valueList.getList().size(), currentStmt); } + return new ValueSourceStructValueList(valueList, structDefinition); + } + while(value instanceof CastValue) + value = ((CastValue) value).getValue(); + if(value instanceof VariableRef) { + Variable variable = programScope.getVariable((VariableRef) value); + return new ValueSourceVariable(variable); } if(value instanceof StructZero) return new ValueSourceZero(((StructZero) value).getTypeStruct(), null); - if(value instanceof ConstantStructValue) - return new ValueSourceConstant(((ConstantStructValue) value).getType(getScope()), null, (ConstantStructValue) value); + if(value instanceof ConstantValue) + return new ValueSourceConstant(((ConstantValue) value).getType(programScope), null, (ConstantValue) value); if(value instanceof PointerDereferenceSimple) - return new ValueSourcePointerDereferenceSimple((PointerDereferenceSimple) value, SymbolTypeInference.inferType(getScope(), (RValue) value), null); + return new ValueSourcePointerDereferenceSimple((PointerDereferenceSimple) value, valueType, null); if(value instanceof PointerDereferenceIndexed) - return new ValueSourcePointerDereferenceIndexed((PointerDereferenceIndexed) value, SymbolTypeInference.inferType(getScope(), (RValue) value), null); + return new ValueSourcePointerDereferenceIndexed((PointerDereferenceIndexed) value, valueType, null); if(value instanceof StructMemberRef) { final RValue structValue = ((StructMemberRef) value).getStruct(); - final ValueSource structValueSource = getValueSource(structValue, currentStmt, stmtIt, currentBlock); - final ValueSource structMemberSource = structValueSource.getMemberUnwinding(((StructMemberRef) value).getMemberName(), getProgram(), getScope(), currentStmt, currentBlock, stmtIt); + final ValueSource structValueSource = getValueSource(program, programScope, structValue, currentStmt, stmtIt, currentBlock); + final ValueSource structMemberSource = structValueSource.getMemberUnwinding(((StructMemberRef) value).getMemberName(), program, programScope, currentStmt, currentBlock, stmtIt); return structMemberSource; } + + return null; } - /** - * Unwind assignment from an RValue to an LValue - * - * @param lValueUnwinding The unwinding of the LValue - * @param rValueUnwinding The unwinding of the RValue - * @param lValueUnwoundList will receive the actual unwinding used for the lValue (if non-null) - * @param stmtIt Statement iterator used for adding unwound assignment statements (before the current statement) - * @param initialAssignment Is this the initial assignment - * @param source The statement source - */ - private void unwindAssignment(RValueUnwinding lValueUnwinding, RValueUnwinding rValueUnwinding, List lValueUnwoundList, ListIterator stmtIt, boolean initialAssignment, StatementSource source) { - if(lValueUnwinding.isBulkCopyable() && rValueUnwinding.isBulkCopyable()) { - // Use bulk unwinding for a struct member that is an array - stmtIt.previous(); - if(lValueUnwinding.getArraySpec() != null) - if(rValueUnwinding.getArraySpec() == null || !lValueUnwinding.getArraySpec().equals(rValueUnwinding.getArraySpec())) - throw new RuntimeException("ArraySpec mismatch!"); - LValue lValueMemberVarRef = lValueUnwinding.getBulkLValue(getScope()); - RValue rValueBulkUnwinding = rValueUnwinding.getBulkRValue(getScope()); - if(lValueUnwoundList != null) - lValueUnwoundList.add(lValueMemberVarRef); - Statement copyStmt = new StatementAssignment(lValueMemberVarRef, rValueBulkUnwinding, initialAssignment, source, Comment.NO_COMMENTS); - stmtIt.add(copyStmt); - stmtIt.next(); - getLog().append("Adding struct value member variable copy " + copyStmt.toString(getProgram(), false)); - } else { - // Unwinding a non-array struct member - stmtIt.previous(); - LValue lValueMemberVarRef = (LValue) lValueUnwinding.getUnwinding(getScope()); - RValue rValueMemberVarRef = rValueUnwinding.getUnwinding(getScope()); - if(lValueUnwoundList != null) - lValueUnwoundList.add(lValueMemberVarRef); - Statement copyStmt = new StatementAssignment(lValueMemberVarRef, rValueMemberVarRef, initialAssignment, source, Comment.NO_COMMENTS); - stmtIt.add(copyStmt); - stmtIt.next(); - getLog().append("Adding struct value member variable copy " + copyStmt.toString(getProgram(), false)); - } - } - - /** - * Determine whether a value can be used in a bulk assignment - * - * @param value The value - * @return true if the value is bulk assignable - */ - private boolean isBulkAssignable(RValue value) { - if(value instanceof SymbolVariableRef) { - Variable var = getScope().getVar((SymbolVariableRef) value); - if(var.isStructClassic()) - // A load/store struct value - return true; - } - if(value instanceof StructZero) - // A zero-filled struct value - return true; - if(value instanceof ConstantStructValue) - // A constant struct value - return true; - if(value instanceof StructMemberRef && ((StructMemberRef) value).getStruct() instanceof PointerDereference) - // A member of a struct in memory - return true; - if(value instanceof PointerDereference) { - final SymbolType symbolType = SymbolTypeInference.inferType(getProgram().getScope(), value); - if(symbolType instanceof SymbolTypeStruct) - // A pointer to a struct - return true; - } - // TODO: Add support for arrays - // Not bulk assignable - return false; - } - - /** - * Get unwinding for a value - * - * @param value The value - * @return Unwinding for the value - */ - private RValueUnwinding getValueUnwinding(RValue value, Statement currentStmt, ListIterator stmtIt, ControlFlowBlock currentBlock) { - if(value != null) { - SymbolType valueType = SymbolTypeInference.inferType(getScope(), value); - if(valueType instanceof SymbolTypeStruct) { - if(value instanceof VariableRef) { - Variable variable = getScope().getVariable((VariableRef) value); - if(variable.isStructClassic()) { - return new RValueUnwindingStructVariable(variable); - } - } - if(value instanceof StructZero) - return new RValueUnwindingZero(valueType, null); - if(value instanceof ConstantStructValue) - return new RValueUnwindingConstant(valueType, null, (ConstantStructValue) value); - if(value instanceof PointerDereference) - return new RValueUnwindingStructPointerDeref((PointerDereference) value, (SymbolTypeStruct) valueType); - if(value instanceof StructMemberRef && ((StructMemberRef) value).getStruct() instanceof PointerDereferenceIndexed) { - final StructMemberRef structMemberRef = (StructMemberRef) value; - final PointerDereferenceIndexed structPointerDerefIdx = (PointerDereferenceIndexed) structMemberRef.getStruct(); - final SymbolType structPointerType = SymbolTypeInference.inferType(getScope(), structPointerDerefIdx); - if(!(structPointerType instanceof SymbolTypeStruct)) - throw new CompileError("Value is not a struct" + structPointerDerefIdx.toString(getProgram()), currentStmt); - - final StructDefinition structDefinition = ((SymbolTypeStruct) structPointerType).getStructDefinition(getScope()); - final String memberName = structMemberRef.getMemberName(); - final Variable member = structDefinition.getMember(memberName); - final SymbolType memberType = member.getType(); - final ArraySpec memberArraySpec = member.getArraySpec(); - final ConstantRef memberOffsetConstant = PassNStructPointerRewriting.getMemberOffsetConstant(getScope(), structDefinition, memberName); - return new RValueUnwindingStructPointerDereferenceIndexedMember(structPointerDerefIdx, memberType, memberArraySpec, memberOffsetConstant, currentBlock, stmtIt, currentStmt); - } - - } - } - return null; - } - - /** * Examine a value - and if it represents a struct get the unwinding information for the struct members * diff --git a/src/main/java/dk/camelot64/kickc/passes/unwinding/ValueSourceStructValueList.java b/src/main/java/dk/camelot64/kickc/passes/unwinding/ValueSourceStructValueList.java new file mode 100644 index 000000000..59c9a83e3 --- /dev/null +++ b/src/main/java/dk/camelot64/kickc/passes/unwinding/ValueSourceStructValueList.java @@ -0,0 +1,67 @@ +package dk.camelot64.kickc.passes.unwinding; + +import dk.camelot64.kickc.model.ControlFlowBlock; +import dk.camelot64.kickc.model.InternalError; +import dk.camelot64.kickc.model.Program; +import dk.camelot64.kickc.model.statements.Statement; +import dk.camelot64.kickc.model.symbols.ArraySpec; +import dk.camelot64.kickc.model.symbols.ProgramScope; +import dk.camelot64.kickc.model.symbols.StructDefinition; +import dk.camelot64.kickc.model.types.SymbolType; +import dk.camelot64.kickc.model.values.LValue; +import dk.camelot64.kickc.model.values.RValue; +import dk.camelot64.kickc.model.values.ValueList; +import dk.camelot64.kickc.passes.Pass1UnwindStructValues; + +import java.util.ListIterator; + +/** A struct value list - typically an initializer struct Point p = { x, y };. */ +public class ValueSourceStructValueList extends ValueSourceBase { + + private final StructDefinition structDefinition; + private final ValueList valueList; + + public ValueSourceStructValueList(ValueList valueList, StructDefinition structDefinition) { + this.valueList = valueList; + this.structDefinition = structDefinition; + } + + @Override + public SymbolType getSymbolType() { + return structDefinition.getType(); + } + + @Override + public ArraySpec getArraySpec() { + return null; + } + + @Override + protected boolean isStructClassic() { + return false; + } + + @Override + public RValue getSimpleValue(ProgramScope programScope) { + throw new InternalError("Not a simple value"); + } + + @Override + public LValue getBulkLValue(ProgramScope scope) { + throw new InternalError("Not a bulk value"); + } + + @Override + public RValue getBulkRValue(ProgramScope scope) { + throw new InternalError("Not a bulk value"); + } + + @Override + public ValueSource getMemberUnwinding(String memberName, Program program, ProgramScope programScope, Statement currentStmt, ControlFlowBlock currentBlock, ListIterator stmtIt) { + int memberIndex = getMemberNames(programScope).indexOf(memberName); + final RValue memberValue = valueList.getList().get(memberIndex); + final ValueSource valueSource = Pass1UnwindStructValues.getValueSource(program, programScope, memberValue, currentStmt, stmtIt, currentBlock); + return valueSource; + } + +} diff --git a/src/test/ref/complex/clearscreen/clearscreen.asm b/src/test/ref/complex/clearscreen/clearscreen.asm index 940efcf5a..ad01c4bfd 100644 --- a/src/test/ref/complex/clearscreen/clearscreen.asm +++ b/src/test/ref/complex/clearscreen/clearscreen.asm @@ -208,8 +208,8 @@ startProcessing: { .label spritePtr = $17 // Busy-wait while finding an empty slot in the PROCESSING array .label freeIdx = 2 - .label __44 = $e - .label __45 = $c + .label __35 = $e + .label __36 = $c ldx #$ff __b1: lda #0 @@ -241,19 +241,19 @@ startProcessing: { sta.z __0+1 lda.z __0 asl - sta.z __44 + sta.z __35 lda.z __0+1 rol - sta.z __44+1 - asl.z __44 - rol.z __44+1 - lda.z __45 + sta.z __35+1 + asl.z __35 + rol.z __35+1 + lda.z __36 clc - adc.z __44 - sta.z __45 - lda.z __45+1 - adc.z __44+1 - sta.z __45+1 + adc.z __35 + sta.z __36 + lda.z __36+1 + adc.z __35+1 + sta.z __36+1 asl.z __1 rol.z __1+1 asl.z __1 diff --git a/src/test/ref/complex/clearscreen/clearscreen.cfg b/src/test/ref/complex/clearscreen/clearscreen.cfg index dbf0d6abc..ead6d678f 100644 --- a/src/test/ref/complex/clearscreen/clearscreen.cfg +++ b/src/test/ref/complex/clearscreen/clearscreen.cfg @@ -90,11 +90,11 @@ startProcessing::@1: scope:[startProcessing] from startProcessing startProcessi to:startProcessing::@2 startProcessing::@2: scope:[startProcessing] from startProcessing::@1 startProcessing::@3 [46] (byte) startProcessing::i#2 ← phi( startProcessing::@1/(byte) 0 startProcessing::@3/(byte) startProcessing::i#1 ) - [47] (byte~) startProcessing::$39 ← (byte) startProcessing::i#2 << (byte) 1 - [48] (byte~) startProcessing::$40 ← (byte~) startProcessing::$39 + (byte) startProcessing::i#2 - [49] (byte~) startProcessing::$41 ← (byte~) startProcessing::$40 << (byte) 1 - [50] (byte~) startProcessing::$42 ← (byte~) startProcessing::$41 + (byte) startProcessing::i#2 - [51] (byte~) startProcessing::$27 ← (byte~) startProcessing::$42 << (byte) 1 + [47] (byte~) startProcessing::$30 ← (byte) startProcessing::i#2 << (byte) 1 + [48] (byte~) startProcessing::$31 ← (byte~) startProcessing::$30 + (byte) startProcessing::i#2 + [49] (byte~) startProcessing::$32 ← (byte~) startProcessing::$31 << (byte) 1 + [50] (byte~) startProcessing::$33 ← (byte~) startProcessing::$32 + (byte) startProcessing::i#2 + [51] (byte~) startProcessing::$27 ← (byte~) startProcessing::$33 << (byte) 1 [52] if(*((byte*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$27)!=(const byte) STATUS_FREE) goto startProcessing::@3 to:startProcessing::@4 startProcessing::@4: scope:[startProcessing] from startProcessing::@2 startProcessing::@9 @@ -103,9 +103,9 @@ startProcessing::@4: scope:[startProcessing] from startProcessing::@2 startProc to:startProcessing::@5 startProcessing::@5: scope:[startProcessing] from startProcessing::@4 [55] (word~) startProcessing::$0 ← (word)(byte) startProcessing::center_y#0 - [56] (word~) startProcessing::$44 ← (word~) startProcessing::$0 << (byte) 2 - [57] (word~) startProcessing::$45 ← (word~) startProcessing::$44 + (word~) startProcessing::$0 - [58] (word~) startProcessing::$1 ← (word~) startProcessing::$45 << (byte) 3 + [56] (word~) startProcessing::$35 ← (word~) startProcessing::$0 << (byte) 2 + [57] (word~) startProcessing::$36 ← (word~) startProcessing::$35 + (word~) startProcessing::$0 + [58] (word~) startProcessing::$1 ← (word~) startProcessing::$36 << (byte) 3 [59] (word) startProcessing::offset#0 ← (word~) startProcessing::$1 + (byte) startProcessing::center_x#0 [60] (byte*) startProcessing::colPtr#0 ← (const byte*) COLS + (word) startProcessing::offset#0 [61] (byte) startProcessing::spriteCol#0 ← *((byte*) startProcessing::colPtr#0) @@ -144,11 +144,11 @@ startProcessing::@7: scope:[startProcessing] from startProcessing::@6 [88] (byte) startProcessing::spritePtr#0 ← (byte)(const byte*) SPRITE_DATA/(byte) $40 + (byte) startProcessing::freeIdx#2 [89] (byte~) startProcessing::$20 ← (byte) startProcessing::freeIdx#2 << (byte) 3 [90] (word~) startProcessing::$21 ← (word)(byte~) startProcessing::$20 - [91] (byte~) startProcessing::$47 ← (byte) startProcessing::freeIdx#2 << (byte) 1 - [92] (byte~) startProcessing::$48 ← (byte~) startProcessing::$47 + (byte) startProcessing::freeIdx#2 - [93] (byte~) startProcessing::$49 ← (byte~) startProcessing::$48 << (byte) 1 - [94] (byte~) startProcessing::$50 ← (byte~) startProcessing::$49 + (byte) startProcessing::freeIdx#2 - [95] (byte~) startProcessing::$28 ← (byte~) startProcessing::$50 << (byte) 1 + [91] (byte~) startProcessing::$38 ← (byte) startProcessing::freeIdx#2 << (byte) 1 + [92] (byte~) startProcessing::$39 ← (byte~) startProcessing::$38 + (byte) startProcessing::freeIdx#2 + [93] (byte~) startProcessing::$40 ← (byte~) startProcessing::$39 << (byte) 1 + [94] (byte~) startProcessing::$41 ← (byte~) startProcessing::$40 + (byte) startProcessing::freeIdx#2 + [95] (byte~) startProcessing::$28 ← (byte~) startProcessing::$41 << (byte) 1 [96] *((word*)(const struct ProcessingSprite*) PROCESSING + (byte~) startProcessing::$28) ← (word) startProcessing::spriteX#0 [97] *((word*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) startProcessing::$28) ← (word) startProcessing::spriteY#0 [98] *((word*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX + (byte~) startProcessing::$28) ← (word~) startProcessing::$21 diff --git a/src/test/ref/complex/clearscreen/clearscreen.log b/src/test/ref/complex/clearscreen/clearscreen.log index 08ed6599c..4b37d7eff 100644 --- a/src/test/ref/complex/clearscreen/clearscreen.log +++ b/src/test/ref/complex/clearscreen/clearscreen.log @@ -53,9 +53,10 @@ Unwinding value copy (struct ProcessingChar) getCharToProcess::closest ← { x: Adding value simple copy (byte) getCharToProcess::closest_x ← (byte) 0 Adding value simple copy (byte) getCharToProcess::closest_y ← (byte) 0 Adding value simple copy (byte) getCharToProcess::closest_dist ← (const byte) NOT_FOUND -Adding struct value member variable copy (byte) getCharToProcess::closest_x ← (byte) getCharToProcess::x -Adding struct value member variable copy (byte) getCharToProcess::closest_y ← (byte) getCharToProcess::y -Adding struct value member variable copy (byte) getCharToProcess::closest_dist ← (byte) getCharToProcess::dist +Unwinding value copy (struct ProcessingChar) getCharToProcess::closest ← (struct ProcessingChar){ (byte) getCharToProcess::x, (byte) getCharToProcess::y, (byte) getCharToProcess::dist } +Adding value simple copy (byte) getCharToProcess::closest_x ← (byte) getCharToProcess::x +Adding value simple copy (byte) getCharToProcess::closest_y ← (byte) getCharToProcess::y +Adding value simple copy (byte) getCharToProcess::closest_dist ← (byte) getCharToProcess::dist Unwinding value copy (struct ProcessingChar) getCharToProcess::return ← (struct ProcessingChar) getCharToProcess::closest Adding value simple copy (byte) getCharToProcess::return_x ← (byte) getCharToProcess::closest_x Adding value simple copy (byte) getCharToProcess::return_y ← (byte) getCharToProcess::closest_y @@ -65,15 +66,16 @@ Adding value simple copy (byte) getCharToProcess::return_x ← (byte) getCharToP Adding value simple copy (byte) getCharToProcess::return_y ← (byte) getCharToProcess::return_y Adding value simple copy (byte) getCharToProcess::return_dist ← (byte) getCharToProcess::return_dist Converted procedure struct return value to member unwinding return { (byte) getCharToProcess::return_x, (byte) getCharToProcess::return_y, (byte) getCharToProcess::return_dist } -Adding struct value member variable copy *((word*~) startProcessing::$29 + (byte~) startProcessing::$28) ← (word) startProcessing::spriteX -Adding struct value member variable copy *((word*~) startProcessing::$30 + (byte~) startProcessing::$28) ← (word) startProcessing::spriteY -Adding struct value member variable copy *((word*~) startProcessing::$31 + (byte~) startProcessing::$28) ← (word~) startProcessing::$21 -Adding struct value member variable copy *((word*~) startProcessing::$32 + (byte~) startProcessing::$28) ← (word) $3c -Adding struct value member variable copy *((byte*~) startProcessing::$33 + (byte~) startProcessing::$28) ← (byte) startProcessing::spriteIdx -Adding struct value member variable copy *((byte*~) startProcessing::$34 + (byte~) startProcessing::$28) ← (byte) startProcessing::spritePtr -Adding struct value member variable copy *((byte*~) startProcessing::$35 + (byte~) startProcessing::$28) ← (byte) startProcessing::spriteCol -Adding struct value member variable copy *((byte*~) startProcessing::$36 + (byte~) startProcessing::$28) ← (const byte) STATUS_NEW -Adding struct value member variable copy *((byte**~) startProcessing::$37 + (byte~) startProcessing::$28) ← (byte*) startProcessing::screenPtr +Unwinding value copy *((const struct ProcessingSprite*) PROCESSING + (byte~) startProcessing::$28) ← (struct ProcessingSprite){ (word) startProcessing::spriteX, (word) startProcessing::spriteY, (word~) startProcessing::$21, (word) $3c, (byte) startProcessing::spriteIdx, (byte) startProcessing::spritePtr, (byte) startProcessing::spriteCol, (const byte) STATUS_NEW, (byte*) startProcessing::screenPtr } +Adding value simple copy *((word*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X + (byte~) startProcessing::$28) ← (word) startProcessing::spriteX +Adding value simple copy *((word*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) startProcessing::$28) ← (word) startProcessing::spriteY +Adding value simple copy *((word*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX + (byte~) startProcessing::$28) ← (word~) startProcessing::$21 +Adding value simple copy *((word*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY + (byte~) startProcessing::$28) ← (word) $3c +Adding value simple copy *((byte*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) startProcessing::$28) ← (byte) startProcessing::spriteIdx +Adding value simple copy *((byte*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) startProcessing::$28) ← (byte) startProcessing::spritePtr +Adding value simple copy *((byte*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL + (byte~) startProcessing::$28) ← (byte) startProcessing::spriteCol +Adding value simple copy *((byte*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$28) ← (const byte) STATUS_NEW +Adding value simple copy *((byte**)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) startProcessing::$28) ← (byte*) startProcessing::screenPtr Replacing struct member reference (struct ProcessingChar) main::center.dist with member unwinding reference (byte) main::center_dist Replacing struct member reference (struct ProcessingChar) getCharToProcess::closest.dist with member unwinding reference (byte) getCharToProcess::closest_dist Replacing struct member reference (struct ProcessingChar) getCharToProcess::closest.dist with member unwinding reference (byte) getCharToProcess::closest_dist @@ -703,8 +705,8 @@ startProcessing::@2: scope:[startProcessing] from startProcessing::@1 startProc (byte) startProcessing::freeIdx#5 ← phi( startProcessing::@1/(byte) startProcessing::freeIdx#6 startProcessing::@3/(byte) startProcessing::freeIdx#4 ) (byte) startProcessing::i#2 ← phi( startProcessing::@1/(byte) startProcessing::i#0 startProcessing::@3/(byte) startProcessing::i#1 ) (byte~) startProcessing::$27 ← (byte) startProcessing::i#2 * (const byte) SIZEOF_STRUCT_PROCESSINGSPRITE - (byte*~) startProcessing::$38 ← (byte*)(const struct ProcessingSprite*) PROCESSING + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS - (bool~) startProcessing::$22 ← *((byte*~) startProcessing::$38 + (byte~) startProcessing::$27) == (const byte) STATUS_FREE + (byte*~) startProcessing::$29 ← (byte*)(const struct ProcessingSprite*) PROCESSING + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (bool~) startProcessing::$22 ← *((byte*~) startProcessing::$29 + (byte~) startProcessing::$27) == (const byte) STATUS_FREE (bool~) startProcessing::$23 ← ! (bool~) startProcessing::$22 if((bool~) startProcessing::$23) goto startProcessing::@3 to:startProcessing::@5 @@ -796,24 +798,15 @@ startProcessing::@10: scope:[startProcessing] from startProcessing::@9 (number~) startProcessing::$20 ← (byte) startProcessing::spriteIdx#1 * (number) 8 (word~) startProcessing::$21 ← ((word)) (number~) startProcessing::$20 (byte~) startProcessing::$28 ← (byte) startProcessing::spriteIdx#1 * (const byte) SIZEOF_STRUCT_PROCESSINGSPRITE - (word*~) startProcessing::$29 ← (word*)(const struct ProcessingSprite*) PROCESSING + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X - *((word*~) startProcessing::$29 + (byte~) startProcessing::$28) ← (word) startProcessing::spriteX#0 - (word*~) startProcessing::$30 ← (word*)(const struct ProcessingSprite*) PROCESSING + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y - *((word*~) startProcessing::$30 + (byte~) startProcessing::$28) ← (word) startProcessing::spriteY#0 - (word*~) startProcessing::$31 ← (word*)(const struct ProcessingSprite*) PROCESSING + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX - *((word*~) startProcessing::$31 + (byte~) startProcessing::$28) ← (word~) startProcessing::$21 - (word*~) startProcessing::$32 ← (word*)(const struct ProcessingSprite*) PROCESSING + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY - *((word*~) startProcessing::$32 + (byte~) startProcessing::$28) ← (word) $3c - (byte*~) startProcessing::$33 ← (byte*)(const struct ProcessingSprite*) PROCESSING + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID - *((byte*~) startProcessing::$33 + (byte~) startProcessing::$28) ← (byte) startProcessing::spriteIdx#1 - (byte*~) startProcessing::$34 ← (byte*)(const struct ProcessingSprite*) PROCESSING + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR - *((byte*~) startProcessing::$34 + (byte~) startProcessing::$28) ← (byte) startProcessing::spritePtr#0 - (byte*~) startProcessing::$35 ← (byte*)(const struct ProcessingSprite*) PROCESSING + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL - *((byte*~) startProcessing::$35 + (byte~) startProcessing::$28) ← (byte) startProcessing::spriteCol#1 - (byte*~) startProcessing::$36 ← (byte*)(const struct ProcessingSprite*) PROCESSING + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS - *((byte*~) startProcessing::$36 + (byte~) startProcessing::$28) ← (const byte) STATUS_NEW - (byte**~) startProcessing::$37 ← (byte**)(const struct ProcessingSprite*) PROCESSING + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR - *((byte**~) startProcessing::$37 + (byte~) startProcessing::$28) ← (byte*) startProcessing::screenPtr#1 + *((word*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X + (byte~) startProcessing::$28) ← (word) startProcessing::spriteX#0 + *((word*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) startProcessing::$28) ← (word) startProcessing::spriteY#0 + *((word*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX + (byte~) startProcessing::$28) ← (word~) startProcessing::$21 + *((word*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY + (byte~) startProcessing::$28) ← (word) $3c + *((byte*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) startProcessing::$28) ← (byte) startProcessing::spriteIdx#1 + *((byte*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) startProcessing::$28) ← (byte) startProcessing::spritePtr#0 + *((byte*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL + (byte~) startProcessing::$28) ← (byte) startProcessing::spriteCol#1 + *((byte*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$28) ← (const byte) STATUS_NEW + *((byte**)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) startProcessing::$28) ← (byte*) startProcessing::screenPtr#1 to:startProcessing::@return startProcessing::@return: scope:[startProcessing] from startProcessing::@10 return @@ -2053,17 +2046,8 @@ interrupt(HARDWARE_ALL)(void()) irqTop() (bool~) startProcessing::$26 (byte~) startProcessing::$27 (byte~) startProcessing::$28 -(word*~) startProcessing::$29 +(byte*~) startProcessing::$29 (byte*~) startProcessing::$3 -(word*~) startProcessing::$30 -(word*~) startProcessing::$31 -(word*~) startProcessing::$32 -(byte*~) startProcessing::$33 -(byte*~) startProcessing::$34 -(byte*~) startProcessing::$35 -(byte*~) startProcessing::$36 -(byte**~) startProcessing::$37 -(byte*~) startProcessing::$38 (byte*~) startProcessing::$4 (word~) startProcessing::$5 (number~) startProcessing::$6 @@ -2507,9 +2491,9 @@ Inversing boolean not [146] (bool~) main::$7 ← (byte) main::center_dist#0 != ( Inversing boolean not [170] (bool~) getCharToProcess::$3 ← *((byte*) getCharToProcess::screen_line#2 + (byte) getCharToProcess::x#2) == (byte) ' ' from [169] (bool~) getCharToProcess::$2 ← *((byte*) getCharToProcess::screen_line#2 + (byte) getCharToProcess::x#2) != (byte) ' ' Inversing boolean not [179] (bool~) getCharToProcess::$5 ← (byte) getCharToProcess::dist#0 >= (byte) getCharToProcess::closest_dist#2 from [178] (bool~) getCharToProcess::$4 ← (byte) getCharToProcess::dist#0 < (byte) getCharToProcess::closest_dist#2 Inversing boolean not [193] (bool~) getCharToProcess::$1 ← (byte) getCharToProcess::closest_dist#3 == (const byte) NOT_FOUND from [192] (bool~) getCharToProcess::$0 ← (byte) getCharToProcess::closest_dist#3 != (const byte) NOT_FOUND -Inversing boolean not [220] (bool~) startProcessing::$23 ← *((byte*~) startProcessing::$38 + (byte~) startProcessing::$27) != (const byte) STATUS_FREE from [219] (bool~) startProcessing::$22 ← *((byte*~) startProcessing::$38 + (byte~) startProcessing::$27) == (const byte) STATUS_FREE -Inversing boolean not [309] (bool~) processChars::$4 ← *((byte*~) processChars::$36) == (const byte) STATUS_FREE from [308] (bool~) processChars::$3 ← *((byte*~) processChars::$36) != (const byte) STATUS_FREE -Inversing boolean not [318] (bool~) processChars::$6 ← *((byte*~) processChars::$37) != (const byte) STATUS_NEW from [317] (bool~) processChars::$5 ← *((byte*~) processChars::$37) == (const byte) STATUS_NEW +Inversing boolean not [220] (bool~) startProcessing::$23 ← *((byte*~) startProcessing::$29 + (byte~) startProcessing::$27) != (const byte) STATUS_FREE from [219] (bool~) startProcessing::$22 ← *((byte*~) startProcessing::$29 + (byte~) startProcessing::$27) == (const byte) STATUS_FREE +Inversing boolean not [300] (bool~) processChars::$4 ← *((byte*~) processChars::$36) == (const byte) STATUS_FREE from [299] (bool~) processChars::$3 ← *((byte*~) processChars::$36) != (const byte) STATUS_FREE +Inversing boolean not [309] (bool~) processChars::$6 ← *((byte*~) processChars::$37) != (const byte) STATUS_NEW from [308] (bool~) processChars::$5 ← *((byte*~) processChars::$37) == (const byte) STATUS_NEW Successful SSA optimization Pass2UnaryNotSimplification Alias (byte*) malloc::mem#0 = (byte*~) malloc::$0 Alias (void*) malloc::return#0 = (void*) malloc::return#4 (void*) malloc::return#1 @@ -2734,7 +2718,7 @@ Identical Phi Values (byte) getCharToProcess::y#2 (byte) getCharToProcess::y#7 Identical Phi Values (byte) startProcessing::center_y#8 (byte) startProcessing::center_y#0 Identical Phi Values (byte) startProcessing::center_x#8 (byte) startProcessing::center_x#0 Successful SSA optimization Pass2IdenticalPhiElimination -Identified duplicate assignment right side [353] (byte~) processChars::$15 ← (byte) processChars::i#10 * (byte) 2 +Identified duplicate assignment right side [344] (byte~) processChars::$15 ← (byte) processChars::i#10 * (byte) 2 Successful SSA optimization Pass2DuplicateRValueIdentification Simple Condition (bool~) atan2_16::$0 [12] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 Simple Condition (bool~) atan2_16::$5 [21] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 @@ -2753,42 +2737,33 @@ Simple Condition (bool~) getCharToProcess::$6 [175] if((byte) getCharToProcess:: Simple Condition (bool~) getCharToProcess::$5 [180] if((byte) getCharToProcess::dist#0>=(byte) getCharToProcess::closest_dist#2) goto getCharToProcess::@5 Simple Condition (bool~) getCharToProcess::$7 [190] if((byte) getCharToProcess::y#1!=rangelast(0,$18)) goto getCharToProcess::@3 Simple Condition (bool~) getCharToProcess::$1 [194] if((byte) getCharToProcess::return_dist#1==(const byte) NOT_FOUND) goto getCharToProcess::@1 -Simple Condition (bool~) startProcessing::$23 [221] if(*((byte*~) startProcessing::$38 + (byte~) startProcessing::$27)!=(const byte) STATUS_FREE) goto startProcessing::@3 +Simple Condition (bool~) startProcessing::$23 [221] if(*((byte*~) startProcessing::$29 + (byte~) startProcessing::$27)!=(const byte) STATUS_FREE) goto startProcessing::@3 Simple Condition (bool~) startProcessing::$24 [225] if((byte) startProcessing::i#1!=rangelast(0,NUM_PROCESSING-1)) goto startProcessing::@2 Simple Condition (bool~) startProcessing::$25 [230] if((byte) startProcessing::freeIdx#2==(byte) $ff) goto startProcessing::@1 Simple Condition (bool~) startProcessing::$26 [260] if((byte) startProcessing::i1#1!=rangelast(0,7)) goto startProcessing::@9 -Simple Condition (bool~) processChars::$4 [310] if(*((byte*~) processChars::$36)==(const byte) STATUS_FREE) goto processChars::@3 -Simple Condition (bool~) processChars::$30 [314] if((byte) processChars::i#1!=rangelast(0,NUM_PROCESSING-1)) goto processChars::@2 -Simple Condition (bool~) processChars::$6 [319] if(*((byte*~) processChars::$37)!=(const byte) STATUS_NEW) goto processChars::@4 -Simple Condition (bool~) processChars::$61 [326] if((byte) 0!=(byte~) processChars::$9) goto processChars::@5 -Simple Condition (bool~) init_angle_screen::$2 [417] if((byte) init_angle_screen::x#2<=(byte) $13) goto init_angle_screen::@3 -Simple Condition (bool~) init_angle_screen::$16 [454] if((byte) init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 -Simple Condition (bool~) initSprites::$0 [459] if((byte*) initSprites::sp#2<(const byte*) SPRITE_DATA+(const byte) NUM_PROCESSING*(byte) $40) goto initSprites::@2 -Simple Condition (bool~) initSprites::$1 [468] if((byte) initSprites::i#1!=rangelast(0,7)) goto initSprites::@7 -Simple Condition (bool~) setupRasterIrq::$0 [479] if((word) setupRasterIrq::raster#0<(word) $100) goto setupRasterIrq::@1 -Simple Condition (bool~) irqTop::$1 [500] if((byte) irqTop::i#1!=rangelast(0,4)) goto irqTop::@3 -Simple Condition (bool~) irqTop::$2 [507] if((byte) irqTop::i1#1!=rangelast(0,7)) goto irqTop::@5 -Simple Condition (bool~) irqBottom::$3 [520] if((byte) irqBottom::i#1!=rangelast(0,4)) goto irqBottom::@5 +Simple Condition (bool~) processChars::$4 [301] if(*((byte*~) processChars::$36)==(const byte) STATUS_FREE) goto processChars::@3 +Simple Condition (bool~) processChars::$30 [305] if((byte) processChars::i#1!=rangelast(0,NUM_PROCESSING-1)) goto processChars::@2 +Simple Condition (bool~) processChars::$6 [310] if(*((byte*~) processChars::$37)!=(const byte) STATUS_NEW) goto processChars::@4 +Simple Condition (bool~) processChars::$61 [317] if((byte) 0!=(byte~) processChars::$9) goto processChars::@5 +Simple Condition (bool~) init_angle_screen::$2 [408] if((byte) init_angle_screen::x#2<=(byte) $13) goto init_angle_screen::@3 +Simple Condition (bool~) init_angle_screen::$16 [445] if((byte) init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 +Simple Condition (bool~) initSprites::$0 [450] if((byte*) initSprites::sp#2<(const byte*) SPRITE_DATA+(const byte) NUM_PROCESSING*(byte) $40) goto initSprites::@2 +Simple Condition (bool~) initSprites::$1 [459] if((byte) initSprites::i#1!=rangelast(0,7)) goto initSprites::@7 +Simple Condition (bool~) setupRasterIrq::$0 [470] if((word) setupRasterIrq::raster#0<(word) $100) goto setupRasterIrq::@1 +Simple Condition (bool~) irqTop::$1 [491] if((byte) irqTop::i#1!=rangelast(0,4)) goto irqTop::@3 +Simple Condition (bool~) irqTop::$2 [498] if((byte) irqTop::i1#1!=rangelast(0,7)) goto irqTop::@5 +Simple Condition (bool~) irqBottom::$3 [511] if((byte) irqBottom::i#1!=rangelast(0,4)) goto irqBottom::@5 Successful SSA optimization Pass2ConditionalJumpSimplification -Rewriting || if()-condition to two if()s [365] (bool~) processChars::$22 ← (bool~) processChars::$20 || (bool~) processChars::$21 -Rewriting || if()-condition to two if()s [362] (bool~) processChars::$20 ← (bool~) processChars::$18 || (bool~) processChars::$19 -Rewriting || if()-condition to two if()s [359] (bool~) processChars::$18 ← (bool~) processChars::$16 || (bool~) processChars::$17 -Rewriting ! if()-condition to reversed if() [400] (bool~) processChars::$0 ← ! (const bool) DEBUG -Rewriting ! if()-condition to reversed if() [491] (bool~) irqTop::$0 ← ! (const bool) DEBUG -Rewriting ! if()-condition to reversed if() [511] (bool~) irqBottom::$0 ← ! (const bool) DEBUG -Rewriting ! if()-condition to reversed if() [514] (bool~) irqBottom::$2 ← ! (const bool) DEBUG +Rewriting || if()-condition to two if()s [356] (bool~) processChars::$22 ← (bool~) processChars::$20 || (bool~) processChars::$21 +Rewriting || if()-condition to two if()s [353] (bool~) processChars::$20 ← (bool~) processChars::$18 || (bool~) processChars::$19 +Rewriting || if()-condition to two if()s [350] (bool~) processChars::$18 ← (bool~) processChars::$16 || (bool~) processChars::$17 +Rewriting ! if()-condition to reversed if() [391] (bool~) processChars::$0 ← ! (const bool) DEBUG +Rewriting ! if()-condition to reversed if() [482] (bool~) irqTop::$0 ← ! (const bool) DEBUG +Rewriting ! if()-condition to reversed if() [502] (bool~) irqBottom::$0 ← ! (const bool) DEBUG +Rewriting ! if()-condition to reversed if() [505] (bool~) irqBottom::$2 ← ! (const bool) DEBUG Successful SSA optimization Pass2ConditionalAndOrRewriting Negating conditional jump and destination [74] if((byte) atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@17 -Constant right-side identified [218] (byte*~) startProcessing::$38 ← (byte*)(const struct ProcessingSprite*) PROCESSING + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS -Constant right-side identified [279] (word*~) startProcessing::$29 ← (word*)(const struct ProcessingSprite*) PROCESSING + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X -Constant right-side identified [281] (word*~) startProcessing::$30 ← (word*)(const struct ProcessingSprite*) PROCESSING + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y -Constant right-side identified [283] (word*~) startProcessing::$31 ← (word*)(const struct ProcessingSprite*) PROCESSING + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX -Constant right-side identified [285] (word*~) startProcessing::$32 ← (word*)(const struct ProcessingSprite*) PROCESSING + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY -Constant right-side identified [287] (byte*~) startProcessing::$33 ← (byte*)(const struct ProcessingSprite*) PROCESSING + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID -Constant right-side identified [289] (byte*~) startProcessing::$34 ← (byte*)(const struct ProcessingSprite*) PROCESSING + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR -Constant right-side identified [291] (byte*~) startProcessing::$35 ← (byte*)(const struct ProcessingSprite*) PROCESSING + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL -Constant right-side identified [293] (byte*~) startProcessing::$36 ← (byte*)(const struct ProcessingSprite*) PROCESSING + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS -Constant right-side identified [295] (byte**~) startProcessing::$37 ← (byte**)(const struct ProcessingSprite*) PROCESSING + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR +Constant right-side identified [218] (byte*~) startProcessing::$29 ← (byte*)(const struct ProcessingSprite*) PROCESSING + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte*) heap_head#0 = HEAP_TOP Constant (const word) atan2_16::angle#0 = 0 @@ -2806,17 +2781,8 @@ Constant (const byte) getCharToProcess::y#0 = 0 Constant (const byte) getCharToProcess::x#0 = 0 Constant (const byte) startProcessing::freeIdx#0 = $ff Constant (const byte) startProcessing::i#0 = 0 -Constant (const byte*) startProcessing::$38 = (byte*)PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_STATUS +Constant (const byte*) startProcessing::$29 = (byte*)PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_STATUS Constant (const byte) startProcessing::i1#0 = 0 -Constant (const word*) startProcessing::$29 = (word*)PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_X -Constant (const word*) startProcessing::$30 = (word*)PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_Y -Constant (const word*) startProcessing::$31 = (word*)PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_VX -Constant (const word*) startProcessing::$32 = (word*)PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_VY -Constant (const byte*) startProcessing::$33 = (byte*)PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_ID -Constant (const byte*) startProcessing::$34 = (byte*)PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_PTR -Constant (const byte*) startProcessing::$35 = (byte*)PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_COL -Constant (const byte*) startProcessing::$36 = (byte*)PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_STATUS -Constant (const byte**) startProcessing::$37 = (byte**)PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR Constant (const byte) processChars::numActive#0 = 0 Constant (const byte) processChars::i#0 = 0 Constant (const byte) init_angle_screen::y#0 = 0 @@ -2830,11 +2796,11 @@ Constant (const byte) irqBottom::i#0 = 0 Successful SSA optimization Pass2ConstantIdentification if() condition always true - replacing block destination [154] if(true) goto main::@9 if() condition always true - replacing block destination [157] if(true) goto main::@15 -if() condition always false - eliminating [401] if((const bool) DEBUG) goto processChars::@16 -if() condition always true - replacing block destination [479] if((const word) setupRasterIrq::raster#0<(word) $100) goto setupRasterIrq::@1 -if() condition always false - eliminating [492] if((const bool) DEBUG) goto irqTop::@2 -if() condition always false - eliminating [512] if((const bool) DEBUG) goto irqBottom::@3 -if() condition always false - eliminating [515] if((const bool) DEBUG) goto irqBottom::@4 +if() condition always false - eliminating [392] if((const bool) DEBUG) goto processChars::@16 +if() condition always true - replacing block destination [470] if((const word) setupRasterIrq::raster#0<(word) $100) goto setupRasterIrq::@1 +if() condition always false - eliminating [483] if((const bool) DEBUG) goto irqTop::@2 +if() condition always false - eliminating [503] if((const bool) DEBUG) goto irqBottom::@3 +if() condition always false - eliminating [506] if((const bool) DEBUG) goto irqBottom::@4 Successful SSA optimization Pass2ConstantIfs Resolved ranged next value [72] atan2_16::i#1 ← ++ atan2_16::i#2 to ++ Resolved ranged comparison value [74] if(atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@17 to (const byte) CORDIC_ITERATIONS_16-(byte) 1+(number) 1 @@ -2848,59 +2814,59 @@ Resolved ranged next value [223] startProcessing::i#1 ← ++ startProcessing::i# Resolved ranged comparison value [225] if(startProcessing::i#1!=rangelast(0,NUM_PROCESSING-1)) goto startProcessing::@2 to (const byte) NUM_PROCESSING-(byte) 1+(number) 1 Resolved ranged next value [258] startProcessing::i1#1 ← ++ startProcessing::i1#2 to ++ Resolved ranged comparison value [260] if(startProcessing::i1#1!=rangelast(0,7)) goto startProcessing::@9 to (number) 8 -Resolved ranged next value [312] processChars::i#1 ← ++ processChars::i#10 to ++ -Resolved ranged comparison value [314] if(processChars::i#1!=rangelast(0,NUM_PROCESSING-1)) goto processChars::@2 to (const byte) NUM_PROCESSING-(byte) 1+(number) 1 -Resolved ranged next value [452] init_angle_screen::y#1 ← ++ init_angle_screen::y#5 to ++ -Resolved ranged comparison value [454] if(init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 to (number) $d -Resolved ranged next value [466] initSprites::i#1 ← ++ initSprites::i#2 to ++ -Resolved ranged comparison value [468] if(initSprites::i#1!=rangelast(0,7)) goto initSprites::@7 to (number) 8 -Resolved ranged next value [498] irqTop::i#1 ← ++ irqTop::i#2 to ++ -Resolved ranged comparison value [500] if(irqTop::i#1!=rangelast(0,4)) goto irqTop::@3 to (number) 5 -Resolved ranged next value [505] irqTop::i1#1 ← ++ irqTop::i1#2 to ++ -Resolved ranged comparison value [507] if(irqTop::i1#1!=rangelast(0,7)) goto irqTop::@5 to (number) 8 -Resolved ranged next value [518] irqBottom::i#1 ← ++ irqBottom::i#2 to ++ -Resolved ranged comparison value [520] if(irqBottom::i#1!=rangelast(0,4)) goto irqBottom::@5 to (number) 5 -Rewriting conditional comparison [417] if((byte) init_angle_screen::x#2<=(byte) $13) goto init_angle_screen::@3 +Resolved ranged next value [303] processChars::i#1 ← ++ processChars::i#10 to ++ +Resolved ranged comparison value [305] if(processChars::i#1!=rangelast(0,NUM_PROCESSING-1)) goto processChars::@2 to (const byte) NUM_PROCESSING-(byte) 1+(number) 1 +Resolved ranged next value [443] init_angle_screen::y#1 ← ++ init_angle_screen::y#5 to ++ +Resolved ranged comparison value [445] if(init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 to (number) $d +Resolved ranged next value [457] initSprites::i#1 ← ++ initSprites::i#2 to ++ +Resolved ranged comparison value [459] if(initSprites::i#1!=rangelast(0,7)) goto initSprites::@7 to (number) 8 +Resolved ranged next value [489] irqTop::i#1 ← ++ irqTop::i#2 to ++ +Resolved ranged comparison value [491] if(irqTop::i#1!=rangelast(0,4)) goto irqTop::@3 to (number) 5 +Resolved ranged next value [496] irqTop::i1#1 ← ++ irqTop::i1#2 to ++ +Resolved ranged comparison value [498] if(irqTop::i1#1!=rangelast(0,7)) goto irqTop::@5 to (number) 8 +Resolved ranged next value [509] irqBottom::i#1 ← ++ irqBottom::i#2 to ++ +Resolved ranged comparison value [511] if(irqBottom::i#1!=rangelast(0,4)) goto irqBottom::@5 to (number) 5 +Rewriting conditional comparison [408] if((byte) init_angle_screen::x#2<=(byte) $13) goto init_angle_screen::@3 Converting *(pointer+n) to pointer[n] [205] *((byte*~) getCharToProcess::$11) ← (byte) ' ' -- *(getCharToProcess::$10 + getCharToProcess::return_x#1) -Converting *(pointer+n) to pointer[n] [305] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*~) processChars::$35) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_ID) -Converting *(pointer+n) to pointer[n] [310] if(*((byte*~) processChars::$36)==(const byte) STATUS_FREE) goto processChars::@3 -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) -Converting *(pointer+n) to pointer[n] [319] if(*((byte*~) processChars::$37)!=(const byte) STATUS_NEW) goto processChars::@4 -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) -Converting *(pointer+n) to pointer[n] [322] (word) processChars::xpos#0 ← *((word*~) processChars::$38) >> (byte) 4 -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X) -Converting *(pointer+n) to pointer[n] [329] *(*((byte**~) processChars::$39)) ← (byte) ' ' -- *((byte**)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR) -Converting *(pointer+n) to pointer[n] [333] *((const byte*) SPRITES_COLS + *((byte*~) processChars::$41)) ← *((byte*~) processChars::$40) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_COL) -Converting *(pointer+n) to pointer[n] [333] *((const byte*) SPRITES_COLS + *((byte*~) processChars::$41)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_ID) -Converting *(pointer+n) to pointer[n] [335] (byte*~) processChars::$7 ← (const byte*) SCREEN+(const word) SPRITE_PTRS + *((byte*~) processChars::$42) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_ID) -Converting *(pointer+n) to pointer[n] [337] *((byte*~) processChars::$7) ← *((byte*~) processChars::$43) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_PTR) -Converting *(pointer+n) to pointer[n] [337] *((byte*~) processChars::$7) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR) -- *(SCREEN+SPRITE_PTRS + *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_ID)) -Converting *(pointer+n) to pointer[n] [339] *((byte*~) processChars::$44) ← (const byte) STATUS_PROCESSING -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) -Converting *(pointer+n) to pointer[n] [350] (word~) processChars::$13 ← *((word*~) processChars::$45) >> (byte) 4 -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_Y) -Converting *(pointer+n) to pointer[n] [356] (bool~) processChars::$16 ← *((word*~) processChars::$46) < (const word) XPOS_LEFTMOST -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X) -Converting *(pointer+n) to pointer[n] [358] (bool~) processChars::$17 ← *((word*~) processChars::$47) > (const word) XPOS_RIGHTMOST -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X) -Converting *(pointer+n) to pointer[n] [361] (bool~) processChars::$19 ← *((word*~) processChars::$48) < (const word) YPOS_TOPMOST -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_Y) -Converting *(pointer+n) to pointer[n] [364] (bool~) processChars::$21 ← *((word*~) processChars::$49) > (const word) YPOS_BOTTOMMOST -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_Y) -Converting *(pointer+n) to pointer[n] [369] *((byte*~) processChars::$50) ← (const byte) STATUS_FREE -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) -Converting *(pointer+n) to pointer[n] [380] *((word*~) processChars::$52) ← *((word*~) processChars::$51) + *((const word*) VXSIN + (byte~) processChars::$33) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VX) -Converting *(pointer+n) to pointer[n] [380] *((word*~) processChars::$52) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) + *((const word*) VXSIN + (byte~) processChars::$33) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VX) -Converting *(pointer+n) to pointer[n] [384] *((word*~) processChars::$55) ← *((word*~) processChars::$53) + *((word*~) processChars::$54) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X) -Converting *(pointer+n) to pointer[n] [384] *((word*~) processChars::$55) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) + *((word*~) processChars::$54) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VX) -Converting *(pointer+n) to pointer[n] [384] *((word*~) processChars::$55) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X) -Converting *(pointer+n) to pointer[n] [392] *((word*~) processChars::$57) ← *((word*~) processChars::$56) + *((const word*) VYSIN + (byte~) processChars::$34) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VY) -Converting *(pointer+n) to pointer[n] [392] *((word*~) processChars::$57) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) + *((const word*) VYSIN + (byte~) processChars::$34) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VY) -Converting *(pointer+n) to pointer[n] [396] *((word*~) processChars::$60) ← *((word*~) processChars::$58) + *((word*~) processChars::$59) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_Y) -Converting *(pointer+n) to pointer[n] [396] *((word*~) processChars::$60) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) + *((word*~) processChars::$59) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VY) -Converting *(pointer+n) to pointer[n] [396] *((word*~) processChars::$60) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_Y) +Converting *(pointer+n) to pointer[n] [296] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*~) processChars::$35) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_ID) +Converting *(pointer+n) to pointer[n] [301] if(*((byte*~) processChars::$36)==(const byte) STATUS_FREE) goto processChars::@3 -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) +Converting *(pointer+n) to pointer[n] [310] if(*((byte*~) processChars::$37)!=(const byte) STATUS_NEW) goto processChars::@4 -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) +Converting *(pointer+n) to pointer[n] [313] (word) processChars::xpos#0 ← *((word*~) processChars::$38) >> (byte) 4 -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X) +Converting *(pointer+n) to pointer[n] [320] *(*((byte**~) processChars::$39)) ← (byte) ' ' -- *((byte**)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR) +Converting *(pointer+n) to pointer[n] [324] *((const byte*) SPRITES_COLS + *((byte*~) processChars::$41)) ← *((byte*~) processChars::$40) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_COL) +Converting *(pointer+n) to pointer[n] [324] *((const byte*) SPRITES_COLS + *((byte*~) processChars::$41)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_ID) +Converting *(pointer+n) to pointer[n] [326] (byte*~) processChars::$7 ← (const byte*) SCREEN+(const word) SPRITE_PTRS + *((byte*~) processChars::$42) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_ID) +Converting *(pointer+n) to pointer[n] [328] *((byte*~) processChars::$7) ← *((byte*~) processChars::$43) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_PTR) +Converting *(pointer+n) to pointer[n] [328] *((byte*~) processChars::$7) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR) -- *(SCREEN+SPRITE_PTRS + *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_ID)) +Converting *(pointer+n) to pointer[n] [330] *((byte*~) processChars::$44) ← (const byte) STATUS_PROCESSING -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) +Converting *(pointer+n) to pointer[n] [341] (word~) processChars::$13 ← *((word*~) processChars::$45) >> (byte) 4 -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_Y) +Converting *(pointer+n) to pointer[n] [347] (bool~) processChars::$16 ← *((word*~) processChars::$46) < (const word) XPOS_LEFTMOST -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X) +Converting *(pointer+n) to pointer[n] [349] (bool~) processChars::$17 ← *((word*~) processChars::$47) > (const word) XPOS_RIGHTMOST -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X) +Converting *(pointer+n) to pointer[n] [352] (bool~) processChars::$19 ← *((word*~) processChars::$48) < (const word) YPOS_TOPMOST -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_Y) +Converting *(pointer+n) to pointer[n] [355] (bool~) processChars::$21 ← *((word*~) processChars::$49) > (const word) YPOS_BOTTOMMOST -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_Y) +Converting *(pointer+n) to pointer[n] [360] *((byte*~) processChars::$50) ← (const byte) STATUS_FREE -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) +Converting *(pointer+n) to pointer[n] [371] *((word*~) processChars::$52) ← *((word*~) processChars::$51) + *((const word*) VXSIN + (byte~) processChars::$33) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VX) +Converting *(pointer+n) to pointer[n] [371] *((word*~) processChars::$52) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) + *((const word*) VXSIN + (byte~) processChars::$33) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VX) +Converting *(pointer+n) to pointer[n] [375] *((word*~) processChars::$55) ← *((word*~) processChars::$53) + *((word*~) processChars::$54) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X) +Converting *(pointer+n) to pointer[n] [375] *((word*~) processChars::$55) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) + *((word*~) processChars::$54) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VX) +Converting *(pointer+n) to pointer[n] [375] *((word*~) processChars::$55) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X) +Converting *(pointer+n) to pointer[n] [383] *((word*~) processChars::$57) ← *((word*~) processChars::$56) + *((const word*) VYSIN + (byte~) processChars::$34) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VY) +Converting *(pointer+n) to pointer[n] [383] *((word*~) processChars::$57) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) + *((const word*) VYSIN + (byte~) processChars::$34) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VY) +Converting *(pointer+n) to pointer[n] [387] *((word*~) processChars::$60) ← *((word*~) processChars::$58) + *((word*~) processChars::$59) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_Y) +Converting *(pointer+n) to pointer[n] [387] *((word*~) processChars::$60) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) + *((word*~) processChars::$59) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VY) +Converting *(pointer+n) to pointer[n] [387] *((word*~) processChars::$60) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_Y) Successful SSA optimization Pass2InlineDerefIdx -Simplifying expression containing zero (word*)PROCESSING in -Simplifying expression containing zero (word*)processChars::processing#0 in [321] (word*~) processChars::$38 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X -Simplifying expression containing zero (word*)processChars::processing#0 in [322] (word) processChars::xpos#0 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) >> (byte) 4 -Simplifying expression containing zero (word*)processChars::processing#0 in [355] (word*~) processChars::$46 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X -Simplifying expression containing zero (word*)processChars::processing#0 in [356] (bool~) processChars::$16 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) < (const word) XPOS_LEFTMOST -Simplifying expression containing zero (word*)processChars::processing#0 in [357] (word*~) processChars::$47 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X -Simplifying expression containing zero (word*)processChars::processing#0 in [358] (bool~) processChars::$17 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) > (const word) XPOS_RIGHTMOST -Simplifying expression containing zero (word*)processChars::processing#0 in [381] (word*~) processChars::$53 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X -Simplifying expression containing zero (word*)processChars::processing#0 in [383] (word*~) processChars::$55 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X -Simplifying expression containing zero (word*)processChars::processing#0 in [384] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) -Simplifying expression containing zero (word*)processChars::processing#0 in [384] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) ← *((word*)(struct ProcessingSprite*) processChars::processing#0) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) +Simplifying expression containing zero (word*)PROCESSING in [279] *((word*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X + (byte~) startProcessing::$28) ← (word) startProcessing::spriteX#0 +Simplifying expression containing zero (word*)processChars::processing#0 in [312] (word*~) processChars::$38 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X +Simplifying expression containing zero (word*)processChars::processing#0 in [313] (word) processChars::xpos#0 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) >> (byte) 4 +Simplifying expression containing zero (word*)processChars::processing#0 in [346] (word*~) processChars::$46 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X +Simplifying expression containing zero (word*)processChars::processing#0 in [347] (bool~) processChars::$16 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) < (const word) XPOS_LEFTMOST +Simplifying expression containing zero (word*)processChars::processing#0 in [348] (word*~) processChars::$47 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X +Simplifying expression containing zero (word*)processChars::processing#0 in [349] (bool~) processChars::$17 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) > (const word) XPOS_RIGHTMOST +Simplifying expression containing zero (word*)processChars::processing#0 in [372] (word*~) processChars::$53 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X +Simplifying expression containing zero (word*)processChars::processing#0 in [374] (word*~) processChars::$55 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X +Simplifying expression containing zero (word*)processChars::processing#0 in [375] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) +Simplifying expression containing zero (word*)processChars::processing#0 in [375] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) ← *((word*)(struct ProcessingSprite*) processChars::processing#0) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable (byte) startProcessing::center_dist#0 and assignment [76] (byte) startProcessing::center_dist#0 ← (byte) main::center_dist#0 Eliminating unused variable (struct ProcessingChar) getCharToProcess::return#0 and assignment [96] (struct ProcessingChar) getCharToProcess::return#0 ← struct-unwound {(byte) getCharToProcess::return_x#1, (byte) getCharToProcess::return_y#1, (byte) getCharToProcess::return_dist#1} @@ -3079,12 +3045,7 @@ Inlining constant with var siblings (const byte) init_angle_screen::xb#0 Inlining constant with var siblings (const byte*) initSprites::sp#0 Inlining constant with var siblings (const byte) initSprites::i#0 Inlining constant with var siblings (const byte*) heap_head#0 -Constant inlined startProcessing::$35 = (byte*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL -Constant inlined startProcessing::$34 = (byte*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR -Constant inlined startProcessing::$37 = (byte**)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR -Constant inlined startProcessing::$36 = (byte*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS Constant inlined startProcessing::freeIdx#0 = (byte) $ff -Constant inlined startProcessing::$38 = (byte*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS Constant inlined init_angle_screen::y#0 = (byte) 0 Constant inlined init_angle_screen::x#0 = (byte) 0 Constant inlined main::src#0 = (const byte*) SCREEN @@ -3097,14 +3058,10 @@ Constant inlined getCharToProcess::closest_y#0 = (byte) 0 Constant inlined processChars::numActive#0 = (byte) 0 Constant inlined main::i#0 = (byte) 0 Constant inlined getCharToProcess::closest_x#0 = (byte) 0 -Constant inlined startProcessing::$31 = (word*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX Constant inlined ProcessingSprite::$0::STATUS_FREE = (byte) 0 -Constant inlined startProcessing::$30 = (word*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y -Constant inlined startProcessing::$33 = (byte*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID -Constant inlined startProcessing::$32 = (word*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY Constant inlined startProcessing::i1#0 = (byte) 0 Constant inlined init_angle_screen::xb#0 = (byte) $27 -Constant inlined startProcessing::$29 = (word*)(const struct ProcessingSprite*) PROCESSING +Constant inlined startProcessing::$29 = (byte*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS Constant inlined atan2_16::i#0 = (byte) 0 Constant inlined malloc::size#1 = (word) $3e8 Constant inlined malloc::size#0 = (word) $3e8 @@ -3119,9 +3076,9 @@ Constant inlined initSprites::i#0 = (byte) 0 Successful SSA optimization Pass2ConstantInlining Alias (byte~) main::$10 = (byte~) main::$15 Alias (word~) getCharToProcess::$9 = (word~) getCharToProcess::$14 -Alias (byte~) startProcessing::$27 = (byte~) startProcessing::$43 -Alias (word~) startProcessing::$1 = (word~) startProcessing::$46 -Alias (byte~) startProcessing::$28 = (byte~) startProcessing::$51 +Alias (byte~) startProcessing::$27 = (byte~) startProcessing::$34 +Alias (word~) startProcessing::$1 = (word~) startProcessing::$37 +Alias (byte~) startProcessing::$28 = (byte~) startProcessing::$42 Alias (byte~) processChars::$32 = (byte~) processChars::$66 Successful SSA optimization Pass2AliasElimination Identical Phi Values (word) malloc::size#2 (word) $3e8 @@ -3451,11 +3408,11 @@ startProcessing::@1: scope:[startProcessing] from startProcessing startProcessi to:startProcessing::@2 startProcessing::@2: scope:[startProcessing] from startProcessing::@1 startProcessing::@3 [46] (byte) startProcessing::i#2 ← phi( startProcessing::@1/(byte) 0 startProcessing::@3/(byte) startProcessing::i#1 ) - [47] (byte~) startProcessing::$39 ← (byte) startProcessing::i#2 << (byte) 1 - [48] (byte~) startProcessing::$40 ← (byte~) startProcessing::$39 + (byte) startProcessing::i#2 - [49] (byte~) startProcessing::$41 ← (byte~) startProcessing::$40 << (byte) 1 - [50] (byte~) startProcessing::$42 ← (byte~) startProcessing::$41 + (byte) startProcessing::i#2 - [51] (byte~) startProcessing::$27 ← (byte~) startProcessing::$42 << (byte) 1 + [47] (byte~) startProcessing::$30 ← (byte) startProcessing::i#2 << (byte) 1 + [48] (byte~) startProcessing::$31 ← (byte~) startProcessing::$30 + (byte) startProcessing::i#2 + [49] (byte~) startProcessing::$32 ← (byte~) startProcessing::$31 << (byte) 1 + [50] (byte~) startProcessing::$33 ← (byte~) startProcessing::$32 + (byte) startProcessing::i#2 + [51] (byte~) startProcessing::$27 ← (byte~) startProcessing::$33 << (byte) 1 [52] if(*((byte*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$27)!=(const byte) STATUS_FREE) goto startProcessing::@3 to:startProcessing::@4 startProcessing::@4: scope:[startProcessing] from startProcessing::@2 startProcessing::@9 @@ -3464,9 +3421,9 @@ startProcessing::@4: scope:[startProcessing] from startProcessing::@2 startProc to:startProcessing::@5 startProcessing::@5: scope:[startProcessing] from startProcessing::@4 [55] (word~) startProcessing::$0 ← (word)(byte) startProcessing::center_y#0 - [56] (word~) startProcessing::$44 ← (word~) startProcessing::$0 << (byte) 2 - [57] (word~) startProcessing::$45 ← (word~) startProcessing::$44 + (word~) startProcessing::$0 - [58] (word~) startProcessing::$1 ← (word~) startProcessing::$45 << (byte) 3 + [56] (word~) startProcessing::$35 ← (word~) startProcessing::$0 << (byte) 2 + [57] (word~) startProcessing::$36 ← (word~) startProcessing::$35 + (word~) startProcessing::$0 + [58] (word~) startProcessing::$1 ← (word~) startProcessing::$36 << (byte) 3 [59] (word) startProcessing::offset#0 ← (word~) startProcessing::$1 + (byte) startProcessing::center_x#0 [60] (byte*) startProcessing::colPtr#0 ← (const byte*) COLS + (word) startProcessing::offset#0 [61] (byte) startProcessing::spriteCol#0 ← *((byte*) startProcessing::colPtr#0) @@ -3505,11 +3462,11 @@ startProcessing::@7: scope:[startProcessing] from startProcessing::@6 [88] (byte) startProcessing::spritePtr#0 ← (byte)(const byte*) SPRITE_DATA/(byte) $40 + (byte) startProcessing::freeIdx#2 [89] (byte~) startProcessing::$20 ← (byte) startProcessing::freeIdx#2 << (byte) 3 [90] (word~) startProcessing::$21 ← (word)(byte~) startProcessing::$20 - [91] (byte~) startProcessing::$47 ← (byte) startProcessing::freeIdx#2 << (byte) 1 - [92] (byte~) startProcessing::$48 ← (byte~) startProcessing::$47 + (byte) startProcessing::freeIdx#2 - [93] (byte~) startProcessing::$49 ← (byte~) startProcessing::$48 << (byte) 1 - [94] (byte~) startProcessing::$50 ← (byte~) startProcessing::$49 + (byte) startProcessing::freeIdx#2 - [95] (byte~) startProcessing::$28 ← (byte~) startProcessing::$50 << (byte) 1 + [91] (byte~) startProcessing::$38 ← (byte) startProcessing::freeIdx#2 << (byte) 1 + [92] (byte~) startProcessing::$39 ← (byte~) startProcessing::$38 + (byte) startProcessing::freeIdx#2 + [93] (byte~) startProcessing::$40 ← (byte~) startProcessing::$39 << (byte) 1 + [94] (byte~) startProcessing::$41 ← (byte~) startProcessing::$40 + (byte) startProcessing::freeIdx#2 + [95] (byte~) startProcessing::$28 ← (byte~) startProcessing::$41 << (byte) 1 [96] *((word*)(const struct ProcessingSprite*) PROCESSING + (byte~) startProcessing::$28) ← (word) startProcessing::spriteX#0 [97] *((word*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) startProcessing::$28) ← (word) startProcessing::spriteY#0 [98] *((word*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX + (byte~) startProcessing::$28) ← (word~) startProcessing::$21 @@ -4174,17 +4131,17 @@ interrupt(HARDWARE_ALL)(void()) irqTop() (word~) startProcessing::$21 0.5 (byte~) startProcessing::$27 2002.0 (byte~) startProcessing::$28 2.2222222222222228 -(byte~) startProcessing::$39 2002.0 -(byte~) startProcessing::$40 2002.0 -(byte~) startProcessing::$41 2002.0 -(byte~) startProcessing::$42 2002.0 -(word~) startProcessing::$44 4.0 -(word~) startProcessing::$45 4.0 -(byte~) startProcessing::$47 4.0 -(byte~) startProcessing::$48 4.0 -(byte~) startProcessing::$49 4.0 +(byte~) startProcessing::$30 2002.0 +(byte~) startProcessing::$31 2002.0 +(byte~) startProcessing::$32 2002.0 +(byte~) startProcessing::$33 2002.0 +(word~) startProcessing::$35 4.0 +(word~) startProcessing::$36 4.0 +(byte~) startProcessing::$38 4.0 +(byte~) startProcessing::$39 4.0 +(byte~) startProcessing::$40 4.0 +(byte~) startProcessing::$41 4.0 (word~) startProcessing::$5 4.0 -(byte~) startProcessing::$50 4.0 (word~) startProcessing::$6 4.0 (word~) startProcessing::$8 4.0 (word~) startProcessing::$9 4.0 @@ -4282,14 +4239,14 @@ Added variable main::center_y#0 to live range equivalence class [ main::center_y Added variable main::center_dist#0 to live range equivalence class [ main::center_dist#0 ] Added variable startProcessing::center_x#0 to live range equivalence class [ startProcessing::center_x#0 ] Added variable startProcessing::center_y#0 to live range equivalence class [ startProcessing::center_y#0 ] -Added variable startProcessing::$39 to live range equivalence class [ startProcessing::$39 ] -Added variable startProcessing::$40 to live range equivalence class [ startProcessing::$40 ] -Added variable startProcessing::$41 to live range equivalence class [ startProcessing::$41 ] -Added variable startProcessing::$42 to live range equivalence class [ startProcessing::$42 ] +Added variable startProcessing::$30 to live range equivalence class [ startProcessing::$30 ] +Added variable startProcessing::$31 to live range equivalence class [ startProcessing::$31 ] +Added variable startProcessing::$32 to live range equivalence class [ startProcessing::$32 ] +Added variable startProcessing::$33 to live range equivalence class [ startProcessing::$33 ] Added variable startProcessing::$27 to live range equivalence class [ startProcessing::$27 ] Added variable startProcessing::$0 to live range equivalence class [ startProcessing::$0 ] -Added variable startProcessing::$44 to live range equivalence class [ startProcessing::$44 ] -Added variable startProcessing::$45 to live range equivalence class [ startProcessing::$45 ] +Added variable startProcessing::$35 to live range equivalence class [ startProcessing::$35 ] +Added variable startProcessing::$36 to live range equivalence class [ startProcessing::$36 ] Added variable startProcessing::$1 to live range equivalence class [ startProcessing::$1 ] Added variable startProcessing::offset#0 to live range equivalence class [ startProcessing::offset#0 ] Added variable startProcessing::colPtr#0 to live range equivalence class [ startProcessing::colPtr#0 ] @@ -4311,10 +4268,10 @@ Added variable startProcessing::spriteY#0 to live range equivalence class [ star Added variable startProcessing::spritePtr#0 to live range equivalence class [ startProcessing::spritePtr#0 ] Added variable startProcessing::$20 to live range equivalence class [ startProcessing::$20 ] Added variable startProcessing::$21 to live range equivalence class [ startProcessing::$21 ] -Added variable startProcessing::$47 to live range equivalence class [ startProcessing::$47 ] -Added variable startProcessing::$48 to live range equivalence class [ startProcessing::$48 ] -Added variable startProcessing::$49 to live range equivalence class [ startProcessing::$49 ] -Added variable startProcessing::$50 to live range equivalence class [ startProcessing::$50 ] +Added variable startProcessing::$38 to live range equivalence class [ startProcessing::$38 ] +Added variable startProcessing::$39 to live range equivalence class [ startProcessing::$39 ] +Added variable startProcessing::$40 to live range equivalence class [ startProcessing::$40 ] +Added variable startProcessing::$41 to live range equivalence class [ startProcessing::$41 ] Added variable startProcessing::$28 to live range equivalence class [ startProcessing::$28 ] Added variable getCharToProcess::$8 to live range equivalence class [ getCharToProcess::$8 ] Added variable getCharToProcess::$12 to live range equivalence class [ getCharToProcess::$12 ] @@ -4411,14 +4368,14 @@ Complete equivalence classes [ main::center_dist#0 ] [ startProcessing::center_x#0 ] [ startProcessing::center_y#0 ] -[ startProcessing::$39 ] -[ startProcessing::$40 ] -[ startProcessing::$41 ] -[ startProcessing::$42 ] +[ startProcessing::$30 ] +[ startProcessing::$31 ] +[ startProcessing::$32 ] +[ startProcessing::$33 ] [ startProcessing::$27 ] [ startProcessing::$0 ] -[ startProcessing::$44 ] -[ startProcessing::$45 ] +[ startProcessing::$35 ] +[ startProcessing::$36 ] [ startProcessing::$1 ] [ startProcessing::offset#0 ] [ startProcessing::colPtr#0 ] @@ -4440,10 +4397,10 @@ Complete equivalence classes [ startProcessing::spritePtr#0 ] [ startProcessing::$20 ] [ startProcessing::$21 ] -[ startProcessing::$47 ] -[ startProcessing::$48 ] -[ startProcessing::$49 ] -[ startProcessing::$50 ] +[ startProcessing::$38 ] +[ startProcessing::$39 ] +[ startProcessing::$40 ] +[ startProcessing::$41 ] [ startProcessing::$28 ] [ getCharToProcess::$8 ] [ getCharToProcess::$12 ] @@ -4539,14 +4496,14 @@ Allocated zp[1]:67 [ main::center_y#0 ] Allocated zp[1]:68 [ main::center_dist#0 ] Allocated zp[1]:69 [ startProcessing::center_x#0 ] Allocated zp[1]:70 [ startProcessing::center_y#0 ] -Allocated zp[1]:71 [ startProcessing::$39 ] -Allocated zp[1]:72 [ startProcessing::$40 ] -Allocated zp[1]:73 [ startProcessing::$41 ] -Allocated zp[1]:74 [ startProcessing::$42 ] +Allocated zp[1]:71 [ startProcessing::$30 ] +Allocated zp[1]:72 [ startProcessing::$31 ] +Allocated zp[1]:73 [ startProcessing::$32 ] +Allocated zp[1]:74 [ startProcessing::$33 ] Allocated zp[1]:75 [ startProcessing::$27 ] Allocated zp[2]:76 [ startProcessing::$0 ] -Allocated zp[2]:78 [ startProcessing::$44 ] -Allocated zp[2]:80 [ startProcessing::$45 ] +Allocated zp[2]:78 [ startProcessing::$35 ] +Allocated zp[2]:80 [ startProcessing::$36 ] Allocated zp[2]:82 [ startProcessing::$1 ] Allocated zp[2]:84 [ startProcessing::offset#0 ] Allocated zp[2]:86 [ startProcessing::colPtr#0 ] @@ -4568,10 +4525,10 @@ Allocated zp[2]:114 [ startProcessing::spriteY#0 ] Allocated zp[1]:116 [ startProcessing::spritePtr#0 ] Allocated zp[1]:117 [ startProcessing::$20 ] Allocated zp[2]:118 [ startProcessing::$21 ] -Allocated zp[1]:120 [ startProcessing::$47 ] -Allocated zp[1]:121 [ startProcessing::$48 ] -Allocated zp[1]:122 [ startProcessing::$49 ] -Allocated zp[1]:123 [ startProcessing::$50 ] +Allocated zp[1]:120 [ startProcessing::$38 ] +Allocated zp[1]:121 [ startProcessing::$39 ] +Allocated zp[1]:122 [ startProcessing::$40 ] +Allocated zp[1]:123 [ startProcessing::$41 ] Allocated zp[1]:124 [ startProcessing::$28 ] Allocated zp[2]:125 [ getCharToProcess::$8 ] Allocated zp[2]:127 [ getCharToProcess::$12 ] @@ -4988,16 +4945,16 @@ startProcessing: { .label freeIdx = 8 // Busy-wait while finding an empty slot in the PROCESSING array .label freeIdx_1 = 7 - .label __39 = $47 - .label __40 = $48 - .label __41 = $49 - .label __42 = $4a - .label __44 = $4e - .label __45 = $50 - .label __47 = $78 - .label __48 = $79 - .label __49 = $7a - .label __50 = $7b + .label __30 = $47 + .label __31 = $48 + .label __32 = $49 + .label __33 = $4a + .label __35 = $4e + .label __36 = $50 + .label __38 = $78 + .label __39 = $79 + .label __40 = $7a + .label __41 = $7b // [45] phi from startProcessing to startProcessing::@1 [phi:startProcessing->startProcessing::@1] __b1_from_startProcessing: // [45] phi (byte) startProcessing::freeIdx#6 = (byte) $ff [phi:startProcessing->startProcessing::@1#0] -- vbuz1=vbuc1 @@ -5018,26 +4975,26 @@ startProcessing: { jmp __b2 // startProcessing::@2 __b2: - // [47] (byte~) startProcessing::$39 ← (byte) startProcessing::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + // [47] (byte~) startProcessing::$30 ← (byte) startProcessing::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda.z i asl - sta.z __39 - // [48] (byte~) startProcessing::$40 ← (byte~) startProcessing::$39 + (byte) startProcessing::i#2 -- vbuz1=vbuz2_plus_vbuz3 - lda.z __39 + sta.z __30 + // [48] (byte~) startProcessing::$31 ← (byte~) startProcessing::$30 + (byte) startProcessing::i#2 -- vbuz1=vbuz2_plus_vbuz3 + lda.z __30 clc adc.z i - sta.z __40 - // [49] (byte~) startProcessing::$41 ← (byte~) startProcessing::$40 << (byte) 1 -- vbuz1=vbuz2_rol_1 - lda.z __40 + sta.z __31 + // [49] (byte~) startProcessing::$32 ← (byte~) startProcessing::$31 << (byte) 1 -- vbuz1=vbuz2_rol_1 + lda.z __31 asl - sta.z __41 - // [50] (byte~) startProcessing::$42 ← (byte~) startProcessing::$41 + (byte) startProcessing::i#2 -- vbuz1=vbuz2_plus_vbuz3 - lda.z __41 + sta.z __32 + // [50] (byte~) startProcessing::$33 ← (byte~) startProcessing::$32 + (byte) startProcessing::i#2 -- vbuz1=vbuz2_plus_vbuz3 + lda.z __32 clc adc.z i - sta.z __42 - // [51] (byte~) startProcessing::$27 ← (byte~) startProcessing::$42 << (byte) 1 -- vbuz1=vbuz2_rol_1 - lda.z __42 + sta.z __33 + // [51] (byte~) startProcessing::$27 ← (byte~) startProcessing::$33 << (byte) 1 -- vbuz1=vbuz2_rol_1 + lda.z __33 asl sta.z __27 // [52] if(*((byte*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$27)!=(const byte) STATUS_FREE) goto startProcessing::@3 -- pbuc1_derefidx_vbuz1_neq_vbuc2_then_la1 @@ -5064,28 +5021,28 @@ startProcessing: { sta.z __0 lda #0 sta.z __0+1 - // [56] (word~) startProcessing::$44 ← (word~) startProcessing::$0 << (byte) 2 -- vwuz1=vwuz2_rol_2 + // [56] (word~) startProcessing::$35 ← (word~) startProcessing::$0 << (byte) 2 -- vwuz1=vwuz2_rol_2 lda.z __0 asl - sta.z __44 + sta.z __35 lda.z __0+1 rol - sta.z __44+1 - asl.z __44 - rol.z __44+1 - // [57] (word~) startProcessing::$45 ← (word~) startProcessing::$44 + (word~) startProcessing::$0 -- vwuz1=vwuz2_plus_vwuz3 - lda.z __44 + sta.z __35+1 + asl.z __35 + rol.z __35+1 + // [57] (word~) startProcessing::$36 ← (word~) startProcessing::$35 + (word~) startProcessing::$0 -- vwuz1=vwuz2_plus_vwuz3 + lda.z __35 clc adc.z __0 - sta.z __45 - lda.z __44+1 + sta.z __36 + lda.z __35+1 adc.z __0+1 - sta.z __45+1 - // [58] (word~) startProcessing::$1 ← (word~) startProcessing::$45 << (byte) 3 -- vwuz1=vwuz2_rol_3 - lda.z __45 + sta.z __36+1 + // [58] (word~) startProcessing::$1 ← (word~) startProcessing::$36 << (byte) 3 -- vwuz1=vwuz2_rol_3 + lda.z __36 asl sta.z __1 - lda.z __45+1 + lda.z __36+1 rol sta.z __1+1 asl.z __1 @@ -5320,26 +5277,26 @@ startProcessing: { sta.z __21 lda #0 sta.z __21+1 - // [91] (byte~) startProcessing::$47 ← (byte) startProcessing::freeIdx#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + // [91] (byte~) startProcessing::$38 ← (byte) startProcessing::freeIdx#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda.z freeIdx asl - sta.z __47 - // [92] (byte~) startProcessing::$48 ← (byte~) startProcessing::$47 + (byte) startProcessing::freeIdx#2 -- vbuz1=vbuz2_plus_vbuz3 - lda.z __47 + sta.z __38 + // [92] (byte~) startProcessing::$39 ← (byte~) startProcessing::$38 + (byte) startProcessing::freeIdx#2 -- vbuz1=vbuz2_plus_vbuz3 + lda.z __38 clc adc.z freeIdx - sta.z __48 - // [93] (byte~) startProcessing::$49 ← (byte~) startProcessing::$48 << (byte) 1 -- vbuz1=vbuz2_rol_1 - lda.z __48 + sta.z __39 + // [93] (byte~) startProcessing::$40 ← (byte~) startProcessing::$39 << (byte) 1 -- vbuz1=vbuz2_rol_1 + lda.z __39 asl - sta.z __49 - // [94] (byte~) startProcessing::$50 ← (byte~) startProcessing::$49 + (byte) startProcessing::freeIdx#2 -- vbuz1=vbuz2_plus_vbuz3 - lda.z __49 + sta.z __40 + // [94] (byte~) startProcessing::$41 ← (byte~) startProcessing::$40 + (byte) startProcessing::freeIdx#2 -- vbuz1=vbuz2_plus_vbuz3 + lda.z __40 clc adc.z freeIdx - sta.z __50 - // [95] (byte~) startProcessing::$28 ← (byte~) startProcessing::$50 << (byte) 1 -- vbuz1=vbuz2_rol_1 - lda.z __50 + sta.z __41 + // [95] (byte~) startProcessing::$28 ← (byte~) startProcessing::$41 << (byte) 1 -- vbuz1=vbuz2_rol_1 + lda.z __41 asl sta.z __28 // [96] *((word*)(const struct ProcessingSprite*) PROCESSING + (byte~) startProcessing::$28) ← (word) startProcessing::spriteX#0 -- pwuc1_derefidx_vbuz1=vwuz2 @@ -6860,20 +6817,20 @@ Removing always clobbered register reg byte y as potential for zp[1]:6 [ main::i Statement [22] if((byte) main::i#1!=(const byte) NUM_PROCESSING-(byte) 1+(byte) 1) goto main::@3 [ SCREEN_COPY#0 SCREEN_DIST#0 main::i#1 ] ( main:7 [ SCREEN_COPY#0 SCREEN_DIST#0 main::i#1 ] ) always clobbers reg byte a Statement [36] *((const byte*) SCREEN+(word) $3e7) ← (byte) '.' [ ] ( main:7 [ ] ) always clobbers reg byte a Statement [41] *((byte*) main::dst#2) ← *((byte*) main::src#2) [ SCREEN_COPY#0 SCREEN_DIST#0 main::src#2 main::dst#2 ] ( main:7 [ SCREEN_COPY#0 SCREEN_DIST#0 main::src#2 main::dst#2 ] ) always clobbers reg byte a reg byte y -Statement [47] (byte~) startProcessing::$39 ← (byte) startProcessing::i#2 << (byte) 1 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$39 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$39 ] ) always clobbers reg byte a +Statement [47] (byte~) startProcessing::$30 ← (byte) startProcessing::i#2 << (byte) 1 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$30 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$30 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:69 [ startProcessing::center_x#0 ] Removing always clobbered register reg byte a as potential for zp[1]:70 [ startProcessing::center_y#0 ] Removing always clobbered register reg byte a as potential for zp[1]:7 [ startProcessing::freeIdx#6 startProcessing::freeIdx#7 ] Removing always clobbered register reg byte a as potential for zp[1]:8 [ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ] -Statement [48] (byte~) startProcessing::$40 ← (byte~) startProcessing::$39 + (byte) startProcessing::i#2 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$40 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$40 ] ) always clobbers reg byte a -Statement [49] (byte~) startProcessing::$41 ← (byte~) startProcessing::$40 << (byte) 1 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$41 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$41 ] ) always clobbers reg byte a -Statement [50] (byte~) startProcessing::$42 ← (byte~) startProcessing::$41 + (byte) startProcessing::i#2 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$42 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$42 ] ) always clobbers reg byte a -Statement [51] (byte~) startProcessing::$27 ← (byte~) startProcessing::$42 << (byte) 1 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$27 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$27 ] ) always clobbers reg byte a +Statement [48] (byte~) startProcessing::$31 ← (byte~) startProcessing::$30 + (byte) startProcessing::i#2 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$31 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$31 ] ) always clobbers reg byte a +Statement [49] (byte~) startProcessing::$32 ← (byte~) startProcessing::$31 << (byte) 1 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$32 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$32 ] ) always clobbers reg byte a +Statement [50] (byte~) startProcessing::$33 ← (byte~) startProcessing::$32 + (byte) startProcessing::i#2 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$33 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$33 ] ) always clobbers reg byte a +Statement [51] (byte~) startProcessing::$27 ← (byte~) startProcessing::$33 << (byte) 1 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$27 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$27 ] ) always clobbers reg byte a Statement [52] if(*((byte*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$27)!=(const byte) STATUS_FREE) goto startProcessing::@3 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 ] ) always clobbers reg byte a Statement [55] (word~) startProcessing::$0 ← (word)(byte) startProcessing::center_y#0 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$0 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$0 ] ) always clobbers reg byte a -Statement [56] (word~) startProcessing::$44 ← (word~) startProcessing::$0 << (byte) 2 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$0 startProcessing::$44 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$0 startProcessing::$44 ] ) always clobbers reg byte a -Statement [57] (word~) startProcessing::$45 ← (word~) startProcessing::$44 + (word~) startProcessing::$0 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$45 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$45 ] ) always clobbers reg byte a -Statement [58] (word~) startProcessing::$1 ← (word~) startProcessing::$45 << (byte) 3 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$1 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$1 ] ) always clobbers reg byte a +Statement [56] (word~) startProcessing::$35 ← (word~) startProcessing::$0 << (byte) 2 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$0 startProcessing::$35 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$0 startProcessing::$35 ] ) always clobbers reg byte a +Statement [57] (word~) startProcessing::$36 ← (word~) startProcessing::$35 + (word~) startProcessing::$0 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$36 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$36 ] ) always clobbers reg byte a +Statement [58] (word~) startProcessing::$1 ← (word~) startProcessing::$36 << (byte) 3 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$1 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$1 ] ) always clobbers reg byte a Statement [59] (word) startProcessing::offset#0 ← (word~) startProcessing::$1 + (byte) startProcessing::center_x#0 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::offset#0 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::offset#0 ] ) always clobbers reg byte a Statement [60] (byte*) startProcessing::colPtr#0 ← (const byte*) COLS + (word) startProcessing::offset#0 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::offset#0 startProcessing::colPtr#0 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::offset#0 startProcessing::colPtr#0 ] ) always clobbers reg byte a Statement [61] (byte) startProcessing::spriteCol#0 ← *((byte*) startProcessing::colPtr#0) [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::offset#0 startProcessing::spriteCol#0 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::offset#0 startProcessing::spriteCol#0 ] ) always clobbers reg byte a reg byte y @@ -6908,11 +6865,11 @@ Statement [88] (byte) startProcessing::spritePtr#0 ← (byte)(const byte*) SPRIT Statement [89] (byte~) startProcessing::$20 ← (byte) startProcessing::freeIdx#2 << (byte) 3 [ startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$20 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$20 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:116 [ startProcessing::spritePtr#0 ] Statement [90] (word~) startProcessing::$21 ← (word)(byte~) startProcessing::$20 [ startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 ] ) always clobbers reg byte a -Statement [91] (byte~) startProcessing::$47 ← (byte) startProcessing::freeIdx#2 << (byte) 1 [ startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$47 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$47 ] ) always clobbers reg byte a -Statement [92] (byte~) startProcessing::$48 ← (byte~) startProcessing::$47 + (byte) startProcessing::freeIdx#2 [ startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$48 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$48 ] ) always clobbers reg byte a -Statement [93] (byte~) startProcessing::$49 ← (byte~) startProcessing::$48 << (byte) 1 [ startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$49 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$49 ] ) always clobbers reg byte a -Statement [94] (byte~) startProcessing::$50 ← (byte~) startProcessing::$49 + (byte) startProcessing::freeIdx#2 [ startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$50 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$50 ] ) always clobbers reg byte a -Statement [95] (byte~) startProcessing::$28 ← (byte~) startProcessing::$50 << (byte) 1 [ startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$28 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$28 ] ) always clobbers reg byte a +Statement [91] (byte~) startProcessing::$38 ← (byte) startProcessing::freeIdx#2 << (byte) 1 [ startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$38 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$38 ] ) always clobbers reg byte a +Statement [92] (byte~) startProcessing::$39 ← (byte~) startProcessing::$38 + (byte) startProcessing::freeIdx#2 [ startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$39 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$39 ] ) always clobbers reg byte a +Statement [93] (byte~) startProcessing::$40 ← (byte~) startProcessing::$39 << (byte) 1 [ startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$40 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$40 ] ) always clobbers reg byte a +Statement [94] (byte~) startProcessing::$41 ← (byte~) startProcessing::$40 + (byte) startProcessing::freeIdx#2 [ startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$41 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$41 ] ) always clobbers reg byte a +Statement [95] (byte~) startProcessing::$28 ← (byte~) startProcessing::$41 << (byte) 1 [ startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$28 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$28 ] ) always clobbers reg byte a Statement [96] *((word*)(const struct ProcessingSprite*) PROCESSING + (byte~) startProcessing::$28) ← (word) startProcessing::spriteX#0 [ startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$28 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$28 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:124 [ startProcessing::$28 ] Statement [97] *((word*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) startProcessing::$28) ← (word) startProcessing::spriteY#0 [ startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$28 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$28 ] ) always clobbers reg byte a @@ -7091,16 +7048,16 @@ Statement [20] *((const struct ProcessingSprite*) PROCESSING + (byte~) main::$10 Statement [22] if((byte) main::i#1!=(const byte) NUM_PROCESSING-(byte) 1+(byte) 1) goto main::@3 [ SCREEN_COPY#0 SCREEN_DIST#0 main::i#1 ] ( main:7 [ SCREEN_COPY#0 SCREEN_DIST#0 main::i#1 ] ) always clobbers reg byte a Statement [36] *((const byte*) SCREEN+(word) $3e7) ← (byte) '.' [ ] ( main:7 [ ] ) always clobbers reg byte a Statement [41] *((byte*) main::dst#2) ← *((byte*) main::src#2) [ SCREEN_COPY#0 SCREEN_DIST#0 main::src#2 main::dst#2 ] ( main:7 [ SCREEN_COPY#0 SCREEN_DIST#0 main::src#2 main::dst#2 ] ) always clobbers reg byte a reg byte y -Statement [47] (byte~) startProcessing::$39 ← (byte) startProcessing::i#2 << (byte) 1 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$39 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$39 ] ) always clobbers reg byte a -Statement [48] (byte~) startProcessing::$40 ← (byte~) startProcessing::$39 + (byte) startProcessing::i#2 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$40 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$40 ] ) always clobbers reg byte a -Statement [49] (byte~) startProcessing::$41 ← (byte~) startProcessing::$40 << (byte) 1 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$41 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$41 ] ) always clobbers reg byte a -Statement [50] (byte~) startProcessing::$42 ← (byte~) startProcessing::$41 + (byte) startProcessing::i#2 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$42 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$42 ] ) always clobbers reg byte a -Statement [51] (byte~) startProcessing::$27 ← (byte~) startProcessing::$42 << (byte) 1 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$27 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$27 ] ) always clobbers reg byte a +Statement [47] (byte~) startProcessing::$30 ← (byte) startProcessing::i#2 << (byte) 1 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$30 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$30 ] ) always clobbers reg byte a +Statement [48] (byte~) startProcessing::$31 ← (byte~) startProcessing::$30 + (byte) startProcessing::i#2 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$31 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$31 ] ) always clobbers reg byte a +Statement [49] (byte~) startProcessing::$32 ← (byte~) startProcessing::$31 << (byte) 1 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$32 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$32 ] ) always clobbers reg byte a +Statement [50] (byte~) startProcessing::$33 ← (byte~) startProcessing::$32 + (byte) startProcessing::i#2 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$33 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$33 ] ) always clobbers reg byte a +Statement [51] (byte~) startProcessing::$27 ← (byte~) startProcessing::$33 << (byte) 1 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$27 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$27 ] ) always clobbers reg byte a Statement [52] if(*((byte*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$27)!=(const byte) STATUS_FREE) goto startProcessing::@3 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 ] ) always clobbers reg byte a Statement [55] (word~) startProcessing::$0 ← (word)(byte) startProcessing::center_y#0 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$0 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$0 ] ) always clobbers reg byte a -Statement [56] (word~) startProcessing::$44 ← (word~) startProcessing::$0 << (byte) 2 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$0 startProcessing::$44 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$0 startProcessing::$44 ] ) always clobbers reg byte a -Statement [57] (word~) startProcessing::$45 ← (word~) startProcessing::$44 + (word~) startProcessing::$0 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$45 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$45 ] ) always clobbers reg byte a -Statement [58] (word~) startProcessing::$1 ← (word~) startProcessing::$45 << (byte) 3 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$1 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$1 ] ) always clobbers reg byte a +Statement [56] (word~) startProcessing::$35 ← (word~) startProcessing::$0 << (byte) 2 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$0 startProcessing::$35 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$0 startProcessing::$35 ] ) always clobbers reg byte a +Statement [57] (word~) startProcessing::$36 ← (word~) startProcessing::$35 + (word~) startProcessing::$0 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$36 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$36 ] ) always clobbers reg byte a +Statement [58] (word~) startProcessing::$1 ← (word~) startProcessing::$36 << (byte) 3 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$1 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$1 ] ) always clobbers reg byte a Statement [59] (word) startProcessing::offset#0 ← (word~) startProcessing::$1 + (byte) startProcessing::center_x#0 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::offset#0 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::offset#0 ] ) always clobbers reg byte a Statement [60] (byte*) startProcessing::colPtr#0 ← (const byte*) COLS + (word) startProcessing::offset#0 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::offset#0 startProcessing::colPtr#0 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::offset#0 startProcessing::colPtr#0 ] ) always clobbers reg byte a Statement [61] (byte) startProcessing::spriteCol#0 ← *((byte*) startProcessing::colPtr#0) [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::offset#0 startProcessing::spriteCol#0 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::offset#0 startProcessing::spriteCol#0 ] ) always clobbers reg byte a reg byte y @@ -7127,11 +7084,11 @@ Statement [87] (word) startProcessing::spriteY#0 ← (word~) startProcessing::$1 Statement [88] (byte) startProcessing::spritePtr#0 ← (byte)(const byte*) SPRITE_DATA/(byte) $40 + (byte) startProcessing::freeIdx#2 [ startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 ] ) always clobbers reg byte a Statement [89] (byte~) startProcessing::$20 ← (byte) startProcessing::freeIdx#2 << (byte) 3 [ startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$20 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$20 ] ) always clobbers reg byte a Statement [90] (word~) startProcessing::$21 ← (word)(byte~) startProcessing::$20 [ startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 ] ) always clobbers reg byte a -Statement [91] (byte~) startProcessing::$47 ← (byte) startProcessing::freeIdx#2 << (byte) 1 [ startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$47 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$47 ] ) always clobbers reg byte a -Statement [92] (byte~) startProcessing::$48 ← (byte~) startProcessing::$47 + (byte) startProcessing::freeIdx#2 [ startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$48 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$48 ] ) always clobbers reg byte a -Statement [93] (byte~) startProcessing::$49 ← (byte~) startProcessing::$48 << (byte) 1 [ startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$49 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$49 ] ) always clobbers reg byte a -Statement [94] (byte~) startProcessing::$50 ← (byte~) startProcessing::$49 + (byte) startProcessing::freeIdx#2 [ startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$50 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$50 ] ) always clobbers reg byte a -Statement [95] (byte~) startProcessing::$28 ← (byte~) startProcessing::$50 << (byte) 1 [ startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$28 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$28 ] ) always clobbers reg byte a +Statement [91] (byte~) startProcessing::$38 ← (byte) startProcessing::freeIdx#2 << (byte) 1 [ startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$38 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$38 ] ) always clobbers reg byte a +Statement [92] (byte~) startProcessing::$39 ← (byte~) startProcessing::$38 + (byte) startProcessing::freeIdx#2 [ startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$39 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$39 ] ) always clobbers reg byte a +Statement [93] (byte~) startProcessing::$40 ← (byte~) startProcessing::$39 << (byte) 1 [ startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$40 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$40 ] ) always clobbers reg byte a +Statement [94] (byte~) startProcessing::$41 ← (byte~) startProcessing::$40 + (byte) startProcessing::freeIdx#2 [ startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$41 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$41 ] ) always clobbers reg byte a +Statement [95] (byte~) startProcessing::$28 ← (byte~) startProcessing::$41 << (byte) 1 [ startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$28 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$28 ] ) always clobbers reg byte a Statement [96] *((word*)(const struct ProcessingSprite*) PROCESSING + (byte~) startProcessing::$28) ← (word) startProcessing::spriteX#0 [ startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$28 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$28 ] ) always clobbers reg byte a Statement [97] *((word*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) startProcessing::$28) ← (word) startProcessing::spriteY#0 [ startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$28 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spritePtr#0 startProcessing::$21 startProcessing::$28 ] ) always clobbers reg byte a Statement [98] *((word*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX + (byte~) startProcessing::$28) ← (word~) startProcessing::$21 [ startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spritePtr#0 startProcessing::$28 ] ( main:7::startProcessing:40 [ SCREEN_COPY#0 SCREEN_DIST#0 startProcessing::freeIdx#2 startProcessing::spriteCol#0 startProcessing::screenPtr#0 startProcessing::spritePtr#0 startProcessing::$28 ] ) always clobbers reg byte a @@ -7316,14 +7273,14 @@ Potential registers zp[1]:67 [ main::center_y#0 ] : zp[1]:67 , reg byte a , reg Potential registers zp[1]:68 [ main::center_dist#0 ] : zp[1]:68 , reg byte a , reg byte x , reg byte y , Potential registers zp[1]:69 [ startProcessing::center_x#0 ] : zp[1]:69 , reg byte x , Potential registers zp[1]:70 [ startProcessing::center_y#0 ] : zp[1]:70 , reg byte x , -Potential registers zp[1]:71 [ startProcessing::$39 ] : zp[1]:71 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:72 [ startProcessing::$40 ] : zp[1]:72 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:73 [ startProcessing::$41 ] : zp[1]:73 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:74 [ startProcessing::$42 ] : zp[1]:74 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:71 [ startProcessing::$30 ] : zp[1]:71 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:72 [ startProcessing::$31 ] : zp[1]:72 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:73 [ startProcessing::$32 ] : zp[1]:73 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:74 [ startProcessing::$33 ] : zp[1]:74 , reg byte a , reg byte x , reg byte y , Potential registers zp[1]:75 [ startProcessing::$27 ] : zp[1]:75 , reg byte a , reg byte x , reg byte y , Potential registers zp[2]:76 [ startProcessing::$0 ] : zp[2]:76 , -Potential registers zp[2]:78 [ startProcessing::$44 ] : zp[2]:78 , -Potential registers zp[2]:80 [ startProcessing::$45 ] : zp[2]:80 , +Potential registers zp[2]:78 [ startProcessing::$35 ] : zp[2]:78 , +Potential registers zp[2]:80 [ startProcessing::$36 ] : zp[2]:80 , Potential registers zp[2]:82 [ startProcessing::$1 ] : zp[2]:82 , Potential registers zp[2]:84 [ startProcessing::offset#0 ] : zp[2]:84 , Potential registers zp[2]:86 [ startProcessing::colPtr#0 ] : zp[2]:86 , @@ -7345,10 +7302,10 @@ Potential registers zp[2]:114 [ startProcessing::spriteY#0 ] : zp[2]:114 , Potential registers zp[1]:116 [ startProcessing::spritePtr#0 ] : zp[1]:116 , reg byte x , reg byte y , Potential registers zp[1]:117 [ startProcessing::$20 ] : zp[1]:117 , reg byte a , reg byte x , reg byte y , Potential registers zp[2]:118 [ startProcessing::$21 ] : zp[2]:118 , -Potential registers zp[1]:120 [ startProcessing::$47 ] : zp[1]:120 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:121 [ startProcessing::$48 ] : zp[1]:121 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:122 [ startProcessing::$49 ] : zp[1]:122 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:123 [ startProcessing::$50 ] : zp[1]:123 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:120 [ startProcessing::$38 ] : zp[1]:120 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:121 [ startProcessing::$39 ] : zp[1]:121 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:122 [ startProcessing::$40 ] : zp[1]:122 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:123 [ startProcessing::$41 ] : zp[1]:123 , reg byte a , reg byte x , reg byte y , Potential registers zp[1]:124 [ startProcessing::$28 ] : zp[1]:124 , reg byte x , reg byte y , Potential registers zp[2]:125 [ getCharToProcess::$8 ] : zp[2]:125 , Potential registers zp[2]:127 [ getCharToProcess::$12 ] : zp[2]:127 , @@ -7398,7 +7355,7 @@ Potential registers zp[1]:185 [ processChars::$29 ] : zp[1]:185 , reg byte a , r REGISTER UPLIFT SCOPES Uplift Scope [atan2_16] 28,670.58: zp[1]:43 [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] 20,608: zp[2]:44 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] 17,338.67: zp[2]:46 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] 7,533.33: zp[2]:39 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] 2,698.28: zp[2]:34 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] 2,283.07: zp[2]:36 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] 2,002: zp[1]:156 [ atan2_16::$23 ] 2,002: zp[1]:157 [ atan2_16::$22 ] 1,710.04: zp[1]:38 [ atan2_16::i#2 atan2_16::i#1 ] 202: zp[2]:146 [ atan2_16::return#2 ] 50: zp[2]:41 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] 2.87: zp[2]:142 [ atan2_16::x#0 ] 2.72: zp[2]:144 [ atan2_16::y#0 ] Uplift Scope [getCharToProcess] 4,983.53: zp[1]:23 [ getCharToProcess::return_dist#1 getCharToProcess::return_dist#5 getCharToProcess::return_dist#6 getCharToProcess::dist#0 ] 3,432.25: zp[1]:20 [ getCharToProcess::closest_dist#2 getCharToProcess::closest_dist#8 getCharToProcess::closest_dist#10 getCharToProcess::closest_dist#12 ] 2,937.96: zp[1]:22 [ getCharToProcess::closest_y#7 getCharToProcess::closest_y#9 getCharToProcess::return_y#1 getCharToProcess::return_y#7 ] 1,949.11: zp[1]:21 [ getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 ] 1,557.11: zp[1]:19 [ getCharToProcess::x#2 getCharToProcess::x#1 ] 181.2: zp[1]:18 [ getCharToProcess::y#7 getCharToProcess::y#1 ] 140.57: zp[2]:16 [ getCharToProcess::dist_line#6 getCharToProcess::dist_line#0 getCharToProcess::dist_line#1 ] 135.09: zp[2]:14 [ getCharToProcess::screen_line#4 getCharToProcess::screen_line#0 getCharToProcess::screen_line#1 ] 7.33: zp[1]:63 [ getCharToProcess::return_x#0 ] 7.33: zp[1]:64 [ getCharToProcess::return_y#0 ] 7.33: zp[1]:65 [ getCharToProcess::return_dist#0 ] 4: zp[2]:127 [ getCharToProcess::$12 ] 4: zp[2]:129 [ getCharToProcess::$13 ] 4: zp[2]:131 [ getCharToProcess::$9 ] 4: zp[2]:133 [ getCharToProcess::$10 ] 3: zp[2]:125 [ getCharToProcess::$8 ] -Uplift Scope [startProcessing] 2,589.5: zp[1]:8 [ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ] 2,002: zp[1]:71 [ startProcessing::$39 ] 2,002: zp[1]:72 [ startProcessing::$40 ] 2,002: zp[1]:73 [ startProcessing::$41 ] 2,002: zp[1]:74 [ startProcessing::$42 ] 2,002: zp[1]:75 [ startProcessing::$27 ] 222.2: zp[1]:7 [ startProcessing::freeIdx#6 startProcessing::freeIdx#7 ] 203.57: zp[2]:11 [ startProcessing::spriteData#2 startProcessing::spriteData#0 startProcessing::spriteData#1 ] 202: zp[1]:13 [ startProcessing::i1#2 startProcessing::i1#1 ] 170.33: zp[2]:9 [ startProcessing::chargenData#2 startProcessing::chargenData#0 startProcessing::chargenData#1 ] 4: zp[2]:78 [ startProcessing::$44 ] 4: zp[2]:80 [ startProcessing::$45 ] 4: zp[2]:82 [ startProcessing::$1 ] 4: zp[2]:86 [ startProcessing::colPtr#0 ] 4: zp[2]:91 [ startProcessing::$5 ] 4: zp[2]:93 [ startProcessing::$6 ] 4: zp[2]:96 [ startProcessing::$8 ] 4: zp[2]:98 [ startProcessing::$9 ] 4: zp[2]:100 [ startProcessing::$11 ] 4: zp[2]:102 [ startProcessing::$12 ] 4: zp[2]:104 [ startProcessing::$13 ] 4: zp[2]:108 [ startProcessing::$15 ] 4: zp[2]:110 [ startProcessing::$16 ] 4: zp[2]:112 [ startProcessing::$17 ] 4: zp[1]:120 [ startProcessing::$47 ] 4: zp[1]:121 [ startProcessing::$48 ] 4: zp[1]:122 [ startProcessing::$49 ] 4: zp[1]:123 [ startProcessing::$50 ] 3: zp[2]:76 [ startProcessing::$0 ] 2.22: zp[1]:124 [ startProcessing::$28 ] 2: zp[2]:84 [ startProcessing::offset#0 ] 2: zp[1]:95 [ startProcessing::ch#0 ] 2: zp[1]:117 [ startProcessing::$20 ] 0.5: zp[2]:118 [ startProcessing::$21 ] 0.4: zp[2]:114 [ startProcessing::spriteY#0 ] 0.31: zp[1]:69 [ startProcessing::center_x#0 ] 0.31: zp[2]:106 [ startProcessing::spriteX#0 ] 0.31: zp[1]:116 [ startProcessing::spritePtr#0 ] 0.24: zp[1]:70 [ startProcessing::center_y#0 ] 0.14: zp[2]:89 [ startProcessing::screenPtr#0 ] 0.1: zp[1]:88 [ startProcessing::spriteCol#0 ] +Uplift Scope [startProcessing] 2,589.5: zp[1]:8 [ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ] 2,002: zp[1]:71 [ startProcessing::$30 ] 2,002: zp[1]:72 [ startProcessing::$31 ] 2,002: zp[1]:73 [ startProcessing::$32 ] 2,002: zp[1]:74 [ startProcessing::$33 ] 2,002: zp[1]:75 [ startProcessing::$27 ] 222.2: zp[1]:7 [ startProcessing::freeIdx#6 startProcessing::freeIdx#7 ] 203.57: zp[2]:11 [ startProcessing::spriteData#2 startProcessing::spriteData#0 startProcessing::spriteData#1 ] 202: zp[1]:13 [ startProcessing::i1#2 startProcessing::i1#1 ] 170.33: zp[2]:9 [ startProcessing::chargenData#2 startProcessing::chargenData#0 startProcessing::chargenData#1 ] 4: zp[2]:78 [ startProcessing::$35 ] 4: zp[2]:80 [ startProcessing::$36 ] 4: zp[2]:82 [ startProcessing::$1 ] 4: zp[2]:86 [ startProcessing::colPtr#0 ] 4: zp[2]:91 [ startProcessing::$5 ] 4: zp[2]:93 [ startProcessing::$6 ] 4: zp[2]:96 [ startProcessing::$8 ] 4: zp[2]:98 [ startProcessing::$9 ] 4: zp[2]:100 [ startProcessing::$11 ] 4: zp[2]:102 [ startProcessing::$12 ] 4: zp[2]:104 [ startProcessing::$13 ] 4: zp[2]:108 [ startProcessing::$15 ] 4: zp[2]:110 [ startProcessing::$16 ] 4: zp[2]:112 [ startProcessing::$17 ] 4: zp[1]:120 [ startProcessing::$38 ] 4: zp[1]:121 [ startProcessing::$39 ] 4: zp[1]:122 [ startProcessing::$40 ] 4: zp[1]:123 [ startProcessing::$41 ] 3: zp[2]:76 [ startProcessing::$0 ] 2.22: zp[1]:124 [ startProcessing::$28 ] 2: zp[2]:84 [ startProcessing::offset#0 ] 2: zp[1]:95 [ startProcessing::ch#0 ] 2: zp[1]:117 [ startProcessing::$20 ] 0.5: zp[2]:118 [ startProcessing::$21 ] 0.4: zp[2]:114 [ startProcessing::spriteY#0 ] 0.31: zp[1]:69 [ startProcessing::center_x#0 ] 0.31: zp[2]:106 [ startProcessing::spriteX#0 ] 0.31: zp[1]:116 [ startProcessing::spritePtr#0 ] 0.24: zp[1]:70 [ startProcessing::center_y#0 ] 0.14: zp[2]:89 [ startProcessing::screenPtr#0 ] 0.1: zp[1]:88 [ startProcessing::spriteCol#0 ] Uplift Scope [init_angle_screen] 220.36: zp[1]:33 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] 202: zp[1]:135 [ init_angle_screen::$3 ] 202: zp[1]:136 [ init_angle_screen::$4 ] 202: zp[1]:139 [ init_angle_screen::$7 ] 202: zp[2]:148 [ init_angle_screen::angle_w#0 ] 202: zp[2]:150 [ init_angle_screen::$11 ] 202: zp[1]:153 [ init_angle_screen::$13 ] 202: zp[1]:154 [ init_angle_screen::$14 ] 202: zp[1]:155 [ init_angle_screen::$15 ] 129.86: zp[1]:32 [ init_angle_screen::x#2 init_angle_screen::x#1 ] 84.17: zp[1]:152 [ init_angle_screen::ang_w#0 ] 50.5: zp[2]:140 [ init_angle_screen::yw#0 ] 33.67: zp[2]:137 [ init_angle_screen::xw#0 ] 21.23: zp[1]:27 [ init_angle_screen::y#5 init_angle_screen::y#1 ] 20.37: zp[2]:30 [ init_angle_screen::screen_bottomline#6 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 ] 16.92: zp[2]:28 [ init_angle_screen::screen_topline#6 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 ] 3: zp[2]:56 [ init_angle_screen::screen#0 ] Uplift Scope [processChars] 33.73: zp[1]:51 [ processChars::numActive#10 processChars::numActive#3 processChars::numActive#1 ] 22: zp[1]:160 [ processChars::$62 ] 22: zp[1]:161 [ processChars::$63 ] 22: zp[1]:162 [ processChars::$64 ] 22: zp[1]:163 [ processChars::$65 ] 22: zp[1]:164 [ processChars::$32 ] 22: zp[1]:170 [ processChars::$9 ] 22: zp[1]:171 [ processChars::$10 ] 22: zp[1]:173 [ processChars::$12 ] 22: zp[1]:179 [ processChars::$24 ] 22: zp[1]:180 [ processChars::xchar#0 ] 22: zp[1]:181 [ processChars::$33 ] 22: zp[1]:182 [ processChars::$27 ] 22: zp[1]:183 [ processChars::ychar#0 ] 22: zp[1]:184 [ processChars::$34 ] 22: zp[1]:185 [ processChars::$29 ] 17.9: zp[1]:50 [ processChars::i#10 processChars::i#1 ] 11: zp[2]:174 [ processChars::$13 ] 11: zp[2]:177 [ processChars::$23 ] 6.6: zp[1]:172 [ processChars::$15 ] 2.75: zp[1]:176 [ processChars::ypos#0 ] 2.2: zp[1]:167 [ processChars::bitmask#0 ] 2.06: zp[2]:168 [ processChars::xpos#0 ] 0.31: zp[2]:165 [ processChars::processing#0 ] Uplift Scope [main] 34.75: zp[2]:4 [ main::dst#2 main::dst#0 main::dst#1 ] 25.67: zp[2]:2 [ main::src#2 main::src#1 ] 24.36: zp[1]:6 [ main::i#2 main::i#1 ] 22: zp[1]:58 [ main::$11 ] 22: zp[1]:59 [ main::$12 ] 22: zp[1]:60 [ main::$13 ] 22: zp[1]:61 [ main::$14 ] 22: zp[1]:62 [ main::$10 ] 22: zp[1]:68 [ main::center_dist#0 ] 5.5: zp[1]:66 [ main::center_x#0 ] 5.5: zp[1]:67 [ main::center_y#0 ] @@ -7437,14 +7394,14 @@ Attempting to uplift remaining variables inzp[1]:22 [ getCharToProcess::closest_ Uplifting [getCharToProcess] best 1263819 combination zp[1]:22 [ getCharToProcess::closest_y#7 getCharToProcess::closest_y#9 getCharToProcess::return_y#1 getCharToProcess::return_y#7 ] Attempting to uplift remaining variables inzp[1]:8 [ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ] Uplifting [startProcessing] best 1263819 combination zp[1]:8 [ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ] -Attempting to uplift remaining variables inzp[1]:71 [ startProcessing::$39 ] -Uplifting [startProcessing] best 1257819 combination reg byte a [ startProcessing::$39 ] -Attempting to uplift remaining variables inzp[1]:72 [ startProcessing::$40 ] -Uplifting [startProcessing] best 1251819 combination reg byte a [ startProcessing::$40 ] -Attempting to uplift remaining variables inzp[1]:73 [ startProcessing::$41 ] -Uplifting [startProcessing] best 1245819 combination reg byte a [ startProcessing::$41 ] -Attempting to uplift remaining variables inzp[1]:74 [ startProcessing::$42 ] -Uplifting [startProcessing] best 1239819 combination reg byte a [ startProcessing::$42 ] +Attempting to uplift remaining variables inzp[1]:71 [ startProcessing::$30 ] +Uplifting [startProcessing] best 1257819 combination reg byte a [ startProcessing::$30 ] +Attempting to uplift remaining variables inzp[1]:72 [ startProcessing::$31 ] +Uplifting [startProcessing] best 1251819 combination reg byte a [ startProcessing::$31 ] +Attempting to uplift remaining variables inzp[1]:73 [ startProcessing::$32 ] +Uplifting [startProcessing] best 1245819 combination reg byte a [ startProcessing::$32 ] +Attempting to uplift remaining variables inzp[1]:74 [ startProcessing::$33 ] +Uplifting [startProcessing] best 1239819 combination reg byte a [ startProcessing::$33 ] Attempting to uplift remaining variables inzp[1]:75 [ startProcessing::$27 ] Uplifting [startProcessing] best 1235819 combination reg byte a [ startProcessing::$27 ] Attempting to uplift remaining variables inzp[1]:21 [ getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 ] @@ -7523,14 +7480,14 @@ Attempting to uplift remaining variables inzp[1]:66 [ main::center_x#0 ] Uplifting [main] best 1213209 combination reg byte y [ main::center_x#0 ] Attempting to uplift remaining variables inzp[1]:67 [ main::center_y#0 ] Uplifting [main] best 1213209 combination zp[1]:67 [ main::center_y#0 ] -Attempting to uplift remaining variables inzp[1]:120 [ startProcessing::$47 ] -Uplifting [startProcessing] best 1213203 combination reg byte a [ startProcessing::$47 ] -Attempting to uplift remaining variables inzp[1]:121 [ startProcessing::$48 ] -Uplifting [startProcessing] best 1213197 combination reg byte a [ startProcessing::$48 ] -Attempting to uplift remaining variables inzp[1]:122 [ startProcessing::$49 ] -Uplifting [startProcessing] best 1213191 combination reg byte a [ startProcessing::$49 ] -Attempting to uplift remaining variables inzp[1]:123 [ startProcessing::$50 ] -Uplifting [startProcessing] best 1213185 combination reg byte a [ startProcessing::$50 ] +Attempting to uplift remaining variables inzp[1]:120 [ startProcessing::$38 ] +Uplifting [startProcessing] best 1213203 combination reg byte a [ startProcessing::$38 ] +Attempting to uplift remaining variables inzp[1]:121 [ startProcessing::$39 ] +Uplifting [startProcessing] best 1213197 combination reg byte a [ startProcessing::$39 ] +Attempting to uplift remaining variables inzp[1]:122 [ startProcessing::$40 ] +Uplifting [startProcessing] best 1213191 combination reg byte a [ startProcessing::$40 ] +Attempting to uplift remaining variables inzp[1]:123 [ startProcessing::$41 ] +Uplifting [startProcessing] best 1213185 combination reg byte a [ startProcessing::$41 ] Attempting to uplift remaining variables inzp[1]:176 [ processChars::ypos#0 ] Uplifting [processChars] best 1213185 combination zp[1]:176 [ processChars::ypos#0 ] Attempting to uplift remaining variables inzp[1]:124 [ startProcessing::$28 ] @@ -7555,7 +7512,7 @@ Coalescing zero page register [ zp[2]:30 [ init_angle_screen::screen_bottomline# Coalescing zero page register [ zp[2]:39 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] ] with [ zp[2]:41 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] ] - score: 1 Coalescing zero page register [ zp[2]:54 [ SCREEN_DIST#0 ] ] with [ zp[2]:158 [ malloc::mem#0 ] ] - score: 1 Coalescing zero page register [ zp[1]:67 [ main::center_y#0 ] ] with [ zp[1]:70 [ startProcessing::center_y#0 ] ] - score: 1 -Coalescing zero page register [ zp[2]:76 [ startProcessing::$0 ] ] with [ zp[2]:80 [ startProcessing::$45 ] ] - score: 1 +Coalescing zero page register [ zp[2]:76 [ startProcessing::$0 ] ] with [ zp[2]:80 [ startProcessing::$36 ] ] - score: 1 Coalescing zero page register [ zp[2]:82 [ startProcessing::$1 ] ] with [ zp[2]:84 [ startProcessing::offset#0 ] ] - score: 1 Coalescing zero page register [ zp[2]:100 [ startProcessing::$11 ] ] with [ zp[2]:102 [ startProcessing::$12 ] ] - score: 1 Coalescing zero page register [ zp[2]:104 [ startProcessing::$13 ] ] with [ zp[2]:106 [ startProcessing::spriteX#0 ] ] - score: 1 @@ -7570,12 +7527,12 @@ Coalescing zero page register [ zp[2]:168 [ processChars::xpos#0 ] ] with [ zp[2 Coalescing zero page register [ zp[2]:9 [ startProcessing::chargenData#2 startProcessing::chargenData#0 startProcessing::chargenData#1 startProcessing::$9 ] ] with [ zp[2]:96 [ startProcessing::$8 ] ] - score: 1 Coalescing zero page register [ zp[2]:11 [ startProcessing::spriteData#2 startProcessing::spriteData#0 startProcessing::spriteData#1 startProcessing::$6 ] ] with [ zp[2]:91 [ startProcessing::$5 ] ] - score: 1 Coalescing zero page register [ zp[2]:39 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] ] with [ zp[2]:146 [ atan2_16::return#2 init_angle_screen::angle_w#0 ] ] - score: 1 -Coalescing zero page register [ zp[2]:76 [ startProcessing::$0 startProcessing::$45 ] ] with [ zp[2]:82 [ startProcessing::$1 startProcessing::offset#0 ] ] - score: 1 +Coalescing zero page register [ zp[2]:76 [ startProcessing::$0 startProcessing::$36 ] ] with [ zp[2]:82 [ startProcessing::$1 startProcessing::offset#0 ] ] - score: 1 Coalescing zero page register [ zp[2]:100 [ startProcessing::$11 startProcessing::$12 ] ] with [ zp[2]:104 [ startProcessing::$13 startProcessing::spriteX#0 ] ] - score: 1 Coalescing zero page register [ zp[2]:108 [ startProcessing::$15 startProcessing::$16 ] ] with [ zp[2]:112 [ startProcessing::$17 startProcessing::spriteY#0 ] ] - score: 1 Coalescing zero page register [ zp[2]:125 [ getCharToProcess::$8 getCharToProcess::$13 ] ] with [ zp[2]:131 [ getCharToProcess::$9 getCharToProcess::$10 ] ] - score: 1 Coalescing zero page register [ zp[2]:39 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 ] ] with [ zp[2]:150 [ init_angle_screen::$11 ] ] - score: 1 -Coalescing zero page register [ zp[2]:76 [ startProcessing::$0 startProcessing::$45 startProcessing::$1 startProcessing::offset#0 ] ] with [ zp[2]:89 [ startProcessing::screenPtr#0 ] ] - score: 1 +Coalescing zero page register [ zp[2]:76 [ startProcessing::$0 startProcessing::$36 startProcessing::$1 startProcessing::offset#0 ] ] with [ zp[2]:89 [ startProcessing::screenPtr#0 ] ] - score: 1 Coalescing zero page register [ zp[1]:8 [ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ] ] with [ zp[1]:6 [ main::i#2 main::i#1 ] ] Coalescing zero page register [ zp[2]:9 [ startProcessing::chargenData#2 startProcessing::chargenData#0 startProcessing::chargenData#1 startProcessing::$9 startProcessing::$8 ] ] with [ zp[2]:2 [ main::src#2 main::src#1 ] ] Coalescing zero page register [ zp[2]:11 [ startProcessing::spriteData#2 startProcessing::spriteData#0 startProcessing::spriteData#1 startProcessing::$6 startProcessing::$5 ] ] with [ zp[2]:4 [ main::dst#2 main::dst#0 main::dst#1 ] ] @@ -7586,8 +7543,8 @@ Coalescing zero page register [ zp[1]:32 [ init_angle_screen::x#2 init_angle_scr Coalescing zero page register [ zp[1]:33 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] ] with [ zp[1]:21 [ getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 ] ] Coalescing zero page register [ zp[2]:48 [ heap_head#5 heap_head#1 ] ] with [ zp[2]:30 [ init_angle_screen::screen_bottomline#6 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 init_angle_screen::screen#0 ] ] Coalescing zero page register [ zp[1]:67 [ main::center_y#0 startProcessing::center_y#0 ] ] with [ zp[1]:22 [ getCharToProcess::closest_y#7 getCharToProcess::closest_y#9 getCharToProcess::return_y#1 getCharToProcess::return_y#7 ] ] -Coalescing zero page register [ zp[2]:76 [ startProcessing::$0 startProcessing::$45 startProcessing::$1 startProcessing::offset#0 startProcessing::screenPtr#0 ] ] with [ zp[2]:34 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] ] -Coalescing zero page register [ zp[2]:78 [ startProcessing::$44 ] ] with [ zp[2]:36 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] ] +Coalescing zero page register [ zp[2]:76 [ startProcessing::$0 startProcessing::$36 startProcessing::$1 startProcessing::offset#0 startProcessing::screenPtr#0 ] ] with [ zp[2]:34 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] ] +Coalescing zero page register [ zp[2]:78 [ startProcessing::$35 ] ] with [ zp[2]:36 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] ] Coalescing zero page register [ zp[2]:86 [ startProcessing::colPtr#0 ] ] with [ zp[2]:39 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 init_angle_screen::$11 ] ] Coalescing zero page register [ zp[2]:100 [ startProcessing::$11 startProcessing::$12 startProcessing::$13 startProcessing::spriteX#0 ] ] with [ zp[2]:44 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] ] Coalescing zero page register [ zp[2]:108 [ startProcessing::$15 startProcessing::$16 startProcessing::$17 startProcessing::spriteY#0 ] ] with [ zp[2]:46 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] ] @@ -7608,8 +7565,8 @@ Allocated (was zp[1]:51) zp[1]:6 [ processChars::numActive#10 processChars::numA Allocated (was zp[2]:52) zp[2]:7 [ SCREEN_COPY#0 ] Allocated (was zp[2]:54) zp[2]:9 [ SCREEN_DIST#0 malloc::mem#0 ] Allocated (was zp[1]:67) zp[1]:11 [ main::center_y#0 startProcessing::center_y#0 getCharToProcess::closest_y#7 getCharToProcess::closest_y#9 getCharToProcess::return_y#1 getCharToProcess::return_y#7 ] -Allocated (was zp[2]:76) zp[2]:12 [ startProcessing::$0 startProcessing::$45 startProcessing::$1 startProcessing::offset#0 startProcessing::screenPtr#0 atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] -Allocated (was zp[2]:78) zp[2]:14 [ startProcessing::$44 atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] +Allocated (was zp[2]:76) zp[2]:12 [ startProcessing::$0 startProcessing::$36 startProcessing::$1 startProcessing::offset#0 startProcessing::screenPtr#0 atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] +Allocated (was zp[2]:78) zp[2]:14 [ startProcessing::$35 atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] Allocated (was zp[2]:86) zp[2]:16 [ startProcessing::colPtr#0 atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 init_angle_screen::$11 ] Allocated (was zp[1]:88) zp[1]:18 [ startProcessing::spriteCol#0 init_angle_screen::x#2 init_angle_screen::x#1 getCharToProcess::closest_dist#2 getCharToProcess::closest_dist#8 getCharToProcess::closest_dist#10 getCharToProcess::closest_dist#12 ] Allocated (was zp[2]:100) zp[2]:19 [ startProcessing::$11 startProcessing::$12 startProcessing::$13 startProcessing::spriteX#0 atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] @@ -7955,8 +7912,8 @@ startProcessing: { .label spritePtr = $17 // Busy-wait while finding an empty slot in the PROCESSING array .label freeIdx = 2 - .label __44 = $e - .label __45 = $c + .label __35 = $e + .label __36 = $c // [45] phi from startProcessing to startProcessing::@1 [phi:startProcessing->startProcessing::@1] __b1_from_startProcessing: // [45] phi (byte) startProcessing::freeIdx#6 = (byte) $ff [phi:startProcessing->startProcessing::@1#0] -- vbuxx=vbuc1 @@ -7976,18 +7933,18 @@ startProcessing: { jmp __b2 // startProcessing::@2 __b2: - // [47] (byte~) startProcessing::$39 ← (byte) startProcessing::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + // [47] (byte~) startProcessing::$30 ← (byte) startProcessing::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda.z i asl - // [48] (byte~) startProcessing::$40 ← (byte~) startProcessing::$39 + (byte) startProcessing::i#2 -- vbuaa=vbuaa_plus_vbuz1 + // [48] (byte~) startProcessing::$31 ← (byte~) startProcessing::$30 + (byte) startProcessing::i#2 -- vbuaa=vbuaa_plus_vbuz1 clc adc.z i - // [49] (byte~) startProcessing::$41 ← (byte~) startProcessing::$40 << (byte) 1 -- vbuaa=vbuaa_rol_1 + // [49] (byte~) startProcessing::$32 ← (byte~) startProcessing::$31 << (byte) 1 -- vbuaa=vbuaa_rol_1 asl - // [50] (byte~) startProcessing::$42 ← (byte~) startProcessing::$41 + (byte) startProcessing::i#2 -- vbuaa=vbuaa_plus_vbuz1 + // [50] (byte~) startProcessing::$33 ← (byte~) startProcessing::$32 + (byte) startProcessing::i#2 -- vbuaa=vbuaa_plus_vbuz1 clc adc.z i - // [51] (byte~) startProcessing::$27 ← (byte~) startProcessing::$42 << (byte) 1 -- vbuaa=vbuaa_rol_1 + // [51] (byte~) startProcessing::$27 ← (byte~) startProcessing::$33 << (byte) 1 -- vbuaa=vbuaa_rol_1 asl // [52] if(*((byte*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$27)!=(const byte) STATUS_FREE) goto startProcessing::@3 -- pbuc1_derefidx_vbuaa_neq_vbuc2_then_la1 tay @@ -8013,24 +7970,24 @@ startProcessing: { sta.z __0 lda #0 sta.z __0+1 - // [56] (word~) startProcessing::$44 ← (word~) startProcessing::$0 << (byte) 2 -- vwuz1=vwuz2_rol_2 + // [56] (word~) startProcessing::$35 ← (word~) startProcessing::$0 << (byte) 2 -- vwuz1=vwuz2_rol_2 lda.z __0 asl - sta.z __44 + sta.z __35 lda.z __0+1 rol - sta.z __44+1 - asl.z __44 - rol.z __44+1 - // [57] (word~) startProcessing::$45 ← (word~) startProcessing::$44 + (word~) startProcessing::$0 -- vwuz1=vwuz2_plus_vwuz1 - lda.z __45 + sta.z __35+1 + asl.z __35 + rol.z __35+1 + // [57] (word~) startProcessing::$36 ← (word~) startProcessing::$35 + (word~) startProcessing::$0 -- vwuz1=vwuz2_plus_vwuz1 + lda.z __36 clc - adc.z __44 - sta.z __45 - lda.z __45+1 - adc.z __44+1 - sta.z __45+1 - // [58] (word~) startProcessing::$1 ← (word~) startProcessing::$45 << (byte) 3 -- vwuz1=vwuz1_rol_3 + adc.z __35 + sta.z __36 + lda.z __36+1 + adc.z __35+1 + sta.z __36+1 + // [58] (word~) startProcessing::$1 ← (word~) startProcessing::$36 << (byte) 3 -- vwuz1=vwuz1_rol_3 asl.z __1 rol.z __1+1 asl.z __1 @@ -8235,18 +8192,18 @@ startProcessing: { sta.z __21 lda #0 sta.z __21+1 - // [91] (byte~) startProcessing::$47 ← (byte) startProcessing::freeIdx#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + // [91] (byte~) startProcessing::$38 ← (byte) startProcessing::freeIdx#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda.z freeIdx asl - // [92] (byte~) startProcessing::$48 ← (byte~) startProcessing::$47 + (byte) startProcessing::freeIdx#2 -- vbuaa=vbuaa_plus_vbuz1 + // [92] (byte~) startProcessing::$39 ← (byte~) startProcessing::$38 + (byte) startProcessing::freeIdx#2 -- vbuaa=vbuaa_plus_vbuz1 clc adc.z freeIdx - // [93] (byte~) startProcessing::$49 ← (byte~) startProcessing::$48 << (byte) 1 -- vbuaa=vbuaa_rol_1 + // [93] (byte~) startProcessing::$40 ← (byte~) startProcessing::$39 << (byte) 1 -- vbuaa=vbuaa_rol_1 asl - // [94] (byte~) startProcessing::$50 ← (byte~) startProcessing::$49 + (byte) startProcessing::freeIdx#2 -- vbuaa=vbuaa_plus_vbuz1 + // [94] (byte~) startProcessing::$41 ← (byte~) startProcessing::$40 + (byte) startProcessing::freeIdx#2 -- vbuaa=vbuaa_plus_vbuz1 clc adc.z freeIdx - // [95] (byte~) startProcessing::$28 ← (byte~) startProcessing::$50 << (byte) 1 -- vbuxx=vbuaa_rol_1 + // [95] (byte~) startProcessing::$28 ← (byte~) startProcessing::$41 << (byte) 1 -- vbuxx=vbuaa_rol_1 asl tax // [96] *((word*)(const struct ProcessingSprite*) PROCESSING + (byte~) startProcessing::$28) ← (word) startProcessing::spriteX#0 -- pwuc1_derefidx_vbuxx=vwuz1 @@ -10288,17 +10245,17 @@ interrupt(HARDWARE_ALL)(void()) irqTop() (word~) startProcessing::$21 zp[2]:24 0.5 (byte~) startProcessing::$27 reg byte a 2002.0 (byte~) startProcessing::$28 reg byte x 2.2222222222222228 -(byte~) startProcessing::$39 reg byte a 2002.0 -(byte~) startProcessing::$40 reg byte a 2002.0 -(byte~) startProcessing::$41 reg byte a 2002.0 -(byte~) startProcessing::$42 reg byte a 2002.0 -(word~) startProcessing::$44 zp[2]:14 4.0 -(word~) startProcessing::$45 zp[2]:12 4.0 -(byte~) startProcessing::$47 reg byte a 4.0 -(byte~) startProcessing::$48 reg byte a 4.0 -(byte~) startProcessing::$49 reg byte a 4.0 +(byte~) startProcessing::$30 reg byte a 2002.0 +(byte~) startProcessing::$31 reg byte a 2002.0 +(byte~) startProcessing::$32 reg byte a 2002.0 +(byte~) startProcessing::$33 reg byte a 2002.0 +(word~) startProcessing::$35 zp[2]:14 4.0 +(word~) startProcessing::$36 zp[2]:12 4.0 +(byte~) startProcessing::$38 reg byte a 4.0 +(byte~) startProcessing::$39 reg byte a 4.0 +(byte~) startProcessing::$40 reg byte a 4.0 +(byte~) startProcessing::$41 reg byte a 4.0 (word~) startProcessing::$5 zp[2]:3 4.0 -(byte~) startProcessing::$50 reg byte a 4.0 (word~) startProcessing::$6 zp[2]:3 4.0 (word~) startProcessing::$8 zp[2]:28 4.0 (word~) startProcessing::$9 zp[2]:28 4.0 @@ -10379,13 +10336,13 @@ reg byte x [ getCharToProcess::return_dist#0 ] reg byte y [ main::center_x#0 ] zp[1]:11 [ main::center_y#0 startProcessing::center_y#0 getCharToProcess::closest_y#7 getCharToProcess::closest_y#9 getCharToProcess::return_y#1 getCharToProcess::return_y#7 ] reg byte a [ main::center_dist#0 ] -reg byte a [ startProcessing::$39 ] -reg byte a [ startProcessing::$40 ] -reg byte a [ startProcessing::$41 ] -reg byte a [ startProcessing::$42 ] +reg byte a [ startProcessing::$30 ] +reg byte a [ startProcessing::$31 ] +reg byte a [ startProcessing::$32 ] +reg byte a [ startProcessing::$33 ] reg byte a [ startProcessing::$27 ] -zp[2]:12 [ startProcessing::$0 startProcessing::$45 startProcessing::$1 startProcessing::offset#0 startProcessing::screenPtr#0 atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] -zp[2]:14 [ startProcessing::$44 atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] +zp[2]:12 [ startProcessing::$0 startProcessing::$36 startProcessing::$1 startProcessing::offset#0 startProcessing::screenPtr#0 atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] +zp[2]:14 [ startProcessing::$35 atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] zp[2]:16 [ startProcessing::colPtr#0 atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 init_angle_screen::$11 ] zp[1]:18 [ startProcessing::spriteCol#0 init_angle_screen::x#2 init_angle_screen::x#1 getCharToProcess::closest_dist#2 getCharToProcess::closest_dist#8 getCharToProcess::closest_dist#10 getCharToProcess::closest_dist#12 ] reg byte a [ startProcessing::ch#0 ] @@ -10393,10 +10350,10 @@ zp[2]:19 [ startProcessing::$11 startProcessing::$12 startProcessing::$13 startP zp[2]:21 [ startProcessing::$15 startProcessing::$16 startProcessing::$17 startProcessing::spriteY#0 atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] zp[1]:23 [ startProcessing::spritePtr#0 init_angle_screen::xb#2 init_angle_screen::xb#1 getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 ] reg byte a [ startProcessing::$20 ] -reg byte a [ startProcessing::$47 ] -reg byte a [ startProcessing::$48 ] -reg byte a [ startProcessing::$49 ] -reg byte a [ startProcessing::$50 ] +reg byte a [ startProcessing::$38 ] +reg byte a [ startProcessing::$39 ] +reg byte a [ startProcessing::$40 ] +reg byte a [ startProcessing::$41 ] reg byte x [ startProcessing::$28 ] zp[2]:24 [ getCharToProcess::$8 getCharToProcess::$13 getCharToProcess::$9 getCharToProcess::$10 startProcessing::$21 heap_head#5 heap_head#1 init_angle_screen::screen_bottomline#6 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 init_angle_screen::screen#0 ] reg byte a [ init_angle_screen::$3 ] @@ -10743,8 +10700,8 @@ startProcessing: { .label spritePtr = $17 // Busy-wait while finding an empty slot in the PROCESSING array .label freeIdx = 2 - .label __44 = $e - .label __45 = $c + .label __35 = $e + .label __36 = $c // [45] phi from startProcessing to startProcessing::@1 [phi:startProcessing->startProcessing::@1] // [45] phi (byte) startProcessing::freeIdx#6 = (byte) $ff [phi:startProcessing->startProcessing::@1#0] -- vbuxx=vbuc1 ldx #$ff @@ -10759,18 +10716,18 @@ startProcessing: { // startProcessing::@2 __b2: // PROCESSING[i].status==STATUS_FREE - // [47] (byte~) startProcessing::$39 ← (byte) startProcessing::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + // [47] (byte~) startProcessing::$30 ← (byte) startProcessing::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda.z i asl - // [48] (byte~) startProcessing::$40 ← (byte~) startProcessing::$39 + (byte) startProcessing::i#2 -- vbuaa=vbuaa_plus_vbuz1 + // [48] (byte~) startProcessing::$31 ← (byte~) startProcessing::$30 + (byte) startProcessing::i#2 -- vbuaa=vbuaa_plus_vbuz1 clc adc.z i - // [49] (byte~) startProcessing::$41 ← (byte~) startProcessing::$40 << (byte) 1 -- vbuaa=vbuaa_rol_1 + // [49] (byte~) startProcessing::$32 ← (byte~) startProcessing::$31 << (byte) 1 -- vbuaa=vbuaa_rol_1 asl - // [50] (byte~) startProcessing::$42 ← (byte~) startProcessing::$41 + (byte) startProcessing::i#2 -- vbuaa=vbuaa_plus_vbuz1 + // [50] (byte~) startProcessing::$33 ← (byte~) startProcessing::$32 + (byte) startProcessing::i#2 -- vbuaa=vbuaa_plus_vbuz1 clc adc.z i - // [51] (byte~) startProcessing::$27 ← (byte~) startProcessing::$42 << (byte) 1 -- vbuaa=vbuaa_rol_1 + // [51] (byte~) startProcessing::$27 ← (byte~) startProcessing::$33 << (byte) 1 -- vbuaa=vbuaa_rol_1 asl // if(PROCESSING[i].status==STATUS_FREE) // [52] if(*((byte*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$27)!=(const byte) STATUS_FREE) goto startProcessing::@3 -- pbuc1_derefidx_vbuaa_neq_vbuc2_then_la1 @@ -10799,24 +10756,24 @@ startProcessing: { lda #0 sta.z __0+1 // (word)center.y*40 - // [56] (word~) startProcessing::$44 ← (word~) startProcessing::$0 << (byte) 2 -- vwuz1=vwuz2_rol_2 + // [56] (word~) startProcessing::$35 ← (word~) startProcessing::$0 << (byte) 2 -- vwuz1=vwuz2_rol_2 lda.z __0 asl - sta.z __44 + sta.z __35 lda.z __0+1 rol - sta.z __44+1 - asl.z __44 - rol.z __44+1 - // [57] (word~) startProcessing::$45 ← (word~) startProcessing::$44 + (word~) startProcessing::$0 -- vwuz1=vwuz2_plus_vwuz1 - lda.z __45 + sta.z __35+1 + asl.z __35 + rol.z __35+1 + // [57] (word~) startProcessing::$36 ← (word~) startProcessing::$35 + (word~) startProcessing::$0 -- vwuz1=vwuz2_plus_vwuz1 + lda.z __36 clc - adc.z __44 - sta.z __45 - lda.z __45+1 - adc.z __44+1 - sta.z __45+1 - // [58] (word~) startProcessing::$1 ← (word~) startProcessing::$45 << (byte) 3 -- vwuz1=vwuz1_rol_3 + adc.z __35 + sta.z __36 + lda.z __36+1 + adc.z __35+1 + sta.z __36+1 + // [58] (word~) startProcessing::$1 ← (word~) startProcessing::$36 << (byte) 3 -- vwuz1=vwuz1_rol_3 asl.z __1 rol.z __1+1 asl.z __1 @@ -11044,18 +11001,18 @@ startProcessing: { lda #0 sta.z __21+1 // PROCESSING[spriteIdx] = { spriteX, spriteY, (word)(spriteIdx*8), 60, spriteIdx, spritePtr, spriteCol, STATUS_NEW, screenPtr } - // [91] (byte~) startProcessing::$47 ← (byte) startProcessing::freeIdx#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + // [91] (byte~) startProcessing::$38 ← (byte) startProcessing::freeIdx#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda.z freeIdx asl - // [92] (byte~) startProcessing::$48 ← (byte~) startProcessing::$47 + (byte) startProcessing::freeIdx#2 -- vbuaa=vbuaa_plus_vbuz1 + // [92] (byte~) startProcessing::$39 ← (byte~) startProcessing::$38 + (byte) startProcessing::freeIdx#2 -- vbuaa=vbuaa_plus_vbuz1 clc adc.z freeIdx - // [93] (byte~) startProcessing::$49 ← (byte~) startProcessing::$48 << (byte) 1 -- vbuaa=vbuaa_rol_1 + // [93] (byte~) startProcessing::$40 ← (byte~) startProcessing::$39 << (byte) 1 -- vbuaa=vbuaa_rol_1 asl - // [94] (byte~) startProcessing::$50 ← (byte~) startProcessing::$49 + (byte) startProcessing::freeIdx#2 -- vbuaa=vbuaa_plus_vbuz1 + // [94] (byte~) startProcessing::$41 ← (byte~) startProcessing::$40 + (byte) startProcessing::freeIdx#2 -- vbuaa=vbuaa_plus_vbuz1 clc adc.z freeIdx - // [95] (byte~) startProcessing::$28 ← (byte~) startProcessing::$50 << (byte) 1 -- vbuxx=vbuaa_rol_1 + // [95] (byte~) startProcessing::$28 ← (byte~) startProcessing::$41 << (byte) 1 -- vbuxx=vbuaa_rol_1 asl tax // [96] *((word*)(const struct ProcessingSprite*) PROCESSING + (byte~) startProcessing::$28) ← (word) startProcessing::spriteX#0 -- pwuc1_derefidx_vbuxx=vwuz1 diff --git a/src/test/ref/complex/clearscreen/clearscreen.sym b/src/test/ref/complex/clearscreen/clearscreen.sym index 2ec859c0a..8cf7fa98f 100644 --- a/src/test/ref/complex/clearscreen/clearscreen.sym +++ b/src/test/ref/complex/clearscreen/clearscreen.sym @@ -404,17 +404,17 @@ interrupt(HARDWARE_ALL)(void()) irqTop() (word~) startProcessing::$21 zp[2]:24 0.5 (byte~) startProcessing::$27 reg byte a 2002.0 (byte~) startProcessing::$28 reg byte x 2.2222222222222228 -(byte~) startProcessing::$39 reg byte a 2002.0 -(byte~) startProcessing::$40 reg byte a 2002.0 -(byte~) startProcessing::$41 reg byte a 2002.0 -(byte~) startProcessing::$42 reg byte a 2002.0 -(word~) startProcessing::$44 zp[2]:14 4.0 -(word~) startProcessing::$45 zp[2]:12 4.0 -(byte~) startProcessing::$47 reg byte a 4.0 -(byte~) startProcessing::$48 reg byte a 4.0 -(byte~) startProcessing::$49 reg byte a 4.0 +(byte~) startProcessing::$30 reg byte a 2002.0 +(byte~) startProcessing::$31 reg byte a 2002.0 +(byte~) startProcessing::$32 reg byte a 2002.0 +(byte~) startProcessing::$33 reg byte a 2002.0 +(word~) startProcessing::$35 zp[2]:14 4.0 +(word~) startProcessing::$36 zp[2]:12 4.0 +(byte~) startProcessing::$38 reg byte a 4.0 +(byte~) startProcessing::$39 reg byte a 4.0 +(byte~) startProcessing::$40 reg byte a 4.0 +(byte~) startProcessing::$41 reg byte a 4.0 (word~) startProcessing::$5 zp[2]:3 4.0 -(byte~) startProcessing::$50 reg byte a 4.0 (word~) startProcessing::$6 zp[2]:3 4.0 (word~) startProcessing::$8 zp[2]:28 4.0 (word~) startProcessing::$9 zp[2]:28 4.0 @@ -495,13 +495,13 @@ reg byte x [ getCharToProcess::return_dist#0 ] reg byte y [ main::center_x#0 ] zp[1]:11 [ main::center_y#0 startProcessing::center_y#0 getCharToProcess::closest_y#7 getCharToProcess::closest_y#9 getCharToProcess::return_y#1 getCharToProcess::return_y#7 ] reg byte a [ main::center_dist#0 ] -reg byte a [ startProcessing::$39 ] -reg byte a [ startProcessing::$40 ] -reg byte a [ startProcessing::$41 ] -reg byte a [ startProcessing::$42 ] +reg byte a [ startProcessing::$30 ] +reg byte a [ startProcessing::$31 ] +reg byte a [ startProcessing::$32 ] +reg byte a [ startProcessing::$33 ] reg byte a [ startProcessing::$27 ] -zp[2]:12 [ startProcessing::$0 startProcessing::$45 startProcessing::$1 startProcessing::offset#0 startProcessing::screenPtr#0 atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] -zp[2]:14 [ startProcessing::$44 atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] +zp[2]:12 [ startProcessing::$0 startProcessing::$36 startProcessing::$1 startProcessing::offset#0 startProcessing::screenPtr#0 atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] +zp[2]:14 [ startProcessing::$35 atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] zp[2]:16 [ startProcessing::colPtr#0 atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 init_angle_screen::$11 ] zp[1]:18 [ startProcessing::spriteCol#0 init_angle_screen::x#2 init_angle_screen::x#1 getCharToProcess::closest_dist#2 getCharToProcess::closest_dist#8 getCharToProcess::closest_dist#10 getCharToProcess::closest_dist#12 ] reg byte a [ startProcessing::ch#0 ] @@ -509,10 +509,10 @@ zp[2]:19 [ startProcessing::$11 startProcessing::$12 startProcessing::$13 startP zp[2]:21 [ startProcessing::$15 startProcessing::$16 startProcessing::$17 startProcessing::spriteY#0 atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] zp[1]:23 [ startProcessing::spritePtr#0 init_angle_screen::xb#2 init_angle_screen::xb#1 getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 ] reg byte a [ startProcessing::$20 ] -reg byte a [ startProcessing::$47 ] -reg byte a [ startProcessing::$48 ] -reg byte a [ startProcessing::$49 ] -reg byte a [ startProcessing::$50 ] +reg byte a [ startProcessing::$38 ] +reg byte a [ startProcessing::$39 ] +reg byte a [ startProcessing::$40 ] +reg byte a [ startProcessing::$41 ] reg byte x [ startProcessing::$28 ] zp[2]:24 [ getCharToProcess::$8 getCharToProcess::$13 getCharToProcess::$9 getCharToProcess::$10 startProcessing::$21 heap_head#5 heap_head#1 init_angle_screen::screen_bottomline#6 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 init_angle_screen::screen#0 ] reg byte a [ init_angle_screen::$3 ] diff --git a/src/test/ref/complex/splines/truetype-splines.cfg b/src/test/ref/complex/splines/truetype-splines.cfg index e6ff0b4d1..692c73505 100644 --- a/src/test/ref/complex/splines/truetype-splines.cfg +++ b/src/test/ref/complex/splines/truetype-splines.cfg @@ -71,8 +71,8 @@ show_letter::@1: scope:[show_letter] from show_letter show_letter::@9 [28] (signed word) show_letter::current_y#4 ← phi( show_letter/(signed word) 0 show_letter::@9/(signed word) show_letter::current_y#11 ) [28] (signed word) show_letter::current_x#4 ← phi( show_letter/(signed word) 0 show_letter::@9/(signed word) show_letter::current_x#11 ) [28] (byte) show_letter::i#10 ← phi( show_letter/(byte) 0 show_letter::@9/(byte) show_letter::i#1 ) - [29] (byte~) show_letter::$24 ← (byte) show_letter::i#10 << (byte) 3 - [30] (byte~) show_letter::$20 ← (byte~) show_letter::$24 + (byte) show_letter::i#10 + [29] (byte~) show_letter::$23 ← (byte) show_letter::i#10 << (byte) 3 + [30] (byte~) show_letter::$20 ← (byte~) show_letter::$23 + (byte) show_letter::i#10 [31] (signed word) show_letter::to_x#0 ← *((signed word*)(struct SplineVector16*)(const struct Segment*) letter_c+(const byte) OFFSET_STRUCT_SEGMENT_TO + (byte~) show_letter::$20) [32] (signed word) show_letter::to_y#0 ← *((signed word*)(struct SplineVector16*)(const struct Segment*) letter_c+(const byte) OFFSET_STRUCT_SEGMENT_TO+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y + (byte~) show_letter::$20) [33] (signed word) show_letter::to_x#1 ← (signed word) show_letter::to_x#0 - (signed byte) $32 @@ -89,8 +89,8 @@ show_letter::@6: scope:[show_letter] from show_letter::@1 [42] (signed word) show_letter::to_y#2 ← (signed word) rotate::return_y#0 [43] (signed word) show_letter::current_x#10 ← (signed word) show_letter::to_x#2 + (signed byte) $64 [44] (signed word) show_letter::current_y#10 ← (signed word) show_letter::to_y#2 + (signed byte) $64 - [45] (byte~) show_letter::$26 ← (byte) show_letter::i#10 << (byte) 3 - [46] (byte~) show_letter::$21 ← (byte~) show_letter::$26 + (byte) show_letter::i#10 + [45] (byte~) show_letter::$25 ← (byte) show_letter::i#10 << (byte) 3 + [46] (byte~) show_letter::$21 ← (byte~) show_letter::$25 + (byte) show_letter::i#10 [47] (signed word) show_letter::via_x#0 ← *((signed word*)(struct SplineVector16*)(const struct Segment*) letter_c+(const byte) OFFSET_STRUCT_SEGMENT_VIA + (byte~) show_letter::$21) [48] (signed word) show_letter::via_y#0 ← *((signed word*)(struct SplineVector16*)(const struct Segment*) letter_c+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y + (byte~) show_letter::$21) [49] (signed word) show_letter::via_x#1 ← (signed word) show_letter::via_x#0 - (signed byte) $32 @@ -107,8 +107,8 @@ show_letter::@7: scope:[show_letter] from show_letter::@6 [58] (signed word) show_letter::via_y#2 ← (signed word) rotate::return_y#1 [59] (signed word) show_letter::segment_via_x#0 ← (signed word) show_letter::via_x#2 + (signed byte) $64 [60] (signed word) show_letter::segment_via_y#0 ← (signed word) show_letter::via_y#2 + (signed byte) $64 - [61] (byte~) show_letter::$28 ← (byte) show_letter::i#10 << (byte) 3 - [62] (byte~) show_letter::$22 ← (byte~) show_letter::$28 + (byte) show_letter::i#10 + [61] (byte~) show_letter::$27 ← (byte) show_letter::i#10 << (byte) 3 + [62] (byte~) show_letter::$22 ← (byte~) show_letter::$27 + (byte) show_letter::i#10 [63] (byte) show_letter::segment_type#0 ← *((byte*)(const struct Segment*) letter_c + (byte~) show_letter::$22) [64] if((byte) show_letter::segment_type#0==(const byte) MOVE_TO) goto show_letter::@3 to:show_letter::@4 diff --git a/src/test/ref/complex/splines/truetype-splines.log b/src/test/ref/complex/splines/truetype-splines.log index 23124a10e..20fd03762 100644 --- a/src/test/ref/complex/splines/truetype-splines.log +++ b/src/test/ref/complex/splines/truetype-splines.log @@ -145,90 +145,126 @@ Converted procedure struct value parameter to member unwinding (void()) spline_1 Converted procedure struct value parameter to member unwinding (void()) spline_8seg((signed word) spline_8seg::p0_x , (signed word) spline_8seg::p0_y , (signed word) spline_8seg::p1_x , (signed word) spline_8seg::p1_y , (signed word) spline_8seg::p2_x , (signed word) spline_8seg::p2_y) Converted procedure struct value parameter to member unwinding (void()) spline_8segB((signed word) spline_8segB::p0_x , (signed word) spline_8segB::p0_y , (signed word) spline_8segB::p1_x , (signed word) spline_8segB::p1_y , (signed word) spline_8segB::p2_x , (signed word) spline_8segB::p2_y) Converted procedure struct value parameter to member unwinding (struct SplineVector16()) rotate((signed word) rotate::vector_x , (signed word) rotate::vector_y , (byte) rotate::angle) -Adding struct value member variable copy (signed word) spline_16seg::a_x ← (number~) spline_16seg::$2 -Adding struct value member variable copy (signed word) spline_16seg::a_y ← (number~) spline_16seg::$5 -Adding struct value member variable copy (signed word) spline_16seg::b_x ← (number~) spline_16seg::$7 -Adding struct value member variable copy (signed word) spline_16seg::b_y ← (number~) spline_16seg::$9 -Adding struct value member variable copy (signed dword) spline_16seg::i_x ← (number~) spline_16seg::$15 -Adding struct value member variable copy (signed dword) spline_16seg::i_y ← (number~) spline_16seg::$21 -Adding struct value member variable copy (signed dword) spline_16seg::j_x ← (number~) spline_16seg::$24 -Adding struct value member variable copy (signed dword) spline_16seg::j_y ← (number~) spline_16seg::$27 -Adding struct value member variable copy (signed dword) spline_16seg::p_x ← (number~) spline_16seg::$29 -Adding struct value member variable copy (signed dword) spline_16seg::p_y ← (number~) spline_16seg::$31 -Adding struct value member variable copy *((signed word*~) spline_16seg::$51 + (byte~) spline_16seg::$49) ← (signed word~) spline_16seg::$40 -Adding struct value member variable copy *((signed word*~) spline_16seg::$52 + (byte~) spline_16seg::$49) ← (signed word~) spline_16seg::$43 -Adding struct value member variable copy (signed dword) spline_16seg::p_x ← (signed dword~) spline_16seg::$44 -Adding struct value member variable copy (signed dword) spline_16seg::p_y ← (signed dword~) spline_16seg::$45 -Adding struct value member variable copy (signed dword) spline_16seg::i_x ← (signed dword~) spline_16seg::$46 -Adding struct value member variable copy (signed dword) spline_16seg::i_y ← (signed dword~) spline_16seg::$47 -Adding struct value member variable copy *((signed word*~) spline_16seg::$53 + (number~) spline_16seg::$50) ← (signed word~) spline_16seg::$34 -Adding struct value member variable copy *((signed word*~) spline_16seg::$54 + (number~) spline_16seg::$50) ← (signed word~) spline_16seg::$37 -Adding struct value member variable copy (signed word) spline_8seg::a_x ← (number~) spline_8seg::$2 -Adding struct value member variable copy (signed word) spline_8seg::a_y ← (number~) spline_8seg::$5 -Adding struct value member variable copy (signed word) spline_8seg::b_x ← (number~) spline_8seg::$7 -Adding struct value member variable copy (signed word) spline_8seg::b_y ← (number~) spline_8seg::$9 -Adding struct value member variable copy (signed dword) spline_8seg::i_x ← (number~) spline_8seg::$16 -Adding struct value member variable copy (signed dword) spline_8seg::i_y ← (number~) spline_8seg::$23 -Adding struct value member variable copy (signed dword) spline_8seg::j_x ← (number~) spline_8seg::$26 -Adding struct value member variable copy (signed dword) spline_8seg::j_y ← (number~) spline_8seg::$29 -Adding struct value member variable copy (signed dword) spline_8seg::p_x ← (number~) spline_8seg::$31 -Adding struct value member variable copy (signed dword) spline_8seg::p_y ← (number~) spline_8seg::$33 -Adding struct value member variable copy *((signed word*~) spline_8seg::$53 + (byte~) spline_8seg::$51) ← (signed word~) spline_8seg::$42 -Adding struct value member variable copy *((signed word*~) spline_8seg::$54 + (byte~) spline_8seg::$51) ← (signed word~) spline_8seg::$45 -Adding struct value member variable copy (signed dword) spline_8seg::p_x ← (signed dword~) spline_8seg::$46 -Adding struct value member variable copy (signed dword) spline_8seg::p_y ← (signed dword~) spline_8seg::$47 -Adding struct value member variable copy (signed dword) spline_8seg::i_x ← (signed dword~) spline_8seg::$48 -Adding struct value member variable copy (signed dword) spline_8seg::i_y ← (signed dword~) spline_8seg::$49 -Adding struct value member variable copy *((signed word*~) spline_8seg::$55 + (number~) spline_8seg::$52) ← (signed word~) spline_8seg::$36 -Adding struct value member variable copy *((signed word*~) spline_8seg::$56 + (number~) spline_8seg::$52) ← (signed word~) spline_8seg::$39 -Adding struct value member variable copy (signed word) spline_8segB::a_x ← (number~) spline_8segB::$2 -Adding struct value member variable copy (signed word) spline_8segB::a_y ← (number~) spline_8segB::$5 -Adding struct value member variable copy (signed word) spline_8segB::b_x ← (number~) spline_8segB::$7 -Adding struct value member variable copy (signed word) spline_8segB::b_y ← (number~) spline_8segB::$9 -Adding struct value member variable copy (signed word) spline_8segB::i_x ← (number~) spline_8segB::$11 -Adding struct value member variable copy (signed word) spline_8segB::i_y ← (number~) spline_8segB::$13 -Adding struct value member variable copy (signed word) spline_8segB::j_x ← (number~) spline_8segB::$14 -Adding struct value member variable copy (signed word) spline_8segB::j_y ← (number~) spline_8segB::$15 -Adding struct value member variable copy (signed word) spline_8segB::p_x ← (number~) spline_8segB::$16 -Adding struct value member variable copy (signed word) spline_8segB::p_y ← (number~) spline_8segB::$17 -Adding struct value member variable copy *((signed word*~) spline_8segB::$33 + (byte~) spline_8segB::$31) ← (signed word)(number~) spline_8segB::$23 -Adding struct value member variable copy *((signed word*~) spline_8segB::$34 + (byte~) spline_8segB::$31) ← (signed word)(number~) spline_8segB::$25 -Adding struct value member variable copy (signed word) spline_8segB::p_x ← (signed word~) spline_8segB::$26 -Adding struct value member variable copy (signed word) spline_8segB::p_y ← (signed word~) spline_8segB::$27 -Adding struct value member variable copy (signed word) spline_8segB::i_x ← (signed word~) spline_8segB::$28 -Adding struct value member variable copy (signed word) spline_8segB::i_y ← (signed word~) spline_8segB::$29 -Adding struct value member variable copy *((signed word*~) spline_8segB::$35 + (number~) spline_8segB::$32) ← (signed word)(number~) spline_8segB::$19 -Adding struct value member variable copy *((signed word*~) spline_8segB::$36 + (number~) spline_8segB::$32) ← (signed word)(number~) spline_8segB::$21 +Unwinding value copy (struct SplineVector16) spline_16seg::a ← (struct SplineVector16){ (number~) spline_16seg::$2, (number~) spline_16seg::$5 } +Adding value simple copy (signed word) spline_16seg::a_x ← (number~) spline_16seg::$2 +Adding value simple copy (signed word) spline_16seg::a_y ← (number~) spline_16seg::$5 +Unwinding value copy (struct SplineVector16) spline_16seg::b ← (struct SplineVector16){ (number~) spline_16seg::$7, (number~) spline_16seg::$9 } +Adding value simple copy (signed word) spline_16seg::b_x ← (number~) spline_16seg::$7 +Adding value simple copy (signed word) spline_16seg::b_y ← (number~) spline_16seg::$9 +Unwinding value copy (struct SplineVector32) spline_16seg::i ← (struct SplineVector32){ (number~) spline_16seg::$15, (number~) spline_16seg::$21 } +Adding value simple copy (signed dword) spline_16seg::i_x ← (number~) spline_16seg::$15 +Adding value simple copy (signed dword) spline_16seg::i_y ← (number~) spline_16seg::$21 +Unwinding value copy (struct SplineVector32) spline_16seg::j ← (struct SplineVector32){ (number~) spline_16seg::$24, (number~) spline_16seg::$27 } +Adding value simple copy (signed dword) spline_16seg::j_x ← (number~) spline_16seg::$24 +Adding value simple copy (signed dword) spline_16seg::j_y ← (number~) spline_16seg::$27 +Unwinding value copy (struct SplineVector32) spline_16seg::p ← (struct SplineVector32){ (number~) spline_16seg::$29, (number~) spline_16seg::$31 } +Adding value simple copy (signed dword) spline_16seg::p_x ← (number~) spline_16seg::$29 +Adding value simple copy (signed dword) spline_16seg::p_y ← (number~) spline_16seg::$31 +Unwinding value copy *((const struct SplineVector16*) SPLINE_16SEG + (byte~) spline_16seg::$49) ← (struct SplineVector16){ (signed word~) spline_16seg::$40, (signed word~) spline_16seg::$43 } +Adding value simple copy *((signed word*)(const struct SplineVector16*) SPLINE_16SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_X + (byte~) spline_16seg::$49) ← (signed word~) spline_16seg::$40 +Adding value simple copy *((signed word*)(const struct SplineVector16*) SPLINE_16SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y + (byte~) spline_16seg::$49) ← (signed word~) spline_16seg::$43 +Unwinding value copy (struct SplineVector32) spline_16seg::p ← (struct SplineVector32){ (signed dword~) spline_16seg::$44, (signed dword~) spline_16seg::$45 } +Adding value simple copy (signed dword) spline_16seg::p_x ← (signed dword~) spline_16seg::$44 +Adding value simple copy (signed dword) spline_16seg::p_y ← (signed dword~) spline_16seg::$45 +Unwinding value copy (struct SplineVector32) spline_16seg::i ← (struct SplineVector32){ (signed dword~) spline_16seg::$46, (signed dword~) spline_16seg::$47 } +Adding value simple copy (signed dword) spline_16seg::i_x ← (signed dword~) spline_16seg::$46 +Adding value simple copy (signed dword) spline_16seg::i_y ← (signed dword~) spline_16seg::$47 +Unwinding value copy *((const struct SplineVector16*) SPLINE_16SEG + (number~) spline_16seg::$50) ← (struct SplineVector16){ (signed word~) spline_16seg::$34, (signed word~) spline_16seg::$37 } +Adding value simple copy *((signed word*)(const struct SplineVector16*) SPLINE_16SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_X + (number~) spline_16seg::$50) ← (signed word~) spline_16seg::$34 +Adding value simple copy *((signed word*)(const struct SplineVector16*) SPLINE_16SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y + (number~) spline_16seg::$50) ← (signed word~) spline_16seg::$37 +Unwinding value copy (struct SplineVector16) spline_8seg::a ← (struct SplineVector16){ (number~) spline_8seg::$2, (number~) spline_8seg::$5 } +Adding value simple copy (signed word) spline_8seg::a_x ← (number~) spline_8seg::$2 +Adding value simple copy (signed word) spline_8seg::a_y ← (number~) spline_8seg::$5 +Unwinding value copy (struct SplineVector16) spline_8seg::b ← (struct SplineVector16){ (number~) spline_8seg::$7, (number~) spline_8seg::$9 } +Adding value simple copy (signed word) spline_8seg::b_x ← (number~) spline_8seg::$7 +Adding value simple copy (signed word) spline_8seg::b_y ← (number~) spline_8seg::$9 +Unwinding value copy (struct SplineVector32) spline_8seg::i ← (struct SplineVector32){ (number~) spline_8seg::$16, (number~) spline_8seg::$23 } +Adding value simple copy (signed dword) spline_8seg::i_x ← (number~) spline_8seg::$16 +Adding value simple copy (signed dword) spline_8seg::i_y ← (number~) spline_8seg::$23 +Unwinding value copy (struct SplineVector32) spline_8seg::j ← (struct SplineVector32){ (number~) spline_8seg::$26, (number~) spline_8seg::$29 } +Adding value simple copy (signed dword) spline_8seg::j_x ← (number~) spline_8seg::$26 +Adding value simple copy (signed dword) spline_8seg::j_y ← (number~) spline_8seg::$29 +Unwinding value copy (struct SplineVector32) spline_8seg::p ← (struct SplineVector32){ (number~) spline_8seg::$31, (number~) spline_8seg::$33 } +Adding value simple copy (signed dword) spline_8seg::p_x ← (number~) spline_8seg::$31 +Adding value simple copy (signed dword) spline_8seg::p_y ← (number~) spline_8seg::$33 +Unwinding value copy *((const struct SplineVector16*) SPLINE_8SEG + (byte~) spline_8seg::$51) ← (struct SplineVector16){ (signed word~) spline_8seg::$42, (signed word~) spline_8seg::$45 } +Adding value simple copy *((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_X + (byte~) spline_8seg::$51) ← (signed word~) spline_8seg::$42 +Adding value simple copy *((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y + (byte~) spline_8seg::$51) ← (signed word~) spline_8seg::$45 +Unwinding value copy (struct SplineVector32) spline_8seg::p ← (struct SplineVector32){ (signed dword~) spline_8seg::$46, (signed dword~) spline_8seg::$47 } +Adding value simple copy (signed dword) spline_8seg::p_x ← (signed dword~) spline_8seg::$46 +Adding value simple copy (signed dword) spline_8seg::p_y ← (signed dword~) spline_8seg::$47 +Unwinding value copy (struct SplineVector32) spline_8seg::i ← (struct SplineVector32){ (signed dword~) spline_8seg::$48, (signed dword~) spline_8seg::$49 } +Adding value simple copy (signed dword) spline_8seg::i_x ← (signed dword~) spline_8seg::$48 +Adding value simple copy (signed dword) spline_8seg::i_y ← (signed dword~) spline_8seg::$49 +Unwinding value copy *((const struct SplineVector16*) SPLINE_8SEG + (number~) spline_8seg::$52) ← (struct SplineVector16){ (signed word~) spline_8seg::$36, (signed word~) spline_8seg::$39 } +Adding value simple copy *((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_X + (number~) spline_8seg::$52) ← (signed word~) spline_8seg::$36 +Adding value simple copy *((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y + (number~) spline_8seg::$52) ← (signed word~) spline_8seg::$39 +Unwinding value copy (struct SplineVector16) spline_8segB::a ← (struct SplineVector16){ (number~) spline_8segB::$2, (number~) spline_8segB::$5 } +Adding value simple copy (signed word) spline_8segB::a_x ← (number~) spline_8segB::$2 +Adding value simple copy (signed word) spline_8segB::a_y ← (number~) spline_8segB::$5 +Unwinding value copy (struct SplineVector16) spline_8segB::b ← (struct SplineVector16){ (number~) spline_8segB::$7, (number~) spline_8segB::$9 } +Adding value simple copy (signed word) spline_8segB::b_x ← (number~) spline_8segB::$7 +Adding value simple copy (signed word) spline_8segB::b_y ← (number~) spline_8segB::$9 +Unwinding value copy (struct SplineVector16) spline_8segB::i ← (struct SplineVector16){ (number~) spline_8segB::$11, (number~) spline_8segB::$13 } +Adding value simple copy (signed word) spline_8segB::i_x ← (number~) spline_8segB::$11 +Adding value simple copy (signed word) spline_8segB::i_y ← (number~) spline_8segB::$13 +Unwinding value copy (struct SplineVector16) spline_8segB::j ← (struct SplineVector16){ (number~) spline_8segB::$14, (number~) spline_8segB::$15 } +Adding value simple copy (signed word) spline_8segB::j_x ← (number~) spline_8segB::$14 +Adding value simple copy (signed word) spline_8segB::j_y ← (number~) spline_8segB::$15 +Unwinding value copy (struct SplineVector16) spline_8segB::p ← (struct SplineVector16){ (number~) spline_8segB::$16, (number~) spline_8segB::$17 } +Adding value simple copy (signed word) spline_8segB::p_x ← (number~) spline_8segB::$16 +Adding value simple copy (signed word) spline_8segB::p_y ← (number~) spline_8segB::$17 +Unwinding value copy *((const struct SplineVector16*) SPLINE_8SEG + (byte~) spline_8segB::$31) ← (struct SplineVector16){ (signed word)(number~) spline_8segB::$23, (signed word)(number~) spline_8segB::$25 } +Adding value simple copy *((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_X + (byte~) spline_8segB::$31) ← (number~) spline_8segB::$23 +Adding value simple copy *((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y + (byte~) spline_8segB::$31) ← (number~) spline_8segB::$25 +Unwinding value copy (struct SplineVector16) spline_8segB::p ← (struct SplineVector16){ (signed word~) spline_8segB::$26, (signed word~) spline_8segB::$27 } +Adding value simple copy (signed word) spline_8segB::p_x ← (signed word~) spline_8segB::$26 +Adding value simple copy (signed word) spline_8segB::p_y ← (signed word~) spline_8segB::$27 +Unwinding value copy (struct SplineVector16) spline_8segB::i ← (struct SplineVector16){ (signed word~) spline_8segB::$28, (signed word~) spline_8segB::$29 } +Adding value simple copy (signed word) spline_8segB::i_x ← (signed word~) spline_8segB::$28 +Adding value simple copy (signed word) spline_8segB::i_y ← (signed word~) spline_8segB::$29 +Unwinding value copy *((const struct SplineVector16*) SPLINE_8SEG + (number~) spline_8segB::$32) ← (struct SplineVector16){ (signed word)(number~) spline_8segB::$19, (signed word)(number~) spline_8segB::$21 } +Adding value simple copy *((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_X + (number~) spline_8segB::$32) ← (number~) spline_8segB::$19 +Adding value simple copy *((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y + (number~) spline_8segB::$32) ← (number~) spline_8segB::$21 Unwinding value copy (struct SplineVector16) show_letter::current ← { x: (signed word) 0, y: (signed word) 0 } Adding value simple copy (signed word) show_letter::current_x ← (signed word) 0 Adding value simple copy (signed word) show_letter::current_y ← (signed word) 0 Unwinding value copy (struct SplineVector16) show_letter::to ← *((const struct Segment*) letter_c + (byte~) show_letter::$20).to Adding value simple copy (signed word) show_letter::to_x ← *((signed word*)(struct SplineVector16*)(const struct Segment*) letter_c+(const byte) OFFSET_STRUCT_SEGMENT_TO+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_X + (byte~) show_letter::$20) Adding value simple copy (signed word) show_letter::to_y ← *((signed word*)(struct SplineVector16*)(const struct Segment*) letter_c+(const byte) OFFSET_STRUCT_SEGMENT_TO+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y + (byte~) show_letter::$20) -Adding struct value member variable copy (signed word) show_letter::to_x ← (signed word)(number~) show_letter::$0 -Adding struct value member variable copy (signed word) show_letter::to_y ← (signed word)(number~) show_letter::$1 +Unwinding value copy (struct SplineVector16) show_letter::to ← (struct SplineVector16){ (signed word)(number~) show_letter::$0, (signed word)(number~) show_letter::$1 } +Adding value simple copy (signed word) show_letter::to_x ← (number~) show_letter::$0 +Adding value simple copy (signed word) show_letter::to_y ← (number~) show_letter::$1 Converted procedure call LValue to member unwinding { (signed word~) show_letter::$2_x, (signed word~) show_letter::$2_y } ← call rotate (struct SplineVector16) show_letter::to (byte) show_letter::angle Converted procedure struct value parameter to member unwinding in call { (signed word~) show_letter::$2_x, (signed word~) show_letter::$2_y } ← call rotate (signed word) show_letter::to_x (signed word) show_letter::to_y (byte) show_letter::angle Unwinding value copy (struct SplineVector16) show_letter::to ← (struct SplineVector16~) show_letter::$2 Adding value simple copy (signed word) show_letter::to_x ← (signed word~) show_letter::$2_x Adding value simple copy (signed word) show_letter::to_y ← (signed word~) show_letter::$2_y -Adding struct value member variable copy (signed word) show_letter::to_x ← (signed word)(number~) show_letter::$3 -Adding struct value member variable copy (signed word) show_letter::to_y ← (signed word)(number~) show_letter::$4 +Unwinding value copy (struct SplineVector16) show_letter::to ← (struct SplineVector16){ (signed word)(number~) show_letter::$3, (signed word)(number~) show_letter::$4 } +Adding value simple copy (signed word) show_letter::to_x ← (number~) show_letter::$3 +Adding value simple copy (signed word) show_letter::to_y ← (number~) show_letter::$4 Unwinding value copy (struct SplineVector16) show_letter::via ← *((const struct Segment*) letter_c + (byte~) show_letter::$21).via Adding value simple copy (signed word) show_letter::via_x ← *((signed word*)(struct SplineVector16*)(const struct Segment*) letter_c+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_X + (byte~) show_letter::$21) Adding value simple copy (signed word) show_letter::via_y ← *((signed word*)(struct SplineVector16*)(const struct Segment*) letter_c+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y + (byte~) show_letter::$21) -Adding struct value member variable copy (signed word) show_letter::via_x ← (signed word)(number~) show_letter::$5 -Adding struct value member variable copy (signed word) show_letter::via_y ← (signed word)(number~) show_letter::$6 +Unwinding value copy (struct SplineVector16) show_letter::via ← (struct SplineVector16){ (signed word)(number~) show_letter::$5, (signed word)(number~) show_letter::$6 } +Adding value simple copy (signed word) show_letter::via_x ← (number~) show_letter::$5 +Adding value simple copy (signed word) show_letter::via_y ← (number~) show_letter::$6 Converted procedure call LValue to member unwinding { (signed word~) show_letter::$7_x, (signed word~) show_letter::$7_y } ← call rotate (struct SplineVector16) show_letter::via (byte) show_letter::angle Converted procedure struct value parameter to member unwinding in call { (signed word~) show_letter::$7_x, (signed word~) show_letter::$7_y } ← call rotate (signed word) show_letter::via_x (signed word) show_letter::via_y (byte) show_letter::angle Unwinding value copy (struct SplineVector16) show_letter::via ← (struct SplineVector16~) show_letter::$7 Adding value simple copy (signed word) show_letter::via_x ← (signed word~) show_letter::$7_x Adding value simple copy (signed word) show_letter::via_y ← (signed word~) show_letter::$7_y -Adding struct value member variable copy (signed word) show_letter::via_x ← (signed word)(number~) show_letter::$8 -Adding struct value member variable copy (signed word) show_letter::via_y ← (signed word)(number~) show_letter::$9 -Adding struct value member variable copy (byte) show_letter::segment_type ← *((const struct Segment*) letter_c + (byte~) show_letter::$22).type -Adding struct value member variable copy (struct SplineVector16) show_letter::segment_to ← (struct SplineVector16) show_letter::to -Adding struct value member variable copy (struct SplineVector16) show_letter::segment_via ← (struct SplineVector16) show_letter::via +Unwinding value copy (struct SplineVector16) show_letter::via ← (struct SplineVector16){ (signed word)(number~) show_letter::$8, (signed word)(number~) show_letter::$9 } +Adding value simple copy (signed word) show_letter::via_x ← (number~) show_letter::$8 +Adding value simple copy (signed word) show_letter::via_y ← (number~) show_letter::$9 +Unwinding value copy (struct Segment) show_letter::segment ← (struct Segment){ *((const struct Segment*) letter_c + (byte~) show_letter::$22).type, (struct SplineVector16) show_letter::to, (struct SplineVector16) show_letter::via } +Adding value simple copy (byte) show_letter::segment_type ← *((byte*)(const struct Segment*) letter_c+(const byte) OFFSET_STRUCT_SEGMENT_TYPE + (byte~) show_letter::$22) +Unwinding value copy (struct Segment) show_letter::segment ← (struct Segment){ *((const struct Segment*) letter_c + (byte~) show_letter::$22).type, (struct SplineVector16) show_letter::to, (struct SplineVector16) show_letter::via } +Adding value simple copy (signed word) show_letter::segment_to_x ← (signed word) show_letter::to_x +Adding value simple copy (signed word) show_letter::segment_to_y ← (signed word) show_letter::to_y +Unwinding value copy (struct Segment) show_letter::segment ← (struct Segment){ *((const struct Segment*) letter_c + (byte~) show_letter::$22).type, (struct SplineVector16) show_letter::to, (struct SplineVector16) show_letter::via } +Adding value simple copy (signed word) show_letter::segment_via_x ← (signed word) show_letter::via_x +Adding value simple copy (signed word) show_letter::segment_via_y ← (signed word) show_letter::via_y Unwinding value copy (struct SplineVector16) show_letter::current ← (struct Segment) show_letter::segment.to Adding value simple copy (signed word) show_letter::current_x ← (signed word) show_letter::segment_to_x Adding value simple copy (signed word) show_letter::current_y ← (signed word) show_letter::segment_to_y @@ -247,8 +283,9 @@ Adding value simple copy (signed word) bitmap_plot_spline_8seg::current_y ← *( Unwinding value copy (struct SplineVector16) bitmap_plot_spline_8seg::current ← *((const struct SplineVector16*) SPLINE_8SEG + (byte~) bitmap_plot_spline_8seg::$9) Adding value simple copy (signed word) bitmap_plot_spline_8seg::current_x ← *((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_X + (byte~) bitmap_plot_spline_8seg::$9) Adding value simple copy (signed word) bitmap_plot_spline_8seg::current_y ← *((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y + (byte~) bitmap_plot_spline_8seg::$9) -Adding struct value member variable copy (signed word) rotate::rotated_x ← (signed word~) rotate::$16 -Adding struct value member variable copy (signed word) rotate::rotated_y ← (signed word~) rotate::$19 +Unwinding value copy (struct SplineVector16) rotate::rotated ← (struct SplineVector16){ (signed word~) rotate::$16, (signed word~) rotate::$19 } +Adding value simple copy (signed word) rotate::rotated_x ← (signed word~) rotate::$16 +Adding value simple copy (signed word) rotate::rotated_y ← (signed word~) rotate::$19 Unwinding value copy (struct SplineVector16) rotate::return ← (struct SplineVector16) rotate::rotated Adding value simple copy (signed word) rotate::return_x ← (signed word) rotate::rotated_x Adding value simple copy (signed word) rotate::return_y ← (signed word) rotate::rotated_y @@ -368,16 +405,9 @@ Replacing struct member reference (struct SplineVector16) rotate::vector.x with Replacing struct member reference (struct SplineVector16) rotate::vector.y with member unwinding reference (signed word) rotate::vector_y Replacing struct member reference (struct SplineVector16) rotate::vector.y with member unwinding reference (signed word) rotate::vector_y Replacing struct member reference (struct SplineVector16) rotate::vector.x with member unwinding reference (signed word) rotate::vector_x -Unwinding value copy (struct SplineVector16) show_letter::segment_to ← (struct SplineVector16) show_letter::to -Adding value simple copy (signed word) show_letter::segment_to_x ← (signed word) show_letter::to_x -Adding value simple copy (signed word) show_letter::segment_to_y ← (signed word) show_letter::to_y -Unwinding value copy (struct SplineVector16) show_letter::segment_via ← (struct SplineVector16) show_letter::via -Adding value simple copy (signed word) show_letter::segment_via_x ← (signed word) show_letter::via_x -Adding value simple copy (signed word) show_letter::segment_via_y ← (signed word) show_letter::via_y Converted procedure struct value parameter to member unwinding in call (void~) show_letter::$17 ← call spline_8segB (signed word) show_letter::current_x (signed word) show_letter::current_y (signed word) show_letter::segment_via_x (signed word) show_letter::segment_via_y (signed word) show_letter::segment_to_x (signed word) show_letter::segment_to_y Replacing struct member reference (struct SplineVector16) show_letter::segment_to.x with member unwinding reference (signed word) show_letter::segment_to_x Replacing struct member reference (struct SplineVector16) show_letter::segment_to.y with member unwinding reference (signed word) show_letter::segment_to_y -Rewriting struct pointer member access *((const struct Segment*) letter_c + (byte~) show_letter::$22).type Rewriting struct pointer member access *((const struct SplineVector16*) SPLINE_8SEG + (byte~) bitmap_plot_spline_8seg::$7).x Rewriting struct pointer member access *((const struct SplineVector16*) SPLINE_8SEG + (byte~) bitmap_plot_spline_8seg::$8).y Warning! Adding boolean cast to non-boolean condition *((byte*) strcpy::src) @@ -563,10 +593,8 @@ spline_8segB::@1: scope:[spline_8segB] from spline_8segB spline_8segB::@1 (number~) spline_8segB::$24 ← (signed word) spline_8segB::p_y#2 + (number) $20 (number~) spline_8segB::$25 ← (number~) spline_8segB::$24 / (number) $40 (byte~) spline_8segB::$31 ← (byte) spline_8segB::n#2 * (const byte) SIZEOF_STRUCT_SPLINEVECTOR16 - (signed word*~) spline_8segB::$33 ← (signed word*)(const struct SplineVector16*) SPLINE_8SEG + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_X - *((signed word*~) spline_8segB::$33 + (byte~) spline_8segB::$31) ← (signed word)(number~) spline_8segB::$23 - (signed word*~) spline_8segB::$34 ← (signed word*)(const struct SplineVector16*) SPLINE_8SEG + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y - *((signed word*~) spline_8segB::$34 + (byte~) spline_8segB::$31) ← (signed word)(number~) spline_8segB::$25 + *((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_X + (byte~) spline_8segB::$31) ← (number~) spline_8segB::$23 + *((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y + (byte~) spline_8segB::$31) ← (number~) spline_8segB::$25 (signed word~) spline_8segB::$26 ← (signed word) spline_8segB::p_x#2 + (signed word) spline_8segB::i_x#2 (signed word~) spline_8segB::$27 ← (signed word) spline_8segB::p_y#2 + (signed word) spline_8segB::i_y#2 (signed word) spline_8segB::p_x#1 ← (signed word~) spline_8segB::$26 @@ -587,10 +615,8 @@ spline_8segB::@2: scope:[spline_8segB] from spline_8segB::@1 (number~) spline_8segB::$20 ← (signed word) spline_8segB::p_y#3 + (number) $20 (number~) spline_8segB::$21 ← (number~) spline_8segB::$20 / (number) $40 (number~) spline_8segB::$32 ← (number) 8 * (const byte) SIZEOF_STRUCT_SPLINEVECTOR16 - (signed word*~) spline_8segB::$35 ← (signed word*)(const struct SplineVector16*) SPLINE_8SEG + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_X - *((signed word*~) spline_8segB::$35 + (number~) spline_8segB::$32) ← (signed word)(number~) spline_8segB::$19 - (signed word*~) spline_8segB::$36 ← (signed word*)(const struct SplineVector16*) SPLINE_8SEG + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y - *((signed word*~) spline_8segB::$36 + (number~) spline_8segB::$32) ← (signed word)(number~) spline_8segB::$21 + *((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_X + (number~) spline_8segB::$32) ← (number~) spline_8segB::$19 + *((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y + (number~) spline_8segB::$32) ← (number~) spline_8segB::$21 to:spline_8segB::@return spline_8segB::@return: scope:[spline_8segB] from spline_8segB::@2 return @@ -1421,8 +1447,8 @@ show_letter::@1: scope:[show_letter] from show_letter show_letter::@5 (signed word) show_letter::to_y#0 ← *((signed word*)(struct SplineVector16*)(const struct Segment*) letter_c+(const byte) OFFSET_STRUCT_SEGMENT_TO+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y + (byte~) show_letter::$20) (number~) show_letter::$0 ← (signed word) show_letter::to_x#0 - (number) $32 (number~) show_letter::$1 ← (signed word) show_letter::to_y#0 - (number) $96 - (signed word) show_letter::to_x#1 ← (signed word)(number~) show_letter::$0 - (signed word) show_letter::to_y#1 ← (signed word)(number~) show_letter::$1 + (signed word) show_letter::to_x#1 ← (number~) show_letter::$0 + (signed word) show_letter::to_y#1 ← (number~) show_letter::$1 (signed word) rotate::vector_x#0 ← (signed word) show_letter::to_x#1 (signed word) rotate::vector_y#0 ← (signed word) show_letter::to_y#1 (byte) rotate::angle#0 ← (byte) show_letter::angle#1 @@ -1443,15 +1469,15 @@ show_letter::@11: scope:[show_letter] from show_letter::@1 (signed word) show_letter::to_y#2 ← (signed word~) show_letter::$2_y (number~) show_letter::$3 ← (signed word) show_letter::to_x#2 + (number) $64 (number~) show_letter::$4 ← (signed word) show_letter::to_y#2 + (number) $64 - (signed word) show_letter::to_x#3 ← (signed word)(number~) show_letter::$3 - (signed word) show_letter::to_y#3 ← (signed word)(number~) show_letter::$4 + (signed word) show_letter::to_x#3 ← (number~) show_letter::$3 + (signed word) show_letter::to_y#3 ← (number~) show_letter::$4 (byte~) show_letter::$21 ← (byte) show_letter::i#3 * (const byte) SIZEOF_STRUCT_SEGMENT (signed word) show_letter::via_x#0 ← *((signed word*)(struct SplineVector16*)(const struct Segment*) letter_c+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_X + (byte~) show_letter::$21) (signed word) show_letter::via_y#0 ← *((signed word*)(struct SplineVector16*)(const struct Segment*) letter_c+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y + (byte~) show_letter::$21) (number~) show_letter::$5 ← (signed word) show_letter::via_x#0 - (number) $32 (number~) show_letter::$6 ← (signed word) show_letter::via_y#0 - (number) $96 - (signed word) show_letter::via_x#1 ← (signed word)(number~) show_letter::$5 - (signed word) show_letter::via_y#1 ← (signed word)(number~) show_letter::$6 + (signed word) show_letter::via_x#1 ← (number~) show_letter::$5 + (signed word) show_letter::via_y#1 ← (number~) show_letter::$6 (signed word) rotate::vector_x#1 ← (signed word) show_letter::via_x#1 (signed word) rotate::vector_y#1 ← (signed word) show_letter::via_y#1 (byte) rotate::angle#1 ← (byte) show_letter::angle#2 @@ -1474,11 +1500,10 @@ show_letter::@12: scope:[show_letter] from show_letter::@11 (signed word) show_letter::via_y#2 ← (signed word~) show_letter::$7_y (number~) show_letter::$8 ← (signed word) show_letter::via_x#2 + (number) $64 (number~) show_letter::$9 ← (signed word) show_letter::via_y#2 + (number) $64 - (signed word) show_letter::via_x#3 ← (signed word)(number~) show_letter::$8 - (signed word) show_letter::via_y#3 ← (signed word)(number~) show_letter::$9 + (signed word) show_letter::via_x#3 ← (number~) show_letter::$8 + (signed word) show_letter::via_y#3 ← (number~) show_letter::$9 (byte~) show_letter::$22 ← (byte) show_letter::i#4 * (const byte) SIZEOF_STRUCT_SEGMENT - (byte*~) show_letter::$23 ← (byte*)(const struct Segment*) letter_c + (const byte) OFFSET_STRUCT_SEGMENT_TYPE - (byte) show_letter::segment_type#0 ← *((byte*~) show_letter::$23 + (byte~) show_letter::$22) + (byte) show_letter::segment_type#0 ← *((byte*)(const struct Segment*) letter_c+(const byte) OFFSET_STRUCT_SEGMENT_TYPE + (byte~) show_letter::$22) (signed word) show_letter::segment_to_x#0 ← (signed word) show_letter::to_x#4 (signed word) show_letter::segment_to_y#0 ← (signed word) show_letter::to_y#4 (signed word) show_letter::segment_via_x#0 ← (signed word) show_letter::via_x#3 @@ -2610,7 +2635,6 @@ SYMBOL TABLE SSA (byte~) show_letter::$20 (byte~) show_letter::$21 (byte~) show_letter::$22 -(byte*~) show_letter::$23 (signed word~) show_letter::$2_x (signed word~) show_letter::$2_y (number~) show_letter::$3 @@ -2686,6 +2710,7 @@ SYMBOL TABLE SSA (byte) show_letter::i#7 (byte) show_letter::i#8 (byte) show_letter::i#9 +(struct SplineVector16) show_letter::segment_to (signed word) show_letter::segment_to_x (signed word) show_letter::segment_to_x#0 (signed word) show_letter::segment_to_x#1 @@ -2707,6 +2732,7 @@ SYMBOL TABLE SSA (byte) show_letter::segment_type (byte) show_letter::segment_type#0 (byte) show_letter::segment_type#1 +(struct SplineVector16) show_letter::segment_via (signed word) show_letter::segment_via_x (signed word) show_letter::segment_via_x#0 (signed word) show_letter::segment_via_x#1 @@ -2765,10 +2791,6 @@ SYMBOL TABLE SSA (bool~) spline_8segB::$30 (byte~) spline_8segB::$31 (number~) spline_8segB::$32 -(signed word*~) spline_8segB::$33 -(signed word*~) spline_8segB::$34 -(signed word*~) spline_8segB::$35 -(signed word*~) spline_8segB::$36 (number~) spline_8segB::$4 (number~) spline_8segB::$5 (signed word~) spline_8segB::$6 @@ -3251,15 +3273,15 @@ Inferred type updated to signed word in (snumber~) rotate::$10 ← (signed word~ Inferred type updated to signed word in (snumber~) rotate::$13 ← (signed word~) rotate::$12 * (signed byte) 2 Adding pointer type conversion cast (byte*) bitmap_plot::$0 in (byte*~) bitmap_plot::$0 ← (word~) bitmap_plot::$3 Successful SSA optimization PassNAddTypeConversionAssignment -Inversing boolean not [64] (bool~) memset::$1 ← (word) memset::num#2 <= (byte) 0 from [63] (bool~) memset::$0 ← (word) memset::num#2 > (byte) 0 -Inversing boolean not [93] (bool~) bitmap_init::$1 ← (byte) bitmap_init::bits#1 != (byte) 0 from [92] (bool~) bitmap_init::$0 ← (byte) bitmap_init::bits#1 == (byte) 0 -Inversing boolean not [113] (bool~) bitmap_init::$9 ← (byte~) bitmap_init::$7 != (byte) 7 from [112] (bool~) bitmap_init::$8 ← (byte~) bitmap_init::$7 == (byte) 7 -Inversing boolean not [211] (bool~) bitmap_line::$21 ← (word) bitmap_line::dy#3 >= (word) bitmap_line::e#1 from [210] (bool~) bitmap_line::$20 ← (word) bitmap_line::dy#3 < (word) bitmap_line::e#1 -Inversing boolean not [233] (bool~) bitmap_line::$27 ← (word) bitmap_line::dx#5 >= (word) bitmap_line::e1#1 from [232] (bool~) bitmap_line::$26 ← (word) bitmap_line::dx#5 < (word) bitmap_line::e1#1 -Inversing boolean not [276] (bool~) mulf_init::$3 ← (byte~) mulf_init::$1 != (byte) 0 from [275] (bool~) mulf_init::$2 ← (byte~) mulf_init::$1 == (byte) 0 -Inversing boolean not [304] (bool~) mulf_init::$10 ← (byte) mulf_init::x_255#1 != (byte) 0 from [303] (bool~) mulf_init::$9 ← (byte) mulf_init::x_255#1 == (byte) 0 -Inversing boolean not [332] (bool~) mulf16s::$4 ← (signed word) mulf16s::a#5 >= (signed byte) 0 from [331] (bool~) mulf16s::$3 ← (signed word) mulf16s::a#5 < (signed byte) 0 -Inversing boolean not [336] (bool~) mulf16s::$6 ← (signed word) mulf16s::b#5 >= (signed byte) 0 from [335] (bool~) mulf16s::$5 ← (signed word) mulf16s::b#5 < (signed byte) 0 +Inversing boolean not [60] (bool~) memset::$1 ← (word) memset::num#2 <= (byte) 0 from [59] (bool~) memset::$0 ← (word) memset::num#2 > (byte) 0 +Inversing boolean not [89] (bool~) bitmap_init::$1 ← (byte) bitmap_init::bits#1 != (byte) 0 from [88] (bool~) bitmap_init::$0 ← (byte) bitmap_init::bits#1 == (byte) 0 +Inversing boolean not [109] (bool~) bitmap_init::$9 ← (byte~) bitmap_init::$7 != (byte) 7 from [108] (bool~) bitmap_init::$8 ← (byte~) bitmap_init::$7 == (byte) 7 +Inversing boolean not [207] (bool~) bitmap_line::$21 ← (word) bitmap_line::dy#3 >= (word) bitmap_line::e#1 from [206] (bool~) bitmap_line::$20 ← (word) bitmap_line::dy#3 < (word) bitmap_line::e#1 +Inversing boolean not [229] (bool~) bitmap_line::$27 ← (word) bitmap_line::dx#5 >= (word) bitmap_line::e1#1 from [228] (bool~) bitmap_line::$26 ← (word) bitmap_line::dx#5 < (word) bitmap_line::e1#1 +Inversing boolean not [272] (bool~) mulf_init::$3 ← (byte~) mulf_init::$1 != (byte) 0 from [271] (bool~) mulf_init::$2 ← (byte~) mulf_init::$1 == (byte) 0 +Inversing boolean not [300] (bool~) mulf_init::$10 ← (byte) mulf_init::x_255#1 != (byte) 0 from [299] (bool~) mulf_init::$9 ← (byte) mulf_init::x_255#1 == (byte) 0 +Inversing boolean not [328] (bool~) mulf16s::$4 ← (signed word) mulf16s::a#5 >= (signed byte) 0 from [327] (bool~) mulf16s::$3 ← (signed word) mulf16s::a#5 < (signed byte) 0 +Inversing boolean not [332] (bool~) mulf16s::$6 ← (signed word) mulf16s::b#5 >= (signed byte) 0 from [331] (bool~) mulf16s::$5 ← (signed word) mulf16s::b#5 < (signed byte) 0 Successful SSA optimization Pass2UnaryNotSimplification Alias (signed word) spline_8segB::a_x#0 = (signed word~) spline_8segB::$2 Alias (signed word) spline_8segB::a_y#0 = (signed word~) spline_8segB::$5 @@ -3390,6 +3412,8 @@ Alias (byte*) bitmap_screen#23 = (byte*) bitmap_screen#26 (byte*) bitmap_screen# Alias (byte*) bitmap_gfx#24 = (byte*) bitmap_gfx#27 (byte*) bitmap_gfx#31 Alias (byte*) bitmap_gfx#14 = (byte*) bitmap_gfx#21 (byte*) bitmap_gfx#9 (byte*) bitmap_gfx#4 Alias (byte*) bitmap_screen#14 = (byte*) bitmap_screen#20 (byte*) bitmap_screen#9 (byte*) bitmap_screen#4 +Alias (signed word) show_letter::to_x#1 = (signed word~) show_letter::$0 +Alias (signed word) show_letter::to_y#1 = (signed word~) show_letter::$1 Alias (signed word) rotate::return_x#0 = (signed word) rotate::return_x#4 Alias (signed word) rotate::return_y#0 = (signed word) rotate::return_y#4 Alias (byte) show_letter::i#10 = (byte) show_letter::i#3 (byte) show_letter::i#2 (byte) show_letter::i#4 (byte) show_letter::i#8 (byte) show_letter::i#12 (byte) show_letter::i#11 (byte) show_letter::i#9 (byte) show_letter::i#6 (byte) show_letter::i#7 @@ -3398,14 +3422,16 @@ Alias (signed word) show_letter::current_x#4 = (signed word) show_letter::curren Alias (signed word) show_letter::current_y#4 = (signed word) show_letter::current_y#8 (signed word) show_letter::current_y#9 (signed word) show_letter::current_y#7 (signed word) show_letter::current_y#6 (signed word) show_letter::current_y#5 Alias (signed word) show_letter::to_x#2 = (signed word~) show_letter::$2_x Alias (signed word) show_letter::to_y#2 = (signed word~) show_letter::$2_y +Alias (signed word) show_letter::segment_to_x#0 = (signed word) show_letter::to_x#3 (signed word~) show_letter::$3 (signed word) show_letter::to_x#4 (signed word) show_letter::segment_to_x#1 (signed word) show_letter::current_x#1 (signed word) show_letter::segment_to_x#6 (signed word) show_letter::segment_to_x#2 (signed word) show_letter::segment_to_x#7 (signed word) show_letter::segment_to_x#3 (signed word) show_letter::current_x#2 (signed word) show_letter::segment_to_x#4 (signed word) show_letter::segment_to_x#5 (signed word) show_letter::current_x#3 +Alias (signed word) show_letter::segment_to_y#0 = (signed word) show_letter::to_y#3 (signed word~) show_letter::$4 (signed word) show_letter::to_y#4 (signed word) show_letter::segment_to_y#1 (signed word) show_letter::current_y#1 (signed word) show_letter::segment_to_y#6 (signed word) show_letter::segment_to_y#2 (signed word) show_letter::segment_to_y#7 (signed word) show_letter::segment_to_y#3 (signed word) show_letter::current_y#2 (signed word) show_letter::segment_to_y#4 (signed word) show_letter::segment_to_y#5 (signed word) show_letter::current_y#3 +Alias (signed word) show_letter::via_x#1 = (signed word~) show_letter::$5 +Alias (signed word) show_letter::via_y#1 = (signed word~) show_letter::$6 Alias (signed word) rotate::return_x#1 = (signed word) rotate::return_x#5 Alias (signed word) rotate::return_y#1 = (signed word) rotate::return_y#5 -Alias (signed word) show_letter::segment_to_x#0 = (signed word) show_letter::to_x#4 (signed word) show_letter::to_x#3 (signed word) show_letter::segment_to_x#1 (signed word) show_letter::current_x#1 (signed word) show_letter::segment_to_x#6 (signed word) show_letter::segment_to_x#2 (signed word) show_letter::segment_to_x#7 (signed word) show_letter::segment_to_x#3 (signed word) show_letter::current_x#2 (signed word) show_letter::segment_to_x#4 (signed word) show_letter::segment_to_x#5 (signed word) show_letter::current_x#3 -Alias (signed word) show_letter::segment_to_y#0 = (signed word) show_letter::to_y#4 (signed word) show_letter::to_y#3 (signed word) show_letter::segment_to_y#1 (signed word) show_letter::current_y#1 (signed word) show_letter::segment_to_y#6 (signed word) show_letter::segment_to_y#2 (signed word) show_letter::segment_to_y#7 (signed word) show_letter::segment_to_y#3 (signed word) show_letter::current_y#2 (signed word) show_letter::segment_to_y#4 (signed word) show_letter::segment_to_y#5 (signed word) show_letter::current_y#3 Alias (signed word) show_letter::via_x#2 = (signed word~) show_letter::$7_x Alias (signed word) show_letter::via_y#2 = (signed word~) show_letter::$7_y -Alias (signed word) show_letter::segment_via_x#0 = (signed word) show_letter::via_x#3 (signed word) show_letter::segment_via_x#2 (signed word) show_letter::segment_via_x#1 -Alias (signed word) show_letter::segment_via_y#0 = (signed word) show_letter::via_y#3 (signed word) show_letter::segment_via_y#2 (signed word) show_letter::segment_via_y#1 +Alias (signed word) show_letter::segment_via_x#0 = (signed word) show_letter::via_x#3 (signed word~) show_letter::$8 (signed word) show_letter::segment_via_x#2 (signed word) show_letter::segment_via_x#1 +Alias (signed word) show_letter::segment_via_y#0 = (signed word) show_letter::via_y#3 (signed word~) show_letter::$9 (signed word) show_letter::segment_via_y#2 (signed word) show_letter::segment_via_y#1 Alias (byte) show_letter::segment_type#0 = (byte) show_letter::segment_type#1 Alias (word) bitmap_line::x1#0 = (word~) show_letter::$12 Alias (word) bitmap_line::y1#0 = (word~) show_letter::$13 @@ -3523,56 +3549,47 @@ Successful SSA optimization Pass2IdenticalPhiElimination Identical Phi Values (byte*) bitmap_screen#7 (byte*) bitmap_screen#1 Identical Phi Values (byte*) bitmap_gfx#12 (byte*) bitmap_gfx#1 Successful SSA optimization Pass2IdenticalPhiElimination -Identified duplicate assignment right side [111] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -Identified duplicate assignment right side [541] (byte~) bitmap_plot_spline_8seg::$8 ← (byte) bitmap_plot_spline_8seg::n#2 * (const byte) SIZEOF_STRUCT_SPLINEVECTOR16 +Identified duplicate assignment right side [107] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 +Identified duplicate assignment right side [536] (byte~) bitmap_plot_spline_8seg::$8 ← (byte) bitmap_plot_spline_8seg::n#2 * (const byte) SIZEOF_STRUCT_SPLINEVECTOR16 Successful SSA optimization Pass2DuplicateRValueIdentification -Simple Condition (bool~) spline_8segB::$30 [50] if((byte) spline_8segB::n#1!=rangelast(0,7)) goto spline_8segB::@1 -Simple Condition (bool~) memset::$1 [65] if((word) memset::num#2<=(byte) 0) goto memset::@1 -Simple Condition (bool~) memset::$4 [75] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 -Simple Condition (bool~) bitmap_init::$1 [94] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@2 -Simple Condition (bool~) bitmap_init::$2 [98] if((byte) bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 -Simple Condition (bool~) bitmap_init::$9 [114] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@6 -Simple Condition (bool~) bitmap_init::$11 [118] if((byte) bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 -Simple Condition (bool~) bitmap_line::$12 [189] if((word) bitmap_line::dx#0>(word) bitmap_line::dy#0) goto bitmap_line::@2 -Simple Condition (bool~) bitmap_line::$21 [212] if((word) bitmap_line::dy#0>=(word) bitmap_line::e#1) goto bitmap_line::@8 -Simple Condition (bool~) bitmap_line::$22 [215] if((word) bitmap_line::y#1!=(word) bitmap_line::y2#11) goto bitmap_line::@7 -Simple Condition (bool~) bitmap_line::$27 [234] if((word) bitmap_line::dx#0>=(word) bitmap_line::e1#1) goto bitmap_line::@13 -Simple Condition (bool~) bitmap_line::$28 [237] if((word) bitmap_line::x#15!=(word) bitmap_line::x2#10) goto bitmap_line::@12 -Simple Condition (bool~) abs_u16::$3 [245] if((byte) 0!=(byte~) abs_u16::$1) goto abs_u16::@1 -Simple Condition (bool~) sgn_u16::$2 [258] if((byte) 0!=(byte~) sgn_u16::$1) goto sgn_u16::@1 -Simple Condition (bool~) mulf_init::$0 [271] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2 -Simple Condition (bool~) mulf_init::$3 [277] if((byte~) mulf_init::$1!=(byte) 0) goto mulf_init::@4 -Simple Condition (bool~) mulf_init::$7 [296] if((byte*) mulf_init::sqr2_lo#2!=(const byte*) mulf_sqr2_lo+(word) $1ff) goto mulf_init::@10 -Simple Condition (bool~) mulf_init::$10 [305] if((byte) mulf_init::x_255#1!=(byte) 0) goto mulf_init::@12 -Simple Condition (bool~) mulf16s::$4 [333] if((signed word) mulf16s::a#4>=(signed byte) 0) goto mulf16s::@1 -Simple Condition (bool~) mulf16s::$6 [337] if((signed word) mulf16s::b#4>=(signed byte) 0) goto mulf16s::@2 -Simple Condition (bool~) main::$7 [418] if(*((const byte*) RASTER)!=(byte) $fe) goto main::@5 -Simple Condition (bool~) main::$8 [421] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@7 -Simple Condition (bool~) main::$9 [425] if((byte) main::w#1!=rangelast(0,$3c)) goto main::@5 -Simple Condition (bool~) show_letter::$10 [493] if((byte) show_letter::segment_type#0==(const byte) MOVE_TO) goto show_letter::@2 -Simple Condition (bool~) show_letter::$11 [499] if((byte) show_letter::segment_type#0==(const byte) SPLINE_TO) goto show_letter::@3 -Simple Condition (bool~) show_letter::$19 [529] if((byte) show_letter::i#1!=rangelast(0,$15)) goto show_letter::@1 -Simple Condition (bool~) bitmap_plot_spline_8seg::$5 [555] if((byte) bitmap_plot_spline_8seg::n#1!=rangelast(1,8)) goto bitmap_plot_spline_8seg::@1 +Simple Condition (bool~) spline_8segB::$30 [48] if((byte) spline_8segB::n#1!=rangelast(0,7)) goto spline_8segB::@1 +Simple Condition (bool~) memset::$1 [61] if((word) memset::num#2<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [71] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 +Simple Condition (bool~) bitmap_init::$1 [90] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@2 +Simple Condition (bool~) bitmap_init::$2 [94] if((byte) bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 +Simple Condition (bool~) bitmap_init::$9 [110] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@6 +Simple Condition (bool~) bitmap_init::$11 [114] if((byte) bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 +Simple Condition (bool~) bitmap_line::$12 [185] if((word) bitmap_line::dx#0>(word) bitmap_line::dy#0) goto bitmap_line::@2 +Simple Condition (bool~) bitmap_line::$21 [208] if((word) bitmap_line::dy#0>=(word) bitmap_line::e#1) goto bitmap_line::@8 +Simple Condition (bool~) bitmap_line::$22 [211] if((word) bitmap_line::y#1!=(word) bitmap_line::y2#11) goto bitmap_line::@7 +Simple Condition (bool~) bitmap_line::$27 [230] if((word) bitmap_line::dx#0>=(word) bitmap_line::e1#1) goto bitmap_line::@13 +Simple Condition (bool~) bitmap_line::$28 [233] if((word) bitmap_line::x#15!=(word) bitmap_line::x2#10) goto bitmap_line::@12 +Simple Condition (bool~) abs_u16::$3 [241] if((byte) 0!=(byte~) abs_u16::$1) goto abs_u16::@1 +Simple Condition (bool~) sgn_u16::$2 [254] if((byte) 0!=(byte~) sgn_u16::$1) goto sgn_u16::@1 +Simple Condition (bool~) mulf_init::$0 [267] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2 +Simple Condition (bool~) mulf_init::$3 [273] if((byte~) mulf_init::$1!=(byte) 0) goto mulf_init::@4 +Simple Condition (bool~) mulf_init::$7 [292] if((byte*) mulf_init::sqr2_lo#2!=(const byte*) mulf_sqr2_lo+(word) $1ff) goto mulf_init::@10 +Simple Condition (bool~) mulf_init::$10 [301] if((byte) mulf_init::x_255#1!=(byte) 0) goto mulf_init::@12 +Simple Condition (bool~) mulf16s::$4 [329] if((signed word) mulf16s::a#4>=(signed byte) 0) goto mulf16s::@1 +Simple Condition (bool~) mulf16s::$6 [333] if((signed word) mulf16s::b#4>=(signed byte) 0) goto mulf16s::@2 +Simple Condition (bool~) main::$7 [414] if(*((const byte*) RASTER)!=(byte) $fe) goto main::@5 +Simple Condition (bool~) main::$8 [417] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@7 +Simple Condition (bool~) main::$9 [421] if((byte) main::w#1!=rangelast(0,$3c)) goto main::@5 +Simple Condition (bool~) show_letter::$10 [488] if((byte) show_letter::segment_type#0==(const byte) MOVE_TO) goto show_letter::@2 +Simple Condition (bool~) show_letter::$11 [494] if((byte) show_letter::segment_type#0==(const byte) SPLINE_TO) goto show_letter::@3 +Simple Condition (bool~) show_letter::$19 [524] if((byte) show_letter::i#1!=rangelast(0,$15)) goto show_letter::@1 +Simple Condition (bool~) bitmap_plot_spline_8seg::$5 [550] if((byte) bitmap_plot_spline_8seg::n#1!=rangelast(1,8)) goto bitmap_plot_spline_8seg::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Rewriting ! if()-condition to reversed if() [171] (bool~) bitmap_line::$7 ← ! (bool~) bitmap_line::$6 -Rewriting && if()-condition to two if()s [170] (bool~) bitmap_line::$6 ← (bool~) bitmap_line::$4 && (bool~) bitmap_line::$5 +Rewriting ! if()-condition to reversed if() [167] (bool~) bitmap_line::$7 ← ! (bool~) bitmap_line::$6 +Rewriting && if()-condition to two if()s [166] (bool~) bitmap_line::$6 ← (bool~) bitmap_line::$4 && (bool~) bitmap_line::$5 Successful SSA optimization Pass2ConditionalAndOrRewriting -Constant right-side identified [36] (signed word*~) spline_8segB::$33 ← (signed word*)(const struct SplineVector16*) SPLINE_8SEG + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_X -Constant right-side identified [38] (signed word*~) spline_8segB::$34 ← (signed word*)(const struct SplineVector16*) SPLINE_8SEG + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y -Constant right-side identified [56] (byte~) spline_8segB::$32 ← (byte) 8 * (const byte) SIZEOF_STRUCT_SPLINEVECTOR16 -Constant right-side identified [57] (signed word*~) spline_8segB::$35 ← (signed word*)(const struct SplineVector16*) SPLINE_8SEG + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_X -Constant right-side identified [59] (signed word*~) spline_8segB::$36 ← (signed word*)(const struct SplineVector16*) SPLINE_8SEG + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y -Constant right-side identified [486] (byte*~) show_letter::$23 ← (byte*)(const struct Segment*) letter_c + (const byte) OFFSET_STRUCT_SEGMENT_TYPE -Constant right-side identified [531] (byte~) bitmap_plot_spline_8seg::$6 ← (byte) 0 * (const byte) SIZEOF_STRUCT_SPLINEVECTOR16 -Constant right-side identified [539] (signed word*~) bitmap_plot_spline_8seg::$10 ← (signed word*)(const struct SplineVector16*) SPLINE_8SEG + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_X -Constant right-side identified [542] (signed word*~) bitmap_plot_spline_8seg::$11 ← (signed word*)(const struct SplineVector16*) SPLINE_8SEG + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y +Constant right-side identified [54] (byte~) spline_8segB::$32 ← (byte) 8 * (const byte) SIZEOF_STRUCT_SPLINEVECTOR16 +Constant right-side identified [526] (byte~) bitmap_plot_spline_8seg::$6 ← (byte) 0 * (const byte) SIZEOF_STRUCT_SPLINEVECTOR16 +Constant right-side identified [534] (signed word*~) bitmap_plot_spline_8seg::$10 ← (signed word*)(const struct SplineVector16*) SPLINE_8SEG + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_X +Constant right-side identified [537] (signed word*~) bitmap_plot_spline_8seg::$11 ← (signed word*)(const struct SplineVector16*) SPLINE_8SEG + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) spline_8segB::n#0 = 0 -Constant (const signed word*) spline_8segB::$33 = (signed word*)SPLINE_8SEG+OFFSET_STRUCT_SPLINEVECTOR16_X -Constant (const signed word*) spline_8segB::$34 = (signed word*)SPLINE_8SEG+OFFSET_STRUCT_SPLINEVECTOR16_Y Constant (const byte) spline_8segB::$32 = 8*SIZEOF_STRUCT_SPLINEVECTOR16 -Constant (const signed word*) spline_8segB::$35 = (signed word*)SPLINE_8SEG+OFFSET_STRUCT_SPLINEVECTOR16_X -Constant (const signed word*) spline_8segB::$36 = (signed word*)SPLINE_8SEG+OFFSET_STRUCT_SPLINEVECTOR16_Y Constant (const byte*) bitmap_screen#0 = (byte*) 0 Constant (const byte*) bitmap_gfx#0 = (byte*) 0 Constant (const byte) bitmap_init::bits#0 = $80 @@ -3608,7 +3625,6 @@ Constant (const byte) main::w#0 = 0 Constant (const signed word) show_letter::current_x#0 = 0 Constant (const signed word) show_letter::current_y#0 = 0 Constant (const byte) show_letter::i#0 = 0 -Constant (const byte*) show_letter::$23 = (byte*)letter_c+OFFSET_STRUCT_SEGMENT_TYPE Constant (const byte) bitmap_plot_spline_8seg::$6 = 0*SIZEOF_STRUCT_SPLINEVECTOR16 Constant (const byte) bitmap_plot_spline_8seg::n#0 = 1 Constant (const signed word*) bitmap_plot_spline_8seg::$10 = (signed word*)SPLINE_8SEG+OFFSET_STRUCT_SPLINEVECTOR16_X @@ -3623,38 +3639,38 @@ Successful SSA optimization Pass2ConstantIdentification Constant (const void*) memset::str#0 = (void*)bitmap_screen#1 Constant (const void*) memset::str#1 = (void*)bitmap_gfx#1 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [406] if(true) goto main::@2 -if() condition always true - replacing block destination [429] if(true) goto main::@14 +if() condition always true - replacing block destination [402] if(true) goto main::@2 +if() condition always true - replacing block destination [425] if(true) goto main::@14 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [48] spline_8segB::n#1 ← ++ spline_8segB::n#2 to ++ -Resolved ranged comparison value [50] if(spline_8segB::n#1!=rangelast(0,7)) goto spline_8segB::@1 to (number) 8 -Resolved ranged next value [96] bitmap_init::x#1 ← ++ bitmap_init::x#2 to ++ -Resolved ranged comparison value [98] if(bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 to (number) 0 -Resolved ranged next value [116] bitmap_init::y#1 ← ++ bitmap_init::y#2 to ++ -Resolved ranged comparison value [118] if(bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 to (number) 0 -Resolved ranged next value [423] main::w#1 ← ++ main::w#4 to ++ -Resolved ranged comparison value [425] if(main::w#1!=rangelast(0,$3c)) goto main::@5 to (number) $3d -Resolved ranged next value [527] show_letter::i#1 ← ++ show_letter::i#10 to ++ -Resolved ranged comparison value [529] if(show_letter::i#1!=rangelast(0,$15)) goto show_letter::@1 to (number) $16 -Resolved ranged next value [553] bitmap_plot_spline_8seg::n#1 ← ++ bitmap_plot_spline_8seg::n#2 to ++ -Resolved ranged comparison value [555] if(bitmap_plot_spline_8seg::n#1!=rangelast(1,8)) goto bitmap_plot_spline_8seg::@1 to (number) 9 +Resolved ranged next value [46] spline_8segB::n#1 ← ++ spline_8segB::n#2 to ++ +Resolved ranged comparison value [48] if(spline_8segB::n#1!=rangelast(0,7)) goto spline_8segB::@1 to (number) 8 +Resolved ranged next value [92] bitmap_init::x#1 ← ++ bitmap_init::x#2 to ++ +Resolved ranged comparison value [94] if(bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 to (number) 0 +Resolved ranged next value [112] bitmap_init::y#1 ← ++ bitmap_init::y#2 to ++ +Resolved ranged comparison value [114] if(bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 to (number) 0 +Resolved ranged next value [419] main::w#1 ← ++ main::w#4 to ++ +Resolved ranged comparison value [421] if(main::w#1!=rangelast(0,$3c)) goto main::@5 to (number) $3d +Resolved ranged next value [522] show_letter::i#1 ← ++ show_letter::i#10 to ++ +Resolved ranged comparison value [524] if(show_letter::i#1!=rangelast(0,$15)) goto show_letter::@1 to (number) $16 +Resolved ranged next value [548] bitmap_plot_spline_8seg::n#1 ← ++ bitmap_plot_spline_8seg::n#2 to ++ +Resolved ranged comparison value [550] if(bitmap_plot_spline_8seg::n#1!=rangelast(1,8)) goto bitmap_plot_spline_8seg::@1 to (number) 9 Simplifying constant evaluating to zero (byte) 0*(const byte) SIZEOF_STRUCT_SPLINEVECTOR16 in Successful SSA optimization PassNSimplifyConstantZero Simplifying expression containing zero (signed word*)SPLINE_8SEG in -Simplifying expression containing zero (signed word*)SPLINE_8SEG in -Simplifying expression containing zero (byte*)letter_c in -Simplifying expression containing zero (signed word*)SPLINE_8SEG in -Simplifying expression containing zero (signed word*)(struct SplineVector16*)letter_c+OFFSET_STRUCT_SEGMENT_TO in [442] (signed word) show_letter::to_x#0 ← *((signed word*)(struct SplineVector16*)(const struct Segment*) letter_c+(const byte) OFFSET_STRUCT_SEGMENT_TO+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_X + (byte~) show_letter::$20) -Simplifying expression containing zero (signed word*)(struct SplineVector16*)letter_c+OFFSET_STRUCT_SEGMENT_VIA in [464] (signed word) show_letter::via_x#0 ← *((signed word*)(struct SplineVector16*)(const struct Segment*) letter_c+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_X + (byte~) show_letter::$21) -Simplifying expression containing zero (signed word*)SPLINE_8SEG+OFFSET_STRUCT_SPLINEVECTOR16_X in [532] (signed word) bitmap_plot_spline_8seg::current_x#0 ← *((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_X + (const byte) bitmap_plot_spline_8seg::$6) -Simplifying expression containing zero (signed word*)SPLINE_8SEG in [532] (signed word) bitmap_plot_spline_8seg::current_x#0 ← *((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_X) -Simplifying expression containing zero (signed word*)SPLINE_8SEG+OFFSET_STRUCT_SPLINEVECTOR16_Y in [533] (signed word) bitmap_plot_spline_8seg::current_y#0 ← *((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y + (const byte) bitmap_plot_spline_8seg::$6) -Simplifying expression containing zero (signed word*)SPLINE_8SEG in [551] (signed word) bitmap_plot_spline_8seg::current_x#1 ← *((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_X + (byte~) bitmap_plot_spline_8seg::$9) +Simplifying expression containing zero (signed word*)SPLINE_8SEG in [36] *((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_X + (byte~) spline_8segB::$31) ← (signed word~) spline_8segB::$23 +Simplifying expression containing zero (signed word*)SPLINE_8SEG in [55] *((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_X + (const byte) spline_8segB::$32) ← (signed word~) spline_8segB::$19 +Simplifying expression containing zero (signed word*)(struct SplineVector16*)letter_c+OFFSET_STRUCT_SEGMENT_TO in [438] (signed word) show_letter::to_x#0 ← *((signed word*)(struct SplineVector16*)(const struct Segment*) letter_c+(const byte) OFFSET_STRUCT_SEGMENT_TO+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_X + (byte~) show_letter::$20) +Simplifying expression containing zero (signed word*)(struct SplineVector16*)letter_c+OFFSET_STRUCT_SEGMENT_VIA in [460] (signed word) show_letter::via_x#0 ← *((signed word*)(struct SplineVector16*)(const struct Segment*) letter_c+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_X + (byte~) show_letter::$21) +Simplifying expression containing zero (byte*)letter_c in [482] (byte) show_letter::segment_type#0 ← *((byte*)(const struct Segment*) letter_c+(const byte) OFFSET_STRUCT_SEGMENT_TYPE + (byte~) show_letter::$22) +Simplifying expression containing zero (signed word*)SPLINE_8SEG+OFFSET_STRUCT_SPLINEVECTOR16_X in [527] (signed word) bitmap_plot_spline_8seg::current_x#0 ← *((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_X + (const byte) bitmap_plot_spline_8seg::$6) +Simplifying expression containing zero (signed word*)SPLINE_8SEG in [527] (signed word) bitmap_plot_spline_8seg::current_x#0 ← *((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_X) +Simplifying expression containing zero (signed word*)SPLINE_8SEG+OFFSET_STRUCT_SPLINEVECTOR16_Y in [528] (signed word) bitmap_plot_spline_8seg::current_y#0 ← *((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y + (const byte) bitmap_plot_spline_8seg::$6) +Simplifying expression containing zero (signed word*)SPLINE_8SEG in [546] (signed word) bitmap_plot_spline_8seg::current_x#1 ← *((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_X + (byte~) bitmap_plot_spline_8seg::$9) Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable (void*) memset::return#2 and assignment [75] (void*) memset::return#2 ← (void*) memset::str#3 Eliminating unused variable (void*) memset::return#3 and assignment [77] (void*) memset::return#3 ← (void*) memset::str#3 -Eliminating unused variable (struct SplineVector16) rotate::return#0 and assignment [348] (struct SplineVector16) rotate::return#0 ← struct-unwound {(signed word) rotate::return_x#2, (signed word) rotate::return_y#2} -Eliminating unused variable (struct SplineVector16) rotate::return#1 and assignment [349] (struct SplineVector16) rotate::return#1 ← struct-unwound {(signed word) rotate::return_x#2, (signed word) rotate::return_y#2} +Eliminating unused variable (struct SplineVector16) rotate::return#0 and assignment [340] (struct SplineVector16) rotate::return#0 ← struct-unwound {(signed word) rotate::return_x#2, (signed word) rotate::return_y#2} +Eliminating unused variable (struct SplineVector16) rotate::return#1 and assignment [341] (struct SplineVector16) rotate::return#1 ← struct-unwound {(signed word) rotate::return_x#2, (signed word) rotate::return_y#2} Eliminating unused constant (const byte) bitmap_plot_spline_8seg::$6 Eliminating unused constant (const byte) OFFSET_STRUCT_SPLINEVECTOR16_X Eliminating unused constant (const byte) OFFSET_STRUCT_SEGMENT_TYPE @@ -3674,22 +3690,10 @@ Adding number conversion cast (unumber) 9 in if((byte) bitmap_plot_spline_8seg:: Successful SSA optimization PassNAddNumberTypeConversions Inlining cast (byte*) bitmap_plot::plotter#0 ← (byte*)(word~) bitmap_plot::$3 Successful SSA optimization Pass2InlineCast -Simplifying constant integer cast (signed word~) spline_8segB::$23 -Simplifying constant integer cast (signed word~) spline_8segB::$25 Simplifying constant integer cast 8 -Simplifying constant integer cast (signed word~) spline_8segB::$19 -Simplifying constant integer cast (signed word~) spline_8segB::$21 Simplifying constant integer cast 0 Simplifying constant integer cast 0 Simplifying constant integer cast $3d -Simplifying constant integer cast (signed word~) show_letter::$0 -Simplifying constant integer cast (signed word~) show_letter::$1 -Simplifying constant integer cast (signed word~) show_letter::$3 -Simplifying constant integer cast (signed word~) show_letter::$4 -Simplifying constant integer cast (signed word~) show_letter::$5 -Simplifying constant integer cast (signed word~) show_letter::$6 -Simplifying constant integer cast (signed word~) show_letter::$8 -Simplifying constant integer cast (signed word~) show_letter::$9 Simplifying constant integer cast $16 Simplifying constant integer cast 9 Successful SSA optimization PassNCastSimplification @@ -3701,18 +3705,10 @@ Finalized unsigned number type (byte) $16 Finalized unsigned number type (byte) 9 Successful SSA optimization PassNFinalizeNumberTypeConversions Alias (byte~) bitmap_init::$7 = (byte~) bitmap_init::$3 -Alias (signed word) show_letter::to_x#1 = (signed word~) show_letter::$0 -Alias (signed word) show_letter::to_y#1 = (signed word~) show_letter::$1 -Alias (signed word) show_letter::current_x#10 = (signed word~) show_letter::$3 -Alias (signed word) show_letter::current_y#10 = (signed word~) show_letter::$4 -Alias (signed word) show_letter::via_x#1 = (signed word~) show_letter::$5 -Alias (signed word) show_letter::via_y#1 = (signed word~) show_letter::$6 -Alias (signed word) show_letter::segment_via_x#0 = (signed word~) show_letter::$8 -Alias (signed word) show_letter::segment_via_y#0 = (signed word~) show_letter::$9 Alias (byte~) bitmap_plot_spline_8seg::$8 = (byte~) bitmap_plot_spline_8seg::$7 Successful SSA optimization Pass2AliasElimination Simple Condition (bool~) bitmap_line::$4 [96] if((word) bitmap_line::dx#0==(byte) 0) goto bitmap_line::@24 -Simple Condition (bool~) bitmap_line::$5 [346] if((word) bitmap_line::dy#0==(byte) 0) goto bitmap_line::@4 +Simple Condition (bool~) bitmap_line::$5 [338] if((word) bitmap_line::dy#0==(byte) 0) goto bitmap_line::@4 Successful SSA optimization Pass2ConditionalJumpSimplification Negating conditional jump and destination [96] if((word) bitmap_line::dx#0!=(byte) 0) goto bitmap_line::@1 Successful SSA optimization Pass2ConditionalJumpSequenceImprovement @@ -3841,7 +3837,6 @@ Constant inlined main::toD0181_$5 = >(word)(const byte*) BITMAP_GRAPHICS Constant inlined main::w#0 = (byte) 0 Constant inlined main::toD0181_$4 = (word)(const byte*) BITMAP_GRAPHICS Constant inlined main::toD0181_$3 = >(word)(const byte*) BITMAP_SCREEN&(word) $3fff*(byte) 4 -Constant inlined show_letter::$23 = (byte*)(const struct Segment*) letter_c Constant inlined mulf_init::sqr1_hi#0 = (const byte*) mulf_sqr1_hi+(byte) 1 Constant inlined mulf_init::sqr1_lo#0 = (const byte*) mulf_sqr1_lo+(byte) 1 Constant inlined spline_8segB::n#0 = (byte) 0 @@ -3853,12 +3848,8 @@ Constant inlined mulf_init::c#0 = (byte) 0 Constant inlined main::toD0181_screen#0 = (const byte*) BITMAP_SCREEN Constant inlined main::toD0181_gfx#0 = (const byte*) BITMAP_GRAPHICS Constant inlined bitmap_init::bits#0 = (byte) $80 -Constant inlined spline_8segB::$36 = (signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y Constant inlined bitmap_init::bits#2 = (byte) $80 Constant inlined spline_8segB::$32 = (byte) 8*(const byte) SIZEOF_STRUCT_SPLINEVECTOR16 -Constant inlined spline_8segB::$33 = (signed word*)(const struct SplineVector16*) SPLINE_8SEG -Constant inlined spline_8segB::$34 = (signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y -Constant inlined spline_8segB::$35 = (signed word*)(const struct SplineVector16*) SPLINE_8SEG Constant inlined sgn_u16::return#3 = (byte) 1 Constant inlined sgn_u16::return#2 = (byte) -1 Constant inlined memset::str#1 = (void*)(const byte*) BITMAP_GRAPHICS @@ -3879,9 +3870,9 @@ Successful SSA optimization Pass2ConstantInlining Consolidated array index constant in *((signed word*)SPLINE_8SEG+8*SIZEOF_STRUCT_SPLINEVECTOR16) Consolidated array index constant in *((signed word*)SPLINE_8SEG+OFFSET_STRUCT_SPLINEVECTOR16_Y+8*SIZEOF_STRUCT_SPLINEVECTOR16) Successful SSA optimization Pass2ConstantAdditionElimination -Alias (byte~) show_letter::$20 = (byte~) show_letter::$25 -Alias (byte~) show_letter::$21 = (byte~) show_letter::$27 -Alias (byte~) show_letter::$22 = (byte~) show_letter::$29 +Alias (byte~) show_letter::$20 = (byte~) show_letter::$24 +Alias (byte~) show_letter::$21 = (byte~) show_letter::$26 +Alias (byte~) show_letter::$22 = (byte~) show_letter::$28 Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) bitmap_clear::fgcol#2 (const byte) WHITE Identical Phi Values (byte) bitmap_clear::bgcol#2 (const byte) BLACK @@ -4254,8 +4245,8 @@ show_letter::@1: scope:[show_letter] from show_letter show_letter::@9 [28] (signed word) show_letter::current_y#4 ← phi( show_letter/(signed word) 0 show_letter::@9/(signed word) show_letter::current_y#11 ) [28] (signed word) show_letter::current_x#4 ← phi( show_letter/(signed word) 0 show_letter::@9/(signed word) show_letter::current_x#11 ) [28] (byte) show_letter::i#10 ← phi( show_letter/(byte) 0 show_letter::@9/(byte) show_letter::i#1 ) - [29] (byte~) show_letter::$24 ← (byte) show_letter::i#10 << (byte) 3 - [30] (byte~) show_letter::$20 ← (byte~) show_letter::$24 + (byte) show_letter::i#10 + [29] (byte~) show_letter::$23 ← (byte) show_letter::i#10 << (byte) 3 + [30] (byte~) show_letter::$20 ← (byte~) show_letter::$23 + (byte) show_letter::i#10 [31] (signed word) show_letter::to_x#0 ← *((signed word*)(struct SplineVector16*)(const struct Segment*) letter_c+(const byte) OFFSET_STRUCT_SEGMENT_TO + (byte~) show_letter::$20) [32] (signed word) show_letter::to_y#0 ← *((signed word*)(struct SplineVector16*)(const struct Segment*) letter_c+(const byte) OFFSET_STRUCT_SEGMENT_TO+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y + (byte~) show_letter::$20) [33] (signed word) show_letter::to_x#1 ← (signed word) show_letter::to_x#0 - (signed byte) $32 @@ -4272,8 +4263,8 @@ show_letter::@6: scope:[show_letter] from show_letter::@1 [42] (signed word) show_letter::to_y#2 ← (signed word) rotate::return_y#0 [43] (signed word) show_letter::current_x#10 ← (signed word) show_letter::to_x#2 + (signed byte) $64 [44] (signed word) show_letter::current_y#10 ← (signed word) show_letter::to_y#2 + (signed byte) $64 - [45] (byte~) show_letter::$26 ← (byte) show_letter::i#10 << (byte) 3 - [46] (byte~) show_letter::$21 ← (byte~) show_letter::$26 + (byte) show_letter::i#10 + [45] (byte~) show_letter::$25 ← (byte) show_letter::i#10 << (byte) 3 + [46] (byte~) show_letter::$21 ← (byte~) show_letter::$25 + (byte) show_letter::i#10 [47] (signed word) show_letter::via_x#0 ← *((signed word*)(struct SplineVector16*)(const struct Segment*) letter_c+(const byte) OFFSET_STRUCT_SEGMENT_VIA + (byte~) show_letter::$21) [48] (signed word) show_letter::via_y#0 ← *((signed word*)(struct SplineVector16*)(const struct Segment*) letter_c+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y + (byte~) show_letter::$21) [49] (signed word) show_letter::via_x#1 ← (signed word) show_letter::via_x#0 - (signed byte) $32 @@ -4290,8 +4281,8 @@ show_letter::@7: scope:[show_letter] from show_letter::@6 [58] (signed word) show_letter::via_y#2 ← (signed word) rotate::return_y#1 [59] (signed word) show_letter::segment_via_x#0 ← (signed word) show_letter::via_x#2 + (signed byte) $64 [60] (signed word) show_letter::segment_via_y#0 ← (signed word) show_letter::via_y#2 + (signed byte) $64 - [61] (byte~) show_letter::$28 ← (byte) show_letter::i#10 << (byte) 3 - [62] (byte~) show_letter::$22 ← (byte~) show_letter::$28 + (byte) show_letter::i#10 + [61] (byte~) show_letter::$27 ← (byte) show_letter::i#10 << (byte) 3 + [62] (byte~) show_letter::$22 ← (byte~) show_letter::$27 + (byte) show_letter::i#10 [63] (byte) show_letter::segment_type#0 ← *((byte*)(const struct Segment*) letter_c + (byte~) show_letter::$22) [64] if((byte) show_letter::segment_type#0==(const byte) MOVE_TO) goto show_letter::@3 to:show_letter::@4 @@ -5090,9 +5081,9 @@ VARIABLE REGISTER WEIGHTS (byte~) show_letter::$20 151.5 (byte~) show_letter::$21 151.5 (byte~) show_letter::$22 202.0 -(byte~) show_letter::$24 202.0 -(byte~) show_letter::$26 202.0 -(byte~) show_letter::$28 202.0 +(byte~) show_letter::$23 202.0 +(byte~) show_letter::$25 202.0 +(byte~) show_letter::$27 202.0 (struct SplineVector16~) show_letter::$7 (byte) show_letter::angle (byte) show_letter::angle#0 3.6724137931034484 @@ -5107,10 +5098,12 @@ VARIABLE REGISTER WEIGHTS (byte) show_letter::i (byte) show_letter::i#1 75.75 (byte) show_letter::i#10 15.538461538461537 +(struct SplineVector16) show_letter::segment_to (signed word) show_letter::segment_to_x (signed word) show_letter::segment_to_y (byte) show_letter::segment_type (byte) show_letter::segment_type#0 151.5 +(struct SplineVector16) show_letter::segment_via (signed word) show_letter::segment_via_x (signed word) show_letter::segment_via_x#0 22.444444444444443 (signed word) show_letter::segment_via_y @@ -5245,7 +5238,7 @@ Initial phi equivalence classes [ mulf_init::dir#2 mulf_init::dir#4 ] [ mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ] Added variable show_letter::angle#0 to live range equivalence class [ show_letter::angle#0 ] -Added variable show_letter::$24 to live range equivalence class [ show_letter::$24 ] +Added variable show_letter::$23 to live range equivalence class [ show_letter::$23 ] Added variable show_letter::$20 to live range equivalence class [ show_letter::$20 ] Added variable show_letter::to_x#0 to live range equivalence class [ show_letter::to_x#0 ] Added variable show_letter::to_y#0 to live range equivalence class [ show_letter::to_y#0 ] @@ -5257,7 +5250,7 @@ Added variable show_letter::to_x#2 to live range equivalence class [ show_letter Added variable show_letter::to_y#2 to live range equivalence class [ show_letter::to_y#2 ] Added variable show_letter::current_x#10 to live range equivalence class [ show_letter::current_x#10 ] Added variable show_letter::current_y#10 to live range equivalence class [ show_letter::current_y#10 ] -Added variable show_letter::$26 to live range equivalence class [ show_letter::$26 ] +Added variable show_letter::$25 to live range equivalence class [ show_letter::$25 ] Added variable show_letter::$21 to live range equivalence class [ show_letter::$21 ] Added variable show_letter::via_x#0 to live range equivalence class [ show_letter::via_x#0 ] Added variable show_letter::via_y#0 to live range equivalence class [ show_letter::via_y#0 ] @@ -5269,7 +5262,7 @@ Added variable show_letter::via_x#2 to live range equivalence class [ show_lette Added variable show_letter::via_y#2 to live range equivalence class [ show_letter::via_y#2 ] Added variable show_letter::segment_via_x#0 to live range equivalence class [ show_letter::segment_via_x#0 ] Added variable show_letter::segment_via_y#0 to live range equivalence class [ show_letter::segment_via_y#0 ] -Added variable show_letter::$28 to live range equivalence class [ show_letter::$28 ] +Added variable show_letter::$27 to live range equivalence class [ show_letter::$27 ] Added variable show_letter::$22 to live range equivalence class [ show_letter::$22 ] Added variable show_letter::segment_type#0 to live range equivalence class [ show_letter::segment_type#0 ] Added variable spline_8segB::p0_x#0 to live range equivalence class [ spline_8segB::p0_x#0 ] @@ -5409,7 +5402,7 @@ Complete equivalence classes [ mulf_init::dir#2 mulf_init::dir#4 ] [ mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ] [ show_letter::angle#0 ] -[ show_letter::$24 ] +[ show_letter::$23 ] [ show_letter::$20 ] [ show_letter::to_x#0 ] [ show_letter::to_y#0 ] @@ -5421,7 +5414,7 @@ Complete equivalence classes [ show_letter::to_y#2 ] [ show_letter::current_x#10 ] [ show_letter::current_y#10 ] -[ show_letter::$26 ] +[ show_letter::$25 ] [ show_letter::$21 ] [ show_letter::via_x#0 ] [ show_letter::via_y#0 ] @@ -5433,7 +5426,7 @@ Complete equivalence classes [ show_letter::via_y#2 ] [ show_letter::segment_via_x#0 ] [ show_letter::segment_via_y#0 ] -[ show_letter::$28 ] +[ show_letter::$27 ] [ show_letter::$22 ] [ show_letter::segment_type#0 ] [ spline_8segB::p0_x#0 ] @@ -5572,7 +5565,7 @@ Allocated zp[2]:78 [ mulf_init::sqr2_hi#2 mulf_init::sqr2_hi#1 ] Allocated zp[1]:80 [ mulf_init::dir#2 mulf_init::dir#4 ] Allocated zp[2]:81 [ mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ] Allocated zp[1]:83 [ show_letter::angle#0 ] -Allocated zp[1]:84 [ show_letter::$24 ] +Allocated zp[1]:84 [ show_letter::$23 ] Allocated zp[1]:85 [ show_letter::$20 ] Allocated zp[2]:86 [ show_letter::to_x#0 ] Allocated zp[2]:88 [ show_letter::to_y#0 ] @@ -5584,7 +5577,7 @@ Allocated zp[2]:98 [ show_letter::to_x#2 ] Allocated zp[2]:100 [ show_letter::to_y#2 ] Allocated zp[2]:102 [ show_letter::current_x#10 ] Allocated zp[2]:104 [ show_letter::current_y#10 ] -Allocated zp[1]:106 [ show_letter::$26 ] +Allocated zp[1]:106 [ show_letter::$25 ] Allocated zp[1]:107 [ show_letter::$21 ] Allocated zp[2]:108 [ show_letter::via_x#0 ] Allocated zp[2]:110 [ show_letter::via_y#0 ] @@ -5596,7 +5589,7 @@ Allocated zp[2]:120 [ show_letter::via_x#2 ] Allocated zp[2]:122 [ show_letter::via_y#2 ] Allocated zp[2]:124 [ show_letter::segment_via_x#0 ] Allocated zp[2]:126 [ show_letter::segment_via_y#0 ] -Allocated zp[1]:128 [ show_letter::$28 ] +Allocated zp[1]:128 [ show_letter::$27 ] Allocated zp[1]:129 [ show_letter::$22 ] Allocated zp[1]:130 [ show_letter::segment_type#0 ] Allocated zp[2]:131 [ spline_8segB::p0_x#0 ] @@ -5892,9 +5885,9 @@ show_letter: { .label current_y = 7 .label current_x_1 = $66 .label current_y_1 = $68 - .label __24 = $54 - .label __26 = $6a - .label __28 = $80 + .label __23 = $54 + .label __25 = $6a + .label __27 = $80 // [28] phi from show_letter to show_letter::@1 [phi:show_letter->show_letter::@1] __b1_from_show_letter: // [28] phi (signed word) show_letter::current_y#4 = (signed word) 0 [phi:show_letter->show_letter::@1#0] -- vwsz1=vwsc1 @@ -5913,14 +5906,14 @@ show_letter: { jmp __b1 // show_letter::@1 __b1: - // [29] (byte~) show_letter::$24 ← (byte) show_letter::i#10 << (byte) 3 -- vbuz1=vbuz2_rol_3 + // [29] (byte~) show_letter::$23 ← (byte) show_letter::i#10 << (byte) 3 -- vbuz1=vbuz2_rol_3 lda.z i asl asl asl - sta.z __24 - // [30] (byte~) show_letter::$20 ← (byte~) show_letter::$24 + (byte) show_letter::i#10 -- vbuz1=vbuz2_plus_vbuz3 - lda.z __24 + sta.z __23 + // [30] (byte~) show_letter::$20 ← (byte~) show_letter::$23 + (byte) show_letter::i#10 -- vbuz1=vbuz2_plus_vbuz3 + lda.z __23 clc adc.z i sta.z __20 @@ -6011,14 +6004,14 @@ show_letter: { lda.z to_y_2+1 adc #>$64 sta.z current_y_1+1 - // [45] (byte~) show_letter::$26 ← (byte) show_letter::i#10 << (byte) 3 -- vbuz1=vbuz2_rol_3 + // [45] (byte~) show_letter::$25 ← (byte) show_letter::i#10 << (byte) 3 -- vbuz1=vbuz2_rol_3 lda.z i asl asl asl - sta.z __26 - // [46] (byte~) show_letter::$21 ← (byte~) show_letter::$26 + (byte) show_letter::i#10 -- vbuz1=vbuz2_plus_vbuz3 - lda.z __26 + sta.z __25 + // [46] (byte~) show_letter::$21 ← (byte~) show_letter::$25 + (byte) show_letter::i#10 -- vbuz1=vbuz2_plus_vbuz3 + lda.z __25 clc adc.z i sta.z __21 @@ -6109,14 +6102,14 @@ show_letter: { lda.z via_y_2+1 adc #>$64 sta.z segment_via_y+1 - // [61] (byte~) show_letter::$28 ← (byte) show_letter::i#10 << (byte) 3 -- vbuz1=vbuz2_rol_3 + // [61] (byte~) show_letter::$27 ← (byte) show_letter::i#10 << (byte) 3 -- vbuz1=vbuz2_rol_3 lda.z i asl asl asl - sta.z __28 - // [62] (byte~) show_letter::$22 ← (byte~) show_letter::$28 + (byte) show_letter::i#10 -- vbuz1=vbuz2_plus_vbuz3 - lda.z __28 + sta.z __27 + // [62] (byte~) show_letter::$22 ← (byte~) show_letter::$27 + (byte) show_letter::i#10 -- vbuz1=vbuz2_plus_vbuz3 + lda.z __27 clc adc.z i sta.z __22 @@ -8364,10 +8357,10 @@ Removing always clobbered register reg byte a as potential for zp[1]:2 [ main::a Removing always clobbered register reg byte a as potential for zp[1]:3 [ main::w#4 main::w#1 ] Statement [23] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@4 [ main::angle#2 main::w#4 ] ( main:2 [ main::angle#2 main::w#4 ] ) always clobbers reg byte a Statement [26] (byte) main::angle#1 ← (byte) main::angle#2 + (byte) 9 [ main::angle#1 ] ( main:2 [ main::angle#1 ] ) always clobbers reg byte a -Statement [29] (byte~) show_letter::$24 ← (byte) show_letter::i#10 << (byte) 3 [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::$24 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::$24 ] ) always clobbers reg byte a +Statement [29] (byte~) show_letter::$23 ← (byte) show_letter::i#10 << (byte) 3 [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::$23 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::$23 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:83 [ show_letter::angle#0 ] Removing always clobbered register reg byte a as potential for zp[1]:4 [ show_letter::i#10 show_letter::i#1 ] -Statement [30] (byte~) show_letter::$20 ← (byte~) show_letter::$24 + (byte) show_letter::i#10 [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::$20 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::$20 ] ) always clobbers reg byte a +Statement [30] (byte~) show_letter::$20 ← (byte~) show_letter::$23 + (byte) show_letter::i#10 [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::$20 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::$20 ] ) always clobbers reg byte a Statement [31] (signed word) show_letter::to_x#0 ← *((signed word*)(struct SplineVector16*)(const struct Segment*) letter_c+(const byte) OFFSET_STRUCT_SEGMENT_TO + (byte~) show_letter::$20) [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::$20 show_letter::to_x#0 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::$20 show_letter::to_x#0 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:85 [ show_letter::$20 ] Statement [32] (signed word) show_letter::to_y#0 ← *((signed word*)(struct SplineVector16*)(const struct Segment*) letter_c+(const byte) OFFSET_STRUCT_SEGMENT_TO+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y + (byte~) show_letter::$20) [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::to_x#0 show_letter::to_y#0 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::to_x#0 show_letter::to_y#0 ] ) always clobbers reg byte a @@ -8381,8 +8374,8 @@ Statement [41] (signed word) show_letter::to_x#2 ← (signed word) rotate::retur Statement [42] (signed word) show_letter::to_y#2 ← (signed word) rotate::return_y#0 [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::to_x#2 show_letter::to_y#2 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::to_x#2 show_letter::to_y#2 ] ) always clobbers reg byte a Statement [43] (signed word) show_letter::current_x#10 ← (signed word) show_letter::to_x#2 + (signed byte) $64 [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::to_y#2 show_letter::current_x#10 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::to_y#2 show_letter::current_x#10 ] ) always clobbers reg byte a Statement [44] (signed word) show_letter::current_y#10 ← (signed word) show_letter::to_y#2 + (signed byte) $64 [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 ] ) always clobbers reg byte a -Statement [45] (byte~) show_letter::$26 ← (byte) show_letter::i#10 << (byte) 3 [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::$26 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::$26 ] ) always clobbers reg byte a -Statement [46] (byte~) show_letter::$21 ← (byte~) show_letter::$26 + (byte) show_letter::i#10 [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::$21 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::$21 ] ) always clobbers reg byte a +Statement [45] (byte~) show_letter::$25 ← (byte) show_letter::i#10 << (byte) 3 [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::$25 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::$25 ] ) always clobbers reg byte a +Statement [46] (byte~) show_letter::$21 ← (byte~) show_letter::$25 + (byte) show_letter::i#10 [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::$21 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::$21 ] ) always clobbers reg byte a Statement [47] (signed word) show_letter::via_x#0 ← *((signed word*)(struct SplineVector16*)(const struct Segment*) letter_c+(const byte) OFFSET_STRUCT_SEGMENT_VIA + (byte~) show_letter::$21) [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::$21 show_letter::via_x#0 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::$21 show_letter::via_x#0 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:107 [ show_letter::$21 ] Statement [48] (signed word) show_letter::via_y#0 ← *((signed word*)(struct SplineVector16*)(const struct Segment*) letter_c+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y + (byte~) show_letter::$21) [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::via_x#0 show_letter::via_y#0 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::via_x#0 show_letter::via_y#0 ] ) always clobbers reg byte a @@ -8396,8 +8389,8 @@ Statement [57] (signed word) show_letter::via_x#2 ← (signed word) rotate::retu Statement [58] (signed word) show_letter::via_y#2 ← (signed word) rotate::return_y#1 [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::via_x#2 show_letter::via_y#2 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::via_x#2 show_letter::via_y#2 ] ) always clobbers reg byte a Statement [59] (signed word) show_letter::segment_via_x#0 ← (signed word) show_letter::via_x#2 + (signed byte) $64 [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::via_y#2 show_letter::segment_via_x#0 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::via_y#2 show_letter::segment_via_x#0 ] ) always clobbers reg byte a Statement [60] (signed word) show_letter::segment_via_y#0 ← (signed word) show_letter::via_y#2 + (signed byte) $64 [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::segment_via_x#0 show_letter::segment_via_y#0 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::segment_via_x#0 show_letter::segment_via_y#0 ] ) always clobbers reg byte a -Statement [61] (byte~) show_letter::$28 ← (byte) show_letter::i#10 << (byte) 3 [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::segment_via_x#0 show_letter::segment_via_y#0 show_letter::$28 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::segment_via_x#0 show_letter::segment_via_y#0 show_letter::$28 ] ) always clobbers reg byte a -Statement [62] (byte~) show_letter::$22 ← (byte~) show_letter::$28 + (byte) show_letter::i#10 [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::segment_via_x#0 show_letter::segment_via_y#0 show_letter::$22 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::segment_via_x#0 show_letter::segment_via_y#0 show_letter::$22 ] ) always clobbers reg byte a +Statement [61] (byte~) show_letter::$27 ← (byte) show_letter::i#10 << (byte) 3 [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::segment_via_x#0 show_letter::segment_via_y#0 show_letter::$27 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::segment_via_x#0 show_letter::segment_via_y#0 show_letter::$27 ] ) always clobbers reg byte a +Statement [62] (byte~) show_letter::$22 ← (byte~) show_letter::$27 + (byte) show_letter::i#10 [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::segment_via_x#0 show_letter::segment_via_y#0 show_letter::$22 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::segment_via_x#0 show_letter::segment_via_y#0 show_letter::$22 ] ) always clobbers reg byte a Statement [66] (word) bitmap_line::x1#0 ← (word)(signed word) show_letter::current_x#4 [ show_letter::angle#0 show_letter::i#10 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 bitmap_line::x1#0 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 bitmap_line::x1#0 ] ) always clobbers reg byte a Statement [67] (word) bitmap_line::y1#0 ← (word)(signed word) show_letter::current_y#4 [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#10 show_letter::current_y#10 bitmap_line::x1#0 bitmap_line::y1#0 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#10 show_letter::current_y#10 bitmap_line::x1#0 bitmap_line::y1#0 ] ) always clobbers reg byte a Statement [68] (word) bitmap_line::x2#0 ← (word)(signed word) show_letter::current_x#10 [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#10 show_letter::current_y#10 bitmap_line::x1#0 bitmap_line::y1#0 bitmap_line::x2#0 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#10 show_letter::current_y#10 bitmap_line::x1#0 bitmap_line::y1#0 bitmap_line::x2#0 ] ) always clobbers reg byte a @@ -8602,8 +8595,8 @@ Statement [19] (byte) show_letter::angle#0 ← (byte) main::angle#2 [ main::angl Statement [22] if(*((const byte*) RASTER)!=(byte) $fe) goto main::@3 [ main::angle#2 main::w#4 ] ( main:2 [ main::angle#2 main::w#4 ] ) always clobbers reg byte a Statement [23] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@4 [ main::angle#2 main::w#4 ] ( main:2 [ main::angle#2 main::w#4 ] ) always clobbers reg byte a Statement [26] (byte) main::angle#1 ← (byte) main::angle#2 + (byte) 9 [ main::angle#1 ] ( main:2 [ main::angle#1 ] ) always clobbers reg byte a reg byte x -Statement [29] (byte~) show_letter::$24 ← (byte) show_letter::i#10 << (byte) 3 [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::$24 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::$24 ] ) always clobbers reg byte a -Statement [30] (byte~) show_letter::$20 ← (byte~) show_letter::$24 + (byte) show_letter::i#10 [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::$20 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::$20 ] ) always clobbers reg byte a +Statement [29] (byte~) show_letter::$23 ← (byte) show_letter::i#10 << (byte) 3 [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::$23 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::$23 ] ) always clobbers reg byte a +Statement [30] (byte~) show_letter::$20 ← (byte~) show_letter::$23 + (byte) show_letter::i#10 [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::$20 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::$20 ] ) always clobbers reg byte a Statement [31] (signed word) show_letter::to_x#0 ← *((signed word*)(struct SplineVector16*)(const struct Segment*) letter_c+(const byte) OFFSET_STRUCT_SEGMENT_TO + (byte~) show_letter::$20) [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::$20 show_letter::to_x#0 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::$20 show_letter::to_x#0 ] ) always clobbers reg byte a Statement [32] (signed word) show_letter::to_y#0 ← *((signed word*)(struct SplineVector16*)(const struct Segment*) letter_c+(const byte) OFFSET_STRUCT_SEGMENT_TO+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y + (byte~) show_letter::$20) [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::to_x#0 show_letter::to_y#0 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::to_x#0 show_letter::to_y#0 ] ) always clobbers reg byte a Statement [33] (signed word) show_letter::to_x#1 ← (signed word) show_letter::to_x#0 - (signed byte) $32 [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::to_y#0 show_letter::to_x#1 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::to_y#0 show_letter::to_x#1 ] ) always clobbers reg byte a @@ -8616,8 +8609,8 @@ Statement [41] (signed word) show_letter::to_x#2 ← (signed word) rotate::retur Statement [42] (signed word) show_letter::to_y#2 ← (signed word) rotate::return_y#0 [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::to_x#2 show_letter::to_y#2 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::to_x#2 show_letter::to_y#2 ] ) always clobbers reg byte a Statement [43] (signed word) show_letter::current_x#10 ← (signed word) show_letter::to_x#2 + (signed byte) $64 [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::to_y#2 show_letter::current_x#10 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::to_y#2 show_letter::current_x#10 ] ) always clobbers reg byte a Statement [44] (signed word) show_letter::current_y#10 ← (signed word) show_letter::to_y#2 + (signed byte) $64 [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 ] ) always clobbers reg byte a -Statement [45] (byte~) show_letter::$26 ← (byte) show_letter::i#10 << (byte) 3 [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::$26 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::$26 ] ) always clobbers reg byte a -Statement [46] (byte~) show_letter::$21 ← (byte~) show_letter::$26 + (byte) show_letter::i#10 [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::$21 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::$21 ] ) always clobbers reg byte a +Statement [45] (byte~) show_letter::$25 ← (byte) show_letter::i#10 << (byte) 3 [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::$25 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::$25 ] ) always clobbers reg byte a +Statement [46] (byte~) show_letter::$21 ← (byte~) show_letter::$25 + (byte) show_letter::i#10 [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::$21 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::$21 ] ) always clobbers reg byte a Statement [47] (signed word) show_letter::via_x#0 ← *((signed word*)(struct SplineVector16*)(const struct Segment*) letter_c+(const byte) OFFSET_STRUCT_SEGMENT_VIA + (byte~) show_letter::$21) [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::$21 show_letter::via_x#0 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::$21 show_letter::via_x#0 ] ) always clobbers reg byte a Statement [48] (signed word) show_letter::via_y#0 ← *((signed word*)(struct SplineVector16*)(const struct Segment*) letter_c+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y + (byte~) show_letter::$21) [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::via_x#0 show_letter::via_y#0 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::via_x#0 show_letter::via_y#0 ] ) always clobbers reg byte a Statement [49] (signed word) show_letter::via_x#1 ← (signed word) show_letter::via_x#0 - (signed byte) $32 [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::via_y#0 show_letter::via_x#1 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::via_y#0 show_letter::via_x#1 ] ) always clobbers reg byte a @@ -8630,8 +8623,8 @@ Statement [57] (signed word) show_letter::via_x#2 ← (signed word) rotate::retu Statement [58] (signed word) show_letter::via_y#2 ← (signed word) rotate::return_y#1 [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::via_x#2 show_letter::via_y#2 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::via_x#2 show_letter::via_y#2 ] ) always clobbers reg byte a Statement [59] (signed word) show_letter::segment_via_x#0 ← (signed word) show_letter::via_x#2 + (signed byte) $64 [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::via_y#2 show_letter::segment_via_x#0 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::via_y#2 show_letter::segment_via_x#0 ] ) always clobbers reg byte a Statement [60] (signed word) show_letter::segment_via_y#0 ← (signed word) show_letter::via_y#2 + (signed byte) $64 [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::segment_via_x#0 show_letter::segment_via_y#0 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::segment_via_x#0 show_letter::segment_via_y#0 ] ) always clobbers reg byte a -Statement [61] (byte~) show_letter::$28 ← (byte) show_letter::i#10 << (byte) 3 [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::segment_via_x#0 show_letter::segment_via_y#0 show_letter::$28 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::segment_via_x#0 show_letter::segment_via_y#0 show_letter::$28 ] ) always clobbers reg byte a -Statement [62] (byte~) show_letter::$22 ← (byte~) show_letter::$28 + (byte) show_letter::i#10 [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::segment_via_x#0 show_letter::segment_via_y#0 show_letter::$22 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::segment_via_x#0 show_letter::segment_via_y#0 show_letter::$22 ] ) always clobbers reg byte a +Statement [61] (byte~) show_letter::$27 ← (byte) show_letter::i#10 << (byte) 3 [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::segment_via_x#0 show_letter::segment_via_y#0 show_letter::$27 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::segment_via_x#0 show_letter::segment_via_y#0 show_letter::$27 ] ) always clobbers reg byte a +Statement [62] (byte~) show_letter::$22 ← (byte~) show_letter::$27 + (byte) show_letter::i#10 [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::segment_via_x#0 show_letter::segment_via_y#0 show_letter::$22 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#4 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 show_letter::segment_via_x#0 show_letter::segment_via_y#0 show_letter::$22 ] ) always clobbers reg byte a Statement [66] (word) bitmap_line::x1#0 ← (word)(signed word) show_letter::current_x#4 [ show_letter::angle#0 show_letter::i#10 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 bitmap_line::x1#0 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_y#4 show_letter::current_x#10 show_letter::current_y#10 bitmap_line::x1#0 ] ) always clobbers reg byte a Statement [67] (word) bitmap_line::y1#0 ← (word)(signed word) show_letter::current_y#4 [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#10 show_letter::current_y#10 bitmap_line::x1#0 bitmap_line::y1#0 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#10 show_letter::current_y#10 bitmap_line::x1#0 bitmap_line::y1#0 ] ) always clobbers reg byte a Statement [68] (word) bitmap_line::x2#0 ← (word)(signed word) show_letter::current_x#10 [ show_letter::angle#0 show_letter::i#10 show_letter::current_x#10 show_letter::current_y#10 bitmap_line::x1#0 bitmap_line::y1#0 bitmap_line::x2#0 ] ( main:2::show_letter:20 [ main::angle#2 show_letter::angle#0 show_letter::i#10 show_letter::current_x#10 show_letter::current_y#10 bitmap_line::x1#0 bitmap_line::y1#0 bitmap_line::x2#0 ] ) always clobbers reg byte a @@ -8852,7 +8845,7 @@ Potential registers zp[2]:78 [ mulf_init::sqr2_hi#2 mulf_init::sqr2_hi#1 ] : zp[ Potential registers zp[1]:80 [ mulf_init::dir#2 mulf_init::dir#4 ] : zp[1]:80 , reg byte x , Potential registers zp[2]:81 [ mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ] : zp[2]:81 , Potential registers zp[1]:83 [ show_letter::angle#0 ] : zp[1]:83 , -Potential registers zp[1]:84 [ show_letter::$24 ] : zp[1]:84 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:84 [ show_letter::$23 ] : zp[1]:84 , reg byte a , reg byte x , reg byte y , Potential registers zp[1]:85 [ show_letter::$20 ] : zp[1]:85 , reg byte x , reg byte y , Potential registers zp[2]:86 [ show_letter::to_x#0 ] : zp[2]:86 , Potential registers zp[2]:88 [ show_letter::to_y#0 ] : zp[2]:88 , @@ -8864,7 +8857,7 @@ Potential registers zp[2]:98 [ show_letter::to_x#2 ] : zp[2]:98 , Potential registers zp[2]:100 [ show_letter::to_y#2 ] : zp[2]:100 , Potential registers zp[2]:102 [ show_letter::current_x#10 ] : zp[2]:102 , Potential registers zp[2]:104 [ show_letter::current_y#10 ] : zp[2]:104 , -Potential registers zp[1]:106 [ show_letter::$26 ] : zp[1]:106 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:106 [ show_letter::$25 ] : zp[1]:106 , reg byte a , reg byte x , reg byte y , Potential registers zp[1]:107 [ show_letter::$21 ] : zp[1]:107 , reg byte x , reg byte y , Potential registers zp[2]:108 [ show_letter::via_x#0 ] : zp[2]:108 , Potential registers zp[2]:110 [ show_letter::via_y#0 ] : zp[2]:110 , @@ -8876,7 +8869,7 @@ Potential registers zp[2]:120 [ show_letter::via_x#2 ] : zp[2]:120 , Potential registers zp[2]:122 [ show_letter::via_y#2 ] : zp[2]:122 , Potential registers zp[2]:124 [ show_letter::segment_via_x#0 ] : zp[2]:124 , Potential registers zp[2]:126 [ show_letter::segment_via_y#0 ] : zp[2]:126 , -Potential registers zp[1]:128 [ show_letter::$28 ] : zp[1]:128 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:128 [ show_letter::$27 ] : zp[1]:128 , reg byte a , reg byte x , reg byte y , Potential registers zp[1]:129 [ show_letter::$22 ] : zp[1]:129 , reg byte a , reg byte x , reg byte y , Potential registers zp[1]:130 [ show_letter::segment_type#0 ] : zp[1]:130 , reg byte a , reg byte x , reg byte y , Potential registers zp[2]:131 [ spline_8segB::p0_x#0 ] : zp[2]:131 , @@ -8973,7 +8966,7 @@ Uplift Scope [bitmap_line] 7,125.57: zp[2]:20 [ bitmap_line::y#15 bitmap_line::y Uplift Scope [spline_8segB] 2,002: zp[2]:200 [ spline_8segB::$22 ] 2,002: zp[2]:204 [ spline_8segB::$24 ] 1,751.75: zp[1]:39 [ spline_8segB::n#2 spline_8segB::n#1 ] 1,501.5: zp[1]:208 [ spline_8segB::$31 ] 941.32: zp[2]:42 [ spline_8segB::i_y#2 spline_8segB::i_y#0 spline_8segB::i_y#1 ] 801.57: zp[2]:40 [ spline_8segB::i_x#2 spline_8segB::i_x#0 spline_8segB::i_x#1 ] 711.62: zp[2]:35 [ spline_8segB::p_x#2 spline_8segB::p_x#0 spline_8segB::p_x#1 ] 667.33: zp[2]:206 [ spline_8segB::$25 ] 624.17: zp[2]:37 [ spline_8segB::p_y#2 spline_8segB::p_y#0 spline_8segB::p_y#1 ] 500.5: zp[2]:202 [ spline_8segB::$23 ] 59: zp[2]:198 [ spline_8segB::j_y#0 ] 55.72: zp[2]:196 [ spline_8segB::j_x#0 ] 34.33: zp[2]:139 [ spline_8segB::p2_x#0 ] 20.6: zp[2]:141 [ spline_8segB::p2_y#0 ] 10.5: zp[2]:135 [ spline_8segB::p1_x#0 ] 9.55: zp[2]:137 [ spline_8segB::p1_y#0 ] 4.86: zp[2]:131 [ spline_8segB::p0_x#0 ] 4.86: zp[2]:133 [ spline_8segB::p0_y#0 ] 4: zp[2]:172 [ spline_8segB::$0 ] 4: zp[2]:174 [ spline_8segB::$1 ] 4: zp[2]:178 [ spline_8segB::$3 ] 4: zp[2]:180 [ spline_8segB::$4 ] 4: zp[2]:184 [ spline_8segB::$6 ] 4: zp[2]:188 [ spline_8segB::$8 ] 4: zp[2]:192 [ spline_8segB::$10 ] 4: zp[2]:194 [ spline_8segB::$12 ] 4: zp[2]:209 [ spline_8segB::$18 ] 4: zp[2]:213 [ spline_8segB::$20 ] 2: zp[2]:215 [ spline_8segB::$21 ] 1.33: zp[2]:186 [ spline_8segB::b_x#0 ] 1.33: zp[2]:190 [ spline_8segB::b_y#0 ] 1.33: zp[2]:211 [ spline_8segB::$19 ] 0.6: zp[2]:182 [ spline_8segB::a_y#0 ] 0.5: zp[2]:176 [ spline_8segB::a_x#0 ] Uplift Scope [bitmap_plot] 4,514.5: zp[2]:27 [ bitmap_plot::x#4 bitmap_plot::x#3 bitmap_plot::x#2 bitmap_plot::x#0 bitmap_plot::x#1 ] 4,016: zp[1]:26 [ bitmap_plot::y#4 bitmap_plot::y#3 bitmap_plot::y#2 bitmap_plot::y#0 bitmap_plot::y#1 ] 4: zp[2]:163 [ bitmap_plot::$1 ] 4: zp[1]:167 [ bitmap_plot::$2 ] 3: zp[2]:165 [ bitmap_plot::plotter#1 ] 1: zp[2]:161 [ bitmap_plot::plotter#0 ] Uplift Scope [bitmap_plot_spline_8seg] 1,901.9: zp[1]:13 [ bitmap_plot_spline_8seg::n#2 bitmap_plot_spline_8seg::n#1 ] 1,505.5: zp[2]:9 [ bitmap_plot_spline_8seg::current_x#2 bitmap_plot_spline_8seg::current_x#0 bitmap_plot_spline_8seg::current_x#1 ] 1,501.5: zp[1]:144 [ bitmap_plot_spline_8seg::$9 ] 1,172.83: zp[2]:11 [ bitmap_plot_spline_8seg::current_y#2 bitmap_plot_spline_8seg::current_y#0 bitmap_plot_spline_8seg::current_y#1 ] 500.5: zp[1]:143 [ bitmap_plot_spline_8seg::$8 ] -Uplift Scope [show_letter] 207.05: zp[2]:7 [ show_letter::current_y#4 show_letter::current_y#11 ] 202: zp[1]:84 [ show_letter::$24 ] 202: zp[1]:106 [ show_letter::$26 ] 202: zp[1]:128 [ show_letter::$28 ] 202: zp[1]:129 [ show_letter::$22 ] 151.5: zp[1]:85 [ show_letter::$20 ] 151.5: zp[1]:107 [ show_letter::$21 ] 151.5: zp[1]:130 [ show_letter::segment_type#0 ] 106.32: zp[2]:5 [ show_letter::current_x#4 show_letter::current_x#11 ] 101: zp[2]:86 [ show_letter::to_x#0 ] 101: zp[2]:88 [ show_letter::to_y#0 ] 101: zp[2]:90 [ show_letter::to_x#1 ] 101: zp[2]:92 [ show_letter::to_y#1 ] 101: zp[2]:98 [ show_letter::to_x#2 ] 101: zp[2]:100 [ show_letter::to_y#2 ] 101: zp[2]:108 [ show_letter::via_x#0 ] 101: zp[2]:110 [ show_letter::via_y#0 ] 101: zp[2]:112 [ show_letter::via_x#1 ] 101: zp[2]:114 [ show_letter::via_y#1 ] 101: zp[2]:120 [ show_letter::via_x#2 ] 101: zp[2]:122 [ show_letter::via_y#2 ] 91.29: zp[1]:4 [ show_letter::i#10 show_letter::i#1 ] 22.44: zp[2]:124 [ show_letter::segment_via_x#0 ] 22.44: zp[2]:126 [ show_letter::segment_via_y#0 ] 7.77: zp[2]:102 [ show_letter::current_x#10 ] 7.77: zp[2]:104 [ show_letter::current_y#10 ] 3.67: zp[1]:83 [ show_letter::angle#0 ] +Uplift Scope [show_letter] 207.05: zp[2]:7 [ show_letter::current_y#4 show_letter::current_y#11 ] 202: zp[1]:84 [ show_letter::$23 ] 202: zp[1]:106 [ show_letter::$25 ] 202: zp[1]:128 [ show_letter::$27 ] 202: zp[1]:129 [ show_letter::$22 ] 151.5: zp[1]:85 [ show_letter::$20 ] 151.5: zp[1]:107 [ show_letter::$21 ] 151.5: zp[1]:130 [ show_letter::segment_type#0 ] 106.32: zp[2]:5 [ show_letter::current_x#4 show_letter::current_x#11 ] 101: zp[2]:86 [ show_letter::to_x#0 ] 101: zp[2]:88 [ show_letter::to_y#0 ] 101: zp[2]:90 [ show_letter::to_x#1 ] 101: zp[2]:92 [ show_letter::to_y#1 ] 101: zp[2]:98 [ show_letter::to_x#2 ] 101: zp[2]:100 [ show_letter::to_y#2 ] 101: zp[2]:108 [ show_letter::via_x#0 ] 101: zp[2]:110 [ show_letter::via_y#0 ] 101: zp[2]:112 [ show_letter::via_x#1 ] 101: zp[2]:114 [ show_letter::via_y#1 ] 101: zp[2]:120 [ show_letter::via_x#2 ] 101: zp[2]:122 [ show_letter::via_y#2 ] 91.29: zp[1]:4 [ show_letter::i#10 show_letter::i#1 ] 22.44: zp[2]:124 [ show_letter::segment_via_x#0 ] 22.44: zp[2]:126 [ show_letter::segment_via_y#0 ] 7.77: zp[2]:102 [ show_letter::current_x#10 ] 7.77: zp[2]:104 [ show_letter::current_y#10 ] 3.67: zp[1]:83 [ show_letter::angle#0 ] Uplift Scope [rotate] 416.62: zp[1]:44 [ rotate::angle#2 rotate::angle#0 rotate::angle#1 ] 213.44: zp[2]:47 [ rotate::vector_y#2 rotate::vector_y#0 rotate::vector_y#1 ] 142.59: zp[2]:45 [ rotate::vector_x#2 rotate::vector_x#0 rotate::vector_x#1 ] 101: zp[2]:94 [ rotate::return_x#0 ] 101: zp[2]:96 [ rotate::return_y#0 ] 101: zp[2]:116 [ rotate::return_x#1 ] 101: zp[2]:118 [ rotate::return_y#1 ] 34: zp[2]:274 [ rotate::return_x#2 ] 34: zp[2]:277 [ rotate::return_y#2 ] 4: zp[2]:227 [ rotate::$2 ] 4: zp[2]:239 [ rotate::$5 ] 4: zp[2]:253 [ rotate::$9 ] 4: zp[2]:255 [ rotate::$10 ] 4: zp[2]:267 [ rotate::$12 ] 4: zp[2]:269 [ rotate::$13 ] 2: zp[4]:223 [ rotate::$1 ] 2: zp[4]:235 [ rotate::$4 ] 2: zp[4]:249 [ rotate::$8 ] 2: zp[4]:263 [ rotate::$11 ] 2: zp[1]:273 [ rotate::$15 ] 2: zp[1]:276 [ rotate::$18 ] 1.33: zp[2]:271 [ rotate::yr#1 ] 0.75: zp[2]:217 [ rotate::cos_a#0 ] 0.67: zp[2]:243 [ rotate::sin_a#0 ] 0.44: zp[2]:257 [ rotate::xr#1 ] 0.25: zp[2]:229 [ rotate::xr#0 ] 0.24: zp[2]:241 [ rotate::yr#0 ] Uplift Scope [main] 886.17: zp[1]:3 [ main::w#4 main::w#1 ] 25.3: zp[1]:2 [ main::angle#2 main::angle#1 ] Uplift Scope [memset] 341.33: zp[2]:62 [ memset::dst#2 memset::dst#4 memset::dst#1 ] 17.17: zp[2]:303 [ memset::end#0 ] 12.62: zp[1]:61 [ memset::c#4 ] 2: zp[2]:57 [ memset::num#2 ] 0: zp[2]:59 [ memset::str#3 ] @@ -8995,7 +8988,7 @@ Uplifting [bitmap_line] best 849275 combination zp[2]:20 [ bitmap_line::y#15 bit Uplifting [spline_8segB] best 832275 combination zp[2]:200 [ spline_8segB::$22 ] zp[2]:204 [ spline_8segB::$24 ] reg byte y [ spline_8segB::n#2 spline_8segB::n#1 ] reg byte x [ spline_8segB::$31 ] zp[2]:42 [ spline_8segB::i_y#2 spline_8segB::i_y#0 spline_8segB::i_y#1 ] zp[2]:40 [ spline_8segB::i_x#2 spline_8segB::i_x#0 spline_8segB::i_x#1 ] zp[2]:35 [ spline_8segB::p_x#2 spline_8segB::p_x#0 spline_8segB::p_x#1 ] zp[2]:206 [ spline_8segB::$25 ] zp[2]:37 [ spline_8segB::p_y#2 spline_8segB::p_y#0 spline_8segB::p_y#1 ] zp[2]:202 [ spline_8segB::$23 ] zp[2]:198 [ spline_8segB::j_y#0 ] zp[2]:196 [ spline_8segB::j_x#0 ] zp[2]:139 [ spline_8segB::p2_x#0 ] zp[2]:141 [ spline_8segB::p2_y#0 ] zp[2]:135 [ spline_8segB::p1_x#0 ] zp[2]:137 [ spline_8segB::p1_y#0 ] zp[2]:131 [ spline_8segB::p0_x#0 ] zp[2]:133 [ spline_8segB::p0_y#0 ] zp[2]:172 [ spline_8segB::$0 ] zp[2]:174 [ spline_8segB::$1 ] zp[2]:178 [ spline_8segB::$3 ] zp[2]:180 [ spline_8segB::$4 ] zp[2]:184 [ spline_8segB::$6 ] zp[2]:188 [ spline_8segB::$8 ] zp[2]:192 [ spline_8segB::$10 ] zp[2]:194 [ spline_8segB::$12 ] zp[2]:209 [ spline_8segB::$18 ] zp[2]:213 [ spline_8segB::$20 ] zp[2]:215 [ spline_8segB::$21 ] zp[2]:186 [ spline_8segB::b_x#0 ] zp[2]:190 [ spline_8segB::b_y#0 ] zp[2]:211 [ spline_8segB::$19 ] zp[2]:182 [ spline_8segB::a_y#0 ] zp[2]:176 [ spline_8segB::a_x#0 ] Uplifting [bitmap_plot] best 830266 combination zp[2]:27 [ bitmap_plot::x#4 bitmap_plot::x#3 bitmap_plot::x#2 bitmap_plot::x#0 bitmap_plot::x#1 ] reg byte x [ bitmap_plot::y#4 bitmap_plot::y#3 bitmap_plot::y#2 bitmap_plot::y#0 bitmap_plot::y#1 ] zp[2]:163 [ bitmap_plot::$1 ] reg byte a [ bitmap_plot::$2 ] zp[2]:165 [ bitmap_plot::plotter#1 ] zp[2]:161 [ bitmap_plot::plotter#0 ] Uplifting [bitmap_plot_spline_8seg] best 816266 combination zp[1]:13 [ bitmap_plot_spline_8seg::n#2 bitmap_plot_spline_8seg::n#1 ] zp[2]:9 [ bitmap_plot_spline_8seg::current_x#2 bitmap_plot_spline_8seg::current_x#0 bitmap_plot_spline_8seg::current_x#1 ] reg byte x [ bitmap_plot_spline_8seg::$9 ] zp[2]:11 [ bitmap_plot_spline_8seg::current_y#2 bitmap_plot_spline_8seg::current_y#0 bitmap_plot_spline_8seg::current_y#1 ] reg byte x [ bitmap_plot_spline_8seg::$8 ] -Uplifting [show_letter] best 814066 combination zp[2]:7 [ show_letter::current_y#4 show_letter::current_y#11 ] reg byte a [ show_letter::$24 ] reg byte a [ show_letter::$26 ] reg byte a [ show_letter::$28 ] reg byte a [ show_letter::$22 ] zp[1]:85 [ show_letter::$20 ] zp[1]:107 [ show_letter::$21 ] zp[1]:130 [ show_letter::segment_type#0 ] zp[2]:5 [ show_letter::current_x#4 show_letter::current_x#11 ] zp[2]:86 [ show_letter::to_x#0 ] zp[2]:88 [ show_letter::to_y#0 ] zp[2]:90 [ show_letter::to_x#1 ] zp[2]:92 [ show_letter::to_y#1 ] zp[2]:98 [ show_letter::to_x#2 ] zp[2]:100 [ show_letter::to_y#2 ] zp[2]:108 [ show_letter::via_x#0 ] zp[2]:110 [ show_letter::via_y#0 ] zp[2]:112 [ show_letter::via_x#1 ] zp[2]:114 [ show_letter::via_y#1 ] zp[2]:120 [ show_letter::via_x#2 ] zp[2]:122 [ show_letter::via_y#2 ] zp[1]:4 [ show_letter::i#10 show_letter::i#1 ] zp[2]:124 [ show_letter::segment_via_x#0 ] zp[2]:126 [ show_letter::segment_via_y#0 ] zp[2]:102 [ show_letter::current_x#10 ] zp[2]:104 [ show_letter::current_y#10 ] zp[1]:83 [ show_letter::angle#0 ] +Uplifting [show_letter] best 814066 combination zp[2]:7 [ show_letter::current_y#4 show_letter::current_y#11 ] reg byte a [ show_letter::$23 ] reg byte a [ show_letter::$25 ] reg byte a [ show_letter::$27 ] reg byte a [ show_letter::$22 ] zp[1]:85 [ show_letter::$20 ] zp[1]:107 [ show_letter::$21 ] zp[1]:130 [ show_letter::segment_type#0 ] zp[2]:5 [ show_letter::current_x#4 show_letter::current_x#11 ] zp[2]:86 [ show_letter::to_x#0 ] zp[2]:88 [ show_letter::to_y#0 ] zp[2]:90 [ show_letter::to_x#1 ] zp[2]:92 [ show_letter::to_y#1 ] zp[2]:98 [ show_letter::to_x#2 ] zp[2]:100 [ show_letter::to_y#2 ] zp[2]:108 [ show_letter::via_x#0 ] zp[2]:110 [ show_letter::via_y#0 ] zp[2]:112 [ show_letter::via_x#1 ] zp[2]:114 [ show_letter::via_y#1 ] zp[2]:120 [ show_letter::via_x#2 ] zp[2]:122 [ show_letter::via_y#2 ] zp[1]:4 [ show_letter::i#10 show_letter::i#1 ] zp[2]:124 [ show_letter::segment_via_x#0 ] zp[2]:126 [ show_letter::segment_via_y#0 ] zp[2]:102 [ show_letter::current_x#10 ] zp[2]:104 [ show_letter::current_y#10 ] zp[1]:83 [ show_letter::angle#0 ] Limited combination testing to 100 combinations of 9216 possible. Uplifting [rotate] best 813448 combination reg byte y [ rotate::angle#2 rotate::angle#0 rotate::angle#1 ] zp[2]:47 [ rotate::vector_y#2 rotate::vector_y#0 rotate::vector_y#1 ] zp[2]:45 [ rotate::vector_x#2 rotate::vector_x#0 rotate::vector_x#1 ] zp[2]:94 [ rotate::return_x#0 ] zp[2]:96 [ rotate::return_y#0 ] zp[2]:116 [ rotate::return_x#1 ] zp[2]:118 [ rotate::return_y#1 ] zp[2]:274 [ rotate::return_x#2 ] zp[2]:277 [ rotate::return_y#2 ] zp[2]:227 [ rotate::$2 ] zp[2]:239 [ rotate::$5 ] zp[2]:253 [ rotate::$9 ] zp[2]:255 [ rotate::$10 ] zp[2]:267 [ rotate::$12 ] zp[2]:269 [ rotate::$13 ] zp[4]:223 [ rotate::$1 ] zp[4]:235 [ rotate::$4 ] zp[4]:249 [ rotate::$8 ] zp[4]:263 [ rotate::$11 ] reg byte a [ rotate::$15 ] reg byte a [ rotate::$18 ] zp[2]:271 [ rotate::yr#1 ] zp[2]:217 [ rotate::cos_a#0 ] zp[2]:243 [ rotate::sin_a#0 ] zp[2]:257 [ rotate::xr#1 ] zp[2]:229 [ rotate::xr#0 ] zp[2]:241 [ rotate::yr#0 ] Uplifting [main] best 809848 combination reg byte x [ main::w#4 main::w#1 ] zp[1]:2 [ main::angle#2 main::angle#1 ] @@ -9380,12 +9373,12 @@ show_letter: { jmp __b1 // show_letter::@1 __b1: - // [29] (byte~) show_letter::$24 ← (byte) show_letter::i#10 << (byte) 3 -- vbuaa=vbuz1_rol_3 + // [29] (byte~) show_letter::$23 ← (byte) show_letter::i#10 << (byte) 3 -- vbuaa=vbuz1_rol_3 lda.z i asl asl asl - // [30] (byte~) show_letter::$20 ← (byte~) show_letter::$24 + (byte) show_letter::i#10 -- vbuxx=vbuaa_plus_vbuz1 + // [30] (byte~) show_letter::$20 ← (byte~) show_letter::$23 + (byte) show_letter::i#10 -- vbuxx=vbuaa_plus_vbuz1 clc adc.z i tax @@ -9449,12 +9442,12 @@ show_letter: { lda.z to_y_1+1 adc #>$64 sta.z current_y_1+1 - // [45] (byte~) show_letter::$26 ← (byte) show_letter::i#10 << (byte) 3 -- vbuaa=vbuz1_rol_3 + // [45] (byte~) show_letter::$25 ← (byte) show_letter::i#10 << (byte) 3 -- vbuaa=vbuz1_rol_3 lda.z i asl asl asl - // [46] (byte~) show_letter::$21 ← (byte~) show_letter::$26 + (byte) show_letter::i#10 -- vbuxx=vbuaa_plus_vbuz1 + // [46] (byte~) show_letter::$21 ← (byte~) show_letter::$25 + (byte) show_letter::i#10 -- vbuxx=vbuaa_plus_vbuz1 clc adc.z i tax @@ -9518,12 +9511,12 @@ show_letter: { lda.z segment_via_y+1 adc #>$64 sta.z segment_via_y+1 - // [61] (byte~) show_letter::$28 ← (byte) show_letter::i#10 << (byte) 3 -- vbuaa=vbuz1_rol_3 + // [61] (byte~) show_letter::$27 ← (byte) show_letter::i#10 << (byte) 3 -- vbuaa=vbuz1_rol_3 lda.z i asl asl asl - // [62] (byte~) show_letter::$22 ← (byte~) show_letter::$28 + (byte) show_letter::i#10 -- vbuaa=vbuaa_plus_vbuz1 + // [62] (byte~) show_letter::$22 ← (byte~) show_letter::$27 + (byte) show_letter::i#10 -- vbuaa=vbuaa_plus_vbuz1 clc adc.z i // [63] (byte) show_letter::segment_type#0 ← *((byte*)(const struct Segment*) letter_c + (byte~) show_letter::$22) -- vbuaa=pbuc1_derefidx_vbuaa @@ -12125,9 +12118,9 @@ FINAL SYMBOL TABLE (byte~) show_letter::$20 reg byte x 151.5 (byte~) show_letter::$21 reg byte x 151.5 (byte~) show_letter::$22 reg byte a 202.0 -(byte~) show_letter::$24 reg byte a 202.0 -(byte~) show_letter::$26 reg byte a 202.0 -(byte~) show_letter::$28 reg byte a 202.0 +(byte~) show_letter::$23 reg byte a 202.0 +(byte~) show_letter::$25 reg byte a 202.0 +(byte~) show_letter::$27 reg byte a 202.0 (struct SplineVector16~) show_letter::$7 (label) show_letter::@1 (label) show_letter::@2 @@ -12152,10 +12145,12 @@ FINAL SYMBOL TABLE (byte) show_letter::i (byte) show_letter::i#1 i zp[1]:19 75.75 (byte) show_letter::i#10 i zp[1]:19 15.538461538461537 +(struct SplineVector16) show_letter::segment_to (signed word) show_letter::segment_to_x (signed word) show_letter::segment_to_y (byte) show_letter::segment_type (byte) show_letter::segment_type#0 reg byte a 151.5 +(struct SplineVector16) show_letter::segment_via (signed word) show_letter::segment_via_x (signed word) show_letter::segment_via_x#0 segment_via_x zp[2]:32 22.444444444444443 (signed word) show_letter::segment_via_y @@ -12263,13 +12258,13 @@ zp[1]:18 [ mulf_init::c#2 mulf_init::c#1 main::angle#2 main::angle#1 show_letter reg byte x [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ] reg byte x [ mulf_init::x_255#2 mulf_init::x_255#1 ] zp[1]:19 [ mulf_init::dir#2 mulf_init::dir#4 show_letter::i#10 show_letter::i#1 ] -reg byte a [ show_letter::$24 ] +reg byte a [ show_letter::$23 ] reg byte x [ show_letter::$20 ] zp[2]:20 [ show_letter::current_x#10 spline_8segB::p2_x#0 mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 ] zp[2]:22 [ show_letter::current_y#10 spline_8segB::p2_y#0 mulf_init::sqr1_hi#2 mulf_init::sqr1_hi#1 ] -reg byte a [ show_letter::$26 ] +reg byte a [ show_letter::$25 ] reg byte x [ show_letter::$21 ] -reg byte a [ show_letter::$28 ] +reg byte a [ show_letter::$27 ] reg byte a [ show_letter::$22 ] reg byte a [ show_letter::segment_type#0 ] reg byte x [ bitmap_plot_spline_8seg::$8 ] @@ -12465,12 +12460,12 @@ show_letter: { // show_letter::@1 __b1: // to = letter_c[i].to - // [29] (byte~) show_letter::$24 ← (byte) show_letter::i#10 << (byte) 3 -- vbuaa=vbuz1_rol_3 + // [29] (byte~) show_letter::$23 ← (byte) show_letter::i#10 << (byte) 3 -- vbuaa=vbuz1_rol_3 lda.z i asl asl asl - // [30] (byte~) show_letter::$20 ← (byte~) show_letter::$24 + (byte) show_letter::i#10 -- vbuxx=vbuaa_plus_vbuz1 + // [30] (byte~) show_letter::$20 ← (byte~) show_letter::$23 + (byte) show_letter::i#10 -- vbuxx=vbuaa_plus_vbuz1 clc adc.z i tax @@ -12519,7 +12514,7 @@ show_letter: { // to = rotate(to, angle) // [41] (signed word) show_letter::to_x#2 ← (signed word) rotate::return_x#0 // [42] (signed word) show_letter::to_y#2 ← (signed word) rotate::return_y#0 - // to = { to.x + 100, to.y + 100} + // to.x + 100 // [43] (signed word) show_letter::current_x#10 ← (signed word) show_letter::to_x#2 + (signed byte) $64 -- vwsz1=vwsz2_plus_vbsc1 lda.z to_x_1 clc @@ -12528,6 +12523,7 @@ show_letter: { lda.z to_x_1+1 adc #>$64 sta.z current_x_1+1 + // to.y + 100 // [44] (signed word) show_letter::current_y#10 ← (signed word) show_letter::to_y#2 + (signed byte) $64 -- vwsz1=vwsz2_plus_vbsc1 lda.z to_y_1 clc @@ -12537,12 +12533,12 @@ show_letter: { adc #>$64 sta.z current_y_1+1 // via = letter_c[i].via - // [45] (byte~) show_letter::$26 ← (byte) show_letter::i#10 << (byte) 3 -- vbuaa=vbuz1_rol_3 + // [45] (byte~) show_letter::$25 ← (byte) show_letter::i#10 << (byte) 3 -- vbuaa=vbuz1_rol_3 lda.z i asl asl asl - // [46] (byte~) show_letter::$21 ← (byte~) show_letter::$26 + (byte) show_letter::i#10 -- vbuxx=vbuaa_plus_vbuz1 + // [46] (byte~) show_letter::$21 ← (byte~) show_letter::$25 + (byte) show_letter::i#10 -- vbuxx=vbuaa_plus_vbuz1 clc adc.z i tax @@ -12591,7 +12587,7 @@ show_letter: { // via = rotate(via, angle) // [57] (signed word) show_letter::via_x#2 ← (signed word) rotate::return_x#1 // [58] (signed word) show_letter::via_y#2 ← (signed word) rotate::return_y#1 - // via = { via.x + 100, via.y + 100} + // via.x + 100 // [59] (signed word) show_letter::segment_via_x#0 ← (signed word) show_letter::via_x#2 + (signed byte) $64 -- vwsz1=vwsz1_plus_vbsc1 lda.z segment_via_x clc @@ -12600,6 +12596,7 @@ show_letter: { lda.z segment_via_x+1 adc #>$64 sta.z segment_via_x+1 + // via.y + 100 // [60] (signed word) show_letter::segment_via_y#0 ← (signed word) show_letter::via_y#2 + (signed byte) $64 -- vwsz1=vwsz1_plus_vbsc1 lda.z segment_via_y clc @@ -12609,12 +12606,12 @@ show_letter: { adc #>$64 sta.z segment_via_y+1 // segment = { letter_c[i].type, to, via} - // [61] (byte~) show_letter::$28 ← (byte) show_letter::i#10 << (byte) 3 -- vbuaa=vbuz1_rol_3 + // [61] (byte~) show_letter::$27 ← (byte) show_letter::i#10 << (byte) 3 -- vbuaa=vbuz1_rol_3 lda.z i asl asl asl - // [62] (byte~) show_letter::$22 ← (byte~) show_letter::$28 + (byte) show_letter::i#10 -- vbuaa=vbuaa_plus_vbuz1 + // [62] (byte~) show_letter::$22 ← (byte~) show_letter::$27 + (byte) show_letter::i#10 -- vbuaa=vbuaa_plus_vbuz1 clc adc.z i // [63] (byte) show_letter::segment_type#0 ← *((byte*)(const struct Segment*) letter_c + (byte~) show_letter::$22) -- vbuaa=pbuc1_derefidx_vbuaa diff --git a/src/test/ref/complex/splines/truetype-splines.sym b/src/test/ref/complex/splines/truetype-splines.sym index fb5f33da8..3dd7c46e7 100644 --- a/src/test/ref/complex/splines/truetype-splines.sym +++ b/src/test/ref/complex/splines/truetype-splines.sym @@ -411,9 +411,9 @@ (byte~) show_letter::$20 reg byte x 151.5 (byte~) show_letter::$21 reg byte x 151.5 (byte~) show_letter::$22 reg byte a 202.0 -(byte~) show_letter::$24 reg byte a 202.0 -(byte~) show_letter::$26 reg byte a 202.0 -(byte~) show_letter::$28 reg byte a 202.0 +(byte~) show_letter::$23 reg byte a 202.0 +(byte~) show_letter::$25 reg byte a 202.0 +(byte~) show_letter::$27 reg byte a 202.0 (struct SplineVector16~) show_letter::$7 (label) show_letter::@1 (label) show_letter::@2 @@ -438,10 +438,12 @@ (byte) show_letter::i (byte) show_letter::i#1 i zp[1]:19 75.75 (byte) show_letter::i#10 i zp[1]:19 15.538461538461537 +(struct SplineVector16) show_letter::segment_to (signed word) show_letter::segment_to_x (signed word) show_letter::segment_to_y (byte) show_letter::segment_type (byte) show_letter::segment_type#0 reg byte a 151.5 +(struct SplineVector16) show_letter::segment_via (signed word) show_letter::segment_via_x (signed word) show_letter::segment_via_x#0 segment_via_x zp[2]:32 22.444444444444443 (signed word) show_letter::segment_via_y @@ -549,13 +551,13 @@ zp[1]:18 [ mulf_init::c#2 mulf_init::c#1 main::angle#2 main::angle#1 show_letter reg byte x [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ] reg byte x [ mulf_init::x_255#2 mulf_init::x_255#1 ] zp[1]:19 [ mulf_init::dir#2 mulf_init::dir#4 show_letter::i#10 show_letter::i#1 ] -reg byte a [ show_letter::$24 ] +reg byte a [ show_letter::$23 ] reg byte x [ show_letter::$20 ] zp[2]:20 [ show_letter::current_x#10 spline_8segB::p2_x#0 mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 ] zp[2]:22 [ show_letter::current_y#10 spline_8segB::p2_y#0 mulf_init::sqr1_hi#2 mulf_init::sqr1_hi#1 ] -reg byte a [ show_letter::$26 ] +reg byte a [ show_letter::$25 ] reg byte x [ show_letter::$21 ] -reg byte a [ show_letter::$28 ] +reg byte a [ show_letter::$27 ] reg byte a [ show_letter::$22 ] reg byte a [ show_letter::segment_type#0 ] reg byte x [ bitmap_plot_spline_8seg::$8 ] diff --git a/src/test/ref/struct-20.log b/src/test/ref/struct-20.log index b9db19fbb..5f5999b58 100644 --- a/src/test/ref/struct-20.log +++ b/src/test/ref/struct-20.log @@ -1,13 +1,12 @@ Adding value bulk copy *(&(struct Point) main::p1) ← memcpy(*(&(const struct Point) $0), struct Point, (const byte) SIZEOF_STRUCT_POINT) Adding value bulk copy *(&(struct Point) main::p2) ← memcpy(*(&(const struct Point) $1), struct Point, (const byte) SIZEOF_STRUCT_POINT) -Adding struct value member variable copy *((struct Point*)&(struct Vector) main::v+(const byte) OFFSET_STRUCT_VECTOR_P) ← (struct Point) main::p1 -Adding struct value member variable copy *((struct Point*)&(struct Vector) main::v+(const byte) OFFSET_STRUCT_VECTOR_Q) ← (struct Point) main::p2 -Replacing struct member reference (struct Vector) main::v.p with member unwinding reference *((struct Point*)&(struct Vector) main::v+(const byte) OFFSET_STRUCT_VECTOR_P) -Replacing struct member reference (struct Vector) main::v.p with member unwinding reference *((struct Point*)&(struct Vector) main::v+(const byte) OFFSET_STRUCT_VECTOR_P) -Replacing struct member reference (struct Vector) main::v.q with member unwinding reference *((struct Point*)&(struct Vector) main::v+(const byte) OFFSET_STRUCT_VECTOR_Q) -Replacing struct member reference (struct Vector) main::v.q with member unwinding reference *((struct Point*)&(struct Vector) main::v+(const byte) OFFSET_STRUCT_VECTOR_Q) +Unwinding value copy (struct Vector) main::v ← (struct Vector){ (struct Point) main::p1, (struct Point) main::p2 } Adding value bulk copy *((struct Point*)&(struct Vector) main::v+(const byte) OFFSET_STRUCT_VECTOR_P) ← memcpy(*(&(struct Point) main::p1), struct Point, (const byte) SIZEOF_STRUCT_POINT) Adding value bulk copy *((struct Point*)&(struct Vector) main::v+(const byte) OFFSET_STRUCT_VECTOR_Q) ← memcpy(*(&(struct Point) main::p2), struct Point, (const byte) SIZEOF_STRUCT_POINT) +Replacing struct member reference (struct Vector) main::v.p with member unwinding reference *((struct Point*)&(struct Vector) main::v+(const byte) OFFSET_STRUCT_VECTOR_P) +Replacing struct member reference (struct Vector) main::v.p with member unwinding reference *((struct Point*)&(struct Vector) main::v+(const byte) OFFSET_STRUCT_VECTOR_P) +Replacing struct member reference (struct Vector) main::v.q with member unwinding reference *((struct Point*)&(struct Vector) main::v+(const byte) OFFSET_STRUCT_VECTOR_Q) +Replacing struct member reference (struct Vector) main::v.q with member unwinding reference *((struct Point*)&(struct Vector) main::v+(const byte) OFFSET_STRUCT_VECTOR_Q) Rewriting struct pointer member access *((struct Point*)&(struct Vector) main::v+(const byte) OFFSET_STRUCT_VECTOR_P).x Rewriting struct pointer member access *((struct Point*)&(struct Vector) main::v+(const byte) OFFSET_STRUCT_VECTOR_P).y Rewriting struct pointer member access *((struct Point*)&(struct Vector) main::v+(const byte) OFFSET_STRUCT_VECTOR_Q).x diff --git a/src/test/ref/struct-23.log b/src/test/ref/struct-23.log index 72def629c..0a29b51e1 100644 --- a/src/test/ref/struct-23.log +++ b/src/test/ref/struct-23.log @@ -18,8 +18,9 @@ Converted procedure call LValue to member unwinding { (byte~) main::$1_x, (byte~ Unwinding value copy (struct Point) main::point2 ← (struct Point~) main::$1 Adding value simple copy *((byte*)&(struct Point) main::point2+(const byte) OFFSET_STRUCT_POINT_X) ← (byte~) main::$1_x Adding value simple copy *((byte*)&(struct Point) main::point2+(const byte) OFFSET_STRUCT_POINT_Y) ← (byte~) main::$1_y -Adding struct value member variable copy (byte) getPoint::p_x ← (byte) getPoint::x -Adding struct value member variable copy (byte) getPoint::p_y ← (byte) getPoint::y +Unwinding value copy (struct Point) getPoint::p ← (struct Point){ (byte) getPoint::x, (byte) getPoint::y } +Adding value simple copy (byte) getPoint::p_x ← (byte) getPoint::x +Adding value simple copy (byte) getPoint::p_y ← (byte) getPoint::y Unwinding value copy (struct Point) getPoint::return ← (struct Point) getPoint::p Adding value simple copy (byte) getPoint::return_x ← (byte) getPoint::p_x Adding value simple copy (byte) getPoint::return_y ← (byte) getPoint::p_y diff --git a/src/test/ref/struct-4.log b/src/test/ref/struct-4.log index 2c0ad2130..23df953ae 100644 --- a/src/test/ref/struct-4.log +++ b/src/test/ref/struct-4.log @@ -1,8 +1,9 @@ Created struct value member variable (byte) main::p_x Created struct value member variable (byte) main::p_y Converted struct value to member variables (struct Point) main::p -Adding struct value member variable copy (byte) main::p_x ← (byte) main::x -Adding struct value member variable copy (byte) main::p_y ← (number~) main::$0 +Unwinding value copy (struct Point) main::p ← (struct Point){ (byte) main::x, (number~) main::$0 } +Adding value simple copy (byte) main::p_x ← (byte) main::x +Adding value simple copy (byte) main::p_y ← (number~) main::$0 Replacing struct member reference (struct Point) main::p.x with member unwinding reference (byte) main::p_x Replacing struct member reference (struct Point) main::p.y with member unwinding reference (byte) main::p_y Identified constant variable (byte) main::x diff --git a/src/test/ref/struct-40.log b/src/test/ref/struct-40.log index 83ba68972..402b826e2 100644 --- a/src/test/ref/struct-40.log +++ b/src/test/ref/struct-40.log @@ -48,42 +48,36 @@ Adding value simple copy (byte) main::v2_p_y ← (byte) main::v1_p_y Unwinding value copy (struct Vector) main::v2 ← (struct Vector) main::v1 Adding value simple copy (byte) main::v2_q_x ← (byte) main::v1_q_x Adding value simple copy (byte) main::v2_q_y ← (byte) main::v1_q_y -Adding struct value member variable copy (struct Point) main::v3_p ← (struct Vector) main::v1.p -Adding struct value member variable copy (struct Point) main::v3_q ← { x: (byte) 6, y: (byte) 7 } -Adding struct value member variable copy (struct Point) main::v4_p ← (struct Point){ (struct Vector) main::v1.p.x, (struct Vector) main::v1.p.y } -Adding struct value member variable copy (struct Point) main::v4_q ← { x: (byte) 8, y: (byte) 9 } -Replacing struct member reference (struct Vector) main::v1.p with member unwinding reference (struct Point) main::v1_p -Replacing struct member reference (struct Vector) main::v1.p with member unwinding reference (struct Point) main::v1_p -Replacing struct member reference (struct Vector) main::v1.p with member unwinding reference (struct Point) main::v1_p -Replacing struct member reference (struct Vector) main::v1.p with member unwinding reference (struct Point) main::v1_p -Replacing struct member reference (struct Vector) main::v1.p with member unwinding reference (struct Point) main::v1_p -Replacing struct member reference (struct Vector) main::v1.q with member unwinding reference (struct Point) main::v1_q -Replacing struct member reference (struct Vector) main::v1.q with member unwinding reference (struct Point) main::v1_q -Replacing struct member reference (struct Vector) main::v2.p with member unwinding reference (struct Point) main::v2_p -Replacing struct member reference (struct Vector) main::v2.p with member unwinding reference (struct Point) main::v2_p -Replacing struct member reference (struct Vector) main::v2.q with member unwinding reference (struct Point) main::v2_q -Replacing struct member reference (struct Vector) main::v2.q with member unwinding reference (struct Point) main::v2_q -Replacing struct member reference (struct Vector) main::v3.p with member unwinding reference (struct Point) main::v3_p -Replacing struct member reference (struct Vector) main::v3.p with member unwinding reference (struct Point) main::v3_p -Replacing struct member reference (struct Vector) main::v3.q with member unwinding reference (struct Point) main::v3_q -Replacing struct member reference (struct Vector) main::v3.q with member unwinding reference (struct Point) main::v3_q -Replacing struct member reference (struct Vector) main::v4.p with member unwinding reference (struct Point) main::v4_p -Replacing struct member reference (struct Vector) main::v4.p with member unwinding reference (struct Point) main::v4_p -Replacing struct member reference (struct Vector) main::v4.q with member unwinding reference (struct Point) main::v4_q -Replacing struct member reference (struct Vector) main::v4.q with member unwinding reference (struct Point) main::v4_q -Unwinding value copy (struct Point) main::v3_p ← (struct Point) main::v1_p +Unwinding value copy (struct Vector) main::v3 ← (struct Vector){ (struct Vector) main::v1.p, { x: (byte) 6, y: (byte) 7 } } +Unwinding value copy (struct Vector) main::v3 ← (struct Vector){ (struct Vector) main::v1.p, { x: (byte) 6, y: (byte) 7 } } Adding value simple copy (byte) main::v3_p_x ← (byte) main::v1_p_x Adding value simple copy (byte) main::v3_p_y ← (byte) main::v1_p_y -Unwinding value copy (struct Point) main::v3_q ← { x: (byte) 6, y: (byte) 7 } +Unwinding value copy (struct Vector) main::v3 ← (struct Vector){ (struct Vector) main::v1.p, { x: (byte) 6, y: (byte) 7 } } Adding value simple copy (byte) main::v3_q_x ← (byte) 6 Adding value simple copy (byte) main::v3_q_y ← (byte) 7 -Adding struct value member variable copy (byte) main::v4_p_x ← (struct Point) main::v1_p.x -Adding struct value member variable copy (byte) main::v4_p_y ← (struct Point) main::v1_p.y -Unwinding value copy (struct Point) main::v4_q ← { x: (byte) 8, y: (byte) 9 } +Unwinding value copy (struct Vector) main::v4 ← (struct Vector){ (struct Point){ (struct Vector) main::v1.p.x, (struct Vector) main::v1.p.y }, { x: (byte) 8, y: (byte) 9 } } +Unwinding value copy (struct Vector) main::v4 ← (struct Vector){ (struct Point){ (struct Vector) main::v1.p.x, (struct Vector) main::v1.p.y }, { x: (byte) 8, y: (byte) 9 } } +Adding value simple copy (byte) main::v4_p_x ← (byte) main::v1_p_x +Adding value simple copy (byte) main::v4_p_y ← (byte) main::v1_p_y +Unwinding value copy (struct Vector) main::v4 ← (struct Vector){ (struct Point){ (struct Vector) main::v1.p.x, (struct Vector) main::v1.p.y }, { x: (byte) 8, y: (byte) 9 } } Adding value simple copy (byte) main::v4_q_x ← (byte) 8 Adding value simple copy (byte) main::v4_q_y ← (byte) 9 -Replacing struct member reference (struct Point) main::v1_p.x with member unwinding reference (byte) main::v1_p_x -Replacing struct member reference (struct Point) main::v1_p.y with member unwinding reference (byte) main::v1_p_y +Replacing struct member reference (struct Vector) main::v1.p with member unwinding reference (struct Point) main::v1_p +Replacing struct member reference (struct Vector) main::v1.p with member unwinding reference (struct Point) main::v1_p +Replacing struct member reference (struct Vector) main::v1.q with member unwinding reference (struct Point) main::v1_q +Replacing struct member reference (struct Vector) main::v1.q with member unwinding reference (struct Point) main::v1_q +Replacing struct member reference (struct Vector) main::v2.p with member unwinding reference (struct Point) main::v2_p +Replacing struct member reference (struct Vector) main::v2.p with member unwinding reference (struct Point) main::v2_p +Replacing struct member reference (struct Vector) main::v2.q with member unwinding reference (struct Point) main::v2_q +Replacing struct member reference (struct Vector) main::v2.q with member unwinding reference (struct Point) main::v2_q +Replacing struct member reference (struct Vector) main::v3.p with member unwinding reference (struct Point) main::v3_p +Replacing struct member reference (struct Vector) main::v3.p with member unwinding reference (struct Point) main::v3_p +Replacing struct member reference (struct Vector) main::v3.q with member unwinding reference (struct Point) main::v3_q +Replacing struct member reference (struct Vector) main::v3.q with member unwinding reference (struct Point) main::v3_q +Replacing struct member reference (struct Vector) main::v4.p with member unwinding reference (struct Point) main::v4_p +Replacing struct member reference (struct Vector) main::v4.p with member unwinding reference (struct Point) main::v4_p +Replacing struct member reference (struct Vector) main::v4.q with member unwinding reference (struct Point) main::v4_q +Replacing struct member reference (struct Vector) main::v4.q with member unwinding reference (struct Point) main::v4_q Replacing struct member reference (struct Point) main::v1_p.x with member unwinding reference (byte) main::v1_p_x Replacing struct member reference (struct Point) main::v1_p.y with member unwinding reference (byte) main::v1_p_y Replacing struct member reference (struct Point) main::v1_q.x with member unwinding reference (byte) main::v1_q_x @@ -213,16 +207,20 @@ SYMBOL TABLE SSA (byte) main::v2_q_x#0 (byte) main::v2_q_y (byte) main::v2_q_y#0 +(struct Point) main::v3_p (byte) main::v3_p_x (byte) main::v3_p_x#0 (byte) main::v3_p_y (byte) main::v3_p_y#0 +(struct Point) main::v3_q (const byte) main::v3_q_x = (byte) 6 (const byte) main::v3_q_y = (byte) 7 +(struct Point) main::v4_p (byte) main::v4_p_x (byte) main::v4_p_x#0 (byte) main::v4_p_y (byte) main::v4_p_y#0 +(struct Point) main::v4_q (const byte) main::v4_q_x = (byte) 8 (const byte) main::v4_q_y = (byte) 9 @@ -454,10 +452,14 @@ VARIABLE REGISTER WEIGHTS (struct Point) main::v2_q (byte) main::v2_q_x (byte) main::v2_q_y +(struct Point) main::v3_p (byte) main::v3_p_x (byte) main::v3_p_y +(struct Point) main::v3_q +(struct Point) main::v4_p (byte) main::v4_p_x (byte) main::v4_p_y +(struct Point) main::v4_q Initial phi equivalence classes Complete equivalence classes @@ -713,12 +715,16 @@ FINAL SYMBOL TABLE (struct Point) main::v2_q (byte) main::v2_q_x (byte) main::v2_q_y +(struct Point) main::v3_p (byte) main::v3_p_x (byte) main::v3_p_y +(struct Point) main::v3_q (const byte) main::v3_q_x = (byte) 6 (const byte) main::v3_q_y = (byte) 7 +(struct Point) main::v4_p (byte) main::v4_p_x (byte) main::v4_p_y +(struct Point) main::v4_q (const byte) main::v4_q_x = (byte) 8 (const byte) main::v4_q_y = (byte) 9 diff --git a/src/test/ref/struct-40.sym b/src/test/ref/struct-40.sym index fd2fccdab..7963bd663 100644 --- a/src/test/ref/struct-40.sym +++ b/src/test/ref/struct-40.sym @@ -21,12 +21,16 @@ (struct Point) main::v2_q (byte) main::v2_q_x (byte) main::v2_q_y +(struct Point) main::v3_p (byte) main::v3_p_x (byte) main::v3_p_y +(struct Point) main::v3_q (const byte) main::v3_q_x = (byte) 6 (const byte) main::v3_q_y = (byte) 7 +(struct Point) main::v4_p (byte) main::v4_p_x (byte) main::v4_p_y +(struct Point) main::v4_q (const byte) main::v4_q_x = (byte) 8 (const byte) main::v4_q_y = (byte) 9 diff --git a/src/test/ref/struct-41.asm b/src/test/ref/struct-41.asm index cba4c5110..54e3e2f17 100644 --- a/src/test/ref/struct-41.asm +++ b/src/test/ref/struct-41.asm @@ -5,8 +5,8 @@ .label SCREEN = $400 .const OFFSET_STRUCT_POINT_Y = 1 .const OFFSET_STRUCT_VECTOR_Q = 2 - .const SIZEOF_STRUCT_VECTOR = 4 .const SIZEOF_STRUCT_POINT = 2 + .const SIZEOF_STRUCT_VECTOR = 4 main: { .const v1_p_x = 2 .const v1_p_y = 3 diff --git a/src/test/ref/struct-41.log b/src/test/ref/struct-41.log index 343e956dd..9bb567ff8 100644 --- a/src/test/ref/struct-41.log +++ b/src/test/ref/struct-41.log @@ -30,41 +30,37 @@ Adding value simple copy *((byte*)(struct Point*)&(struct Vector) main::v2+(cons Unwinding value copy (struct Vector) main::v2 ← (struct Vector) main::v1 Adding value simple copy *((byte*)(struct Point*)&(struct Vector) main::v2+(const byte) OFFSET_STRUCT_VECTOR_Q+(const byte) OFFSET_STRUCT_POINT_X) ← (byte) main::v1_q_x Adding value simple copy *((byte*)(struct Point*)&(struct Vector) main::v2+(const byte) OFFSET_STRUCT_VECTOR_Q+(const byte) OFFSET_STRUCT_POINT_Y) ← (byte) main::v1_q_y -Adding struct value member variable copy *((struct Point*)&(struct Vector) main::v3+(const byte) OFFSET_STRUCT_VECTOR_P) ← (struct Vector) main::v2.p -Adding struct value member variable copy *((struct Point*)&(struct Vector) main::v3+(const byte) OFFSET_STRUCT_VECTOR_Q) ← { x: (byte) 6, y: (byte) 7 } -Adding value bulk copy *(&(struct Vector) main::v4) ← memcpy(*(&(struct Vector) main::v3), struct Vector, (const byte) SIZEOF_STRUCT_VECTOR) -Adding struct value member variable copy (struct Point) main::v5_p ← (struct Point){ (struct Vector) main::v4.p.x, (struct Vector) main::v4.p.y } -Adding struct value member variable copy (struct Point) main::v5_q ← { x: (byte) 8, y: (byte) 9 } -Replacing struct member reference (struct Vector) main::v2.p with member unwinding reference *((struct Point*)&(struct Vector) main::v2+(const byte) OFFSET_STRUCT_VECTOR_P) -Replacing struct member reference (struct Vector) main::v4.p with member unwinding reference *((struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_VECTOR_P) -Replacing struct member reference (struct Vector) main::v4.p with member unwinding reference *((struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_VECTOR_P) -Replacing struct member reference (struct Vector) main::v1.p with member unwinding reference (struct Point) main::v1_p -Replacing struct member reference (struct Vector) main::v1.p with member unwinding reference (struct Point) main::v1_p -Replacing struct member reference (struct Vector) main::v1.q with member unwinding reference (struct Point) main::v1_q -Replacing struct member reference (struct Vector) main::v1.q with member unwinding reference (struct Point) main::v1_q -Replacing struct member reference (struct Vector) main::v2.p with member unwinding reference *((struct Point*)&(struct Vector) main::v2+(const byte) OFFSET_STRUCT_VECTOR_P) -Replacing struct member reference (struct Vector) main::v2.p with member unwinding reference *((struct Point*)&(struct Vector) main::v2+(const byte) OFFSET_STRUCT_VECTOR_P) -Replacing struct member reference (struct Vector) main::v2.q with member unwinding reference *((struct Point*)&(struct Vector) main::v2+(const byte) OFFSET_STRUCT_VECTOR_Q) -Replacing struct member reference (struct Vector) main::v2.q with member unwinding reference *((struct Point*)&(struct Vector) main::v2+(const byte) OFFSET_STRUCT_VECTOR_Q) -Replacing struct member reference (struct Vector) main::v3.p with member unwinding reference *((struct Point*)&(struct Vector) main::v3+(const byte) OFFSET_STRUCT_VECTOR_P) -Replacing struct member reference (struct Vector) main::v3.p with member unwinding reference *((struct Point*)&(struct Vector) main::v3+(const byte) OFFSET_STRUCT_VECTOR_P) -Replacing struct member reference (struct Vector) main::v3.q with member unwinding reference *((struct Point*)&(struct Vector) main::v3+(const byte) OFFSET_STRUCT_VECTOR_Q) -Replacing struct member reference (struct Vector) main::v3.q with member unwinding reference *((struct Point*)&(struct Vector) main::v3+(const byte) OFFSET_STRUCT_VECTOR_Q) -Replacing struct member reference (struct Vector) main::v4.p with member unwinding reference *((struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_VECTOR_P) -Replacing struct member reference (struct Vector) main::v4.p with member unwinding reference *((struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_VECTOR_P) -Replacing struct member reference (struct Vector) main::v4.q with member unwinding reference *((struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_VECTOR_Q) -Replacing struct member reference (struct Vector) main::v4.q with member unwinding reference *((struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_VECTOR_Q) -Replacing struct member reference (struct Vector) main::v5.p with member unwinding reference (struct Point) main::v5_p -Replacing struct member reference (struct Vector) main::v5.p with member unwinding reference (struct Point) main::v5_p -Replacing struct member reference (struct Vector) main::v5.q with member unwinding reference (struct Point) main::v5_q -Replacing struct member reference (struct Vector) main::v5.q with member unwinding reference (struct Point) main::v5_q +Unwinding value copy (struct Vector) main::v3 ← (struct Vector){ (struct Vector) main::v2.p, { x: (byte) 6, y: (byte) 7 } } Adding value bulk copy *((struct Point*)&(struct Vector) main::v3+(const byte) OFFSET_STRUCT_VECTOR_P) ← memcpy(*((struct Point*)&(struct Vector) main::v2+(const byte) OFFSET_STRUCT_VECTOR_P), struct Point, (const byte) SIZEOF_STRUCT_POINT) Adding value bulk copy *((struct Point*)&(struct Vector) main::v3+(const byte) OFFSET_STRUCT_VECTOR_Q) ← memcpy(*(&(const struct Point) $0), struct Point, (const byte) SIZEOF_STRUCT_POINT) -Adding struct value member variable copy (byte) main::v5_p_x ← *((struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_VECTOR_P).x -Adding struct value member variable copy (byte) main::v5_p_y ← *((struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_VECTOR_P).y -Unwinding value copy (struct Point) main::v5_q ← { x: (byte) 8, y: (byte) 9 } +Adding value bulk copy *(&(struct Vector) main::v4) ← memcpy(*(&(struct Vector) main::v3), struct Vector, (const byte) SIZEOF_STRUCT_VECTOR) +Unwinding value copy (struct Vector) main::v5 ← (struct Vector){ (struct Point){ (struct Vector) main::v4.p.x, (struct Vector) main::v4.p.y }, { x: (byte) 8, y: (byte) 9 } } +Unwinding value copy (struct Vector) main::v5 ← (struct Vector){ (struct Point){ (struct Vector) main::v4.p.x, (struct Vector) main::v4.p.y }, { x: (byte) 8, y: (byte) 9 } } +Adding value simple copy (byte) main::v5_p_x ← *((byte*)(struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_VECTOR_P+(const byte) OFFSET_STRUCT_POINT_X) +Adding value simple copy (byte) main::v5_p_y ← *((byte*)(struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_VECTOR_P+(const byte) OFFSET_STRUCT_POINT_Y) +Unwinding value copy (struct Vector) main::v5 ← (struct Vector){ (struct Point){ (struct Vector) main::v4.p.x, (struct Vector) main::v4.p.y }, { x: (byte) 8, y: (byte) 9 } } Adding value simple copy (byte) main::v5_q_x ← (byte) 8 Adding value simple copy (byte) main::v5_q_y ← (byte) 9 +Replacing struct member reference (struct Vector) main::v1.p with member unwinding reference (struct Point) main::v1_p +Replacing struct member reference (struct Vector) main::v1.p with member unwinding reference (struct Point) main::v1_p +Replacing struct member reference (struct Vector) main::v1.q with member unwinding reference (struct Point) main::v1_q +Replacing struct member reference (struct Vector) main::v1.q with member unwinding reference (struct Point) main::v1_q +Replacing struct member reference (struct Vector) main::v2.p with member unwinding reference *((struct Point*)&(struct Vector) main::v2+(const byte) OFFSET_STRUCT_VECTOR_P) +Replacing struct member reference (struct Vector) main::v2.p with member unwinding reference *((struct Point*)&(struct Vector) main::v2+(const byte) OFFSET_STRUCT_VECTOR_P) +Replacing struct member reference (struct Vector) main::v2.q with member unwinding reference *((struct Point*)&(struct Vector) main::v2+(const byte) OFFSET_STRUCT_VECTOR_Q) +Replacing struct member reference (struct Vector) main::v2.q with member unwinding reference *((struct Point*)&(struct Vector) main::v2+(const byte) OFFSET_STRUCT_VECTOR_Q) +Replacing struct member reference (struct Vector) main::v3.p with member unwinding reference *((struct Point*)&(struct Vector) main::v3+(const byte) OFFSET_STRUCT_VECTOR_P) +Replacing struct member reference (struct Vector) main::v3.p with member unwinding reference *((struct Point*)&(struct Vector) main::v3+(const byte) OFFSET_STRUCT_VECTOR_P) +Replacing struct member reference (struct Vector) main::v3.q with member unwinding reference *((struct Point*)&(struct Vector) main::v3+(const byte) OFFSET_STRUCT_VECTOR_Q) +Replacing struct member reference (struct Vector) main::v3.q with member unwinding reference *((struct Point*)&(struct Vector) main::v3+(const byte) OFFSET_STRUCT_VECTOR_Q) +Replacing struct member reference (struct Vector) main::v4.p with member unwinding reference *((struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_VECTOR_P) +Replacing struct member reference (struct Vector) main::v4.p with member unwinding reference *((struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_VECTOR_P) +Replacing struct member reference (struct Vector) main::v4.q with member unwinding reference *((struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_VECTOR_Q) +Replacing struct member reference (struct Vector) main::v4.q with member unwinding reference *((struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_VECTOR_Q) +Replacing struct member reference (struct Vector) main::v5.p with member unwinding reference (struct Point) main::v5_p +Replacing struct member reference (struct Vector) main::v5.p with member unwinding reference (struct Point) main::v5_p +Replacing struct member reference (struct Vector) main::v5.q with member unwinding reference (struct Point) main::v5_q +Replacing struct member reference (struct Vector) main::v5.q with member unwinding reference (struct Point) main::v5_q Replacing struct member reference (struct Point) main::v1_p.x with member unwinding reference (byte) main::v1_p_x Replacing struct member reference (struct Point) main::v1_p.y with member unwinding reference (byte) main::v1_p_y Replacing struct member reference (struct Point) main::v1_q.x with member unwinding reference (byte) main::v1_q_x @@ -73,8 +69,6 @@ Replacing struct member reference (struct Point) main::v5_p.x with member unwind Replacing struct member reference (struct Point) main::v5_p.y with member unwinding reference (byte) main::v5_p_y Replacing struct member reference (struct Point) main::v5_q.x with member unwinding reference (byte) main::v5_q_x Replacing struct member reference (struct Point) main::v5_q.y with member unwinding reference (byte) main::v5_q_y -Rewriting struct pointer member access *((struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_VECTOR_P).x -Rewriting struct pointer member access *((struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_VECTOR_P).y Rewriting struct pointer member access *((struct Point*)&(struct Vector) main::v2+(const byte) OFFSET_STRUCT_VECTOR_P).x Rewriting struct pointer member access *((struct Point*)&(struct Vector) main::v2+(const byte) OFFSET_STRUCT_VECTOR_P).y Rewriting struct pointer member access *((struct Point*)&(struct Vector) main::v2+(const byte) OFFSET_STRUCT_VECTOR_Q).x @@ -111,10 +105,8 @@ main: scope:[main] from @1 (struct Vector) main::v3 ← struct-unwound {*((struct Point*)&(struct Vector) main::v3+(const byte) OFFSET_STRUCT_VECTOR_P), *((struct Point*)&(struct Vector) main::v3+(const byte) OFFSET_STRUCT_VECTOR_Q)} *(&(struct Vector) main::v4) ← memcpy(*(&(struct Vector) main::v3), struct Vector, (const byte) SIZEOF_STRUCT_VECTOR) (struct Vector) main::v4 ← struct-unwound {*(&(struct Vector) main::v4)} - (byte*~) main::$0 ← (byte*)(struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_VECTOR_P + (const byte) OFFSET_STRUCT_POINT_X - (byte) main::v5_p_x#0 ← *((byte*~) main::$0) - (byte*~) main::$1 ← (byte*)(struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_VECTOR_P + (const byte) OFFSET_STRUCT_POINT_Y - (byte) main::v5_p_y#0 ← *((byte*~) main::$1) + (byte) main::v5_p_x#0 ← *((byte*)(struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_VECTOR_P+(const byte) OFFSET_STRUCT_POINT_X) + (byte) main::v5_p_y#0 ← *((byte*)(struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_VECTOR_P+(const byte) OFFSET_STRUCT_POINT_Y) *((const byte*) SCREEN + (byte) main::idx#0) ← (const byte) main::v1_p_x (byte) main::idx#1 ← ++ (byte) main::idx#0 *((const byte*) SCREEN + (byte) main::idx#1) ← (const byte) main::v1_p_y @@ -123,41 +115,41 @@ main: scope:[main] from @1 (byte) main::idx#3 ← ++ (byte) main::idx#2 *((const byte*) SCREEN + (byte) main::idx#3) ← (const byte) main::v1_q_y (byte) main::idx#4 ← ++ (byte) main::idx#3 - (byte*~) main::$2 ← (byte*)(struct Point*)&(struct Vector) main::v2+(const byte) OFFSET_STRUCT_VECTOR_P + (const byte) OFFSET_STRUCT_POINT_X - *((const byte*) SCREEN + (byte) main::idx#4) ← *((byte*~) main::$2) + (byte*~) main::$0 ← (byte*)(struct Point*)&(struct Vector) main::v2+(const byte) OFFSET_STRUCT_VECTOR_P + (const byte) OFFSET_STRUCT_POINT_X + *((const byte*) SCREEN + (byte) main::idx#4) ← *((byte*~) main::$0) (byte) main::idx#5 ← ++ (byte) main::idx#4 - (byte*~) main::$3 ← (byte*)(struct Point*)&(struct Vector) main::v2+(const byte) OFFSET_STRUCT_VECTOR_P + (const byte) OFFSET_STRUCT_POINT_Y - *((const byte*) SCREEN + (byte) main::idx#5) ← *((byte*~) main::$3) + (byte*~) main::$1 ← (byte*)(struct Point*)&(struct Vector) main::v2+(const byte) OFFSET_STRUCT_VECTOR_P + (const byte) OFFSET_STRUCT_POINT_Y + *((const byte*) SCREEN + (byte) main::idx#5) ← *((byte*~) main::$1) (byte) main::idx#6 ← ++ (byte) main::idx#5 - (byte*~) main::$4 ← (byte*)(struct Point*)&(struct Vector) main::v2+(const byte) OFFSET_STRUCT_VECTOR_Q + (const byte) OFFSET_STRUCT_POINT_X - *((const byte*) SCREEN + (byte) main::idx#6) ← *((byte*~) main::$4) + (byte*~) main::$2 ← (byte*)(struct Point*)&(struct Vector) main::v2+(const byte) OFFSET_STRUCT_VECTOR_Q + (const byte) OFFSET_STRUCT_POINT_X + *((const byte*) SCREEN + (byte) main::idx#6) ← *((byte*~) main::$2) (byte) main::idx#7 ← ++ (byte) main::idx#6 - (byte*~) main::$5 ← (byte*)(struct Point*)&(struct Vector) main::v2+(const byte) OFFSET_STRUCT_VECTOR_Q + (const byte) OFFSET_STRUCT_POINT_Y - *((const byte*) SCREEN + (byte) main::idx#7) ← *((byte*~) main::$5) + (byte*~) main::$3 ← (byte*)(struct Point*)&(struct Vector) main::v2+(const byte) OFFSET_STRUCT_VECTOR_Q + (const byte) OFFSET_STRUCT_POINT_Y + *((const byte*) SCREEN + (byte) main::idx#7) ← *((byte*~) main::$3) (byte) main::idx#8 ← ++ (byte) main::idx#7 - (byte*~) main::$6 ← (byte*)(struct Point*)&(struct Vector) main::v3+(const byte) OFFSET_STRUCT_VECTOR_P + (const byte) OFFSET_STRUCT_POINT_X - *((const byte*) SCREEN + (byte) main::idx#8) ← *((byte*~) main::$6) + (byte*~) main::$4 ← (byte*)(struct Point*)&(struct Vector) main::v3+(const byte) OFFSET_STRUCT_VECTOR_P + (const byte) OFFSET_STRUCT_POINT_X + *((const byte*) SCREEN + (byte) main::idx#8) ← *((byte*~) main::$4) (byte) main::idx#9 ← ++ (byte) main::idx#8 - (byte*~) main::$7 ← (byte*)(struct Point*)&(struct Vector) main::v3+(const byte) OFFSET_STRUCT_VECTOR_P + (const byte) OFFSET_STRUCT_POINT_Y - *((const byte*) SCREEN + (byte) main::idx#9) ← *((byte*~) main::$7) + (byte*~) main::$5 ← (byte*)(struct Point*)&(struct Vector) main::v3+(const byte) OFFSET_STRUCT_VECTOR_P + (const byte) OFFSET_STRUCT_POINT_Y + *((const byte*) SCREEN + (byte) main::idx#9) ← *((byte*~) main::$5) (byte) main::idx#10 ← ++ (byte) main::idx#9 - (byte*~) main::$8 ← (byte*)(struct Point*)&(struct Vector) main::v3+(const byte) OFFSET_STRUCT_VECTOR_Q + (const byte) OFFSET_STRUCT_POINT_X - *((const byte*) SCREEN + (byte) main::idx#10) ← *((byte*~) main::$8) + (byte*~) main::$6 ← (byte*)(struct Point*)&(struct Vector) main::v3+(const byte) OFFSET_STRUCT_VECTOR_Q + (const byte) OFFSET_STRUCT_POINT_X + *((const byte*) SCREEN + (byte) main::idx#10) ← *((byte*~) main::$6) (byte) main::idx#11 ← ++ (byte) main::idx#10 - (byte*~) main::$9 ← (byte*)(struct Point*)&(struct Vector) main::v3+(const byte) OFFSET_STRUCT_VECTOR_Q + (const byte) OFFSET_STRUCT_POINT_Y - *((const byte*) SCREEN + (byte) main::idx#11) ← *((byte*~) main::$9) + (byte*~) main::$7 ← (byte*)(struct Point*)&(struct Vector) main::v3+(const byte) OFFSET_STRUCT_VECTOR_Q + (const byte) OFFSET_STRUCT_POINT_Y + *((const byte*) SCREEN + (byte) main::idx#11) ← *((byte*~) main::$7) (byte) main::idx#12 ← ++ (byte) main::idx#11 - (byte*~) main::$10 ← (byte*)(struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_VECTOR_P + (const byte) OFFSET_STRUCT_POINT_X - *((const byte*) SCREEN + (byte) main::idx#12) ← *((byte*~) main::$10) + (byte*~) main::$8 ← (byte*)(struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_VECTOR_P + (const byte) OFFSET_STRUCT_POINT_X + *((const byte*) SCREEN + (byte) main::idx#12) ← *((byte*~) main::$8) (byte) main::idx#13 ← ++ (byte) main::idx#12 - (byte*~) main::$11 ← (byte*)(struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_VECTOR_P + (const byte) OFFSET_STRUCT_POINT_Y - *((const byte*) SCREEN + (byte) main::idx#13) ← *((byte*~) main::$11) + (byte*~) main::$9 ← (byte*)(struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_VECTOR_P + (const byte) OFFSET_STRUCT_POINT_Y + *((const byte*) SCREEN + (byte) main::idx#13) ← *((byte*~) main::$9) (byte) main::idx#14 ← ++ (byte) main::idx#13 - (byte*~) main::$12 ← (byte*)(struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_VECTOR_Q + (const byte) OFFSET_STRUCT_POINT_X - *((const byte*) SCREEN + (byte) main::idx#14) ← *((byte*~) main::$12) + (byte*~) main::$10 ← (byte*)(struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_VECTOR_Q + (const byte) OFFSET_STRUCT_POINT_X + *((const byte*) SCREEN + (byte) main::idx#14) ← *((byte*~) main::$10) (byte) main::idx#15 ← ++ (byte) main::idx#14 - (byte*~) main::$13 ← (byte*)(struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_VECTOR_Q + (const byte) OFFSET_STRUCT_POINT_Y - *((const byte*) SCREEN + (byte) main::idx#15) ← *((byte*~) main::$13) + (byte*~) main::$11 ← (byte*)(struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_VECTOR_Q + (const byte) OFFSET_STRUCT_POINT_Y + *((const byte*) SCREEN + (byte) main::idx#15) ← *((byte*~) main::$11) (byte) main::idx#16 ← ++ (byte) main::idx#15 *((const byte*) SCREEN + (byte) main::idx#16) ← (byte) main::v5_p_x#0 (byte) main::idx#17 ← ++ (byte) main::idx#16 @@ -200,8 +192,6 @@ SYMBOL TABLE SSA (byte*~) main::$1 (byte*~) main::$10 (byte*~) main::$11 -(byte*~) main::$12 -(byte*~) main::$13 (byte*~) main::$2 (byte*~) main::$3 (byte*~) main::$4 @@ -242,10 +232,12 @@ SYMBOL TABLE SSA (struct Vector) main::v2 loadstore (struct Vector) main::v3 loadstore (struct Vector) main::v4 loadstore +(struct Point) main::v5_p (byte) main::v5_p_x (byte) main::v5_p_x#0 (byte) main::v5_p_y (byte) main::v5_p_y#0 +(struct Point) main::v5_q (const byte) main::v5_q_x = (byte) 8 (const byte) main::v5_q_y = (byte) 9 @@ -254,40 +246,33 @@ Successful SSA optimization PassNCastSimplification Removing C-classic struct-unwound assignment [5] (struct Vector) main::v2 ← struct-unwound {*((byte*)(struct Point*)&(struct Vector) main::v2+(const byte) OFFSET_STRUCT_VECTOR_P+(const byte) OFFSET_STRUCT_POINT_X), *((byte*)(struct Point*)&(struct Vector) main::v2+(const byte) OFFSET_STRUCT_VECTOR_P+(const byte) OFFSET_STRUCT_POINT_Y), *((byte*)(struct Point*)&(struct Vector) main::v2+(const byte) OFFSET_STRUCT_VECTOR_Q+(const byte) OFFSET_STRUCT_POINT_X), *((byte*)(struct Point*)&(struct Vector) main::v2+(const byte) OFFSET_STRUCT_VECTOR_Q+(const byte) OFFSET_STRUCT_POINT_Y)} Removing C-classic struct-unwound assignment [8] (struct Vector) main::v3 ← struct-unwound {*((struct Point*)&(struct Vector) main::v3+(const byte) OFFSET_STRUCT_VECTOR_P), *((struct Point*)&(struct Vector) main::v3+(const byte) OFFSET_STRUCT_VECTOR_Q)} Removing C-classic struct-unwound assignment [10] (struct Vector) main::v4 ← struct-unwound {*(&(struct Vector) main::v4)} -Constant right-side identified [11] (byte*~) main::$0 ← (byte*)(struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_VECTOR_P + (const byte) OFFSET_STRUCT_POINT_X -Constant right-side identified [13] (byte*~) main::$1 ← (byte*)(struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_VECTOR_P + (const byte) OFFSET_STRUCT_POINT_Y -Constant right-side identified [23] (byte*~) main::$2 ← (byte*)(struct Point*)&(struct Vector) main::v2+(const byte) OFFSET_STRUCT_VECTOR_P + (const byte) OFFSET_STRUCT_POINT_X -Constant right-side identified [26] (byte*~) main::$3 ← (byte*)(struct Point*)&(struct Vector) main::v2+(const byte) OFFSET_STRUCT_VECTOR_P + (const byte) OFFSET_STRUCT_POINT_Y -Constant right-side identified [29] (byte*~) main::$4 ← (byte*)(struct Point*)&(struct Vector) main::v2+(const byte) OFFSET_STRUCT_VECTOR_Q + (const byte) OFFSET_STRUCT_POINT_X -Constant right-side identified [32] (byte*~) main::$5 ← (byte*)(struct Point*)&(struct Vector) main::v2+(const byte) OFFSET_STRUCT_VECTOR_Q + (const byte) OFFSET_STRUCT_POINT_Y -Constant right-side identified [35] (byte*~) main::$6 ← (byte*)(struct Point*)&(struct Vector) main::v3+(const byte) OFFSET_STRUCT_VECTOR_P + (const byte) OFFSET_STRUCT_POINT_X -Constant right-side identified [38] (byte*~) main::$7 ← (byte*)(struct Point*)&(struct Vector) main::v3+(const byte) OFFSET_STRUCT_VECTOR_P + (const byte) OFFSET_STRUCT_POINT_Y -Constant right-side identified [41] (byte*~) main::$8 ← (byte*)(struct Point*)&(struct Vector) main::v3+(const byte) OFFSET_STRUCT_VECTOR_Q + (const byte) OFFSET_STRUCT_POINT_X -Constant right-side identified [44] (byte*~) main::$9 ← (byte*)(struct Point*)&(struct Vector) main::v3+(const byte) OFFSET_STRUCT_VECTOR_Q + (const byte) OFFSET_STRUCT_POINT_Y -Constant right-side identified [47] (byte*~) main::$10 ← (byte*)(struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_VECTOR_P + (const byte) OFFSET_STRUCT_POINT_X -Constant right-side identified [50] (byte*~) main::$11 ← (byte*)(struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_VECTOR_P + (const byte) OFFSET_STRUCT_POINT_Y -Constant right-side identified [53] (byte*~) main::$12 ← (byte*)(struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_VECTOR_Q + (const byte) OFFSET_STRUCT_POINT_X -Constant right-side identified [56] (byte*~) main::$13 ← (byte*)(struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_VECTOR_Q + (const byte) OFFSET_STRUCT_POINT_Y +Constant right-side identified [21] (byte*~) main::$0 ← (byte*)(struct Point*)&(struct Vector) main::v2+(const byte) OFFSET_STRUCT_VECTOR_P + (const byte) OFFSET_STRUCT_POINT_X +Constant right-side identified [24] (byte*~) main::$1 ← (byte*)(struct Point*)&(struct Vector) main::v2+(const byte) OFFSET_STRUCT_VECTOR_P + (const byte) OFFSET_STRUCT_POINT_Y +Constant right-side identified [27] (byte*~) main::$2 ← (byte*)(struct Point*)&(struct Vector) main::v2+(const byte) OFFSET_STRUCT_VECTOR_Q + (const byte) OFFSET_STRUCT_POINT_X +Constant right-side identified [30] (byte*~) main::$3 ← (byte*)(struct Point*)&(struct Vector) main::v2+(const byte) OFFSET_STRUCT_VECTOR_Q + (const byte) OFFSET_STRUCT_POINT_Y +Constant right-side identified [33] (byte*~) main::$4 ← (byte*)(struct Point*)&(struct Vector) main::v3+(const byte) OFFSET_STRUCT_VECTOR_P + (const byte) OFFSET_STRUCT_POINT_X +Constant right-side identified [36] (byte*~) main::$5 ← (byte*)(struct Point*)&(struct Vector) main::v3+(const byte) OFFSET_STRUCT_VECTOR_P + (const byte) OFFSET_STRUCT_POINT_Y +Constant right-side identified [39] (byte*~) main::$6 ← (byte*)(struct Point*)&(struct Vector) main::v3+(const byte) OFFSET_STRUCT_VECTOR_Q + (const byte) OFFSET_STRUCT_POINT_X +Constant right-side identified [42] (byte*~) main::$7 ← (byte*)(struct Point*)&(struct Vector) main::v3+(const byte) OFFSET_STRUCT_VECTOR_Q + (const byte) OFFSET_STRUCT_POINT_Y +Constant right-side identified [45] (byte*~) main::$8 ← (byte*)(struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_VECTOR_P + (const byte) OFFSET_STRUCT_POINT_X +Constant right-side identified [48] (byte*~) main::$9 ← (byte*)(struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_VECTOR_P + (const byte) OFFSET_STRUCT_POINT_Y +Constant right-side identified [51] (byte*~) main::$10 ← (byte*)(struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_VECTOR_Q + (const byte) OFFSET_STRUCT_POINT_X +Constant right-side identified [54] (byte*~) main::$11 ← (byte*)(struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_VECTOR_Q + (const byte) OFFSET_STRUCT_POINT_Y Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::idx#0 = 0 -Constant (const byte*) main::$0 = (byte*)(struct Point*)&main::v4+OFFSET_STRUCT_VECTOR_P+OFFSET_STRUCT_POINT_X -Constant (const byte*) main::$1 = (byte*)(struct Point*)&main::v4+OFFSET_STRUCT_VECTOR_P+OFFSET_STRUCT_POINT_Y -Constant (const byte*) main::$2 = (byte*)(struct Point*)&main::v2+OFFSET_STRUCT_VECTOR_P+OFFSET_STRUCT_POINT_X -Constant (const byte*) main::$3 = (byte*)(struct Point*)&main::v2+OFFSET_STRUCT_VECTOR_P+OFFSET_STRUCT_POINT_Y -Constant (const byte*) main::$4 = (byte*)(struct Point*)&main::v2+OFFSET_STRUCT_VECTOR_Q+OFFSET_STRUCT_POINT_X -Constant (const byte*) main::$5 = (byte*)(struct Point*)&main::v2+OFFSET_STRUCT_VECTOR_Q+OFFSET_STRUCT_POINT_Y -Constant (const byte*) main::$6 = (byte*)(struct Point*)&main::v3+OFFSET_STRUCT_VECTOR_P+OFFSET_STRUCT_POINT_X -Constant (const byte*) main::$7 = (byte*)(struct Point*)&main::v3+OFFSET_STRUCT_VECTOR_P+OFFSET_STRUCT_POINT_Y -Constant (const byte*) main::$8 = (byte*)(struct Point*)&main::v3+OFFSET_STRUCT_VECTOR_Q+OFFSET_STRUCT_POINT_X -Constant (const byte*) main::$9 = (byte*)(struct Point*)&main::v3+OFFSET_STRUCT_VECTOR_Q+OFFSET_STRUCT_POINT_Y -Constant (const byte*) main::$10 = (byte*)(struct Point*)&main::v4+OFFSET_STRUCT_VECTOR_P+OFFSET_STRUCT_POINT_X -Constant (const byte*) main::$11 = (byte*)(struct Point*)&main::v4+OFFSET_STRUCT_VECTOR_P+OFFSET_STRUCT_POINT_Y -Constant (const byte*) main::$12 = (byte*)(struct Point*)&main::v4+OFFSET_STRUCT_VECTOR_Q+OFFSET_STRUCT_POINT_X -Constant (const byte*) main::$13 = (byte*)(struct Point*)&main::v4+OFFSET_STRUCT_VECTOR_Q+OFFSET_STRUCT_POINT_Y +Constant (const byte*) main::$0 = (byte*)(struct Point*)&main::v2+OFFSET_STRUCT_VECTOR_P+OFFSET_STRUCT_POINT_X +Constant (const byte*) main::$1 = (byte*)(struct Point*)&main::v2+OFFSET_STRUCT_VECTOR_P+OFFSET_STRUCT_POINT_Y +Constant (const byte*) main::$2 = (byte*)(struct Point*)&main::v2+OFFSET_STRUCT_VECTOR_Q+OFFSET_STRUCT_POINT_X +Constant (const byte*) main::$3 = (byte*)(struct Point*)&main::v2+OFFSET_STRUCT_VECTOR_Q+OFFSET_STRUCT_POINT_Y +Constant (const byte*) main::$4 = (byte*)(struct Point*)&main::v3+OFFSET_STRUCT_VECTOR_P+OFFSET_STRUCT_POINT_X +Constant (const byte*) main::$5 = (byte*)(struct Point*)&main::v3+OFFSET_STRUCT_VECTOR_P+OFFSET_STRUCT_POINT_Y +Constant (const byte*) main::$6 = (byte*)(struct Point*)&main::v3+OFFSET_STRUCT_VECTOR_Q+OFFSET_STRUCT_POINT_X +Constant (const byte*) main::$7 = (byte*)(struct Point*)&main::v3+OFFSET_STRUCT_VECTOR_Q+OFFSET_STRUCT_POINT_Y +Constant (const byte*) main::$8 = (byte*)(struct Point*)&main::v4+OFFSET_STRUCT_VECTOR_P+OFFSET_STRUCT_POINT_X +Constant (const byte*) main::$9 = (byte*)(struct Point*)&main::v4+OFFSET_STRUCT_VECTOR_P+OFFSET_STRUCT_POINT_Y +Constant (const byte*) main::$10 = (byte*)(struct Point*)&main::v4+OFFSET_STRUCT_VECTOR_Q+OFFSET_STRUCT_POINT_X +Constant (const byte*) main::$11 = (byte*)(struct Point*)&main::v4+OFFSET_STRUCT_VECTOR_Q+OFFSET_STRUCT_POINT_Y Successful SSA optimization Pass2ConstantIdentification -Simplifying expression containing zero (byte*)(struct Point*)&main::v4+OFFSET_STRUCT_VECTOR_P in -Simplifying expression containing zero (struct Point*)&main::v4 in -Simplifying expression containing zero (struct Point*)&main::v4 in Simplifying expression containing zero (byte*)(struct Point*)&main::v2+OFFSET_STRUCT_VECTOR_P in Simplifying expression containing zero (struct Point*)&main::v2 in Simplifying expression containing zero (struct Point*)&main::v2 in @@ -306,7 +291,10 @@ Simplifying expression containing zero (struct Point*)&main::v2 in [2] *((byte*) Simplifying expression containing zero (byte*)(struct Point*)&main::v2+OFFSET_STRUCT_VECTOR_Q in [3] *((byte*)(struct Point*)&(struct Vector) main::v2+(const byte) OFFSET_STRUCT_VECTOR_Q+(const byte) OFFSET_STRUCT_POINT_X) ← (const byte) main::v1_q_x Simplifying expression containing zero (struct Point*)&main::v2 in [6] *((struct Point*)&(struct Vector) main::v3+(const byte) OFFSET_STRUCT_VECTOR_P) ← memcpy(*((struct Point*)&(struct Vector) main::v2+(const byte) OFFSET_STRUCT_VECTOR_P), struct Point, (const byte) SIZEOF_STRUCT_POINT) Simplifying expression containing zero (struct Point*)&main::v3 in [6] *((struct Point*)&(struct Vector) main::v3+(const byte) OFFSET_STRUCT_VECTOR_P) ← memcpy(*((struct Point*)&(struct Vector) main::v2), struct Point, (const byte) SIZEOF_STRUCT_POINT) -Simplifying expression containing zero SCREEN in [15] *((const byte*) SCREEN + (const byte) main::idx#0) ← (const byte) main::v1_p_x +Simplifying expression containing zero (byte*)(struct Point*)&main::v4+OFFSET_STRUCT_VECTOR_P in [11] (byte) main::v5_p_x#0 ← *((byte*)(struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_VECTOR_P+(const byte) OFFSET_STRUCT_POINT_X) +Simplifying expression containing zero (struct Point*)&main::v4 in [11] (byte) main::v5_p_x#0 ← *((byte*)(struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_VECTOR_P) +Simplifying expression containing zero (struct Point*)&main::v4 in [12] (byte) main::v5_p_y#0 ← *((byte*)(struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_VECTOR_P+(const byte) OFFSET_STRUCT_POINT_Y) +Simplifying expression containing zero SCREEN in [13] *((const byte*) SCREEN + (const byte) main::idx#0) ← (const byte) main::v1_p_x Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable (byte) main::idx#20 and assignment [48] (byte) main::idx#20 ← ++ (byte) main::idx#19 Eliminating unused constant (const byte) OFFSET_STRUCT_VECTOR_P @@ -416,32 +404,30 @@ Constant inlined main::idx#12 = ++++++++++++++++++++++++(byte) 0 Constant inlined main::idx#13 = ++++++++++++++++++++++++++(byte) 0 Constant inlined main::idx#14 = ++++++++++++++++++++++++++++(byte) 0 Constant inlined main::idx#15 = ++++++++++++++++++++++++++++++(byte) 0 -Constant inlined main::$12 = (byte*)(struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_VECTOR_Q -Constant inlined main::$13 = (byte*)(struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_VECTOR_Q+(const byte) OFFSET_STRUCT_POINT_Y -Constant inlined main::$10 = (byte*)(struct Point*)&(struct Vector) main::v4 -Constant inlined main::$11 = (byte*)(struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_POINT_Y +Constant inlined main::$10 = (byte*)(struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_VECTOR_Q +Constant inlined main::$11 = (byte*)(struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_VECTOR_Q+(const byte) OFFSET_STRUCT_POINT_Y Constant inlined main::idx#0 = (byte) 0 Constant inlined main::idx#1 = ++(byte) 0 Constant inlined main::idx#2 = ++++(byte) 0 -Constant inlined main::$1 = (byte*)(struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_POINT_Y +Constant inlined main::$1 = (byte*)(struct Point*)&(struct Vector) main::v2+(const byte) OFFSET_STRUCT_POINT_Y Constant inlined main::idx#3 = ++++++(byte) 0 -Constant inlined main::$2 = (byte*)(struct Point*)&(struct Vector) main::v2 +Constant inlined main::$2 = (byte*)(struct Point*)&(struct Vector) main::v2+(const byte) OFFSET_STRUCT_VECTOR_Q Constant inlined main::idx#4 = ++++++++(byte) 0 Constant inlined main::idx#5 = ++++++++++(byte) 0 -Constant inlined main::$0 = (byte*)(struct Point*)&(struct Vector) main::v4 +Constant inlined main::$0 = (byte*)(struct Point*)&(struct Vector) main::v2 Constant inlined main::idx#6 = ++++++++++++(byte) 0 -Constant inlined main::$5 = (byte*)(struct Point*)&(struct Vector) main::v2+(const byte) OFFSET_STRUCT_VECTOR_Q+(const byte) OFFSET_STRUCT_POINT_Y +Constant inlined main::$5 = (byte*)(struct Point*)&(struct Vector) main::v3+(const byte) OFFSET_STRUCT_POINT_Y Constant inlined main::idx#7 = ++++++++++++++(byte) 0 -Constant inlined main::$6 = (byte*)(struct Point*)&(struct Vector) main::v3 +Constant inlined main::$6 = (byte*)(struct Point*)&(struct Vector) main::v3+(const byte) OFFSET_STRUCT_VECTOR_Q Constant inlined main::idx#8 = ++++++++++++++++(byte) 0 -Constant inlined main::$3 = (byte*)(struct Point*)&(struct Vector) main::v2+(const byte) OFFSET_STRUCT_POINT_Y +Constant inlined main::$3 = (byte*)(struct Point*)&(struct Vector) main::v2+(const byte) OFFSET_STRUCT_VECTOR_Q+(const byte) OFFSET_STRUCT_POINT_Y Constant inlined main::idx#9 = ++++++++++++++++++(byte) 0 Constant inlined main::idx#10 = ++++++++++++++++++++(byte) 0 -Constant inlined main::$4 = (byte*)(struct Point*)&(struct Vector) main::v2+(const byte) OFFSET_STRUCT_VECTOR_Q +Constant inlined main::$4 = (byte*)(struct Point*)&(struct Vector) main::v3 Constant inlined main::idx#11 = ++++++++++++++++++++++(byte) 0 -Constant inlined main::$9 = (byte*)(struct Point*)&(struct Vector) main::v3+(const byte) OFFSET_STRUCT_VECTOR_Q+(const byte) OFFSET_STRUCT_POINT_Y -Constant inlined main::$7 = (byte*)(struct Point*)&(struct Vector) main::v3+(const byte) OFFSET_STRUCT_POINT_Y -Constant inlined main::$8 = (byte*)(struct Point*)&(struct Vector) main::v3+(const byte) OFFSET_STRUCT_VECTOR_Q +Constant inlined main::$9 = (byte*)(struct Point*)&(struct Vector) main::v4+(const byte) OFFSET_STRUCT_POINT_Y +Constant inlined main::$7 = (byte*)(struct Point*)&(struct Vector) main::v3+(const byte) OFFSET_STRUCT_VECTOR_Q+(const byte) OFFSET_STRUCT_POINT_Y +Constant inlined main::$8 = (byte*)(struct Point*)&(struct Vector) main::v4 Successful SSA optimization Pass2ConstantInlining Consolidated array index constant in *(SCREEN+++0) Consolidated array index constant in *(SCREEN+++++0) @@ -576,10 +562,12 @@ VARIABLE REGISTER WEIGHTS (struct Vector) main::v2 loadstore (struct Vector) main::v3 loadstore (struct Vector) main::v4 loadstore +(struct Point) main::v5_p (byte) main::v5_p_x (byte) main::v5_p_x#0 0.2222222222222222 (byte) main::v5_p_y (byte) main::v5_p_y#0 0.2222222222222222 +(struct Point) main::v5_q Initial phi equivalence classes Added variable main::v5_p_x#0 to live range equivalence class [ main::v5_p_x#0 ] @@ -611,8 +599,8 @@ Target platform is c64basic / MOS6502X .label SCREEN = $400 .const OFFSET_STRUCT_POINT_Y = 1 .const OFFSET_STRUCT_VECTOR_Q = 2 - .const SIZEOF_STRUCT_VECTOR = 4 .const SIZEOF_STRUCT_POINT = 2 + .const SIZEOF_STRUCT_VECTOR = 4 // @begin __bbegin: // [1] phi from @begin to @1 [phi:@begin->@1] @@ -832,8 +820,8 @@ ASSEMBLER BEFORE OPTIMIZATION .label SCREEN = $400 .const OFFSET_STRUCT_POINT_Y = 1 .const OFFSET_STRUCT_VECTOR_Q = 2 - .const SIZEOF_STRUCT_VECTOR = 4 .const SIZEOF_STRUCT_POINT = 2 + .const SIZEOF_STRUCT_VECTOR = 4 // @begin __bbegin: // [1] phi from @begin to @1 [phi:@begin->@1] @@ -1010,10 +998,12 @@ FINAL SYMBOL TABLE (struct Vector) main::v2 loadstore zp[4]:2 (struct Vector) main::v3 loadstore zp[4]:6 (struct Vector) main::v4 loadstore zp[4]:10 +(struct Point) main::v5_p (byte) main::v5_p_x (byte) main::v5_p_x#0 reg byte y 0.2222222222222222 (byte) main::v5_p_y (byte) main::v5_p_y#0 reg byte x 0.2222222222222222 +(struct Point) main::v5_q (const byte) main::v5_q_x = (byte) 8 (const byte) main::v5_q_y = (byte) 9 @@ -1037,8 +1027,8 @@ Score: 218 .label SCREEN = $400 .const OFFSET_STRUCT_POINT_Y = 1 .const OFFSET_STRUCT_VECTOR_Q = 2 - .const SIZEOF_STRUCT_VECTOR = 4 .const SIZEOF_STRUCT_POINT = 2 + .const SIZEOF_STRUCT_VECTOR = 4 // @begin // [1] phi from @begin to @1 [phi:@begin->@1] // @1 diff --git a/src/test/ref/struct-41.sym b/src/test/ref/struct-41.sym index e938c8712..f23a0e454 100644 --- a/src/test/ref/struct-41.sym +++ b/src/test/ref/struct-41.sym @@ -23,10 +23,12 @@ (struct Vector) main::v2 loadstore zp[4]:2 (struct Vector) main::v3 loadstore zp[4]:6 (struct Vector) main::v4 loadstore zp[4]:10 +(struct Point) main::v5_p (byte) main::v5_p_x (byte) main::v5_p_x#0 reg byte y 0.2222222222222222 (byte) main::v5_p_y (byte) main::v5_p_y#0 reg byte x 0.2222222222222222 +(struct Point) main::v5_q (const byte) main::v5_q_x = (byte) 8 (const byte) main::v5_q_y = (byte) 9 diff --git a/src/test/ref/struct-6.log b/src/test/ref/struct-6.log index 74dde04e4..7db653f3f 100644 --- a/src/test/ref/struct-6.log +++ b/src/test/ref/struct-6.log @@ -10,14 +10,14 @@ Converted struct value to member variables (struct Point) main::c_center Unwinding value copy (struct Point) main::p ← { x: (byte) $a, y: (byte) $a } Adding value simple copy (byte) main::p_x ← (byte) $a Adding value simple copy (byte) main::p_y ← (byte) $a -Adding struct value member variable copy (struct Point) main::c_center ← (struct Point) main::p -Adding struct value member variable copy (byte) main::c_radius ← (byte) 5 +Unwinding value copy (struct Circle) main::c ← (struct Circle){ (struct Point) main::p, (byte) 5 } +Unwinding value copy (struct Circle) main::c ← (struct Circle){ (struct Point) main::p, (byte) 5 } +Adding value simple copy (byte) main::c_center_x ← (byte) main::p_x +Adding value simple copy (byte) main::c_center_y ← (byte) main::p_y +Adding value simple copy (byte) main::c_radius ← (byte) 5 Replacing struct member reference (struct Circle) main::c.center with member unwinding reference (struct Point) main::c_center Replacing struct member reference (struct Circle) main::c.center with member unwinding reference (struct Point) main::c_center Replacing struct member reference (struct Circle) main::c.radius with member unwinding reference (byte) main::c_radius -Unwinding value copy (struct Point) main::c_center ← (struct Point) main::p -Adding value simple copy (byte) main::c_center_x ← (byte) main::p_x -Adding value simple copy (byte) main::c_center_y ← (byte) main::p_y Replacing struct member reference (struct Point) main::c_center.x with member unwinding reference (byte) main::c_center_x Replacing struct member reference (struct Point) main::c_center.y with member unwinding reference (byte) main::c_center_y Identified constant variable (byte) main::p_x @@ -58,6 +58,7 @@ SYMBOL TABLE SSA (void()) main() (label) main::@return (const byte*) main::SCREEN = (byte*)(number) $400 +(struct Point) main::c_center (byte) main::c_center_x (byte) main::c_center_x#0 (byte) main::c_center_y @@ -132,6 +133,7 @@ VARIABLE REGISTER WEIGHTS (byte) Point::x (byte) Point::y (void()) main() +(struct Point) main::c_center (byte) main::c_center_x (byte) main::c_center_y @@ -275,6 +277,7 @@ FINAL SYMBOL TABLE (void()) main() (label) main::@return (const byte*) main::SCREEN = (byte*) 1024 +(struct Point) main::c_center (byte) main::c_center_x (byte) main::c_center_y (const byte) main::c_radius = (byte) 5 diff --git a/src/test/ref/struct-6.sym b/src/test/ref/struct-6.sym index ab6de3cc3..631177bfe 100644 --- a/src/test/ref/struct-6.sym +++ b/src/test/ref/struct-6.sym @@ -8,6 +8,7 @@ (void()) main() (label) main::@return (const byte*) main::SCREEN = (byte*) 1024 +(struct Point) main::c_center (byte) main::c_center_x (byte) main::c_center_y (const byte) main::c_radius = (byte) 5 diff --git a/src/test/ref/struct-8.log b/src/test/ref/struct-8.log index 2f0768acf..e6cf6f8e2 100644 --- a/src/test/ref/struct-8.log +++ b/src/test/ref/struct-8.log @@ -13,17 +13,17 @@ Converted struct value to member variables (struct Point) main::c_center Unwinding value copy (struct Point) main::p ← { x: (byte) $a, y: (byte) $a } Adding value simple copy (byte) main::p_x ← (byte) $a Adding value simple copy (byte) main::p_y ← (byte) $a -Adding struct value member variable copy (struct Point) main::c_center ← (struct Point) main::p -Adding struct value member variable copy (byte) main::c_radius ← (byte) 5 +Unwinding value copy (struct Circle) main::c ← (struct Circle){ (struct Point) main::p, (byte) 5 } +Unwinding value copy (struct Circle) main::c ← (struct Circle){ (struct Point) main::p, (byte) 5 } +Adding value simple copy (byte) main::c_center_x ← (byte) main::p_x +Adding value simple copy (byte) main::c_center_y ← (byte) main::p_y +Adding value simple copy (byte) main::c_radius ← (byte) 5 Unwinding value copy (struct Point) main::point ← (struct Circle) main::c.center Adding value simple copy (byte) main::point_x ← (byte) main::c_center_x Adding value simple copy (byte) main::point_y ← (byte) main::c_center_y Replacing struct member reference (struct Point) main::point.x with member unwinding reference (byte) main::point_x Replacing struct member reference (struct Point) main::point.y with member unwinding reference (byte) main::point_y Replacing struct member reference (struct Circle) main::c.radius with member unwinding reference (byte) main::c_radius -Unwinding value copy (struct Point) main::c_center ← (struct Point) main::p -Adding value simple copy (byte) main::c_center_x ← (byte) main::p_x -Adding value simple copy (byte) main::c_center_y ← (byte) main::p_y Identified constant variable (byte) main::p_x Identified constant variable (byte) main::p_y Identified constant variable (byte) main::c_radius @@ -64,6 +64,7 @@ SYMBOL TABLE SSA (void()) main() (label) main::@return (const byte*) main::SCREEN = (byte*)(number) $400 +(struct Point) main::c_center (byte) main::c_center_x (byte) main::c_center_x#0 (byte) main::c_center_y @@ -145,6 +146,7 @@ VARIABLE REGISTER WEIGHTS (byte) Point::x (byte) Point::y (void()) main() +(struct Point) main::c_center (byte) main::c_center_x (byte) main::c_center_y (byte) main::point_x @@ -290,6 +292,7 @@ FINAL SYMBOL TABLE (void()) main() (label) main::@return (const byte*) main::SCREEN = (byte*) 1024 +(struct Point) main::c_center (byte) main::c_center_x (byte) main::c_center_y (const byte) main::c_radius = (byte) 5 diff --git a/src/test/ref/struct-8.sym b/src/test/ref/struct-8.sym index 37eb06e0d..f7f307062 100644 --- a/src/test/ref/struct-8.sym +++ b/src/test/ref/struct-8.sym @@ -8,6 +8,7 @@ (void()) main() (label) main::@return (const byte*) main::SCREEN = (byte*) 1024 +(struct Point) main::c_center (byte) main::c_center_x (byte) main::c_center_y (const byte) main::c_radius = (byte) 5 diff --git a/src/test/ref/struct-ptr-10.asm b/src/test/ref/struct-ptr-10.asm index 23bd59bf6..b16542887 100644 --- a/src/test/ref/struct-ptr-10.asm +++ b/src/test/ref/struct-ptr-10.asm @@ -10,10 +10,10 @@ main: { .label __4 = $a .label i = 2 .label i1 = 4 - .label __7 = 8 - .label __8 = 6 - .label __9 = $c - .label __10 = $a + .label __5 = 8 + .label __6 = 6 + .label __7 = $c + .label __8 = $a lda #<0 sta.z i sta.z i+1 @@ -28,22 +28,22 @@ main: { lda.z __3 clc adc #points - sta.z __7+1 + sta.z __5+1 lda #2 ldy #0 - sta (__7),y + sta (__5),y clc - lda.z __8 + lda.z __6 adc #points+OFFSET_STRUCT_POINT_Y - sta.z __8+1 + sta.z __6+1 txa - sta (__8),y + sta (__6),y inc.z i bne !+ inc.z i+1 @@ -67,21 +67,21 @@ main: { lda.z __4 clc adc #points - sta.z __9+1 + sta.z __7+1 clc - lda.z __10 + lda.z __8 adc #SCREEN - sta.z __10+1 + sta.z __8+1 ldy #0 !: - lda (__9),y - sta (__10),y + lda (__7),y + sta (__8),y iny cpy #SIZEOF_STRUCT_POINT bne !- diff --git a/src/test/ref/struct-ptr-10.cfg b/src/test/ref/struct-ptr-10.cfg index 50dae0af9..9bbd99bdb 100644 --- a/src/test/ref/struct-ptr-10.cfg +++ b/src/test/ref/struct-ptr-10.cfg @@ -16,19 +16,19 @@ main::@1: scope:[main] from main main::@1 [5] (word) main::i#2 ← phi( main/(word) 0 main::@1/(word) main::i#1 ) [6] (byte~) main::$0 ← (byte)(word) main::i#2 [7] (word~) main::$3 ← (word) main::i#2 << (byte) 1 - [8] (byte*~) main::$7 ← (byte*)(const struct Point*) points + (word~) main::$3 - [9] *((byte*~) main::$7) ← (byte) 2 - [10] (byte*~) main::$8 ← (byte*)(const struct Point*) points+(const byte) OFFSET_STRUCT_POINT_Y + (word~) main::$3 - [11] *((byte*~) main::$8) ← (byte~) main::$0 + [8] (byte*~) main::$5 ← (byte*)(const struct Point*) points + (word~) main::$3 + [9] *((byte*~) main::$5) ← (byte) 2 + [10] (byte*~) main::$6 ← (byte*)(const struct Point*) points+(const byte) OFFSET_STRUCT_POINT_Y + (word~) main::$3 + [11] *((byte*~) main::$6) ← (byte~) main::$0 [12] (word) main::i#1 ← ++ (word) main::i#2 [13] if((word) main::i#1!=(word) $1f4) goto main::@1 to:main::@2 main::@2: scope:[main] from main::@1 main::@2 [14] (word) main::i1#2 ← phi( main::@1/(word) 0 main::@2/(word) main::i1#1 ) [15] (word~) main::$4 ← (word) main::i1#2 << (byte) 1 - [16] (struct Point*~) main::$9 ← (const struct Point*) points + (word~) main::$4 - [17] (struct Point*~) main::$10 ← (const struct Point*) main::SCREEN + (word~) main::$4 - [18] *((struct Point*~) main::$10) ← memcpy(*((struct Point*~) main::$9), struct Point, (const byte) SIZEOF_STRUCT_POINT) + [16] (struct Point*~) main::$7 ← (const struct Point*) points + (word~) main::$4 + [17] (struct Point*~) main::$8 ← (const struct Point*) main::SCREEN + (word~) main::$4 + [18] *((struct Point*~) main::$8) ← memcpy(*((struct Point*~) main::$7), struct Point, (const byte) SIZEOF_STRUCT_POINT) [19] (word) main::i1#1 ← ++ (word) main::i1#2 [20] if((word) main::i1#1!=(word) $1f4) goto main::@2 to:main::@return diff --git a/src/test/ref/struct-ptr-10.log b/src/test/ref/struct-ptr-10.log index c286de018..e32732d78 100644 --- a/src/test/ref/struct-ptr-10.log +++ b/src/test/ref/struct-ptr-10.log @@ -2,8 +2,9 @@ Fixing pointer array-indexing *((const struct Point*) points + (word) main::i) Fixing pointer array-indexing *((const struct Point*) points + (word) main::i1) Fixing pointer array-indexing *((const struct Point*) main::SCREEN + (word) main::i1) Constantified RValue *((const struct Point*) points + (word~) main::$3) ← (struct Point){ (byte) 2, (byte~) main::$0 } -Adding struct value member variable copy *((byte*~) main::$5 + (word~) main::$3) ← (byte) 2 -Adding struct value member variable copy *((byte*~) main::$6 + (word~) main::$3) ← (byte~) main::$0 +Unwinding value copy *((const struct Point*) points + (word~) main::$3) ← (struct Point){ (byte) 2, (byte~) main::$0 } +Adding value simple copy *((byte*)(const struct Point*) points+(const byte) OFFSET_STRUCT_POINT_X + (word~) main::$3) ← (byte) 2 +Adding value simple copy *((byte*)(const struct Point*) points+(const byte) OFFSET_STRUCT_POINT_Y + (word~) main::$3) ← (byte~) main::$0 Adding value bulk copy *((const struct Point*) main::SCREEN + (word~) main::$4) ← memcpy(*((const struct Point*) points + (word~) main::$4), struct Point, (const byte) SIZEOF_STRUCT_POINT) Culled Empty Block (label) main::@4 @@ -19,10 +20,8 @@ main::@1: scope:[main] from main main::@1 (word) main::i#2 ← phi( main/(word) main::i#0 main::@1/(word) main::i#1 ) (byte~) main::$0 ← ((byte)) (word) main::i#2 (word~) main::$3 ← (word) main::i#2 * (const byte) SIZEOF_STRUCT_POINT - (byte*~) main::$5 ← (byte*)(const struct Point*) points + (const byte) OFFSET_STRUCT_POINT_X - *((byte*~) main::$5 + (word~) main::$3) ← (byte) 2 - (byte*~) main::$6 ← (byte*)(const struct Point*) points + (const byte) OFFSET_STRUCT_POINT_Y - *((byte*~) main::$6 + (word~) main::$3) ← (byte~) main::$0 + *((byte*)(const struct Point*) points+(const byte) OFFSET_STRUCT_POINT_X + (word~) main::$3) ← (byte) 2 + *((byte*)(const struct Point*) points+(const byte) OFFSET_STRUCT_POINT_Y + (word~) main::$3) ← (byte~) main::$0 (word) main::i#1 ← (word) main::i#2 + rangenext(0,$1f3) (bool~) main::$1 ← (word) main::i#1 != rangelast(0,$1f3) if((bool~) main::$1) goto main::@1 @@ -64,8 +63,6 @@ SYMBOL TABLE SSA (bool~) main::$2 (word~) main::$3 (word~) main::$4 -(byte*~) main::$5 -(byte*~) main::$6 (label) main::@1 (label) main::@2 (label) main::@3 @@ -85,27 +82,22 @@ Inlining cast (byte~) main::$0 ← (byte)(word) main::i#2 Successful SSA optimization Pass2InlineCast Simplifying constant pointer cast (struct Point*) 1024 Successful SSA optimization PassNCastSimplification -Simple Condition (bool~) main::$1 [10] if((word) main::i#1!=rangelast(0,$1f3)) goto main::@1 -Simple Condition (bool~) main::$2 [17] if((word) main::i1#1!=rangelast(0,$1f3)) goto main::@3 +Simple Condition (bool~) main::$1 [8] if((word) main::i#1!=rangelast(0,$1f3)) goto main::@1 +Simple Condition (bool~) main::$2 [15] if((word) main::i1#1!=rangelast(0,$1f3)) goto main::@3 Successful SSA optimization Pass2ConditionalJumpSimplification -Constant right-side identified [4] (byte*~) main::$5 ← (byte*)(const struct Point*) points + (const byte) OFFSET_STRUCT_POINT_X -Constant right-side identified [6] (byte*~) main::$6 ← (byte*)(const struct Point*) points + (const byte) OFFSET_STRUCT_POINT_Y -Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const word) main::i#0 = 0 -Constant (const byte*) main::$5 = (byte*)points+OFFSET_STRUCT_POINT_X -Constant (const byte*) main::$6 = (byte*)points+OFFSET_STRUCT_POINT_Y Constant (const word) main::i1#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [8] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [10] if(main::i#1!=rangelast(0,$1f3)) goto main::@1 to (number) $1f4 -Resolved ranged next value [15] main::i1#1 ← ++ main::i1#2 to ++ -Resolved ranged comparison value [17] if(main::i1#1!=rangelast(0,$1f3)) goto main::@3 to (number) $1f4 -De-inlining pointer[w] to *(pointer+w) [5] *((const byte*) main::$5 + (word~) main::$3) ← (byte) 2 -De-inlining pointer[w] to *(pointer+w) [7] *((const byte*) main::$6 + (word~) main::$3) ← (byte~) main::$0 -De-inlining pointer[w] to *(pointer+w) [14] *((const struct Point*) main::SCREEN + (word~) main::$4) ← memcpy(*((const struct Point*) points + (word~) main::$4), struct Point, (const byte) SIZEOF_STRUCT_POINT) -De-inlining pointer[w] to *(pointer+w) [14] *((const struct Point*) main::SCREEN + (word~) main::$4) ← memcpy(*((struct Point*~) main::$9), struct Point, (const byte) SIZEOF_STRUCT_POINT) +Resolved ranged next value [6] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [8] if(main::i#1!=rangelast(0,$1f3)) goto main::@1 to (number) $1f4 +Resolved ranged next value [13] main::i1#1 ← ++ main::i1#2 to ++ +Resolved ranged comparison value [15] if(main::i1#1!=rangelast(0,$1f3)) goto main::@3 to (number) $1f4 +De-inlining pointer[w] to *(pointer+w) [4] *((byte*)(const struct Point*) points+(const byte) OFFSET_STRUCT_POINT_X + (word~) main::$3) ← (byte) 2 +De-inlining pointer[w] to *(pointer+w) [5] *((byte*)(const struct Point*) points+(const byte) OFFSET_STRUCT_POINT_Y + (word~) main::$3) ← (byte~) main::$0 +De-inlining pointer[w] to *(pointer+w) [12] *((const struct Point*) main::SCREEN + (word~) main::$4) ← memcpy(*((const struct Point*) points + (word~) main::$4), struct Point, (const byte) SIZEOF_STRUCT_POINT) +De-inlining pointer[w] to *(pointer+w) [12] *((const struct Point*) main::SCREEN + (word~) main::$4) ← memcpy(*((struct Point*~) main::$7), struct Point, (const byte) SIZEOF_STRUCT_POINT) Successful SSA optimization Pass2DeInlineWordDerefIdx -Simplifying expression containing zero (byte*)points in +Simplifying expression containing zero (byte*)points in (byte*~) main::$5 ← (byte*)(const struct Point*) points+(const byte) OFFSET_STRUCT_POINT_X + (word~) main::$3 Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused constant (const byte) OFFSET_STRUCT_POINT_X Successful SSA optimization PassNEliminateUnusedVars @@ -123,10 +115,8 @@ Rewriting multiplication to use shift [10] (word~) main::$4 ← (word) main::i1# Successful SSA optimization Pass2MultiplyToShiftRewriting Inlining constant with var siblings (const word) main::i#0 Inlining constant with var siblings (const word) main::i1#0 -Constant inlined main::$5 = (byte*)(const struct Point*) points Constant inlined main::i#0 = (word) 0 Constant inlined main::i1#0 = (word) 0 -Constant inlined main::$6 = (byte*)(const struct Point*) points+(const byte) OFFSET_STRUCT_POINT_Y Successful SSA optimization Pass2ConstantInlining Added new block during phi lifting main::@5(between main::@1 and main::@1) Added new block during phi lifting main::@6(between main::@3 and main::@3) @@ -172,19 +162,19 @@ main::@1: scope:[main] from main main::@1 [5] (word) main::i#2 ← phi( main/(word) 0 main::@1/(word) main::i#1 ) [6] (byte~) main::$0 ← (byte)(word) main::i#2 [7] (word~) main::$3 ← (word) main::i#2 << (byte) 1 - [8] (byte*~) main::$7 ← (byte*)(const struct Point*) points + (word~) main::$3 - [9] *((byte*~) main::$7) ← (byte) 2 - [10] (byte*~) main::$8 ← (byte*)(const struct Point*) points+(const byte) OFFSET_STRUCT_POINT_Y + (word~) main::$3 - [11] *((byte*~) main::$8) ← (byte~) main::$0 + [8] (byte*~) main::$5 ← (byte*)(const struct Point*) points + (word~) main::$3 + [9] *((byte*~) main::$5) ← (byte) 2 + [10] (byte*~) main::$6 ← (byte*)(const struct Point*) points+(const byte) OFFSET_STRUCT_POINT_Y + (word~) main::$3 + [11] *((byte*~) main::$6) ← (byte~) main::$0 [12] (word) main::i#1 ← ++ (word) main::i#2 [13] if((word) main::i#1!=(word) $1f4) goto main::@1 to:main::@2 main::@2: scope:[main] from main::@1 main::@2 [14] (word) main::i1#2 ← phi( main::@1/(word) 0 main::@2/(word) main::i1#1 ) [15] (word~) main::$4 ← (word) main::i1#2 << (byte) 1 - [16] (struct Point*~) main::$9 ← (const struct Point*) points + (word~) main::$4 - [17] (struct Point*~) main::$10 ← (const struct Point*) main::SCREEN + (word~) main::$4 - [18] *((struct Point*~) main::$10) ← memcpy(*((struct Point*~) main::$9), struct Point, (const byte) SIZEOF_STRUCT_POINT) + [16] (struct Point*~) main::$7 ← (const struct Point*) points + (word~) main::$4 + [17] (struct Point*~) main::$8 ← (const struct Point*) main::SCREEN + (word~) main::$4 + [18] *((struct Point*~) main::$8) ← memcpy(*((struct Point*~) main::$7), struct Point, (const byte) SIZEOF_STRUCT_POINT) [19] (word) main::i1#1 ← ++ (word) main::i1#2 [20] if((word) main::i1#1!=(word) $1f4) goto main::@2 to:main::@return @@ -198,12 +188,12 @@ VARIABLE REGISTER WEIGHTS (byte) Point::y (void()) main() (byte~) main::$0 4.4 -(struct Point*~) main::$10 22.0 (word~) main::$3 11.0 (word~) main::$4 16.5 -(byte*~) main::$7 22.0 -(byte*~) main::$8 22.0 -(struct Point*~) main::$9 5.5 +(byte*~) main::$5 22.0 +(byte*~) main::$6 22.0 +(struct Point*~) main::$7 5.5 +(struct Point*~) main::$8 22.0 (word) main::i (word) main::i#1 16.5 (word) main::i#2 4.714285714285714 @@ -216,30 +206,30 @@ Initial phi equivalence classes [ main::i1#2 main::i1#1 ] Added variable main::$0 to live range equivalence class [ main::$0 ] Added variable main::$3 to live range equivalence class [ main::$3 ] +Added variable main::$5 to live range equivalence class [ main::$5 ] +Added variable main::$6 to live range equivalence class [ main::$6 ] +Added variable main::$4 to live range equivalence class [ main::$4 ] Added variable main::$7 to live range equivalence class [ main::$7 ] Added variable main::$8 to live range equivalence class [ main::$8 ] -Added variable main::$4 to live range equivalence class [ main::$4 ] -Added variable main::$9 to live range equivalence class [ main::$9 ] -Added variable main::$10 to live range equivalence class [ main::$10 ] Complete equivalence classes [ main::i#2 main::i#1 ] [ main::i1#2 main::i1#1 ] [ main::$0 ] [ main::$3 ] +[ main::$5 ] +[ main::$6 ] +[ main::$4 ] [ main::$7 ] [ main::$8 ] -[ main::$4 ] -[ main::$9 ] -[ main::$10 ] Allocated zp[2]:2 [ main::i#2 main::i#1 ] Allocated zp[2]:4 [ main::i1#2 main::i1#1 ] Allocated zp[1]:6 [ main::$0 ] Allocated zp[2]:7 [ main::$3 ] -Allocated zp[2]:9 [ main::$7 ] -Allocated zp[2]:11 [ main::$8 ] +Allocated zp[2]:9 [ main::$5 ] +Allocated zp[2]:11 [ main::$6 ] Allocated zp[2]:13 [ main::$4 ] -Allocated zp[2]:15 [ main::$9 ] -Allocated zp[2]:17 [ main::$10 ] +Allocated zp[2]:15 [ main::$7 ] +Allocated zp[2]:17 [ main::$8 ] INITIAL ASM Target platform is c64basic / MOS6502X @@ -276,10 +266,10 @@ main: { .label __4 = $d .label i = 2 .label i1 = 4 - .label __7 = 9 - .label __8 = $b - .label __9 = $f - .label __10 = $11 + .label __5 = 9 + .label __6 = $b + .label __7 = $f + .label __8 = $11 // [5] phi from main to main::@1 [phi:main->main::@1] __b1_from_main: // [5] phi (word) main::i#2 = (word) 0 [phi:main->main::@1#0] -- vwuz1=vwuc1 @@ -304,30 +294,30 @@ main: { lda.z i+1 rol sta.z __3+1 - // [8] (byte*~) main::$7 ← (byte*)(const struct Point*) points + (word~) main::$3 -- pbuz1=pbuc1_plus_vwuz2 + // [8] (byte*~) main::$5 ← (byte*)(const struct Point*) points + (word~) main::$3 -- pbuz1=pbuc1_plus_vwuz2 lda.z __3 clc adc #points - sta.z __7+1 - // [9] *((byte*~) main::$7) ← (byte) 2 -- _deref_pbuz1=vbuc1 + sta.z __5+1 + // [9] *((byte*~) main::$5) ← (byte) 2 -- _deref_pbuz1=vbuc1 lda #2 ldy #0 - sta (__7),y - // [10] (byte*~) main::$8 ← (byte*)(const struct Point*) points+(const byte) OFFSET_STRUCT_POINT_Y + (word~) main::$3 -- pbuz1=pbuc1_plus_vwuz2 + sta (__5),y + // [10] (byte*~) main::$6 ← (byte*)(const struct Point*) points+(const byte) OFFSET_STRUCT_POINT_Y + (word~) main::$3 -- pbuz1=pbuc1_plus_vwuz2 lda.z __3 clc adc #points+OFFSET_STRUCT_POINT_Y - sta.z __8+1 - // [11] *((byte*~) main::$8) ← (byte~) main::$0 -- _deref_pbuz1=vbuz2 + sta.z __6+1 + // [11] *((byte*~) main::$6) ← (byte~) main::$0 -- _deref_pbuz1=vbuz2 lda.z __0 ldy #0 - sta (__8),y + sta (__6),y // [12] (word) main::i#1 ← ++ (word) main::i#2 -- vwuz1=_inc_vwuz1 inc.z i bne !+ @@ -361,27 +351,27 @@ main: { lda.z i1+1 rol sta.z __4+1 - // [16] (struct Point*~) main::$9 ← (const struct Point*) points + (word~) main::$4 -- pssz1=pssc1_plus_vwuz2 + // [16] (struct Point*~) main::$7 ← (const struct Point*) points + (word~) main::$4 -- pssz1=pssc1_plus_vwuz2 lda.z __4 clc adc #points - sta.z __9+1 - // [17] (struct Point*~) main::$10 ← (const struct Point*) main::SCREEN + (word~) main::$4 -- pssz1=pssc1_plus_vwuz2 + sta.z __7+1 + // [17] (struct Point*~) main::$8 ← (const struct Point*) main::SCREEN + (word~) main::$4 -- pssz1=pssc1_plus_vwuz2 lda.z __4 clc adc #SCREEN - sta.z __10+1 - // [18] *((struct Point*~) main::$10) ← memcpy(*((struct Point*~) main::$9), struct Point, (const byte) SIZEOF_STRUCT_POINT) -- _deref_pssz1=_deref_pssz2_memcpy_vbuc1 + sta.z __8+1 + // [18] *((struct Point*~) main::$8) ← memcpy(*((struct Point*~) main::$7), struct Point, (const byte) SIZEOF_STRUCT_POINT) -- _deref_pssz1=_deref_pssz2_memcpy_vbuc1 ldy #0 !: - lda (__9),y - sta (__10),y + lda (__7),y + sta (__8),y iny cpy #SIZEOF_STRUCT_POINT bne !- @@ -410,53 +400,53 @@ REGISTER UPLIFT POTENTIAL REGISTERS Statement [6] (byte~) main::$0 ← (byte)(word) main::i#2 [ main::i#2 main::$0 ] ( main:2 [ main::i#2 main::$0 ] ) always clobbers reg byte a Statement [7] (word~) main::$3 ← (word) main::i#2 << (byte) 1 [ main::i#2 main::$0 main::$3 ] ( main:2 [ main::i#2 main::$0 main::$3 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:6 [ main::$0 ] -Statement [8] (byte*~) main::$7 ← (byte*)(const struct Point*) points + (word~) main::$3 [ main::i#2 main::$0 main::$3 main::$7 ] ( main:2 [ main::i#2 main::$0 main::$3 main::$7 ] ) always clobbers reg byte a -Statement [9] *((byte*~) main::$7) ← (byte) 2 [ main::i#2 main::$0 main::$3 ] ( main:2 [ main::i#2 main::$0 main::$3 ] ) always clobbers reg byte a reg byte y +Statement [8] (byte*~) main::$5 ← (byte*)(const struct Point*) points + (word~) main::$3 [ main::i#2 main::$0 main::$3 main::$5 ] ( main:2 [ main::i#2 main::$0 main::$3 main::$5 ] ) always clobbers reg byte a +Statement [9] *((byte*~) main::$5) ← (byte) 2 [ main::i#2 main::$0 main::$3 ] ( main:2 [ main::i#2 main::$0 main::$3 ] ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte y as potential for zp[1]:6 [ main::$0 ] -Statement [10] (byte*~) main::$8 ← (byte*)(const struct Point*) points+(const byte) OFFSET_STRUCT_POINT_Y + (word~) main::$3 [ main::i#2 main::$0 main::$8 ] ( main:2 [ main::i#2 main::$0 main::$8 ] ) always clobbers reg byte a -Statement [11] *((byte*~) main::$8) ← (byte~) main::$0 [ main::i#2 ] ( main:2 [ main::i#2 ] ) always clobbers reg byte a reg byte y +Statement [10] (byte*~) main::$6 ← (byte*)(const struct Point*) points+(const byte) OFFSET_STRUCT_POINT_Y + (word~) main::$3 [ main::i#2 main::$0 main::$6 ] ( main:2 [ main::i#2 main::$0 main::$6 ] ) always clobbers reg byte a +Statement [11] *((byte*~) main::$6) ← (byte~) main::$0 [ main::i#2 ] ( main:2 [ main::i#2 ] ) always clobbers reg byte a reg byte y Statement [13] if((word) main::i#1!=(word) $1f4) goto main::@1 [ main::i#1 ] ( main:2 [ main::i#1 ] ) always clobbers reg byte a Statement [15] (word~) main::$4 ← (word) main::i1#2 << (byte) 1 [ main::i1#2 main::$4 ] ( main:2 [ main::i1#2 main::$4 ] ) always clobbers reg byte a -Statement [16] (struct Point*~) main::$9 ← (const struct Point*) points + (word~) main::$4 [ main::i1#2 main::$4 main::$9 ] ( main:2 [ main::i1#2 main::$4 main::$9 ] ) always clobbers reg byte a -Statement [17] (struct Point*~) main::$10 ← (const struct Point*) main::SCREEN + (word~) main::$4 [ main::i1#2 main::$9 main::$10 ] ( main:2 [ main::i1#2 main::$9 main::$10 ] ) always clobbers reg byte a -Statement [18] *((struct Point*~) main::$10) ← memcpy(*((struct Point*~) main::$9), struct Point, (const byte) SIZEOF_STRUCT_POINT) [ main::i1#2 ] ( main:2 [ main::i1#2 ] ) always clobbers reg byte a reg byte y +Statement [16] (struct Point*~) main::$7 ← (const struct Point*) points + (word~) main::$4 [ main::i1#2 main::$4 main::$7 ] ( main:2 [ main::i1#2 main::$4 main::$7 ] ) always clobbers reg byte a +Statement [17] (struct Point*~) main::$8 ← (const struct Point*) main::SCREEN + (word~) main::$4 [ main::i1#2 main::$7 main::$8 ] ( main:2 [ main::i1#2 main::$7 main::$8 ] ) always clobbers reg byte a +Statement [18] *((struct Point*~) main::$8) ← memcpy(*((struct Point*~) main::$7), struct Point, (const byte) SIZEOF_STRUCT_POINT) [ main::i1#2 ] ( main:2 [ main::i1#2 ] ) always clobbers reg byte a reg byte y Statement [20] if((word) main::i1#1!=(word) $1f4) goto main::@2 [ main::i1#1 ] ( main:2 [ main::i1#1 ] ) always clobbers reg byte a Statement [6] (byte~) main::$0 ← (byte)(word) main::i#2 [ main::i#2 main::$0 ] ( main:2 [ main::i#2 main::$0 ] ) always clobbers reg byte a Statement [7] (word~) main::$3 ← (word) main::i#2 << (byte) 1 [ main::i#2 main::$0 main::$3 ] ( main:2 [ main::i#2 main::$0 main::$3 ] ) always clobbers reg byte a -Statement [8] (byte*~) main::$7 ← (byte*)(const struct Point*) points + (word~) main::$3 [ main::i#2 main::$0 main::$3 main::$7 ] ( main:2 [ main::i#2 main::$0 main::$3 main::$7 ] ) always clobbers reg byte a -Statement [9] *((byte*~) main::$7) ← (byte) 2 [ main::i#2 main::$0 main::$3 ] ( main:2 [ main::i#2 main::$0 main::$3 ] ) always clobbers reg byte a reg byte y -Statement [10] (byte*~) main::$8 ← (byte*)(const struct Point*) points+(const byte) OFFSET_STRUCT_POINT_Y + (word~) main::$3 [ main::i#2 main::$0 main::$8 ] ( main:2 [ main::i#2 main::$0 main::$8 ] ) always clobbers reg byte a -Statement [11] *((byte*~) main::$8) ← (byte~) main::$0 [ main::i#2 ] ( main:2 [ main::i#2 ] ) always clobbers reg byte a reg byte y +Statement [8] (byte*~) main::$5 ← (byte*)(const struct Point*) points + (word~) main::$3 [ main::i#2 main::$0 main::$3 main::$5 ] ( main:2 [ main::i#2 main::$0 main::$3 main::$5 ] ) always clobbers reg byte a +Statement [9] *((byte*~) main::$5) ← (byte) 2 [ main::i#2 main::$0 main::$3 ] ( main:2 [ main::i#2 main::$0 main::$3 ] ) always clobbers reg byte a reg byte y +Statement [10] (byte*~) main::$6 ← (byte*)(const struct Point*) points+(const byte) OFFSET_STRUCT_POINT_Y + (word~) main::$3 [ main::i#2 main::$0 main::$6 ] ( main:2 [ main::i#2 main::$0 main::$6 ] ) always clobbers reg byte a +Statement [11] *((byte*~) main::$6) ← (byte~) main::$0 [ main::i#2 ] ( main:2 [ main::i#2 ] ) always clobbers reg byte a reg byte y Statement [13] if((word) main::i#1!=(word) $1f4) goto main::@1 [ main::i#1 ] ( main:2 [ main::i#1 ] ) always clobbers reg byte a Statement [15] (word~) main::$4 ← (word) main::i1#2 << (byte) 1 [ main::i1#2 main::$4 ] ( main:2 [ main::i1#2 main::$4 ] ) always clobbers reg byte a -Statement [16] (struct Point*~) main::$9 ← (const struct Point*) points + (word~) main::$4 [ main::i1#2 main::$4 main::$9 ] ( main:2 [ main::i1#2 main::$4 main::$9 ] ) always clobbers reg byte a -Statement [17] (struct Point*~) main::$10 ← (const struct Point*) main::SCREEN + (word~) main::$4 [ main::i1#2 main::$9 main::$10 ] ( main:2 [ main::i1#2 main::$9 main::$10 ] ) always clobbers reg byte a -Statement [18] *((struct Point*~) main::$10) ← memcpy(*((struct Point*~) main::$9), struct Point, (const byte) SIZEOF_STRUCT_POINT) [ main::i1#2 ] ( main:2 [ main::i1#2 ] ) always clobbers reg byte a reg byte y +Statement [16] (struct Point*~) main::$7 ← (const struct Point*) points + (word~) main::$4 [ main::i1#2 main::$4 main::$7 ] ( main:2 [ main::i1#2 main::$4 main::$7 ] ) always clobbers reg byte a +Statement [17] (struct Point*~) main::$8 ← (const struct Point*) main::SCREEN + (word~) main::$4 [ main::i1#2 main::$7 main::$8 ] ( main:2 [ main::i1#2 main::$7 main::$8 ] ) always clobbers reg byte a +Statement [18] *((struct Point*~) main::$8) ← memcpy(*((struct Point*~) main::$7), struct Point, (const byte) SIZEOF_STRUCT_POINT) [ main::i1#2 ] ( main:2 [ main::i1#2 ] ) always clobbers reg byte a reg byte y Statement [20] if((word) main::i1#1!=(word) $1f4) goto main::@2 [ main::i1#1 ] ( main:2 [ main::i1#1 ] ) always clobbers reg byte a Potential registers zp[2]:2 [ main::i#2 main::i#1 ] : zp[2]:2 , Potential registers zp[2]:4 [ main::i1#2 main::i1#1 ] : zp[2]:4 , Potential registers zp[1]:6 [ main::$0 ] : zp[1]:6 , reg byte x , Potential registers zp[2]:7 [ main::$3 ] : zp[2]:7 , -Potential registers zp[2]:9 [ main::$7 ] : zp[2]:9 , -Potential registers zp[2]:11 [ main::$8 ] : zp[2]:11 , +Potential registers zp[2]:9 [ main::$5 ] : zp[2]:9 , +Potential registers zp[2]:11 [ main::$6 ] : zp[2]:11 , Potential registers zp[2]:13 [ main::$4 ] : zp[2]:13 , -Potential registers zp[2]:15 [ main::$9 ] : zp[2]:15 , -Potential registers zp[2]:17 [ main::$10 ] : zp[2]:17 , +Potential registers zp[2]:15 [ main::$7 ] : zp[2]:15 , +Potential registers zp[2]:17 [ main::$8 ] : zp[2]:17 , REGISTER UPLIFT SCOPES -Uplift Scope [main] 23.1: zp[2]:4 [ main::i1#2 main::i1#1 ] 22: zp[2]:9 [ main::$7 ] 22: zp[2]:11 [ main::$8 ] 22: zp[2]:17 [ main::$10 ] 21.21: zp[2]:2 [ main::i#2 main::i#1 ] 16.5: zp[2]:13 [ main::$4 ] 11: zp[2]:7 [ main::$3 ] 5.5: zp[2]:15 [ main::$9 ] 4.4: zp[1]:6 [ main::$0 ] +Uplift Scope [main] 23.1: zp[2]:4 [ main::i1#2 main::i1#1 ] 22: zp[2]:9 [ main::$5 ] 22: zp[2]:11 [ main::$6 ] 22: zp[2]:17 [ main::$8 ] 21.21: zp[2]:2 [ main::i#2 main::i#1 ] 16.5: zp[2]:13 [ main::$4 ] 11: zp[2]:7 [ main::$3 ] 5.5: zp[2]:15 [ main::$7 ] 4.4: zp[1]:6 [ main::$0 ] Uplift Scope [Point] Uplift Scope [] -Uplifting [main] best 2408 combination zp[2]:4 [ main::i1#2 main::i1#1 ] zp[2]:9 [ main::$7 ] zp[2]:11 [ main::$8 ] zp[2]:17 [ main::$10 ] zp[2]:2 [ main::i#2 main::i#1 ] zp[2]:13 [ main::$4 ] zp[2]:7 [ main::$3 ] zp[2]:15 [ main::$9 ] reg byte x [ main::$0 ] +Uplifting [main] best 2408 combination zp[2]:4 [ main::i1#2 main::i1#1 ] zp[2]:9 [ main::$5 ] zp[2]:11 [ main::$6 ] zp[2]:17 [ main::$8 ] zp[2]:2 [ main::i#2 main::i#1 ] zp[2]:13 [ main::$4 ] zp[2]:7 [ main::$3 ] zp[2]:15 [ main::$7 ] reg byte x [ main::$0 ] Uplifting [Point] best 2408 combination Uplifting [] best 2408 combination -Coalescing zero page register [ zp[2]:7 [ main::$3 ] ] with [ zp[2]:11 [ main::$8 ] ] - score: 1 -Coalescing zero page register [ zp[2]:13 [ main::$4 ] ] with [ zp[2]:17 [ main::$10 ] ] - score: 1 -Allocated (was zp[2]:7) zp[2]:6 [ main::$3 main::$8 ] -Allocated (was zp[2]:9) zp[2]:8 [ main::$7 ] -Allocated (was zp[2]:13) zp[2]:10 [ main::$4 main::$10 ] -Allocated (was zp[2]:15) zp[2]:12 [ main::$9 ] +Coalescing zero page register [ zp[2]:7 [ main::$3 ] ] with [ zp[2]:11 [ main::$6 ] ] - score: 1 +Coalescing zero page register [ zp[2]:13 [ main::$4 ] ] with [ zp[2]:17 [ main::$8 ] ] - score: 1 +Allocated (was zp[2]:7) zp[2]:6 [ main::$3 main::$6 ] +Allocated (was zp[2]:9) zp[2]:8 [ main::$5 ] +Allocated (was zp[2]:13) zp[2]:10 [ main::$4 main::$8 ] +Allocated (was zp[2]:15) zp[2]:12 [ main::$7 ] ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -491,10 +481,10 @@ main: { .label __4 = $a .label i = 2 .label i1 = 4 - .label __7 = 8 - .label __8 = 6 - .label __9 = $c - .label __10 = $a + .label __5 = 8 + .label __6 = 6 + .label __7 = $c + .label __8 = $a // [5] phi from main to main::@1 [phi:main->main::@1] __b1_from_main: // [5] phi (word) main::i#2 = (word) 0 [phi:main->main::@1#0] -- vwuz1=vwuc1 @@ -519,30 +509,30 @@ main: { lda.z i+1 rol sta.z __3+1 - // [8] (byte*~) main::$7 ← (byte*)(const struct Point*) points + (word~) main::$3 -- pbuz1=pbuc1_plus_vwuz2 + // [8] (byte*~) main::$5 ← (byte*)(const struct Point*) points + (word~) main::$3 -- pbuz1=pbuc1_plus_vwuz2 lda.z __3 clc adc #points - sta.z __7+1 - // [9] *((byte*~) main::$7) ← (byte) 2 -- _deref_pbuz1=vbuc1 + sta.z __5+1 + // [9] *((byte*~) main::$5) ← (byte) 2 -- _deref_pbuz1=vbuc1 lda #2 ldy #0 - sta (__7),y - // [10] (byte*~) main::$8 ← (byte*)(const struct Point*) points+(const byte) OFFSET_STRUCT_POINT_Y + (word~) main::$3 -- pbuz1=pbuc1_plus_vwuz1 + sta (__5),y + // [10] (byte*~) main::$6 ← (byte*)(const struct Point*) points+(const byte) OFFSET_STRUCT_POINT_Y + (word~) main::$3 -- pbuz1=pbuc1_plus_vwuz1 clc - lda.z __8 + lda.z __6 adc #points+OFFSET_STRUCT_POINT_Y - sta.z __8+1 - // [11] *((byte*~) main::$8) ← (byte~) main::$0 -- _deref_pbuz1=vbuxx + sta.z __6+1 + // [11] *((byte*~) main::$6) ← (byte~) main::$0 -- _deref_pbuz1=vbuxx txa ldy #0 - sta (__8),y + sta (__6),y // [12] (word) main::i#1 ← ++ (word) main::i#2 -- vwuz1=_inc_vwuz1 inc.z i bne !+ @@ -576,27 +566,27 @@ main: { lda.z i1+1 rol sta.z __4+1 - // [16] (struct Point*~) main::$9 ← (const struct Point*) points + (word~) main::$4 -- pssz1=pssc1_plus_vwuz2 + // [16] (struct Point*~) main::$7 ← (const struct Point*) points + (word~) main::$4 -- pssz1=pssc1_plus_vwuz2 lda.z __4 clc adc #points - sta.z __9+1 - // [17] (struct Point*~) main::$10 ← (const struct Point*) main::SCREEN + (word~) main::$4 -- pssz1=pssc1_plus_vwuz1 + sta.z __7+1 + // [17] (struct Point*~) main::$8 ← (const struct Point*) main::SCREEN + (word~) main::$4 -- pssz1=pssc1_plus_vwuz1 clc - lda.z __10 + lda.z __8 adc #SCREEN - sta.z __10+1 - // [18] *((struct Point*~) main::$10) ← memcpy(*((struct Point*~) main::$9), struct Point, (const byte) SIZEOF_STRUCT_POINT) -- _deref_pssz1=_deref_pssz2_memcpy_vbuc1 + sta.z __8+1 + // [18] *((struct Point*~) main::$8) ← memcpy(*((struct Point*~) main::$7), struct Point, (const byte) SIZEOF_STRUCT_POINT) -- _deref_pssz1=_deref_pssz2_memcpy_vbuc1 ldy #0 !: - lda (__9),y - sta (__10),y + lda (__7),y + sta (__8),y iny cpy #SIZEOF_STRUCT_POINT bne !- @@ -669,12 +659,12 @@ FINAL SYMBOL TABLE (const byte) SIZEOF_STRUCT_POINT = (byte) 2 (void()) main() (byte~) main::$0 reg byte x 4.4 -(struct Point*~) main::$10 zp[2]:10 22.0 (word~) main::$3 zp[2]:6 11.0 (word~) main::$4 zp[2]:10 16.5 -(byte*~) main::$7 zp[2]:8 22.0 -(byte*~) main::$8 zp[2]:6 22.0 -(struct Point*~) main::$9 zp[2]:12 5.5 +(byte*~) main::$5 zp[2]:8 22.0 +(byte*~) main::$6 zp[2]:6 22.0 +(struct Point*~) main::$7 zp[2]:12 5.5 +(struct Point*~) main::$8 zp[2]:10 22.0 (label) main::@1 (label) main::@2 (label) main::@return @@ -690,10 +680,10 @@ FINAL SYMBOL TABLE zp[2]:2 [ main::i#2 main::i#1 ] zp[2]:4 [ main::i1#2 main::i1#1 ] reg byte x [ main::$0 ] -zp[2]:6 [ main::$3 main::$8 ] -zp[2]:8 [ main::$7 ] -zp[2]:10 [ main::$4 main::$10 ] -zp[2]:12 [ main::$9 ] +zp[2]:6 [ main::$3 main::$6 ] +zp[2]:8 [ main::$5 ] +zp[2]:10 [ main::$4 main::$8 ] +zp[2]:12 [ main::$7 ] FINAL ASSEMBLER @@ -722,10 +712,10 @@ main: { .label __4 = $a .label i = 2 .label i1 = 4 - .label __7 = 8 - .label __8 = 6 - .label __9 = $c - .label __10 = $a + .label __5 = 8 + .label __6 = 6 + .label __7 = $c + .label __8 = $a // [5] phi from main to main::@1 [phi:main->main::@1] // [5] phi (word) main::i#2 = (word) 0 [phi:main->main::@1#0] -- vwuz1=vwuc1 lda #<0 @@ -746,29 +736,29 @@ main: { lda.z i+1 rol sta.z __3+1 - // [8] (byte*~) main::$7 ← (byte*)(const struct Point*) points + (word~) main::$3 -- pbuz1=pbuc1_plus_vwuz2 + // [8] (byte*~) main::$5 ← (byte*)(const struct Point*) points + (word~) main::$3 -- pbuz1=pbuc1_plus_vwuz2 lda.z __3 clc adc #points - sta.z __7+1 - // [9] *((byte*~) main::$7) ← (byte) 2 -- _deref_pbuz1=vbuc1 + sta.z __5+1 + // [9] *((byte*~) main::$5) ← (byte) 2 -- _deref_pbuz1=vbuc1 lda #2 ldy #0 - sta (__7),y - // [10] (byte*~) main::$8 ← (byte*)(const struct Point*) points+(const byte) OFFSET_STRUCT_POINT_Y + (word~) main::$3 -- pbuz1=pbuc1_plus_vwuz1 + sta (__5),y + // [10] (byte*~) main::$6 ← (byte*)(const struct Point*) points+(const byte) OFFSET_STRUCT_POINT_Y + (word~) main::$3 -- pbuz1=pbuc1_plus_vwuz1 clc - lda.z __8 + lda.z __6 adc #points+OFFSET_STRUCT_POINT_Y - sta.z __8+1 - // [11] *((byte*~) main::$8) ← (byte~) main::$0 -- _deref_pbuz1=vbuxx + sta.z __6+1 + // [11] *((byte*~) main::$6) ← (byte~) main::$0 -- _deref_pbuz1=vbuxx txa - sta (__8),y + sta (__6),y // for( word i: 0..499) // [12] (word) main::i#1 ← ++ (word) main::i#2 -- vwuz1=_inc_vwuz1 inc.z i @@ -799,27 +789,27 @@ main: { lda.z i1+1 rol sta.z __4+1 - // [16] (struct Point*~) main::$9 ← (const struct Point*) points + (word~) main::$4 -- pssz1=pssc1_plus_vwuz2 + // [16] (struct Point*~) main::$7 ← (const struct Point*) points + (word~) main::$4 -- pssz1=pssc1_plus_vwuz2 lda.z __4 clc adc #points - sta.z __9+1 - // [17] (struct Point*~) main::$10 ← (const struct Point*) main::SCREEN + (word~) main::$4 -- pssz1=pssc1_plus_vwuz1 + sta.z __7+1 + // [17] (struct Point*~) main::$8 ← (const struct Point*) main::SCREEN + (word~) main::$4 -- pssz1=pssc1_plus_vwuz1 clc - lda.z __10 + lda.z __8 adc #SCREEN - sta.z __10+1 - // [18] *((struct Point*~) main::$10) ← memcpy(*((struct Point*~) main::$9), struct Point, (const byte) SIZEOF_STRUCT_POINT) -- _deref_pssz1=_deref_pssz2_memcpy_vbuc1 + sta.z __8+1 + // [18] *((struct Point*~) main::$8) ← memcpy(*((struct Point*~) main::$7), struct Point, (const byte) SIZEOF_STRUCT_POINT) -- _deref_pssz1=_deref_pssz2_memcpy_vbuc1 ldy #0 !: - lda (__9),y - sta (__10),y + lda (__7),y + sta (__8),y iny cpy #SIZEOF_STRUCT_POINT bne !- diff --git a/src/test/ref/struct-ptr-10.sym b/src/test/ref/struct-ptr-10.sym index 064878fe3..b42fd65c5 100644 --- a/src/test/ref/struct-ptr-10.sym +++ b/src/test/ref/struct-ptr-10.sym @@ -7,12 +7,12 @@ (const byte) SIZEOF_STRUCT_POINT = (byte) 2 (void()) main() (byte~) main::$0 reg byte x 4.4 -(struct Point*~) main::$10 zp[2]:10 22.0 (word~) main::$3 zp[2]:6 11.0 (word~) main::$4 zp[2]:10 16.5 -(byte*~) main::$7 zp[2]:8 22.0 -(byte*~) main::$8 zp[2]:6 22.0 -(struct Point*~) main::$9 zp[2]:12 5.5 +(byte*~) main::$5 zp[2]:8 22.0 +(byte*~) main::$6 zp[2]:6 22.0 +(struct Point*~) main::$7 zp[2]:12 5.5 +(struct Point*~) main::$8 zp[2]:10 22.0 (label) main::@1 (label) main::@2 (label) main::@return @@ -28,7 +28,7 @@ zp[2]:2 [ main::i#2 main::i#1 ] zp[2]:4 [ main::i1#2 main::i1#1 ] reg byte x [ main::$0 ] -zp[2]:6 [ main::$3 main::$8 ] -zp[2]:8 [ main::$7 ] -zp[2]:10 [ main::$4 main::$10 ] -zp[2]:12 [ main::$9 ] +zp[2]:6 [ main::$3 main::$6 ] +zp[2]:8 [ main::$5 ] +zp[2]:10 [ main::$4 main::$8 ] +zp[2]:12 [ main::$7 ] diff --git a/src/test/ref/struct-ptr-11.cfg b/src/test/ref/struct-ptr-11.cfg index 52b4058e6..9015869cc 100644 --- a/src/test/ref/struct-ptr-11.cfg +++ b/src/test/ref/struct-ptr-11.cfg @@ -15,8 +15,8 @@ main: scope:[main] from @1 main::@1: scope:[main] from main main::@1 [5] (byte) main::i#2 ← phi( main/(byte) 0 main::@1/(byte) main::i#1 ) [6] (signed byte~) main::$2 ← - (signed byte)(byte) main::i#2 - [7] (byte~) main::$11 ← (byte) main::i#2 << (byte) 1 - [8] (byte~) main::$6 ← (byte~) main::$11 + (byte) main::i#2 + [7] (byte~) main::$8 ← (byte) main::i#2 << (byte) 1 + [8] (byte~) main::$6 ← (byte~) main::$8 + (byte) main::i#2 [9] *((signed byte*)(const struct Point*) points + (byte~) main::$6) ← (signed byte)(byte) main::i#2 [10] *((signed byte*)(const struct Point*) points+(const byte) OFFSET_STRUCT_POINT_Y + (byte~) main::$6) ← (signed byte~) main::$2 [11] *((signed byte*)(const struct Point*) points+(const byte) OFFSET_STRUCT_POINT_Z + (byte~) main::$6) ← (signed byte)(byte) main::i#2 @@ -25,8 +25,8 @@ main::@1: scope:[main] from main main::@1 to:main::@2 main::@2: scope:[main] from main::@1 main::@2 [14] (byte) main::i1#2 ← phi( main::@1/(byte) 0 main::@2/(byte) main::i1#1 ) - [15] (byte~) main::$13 ← (byte) main::i1#2 << (byte) 1 - [16] (byte~) main::$7 ← (byte~) main::$13 + (byte) main::i1#2 + [15] (byte~) main::$10 ← (byte) main::i1#2 << (byte) 1 + [16] (byte~) main::$7 ← (byte~) main::$10 + (byte) main::i1#2 [17] *((const struct Point*) main::SCREEN + (byte~) main::$7) ← memcpy(*((const struct Point*) points + (byte~) main::$7), struct Point, (const byte) SIZEOF_STRUCT_POINT) [18] (byte) main::i1#1 ← ++ (byte) main::i1#2 [19] if((byte) main::i1#1!=(byte) 4) goto main::@2 diff --git a/src/test/ref/struct-ptr-11.log b/src/test/ref/struct-ptr-11.log index 1eb06ee5a..ec97ab76a 100644 --- a/src/test/ref/struct-ptr-11.log +++ b/src/test/ref/struct-ptr-11.log @@ -2,9 +2,10 @@ Fixing pointer array-indexing *((const struct Point*) points + (byte) main::i) Fixing pointer array-indexing *((const struct Point*) points + (byte) main::i1) Fixing pointer array-indexing *((const struct Point*) main::SCREEN + (byte) main::i1) Constantified RValue *((const struct Point*) points + (byte~) main::$6) ← (struct Point){ (signed byte~) main::$0, (signed byte~) main::$2, (signed byte~) main::$3 } -Adding struct value member variable copy *((signed byte*~) main::$8 + (byte~) main::$6) ← (signed byte~) main::$0 -Adding struct value member variable copy *((signed byte*~) main::$9 + (byte~) main::$6) ← (signed byte~) main::$2 -Adding struct value member variable copy *((signed byte*~) main::$10 + (byte~) main::$6) ← (signed byte~) main::$3 +Unwinding value copy *((const struct Point*) points + (byte~) main::$6) ← (struct Point){ (signed byte~) main::$0, (signed byte~) main::$2, (signed byte~) main::$3 } +Adding value simple copy *((signed byte*)(const struct Point*) points+(const byte) OFFSET_STRUCT_POINT_X + (byte~) main::$6) ← (signed byte~) main::$0 +Adding value simple copy *((signed byte*)(const struct Point*) points+(const byte) OFFSET_STRUCT_POINT_Y + (byte~) main::$6) ← (signed byte~) main::$2 +Adding value simple copy *((signed byte*)(const struct Point*) points+(const byte) OFFSET_STRUCT_POINT_Z + (byte~) main::$6) ← (signed byte~) main::$3 Adding value bulk copy *((const struct Point*) main::SCREEN + (byte~) main::$7) ← memcpy(*((const struct Point*) points + (byte~) main::$7), struct Point, (const byte) SIZEOF_STRUCT_POINT) Culled Empty Block (label) main::@4 @@ -23,12 +24,9 @@ main::@1: scope:[main] from main main::@1 (signed byte~) main::$2 ← - (signed byte~) main::$1 (signed byte~) main::$3 ← ((signed byte)) (byte) main::i#2 (byte~) main::$6 ← (byte) main::i#2 * (const byte) SIZEOF_STRUCT_POINT - (signed byte*~) main::$8 ← (signed byte*)(const struct Point*) points + (const byte) OFFSET_STRUCT_POINT_X - *((signed byte*~) main::$8 + (byte~) main::$6) ← (signed byte~) main::$0 - (signed byte*~) main::$9 ← (signed byte*)(const struct Point*) points + (const byte) OFFSET_STRUCT_POINT_Y - *((signed byte*~) main::$9 + (byte~) main::$6) ← (signed byte~) main::$2 - (signed byte*~) main::$10 ← (signed byte*)(const struct Point*) points + (const byte) OFFSET_STRUCT_POINT_Z - *((signed byte*~) main::$10 + (byte~) main::$6) ← (signed byte~) main::$3 + *((signed byte*)(const struct Point*) points+(const byte) OFFSET_STRUCT_POINT_X + (byte~) main::$6) ← (signed byte~) main::$0 + *((signed byte*)(const struct Point*) points+(const byte) OFFSET_STRUCT_POINT_Y + (byte~) main::$6) ← (signed byte~) main::$2 + *((signed byte*)(const struct Point*) points+(const byte) OFFSET_STRUCT_POINT_Z + (byte~) main::$6) ← (signed byte~) main::$3 (byte) main::i#1 ← (byte) main::i#2 + rangenext(0,3) (bool~) main::$4 ← (byte) main::i#1 != rangelast(0,3) if((bool~) main::$4) goto main::@1 @@ -69,15 +67,12 @@ SYMBOL TABLE SSA (void()) main() (signed byte~) main::$0 (signed byte~) main::$1 -(signed byte*~) main::$10 (signed byte~) main::$2 (signed byte~) main::$3 (bool~) main::$4 (bool~) main::$5 (byte~) main::$6 (byte~) main::$7 -(signed byte*~) main::$8 -(signed byte*~) main::$9 (label) main::@1 (label) main::@2 (label) main::@3 @@ -99,24 +94,17 @@ Inlining cast (signed byte~) main::$3 ← (signed byte)(byte) main::i#2 Successful SSA optimization Pass2InlineCast Simplifying constant pointer cast (struct Point*) 1024 Successful SSA optimization PassNCastSimplification -Simple Condition (bool~) main::$4 [15] if((byte) main::i#1!=rangelast(0,3)) goto main::@1 -Simple Condition (bool~) main::$5 [22] if((byte) main::i1#1!=rangelast(0,3)) goto main::@3 +Simple Condition (bool~) main::$4 [12] if((byte) main::i#1!=rangelast(0,3)) goto main::@1 +Simple Condition (bool~) main::$5 [19] if((byte) main::i1#1!=rangelast(0,3)) goto main::@3 Successful SSA optimization Pass2ConditionalJumpSimplification -Constant right-side identified [7] (signed byte*~) main::$8 ← (signed byte*)(const struct Point*) points + (const byte) OFFSET_STRUCT_POINT_X -Constant right-side identified [9] (signed byte*~) main::$9 ← (signed byte*)(const struct Point*) points + (const byte) OFFSET_STRUCT_POINT_Y -Constant right-side identified [11] (signed byte*~) main::$10 ← (signed byte*)(const struct Point*) points + (const byte) OFFSET_STRUCT_POINT_Z -Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::i#0 = 0 -Constant (const signed byte*) main::$8 = (signed byte*)points+OFFSET_STRUCT_POINT_X -Constant (const signed byte*) main::$9 = (signed byte*)points+OFFSET_STRUCT_POINT_Y -Constant (const signed byte*) main::$10 = (signed byte*)points+OFFSET_STRUCT_POINT_Z Constant (const byte) main::i1#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [13] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [15] if(main::i#1!=rangelast(0,3)) goto main::@1 to (number) 4 -Resolved ranged next value [20] main::i1#1 ← ++ main::i1#2 to ++ -Resolved ranged comparison value [22] if(main::i1#1!=rangelast(0,3)) goto main::@3 to (number) 4 -Simplifying expression containing zero (signed byte*)points in +Resolved ranged next value [10] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [12] if(main::i#1!=rangelast(0,3)) goto main::@1 to (number) 4 +Resolved ranged next value [17] main::i1#1 ← ++ main::i1#2 to ++ +Resolved ranged comparison value [19] if(main::i1#1!=rangelast(0,3)) goto main::@3 to (number) 4 +Simplifying expression containing zero (signed byte*)points in [7] *((signed byte*)(const struct Point*) points+(const byte) OFFSET_STRUCT_POINT_X + (byte~) main::$6) ← (signed byte~) main::$0 Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused constant (const byte) OFFSET_STRUCT_POINT_X Successful SSA optimization PassNEliminateUnusedVars @@ -139,12 +127,9 @@ Inlining constant with var siblings (const byte) main::i#0 Inlining constant with var siblings (const byte) main::i1#0 Constant inlined main::i#0 = (byte) 0 Constant inlined main::i1#0 = (byte) 0 -Constant inlined main::$9 = (signed byte*)(const struct Point*) points+(const byte) OFFSET_STRUCT_POINT_Y -Constant inlined main::$10 = (signed byte*)(const struct Point*) points+(const byte) OFFSET_STRUCT_POINT_Z -Constant inlined main::$8 = (signed byte*)(const struct Point*) points Successful SSA optimization Pass2ConstantInlining -Alias (byte~) main::$6 = (byte~) main::$12 -Alias (byte~) main::$7 = (byte~) main::$14 +Alias (byte~) main::$6 = (byte~) main::$9 +Alias (byte~) main::$7 = (byte~) main::$11 Successful SSA optimization Pass2AliasElimination Added new block during phi lifting main::@5(between main::@1 and main::@1) Added new block during phi lifting main::@6(between main::@3 and main::@3) @@ -189,8 +174,8 @@ main: scope:[main] from @1 main::@1: scope:[main] from main main::@1 [5] (byte) main::i#2 ← phi( main/(byte) 0 main::@1/(byte) main::i#1 ) [6] (signed byte~) main::$2 ← - (signed byte)(byte) main::i#2 - [7] (byte~) main::$11 ← (byte) main::i#2 << (byte) 1 - [8] (byte~) main::$6 ← (byte~) main::$11 + (byte) main::i#2 + [7] (byte~) main::$8 ← (byte) main::i#2 << (byte) 1 + [8] (byte~) main::$6 ← (byte~) main::$8 + (byte) main::i#2 [9] *((signed byte*)(const struct Point*) points + (byte~) main::$6) ← (signed byte)(byte) main::i#2 [10] *((signed byte*)(const struct Point*) points+(const byte) OFFSET_STRUCT_POINT_Y + (byte~) main::$6) ← (signed byte~) main::$2 [11] *((signed byte*)(const struct Point*) points+(const byte) OFFSET_STRUCT_POINT_Z + (byte~) main::$6) ← (signed byte)(byte) main::i#2 @@ -199,8 +184,8 @@ main::@1: scope:[main] from main main::@1 to:main::@2 main::@2: scope:[main] from main::@1 main::@2 [14] (byte) main::i1#2 ← phi( main::@1/(byte) 0 main::@2/(byte) main::i1#1 ) - [15] (byte~) main::$13 ← (byte) main::i1#2 << (byte) 1 - [16] (byte~) main::$7 ← (byte~) main::$13 + (byte) main::i1#2 + [15] (byte~) main::$10 ← (byte) main::i1#2 << (byte) 1 + [16] (byte~) main::$7 ← (byte~) main::$10 + (byte) main::i1#2 [17] *((const struct Point*) main::SCREEN + (byte~) main::$7) ← memcpy(*((const struct Point*) points + (byte~) main::$7), struct Point, (const byte) SIZEOF_STRUCT_POINT) [18] (byte) main::i1#1 ← ++ (byte) main::i1#2 [19] if((byte) main::i1#1!=(byte) 4) goto main::@2 @@ -215,11 +200,11 @@ VARIABLE REGISTER WEIGHTS (signed byte) Point::y (signed byte) Point::z (void()) main() -(byte~) main::$11 22.0 -(byte~) main::$13 22.0 +(byte~) main::$10 22.0 (signed byte~) main::$2 5.5 (byte~) main::$6 14.666666666666666 (byte~) main::$7 22.0 +(byte~) main::$8 22.0 (byte) main::i (byte) main::i#1 16.5 (byte) main::i#2 6.285714285714286 @@ -231,24 +216,24 @@ Initial phi equivalence classes [ main::i#2 main::i#1 ] [ main::i1#2 main::i1#1 ] Added variable main::$2 to live range equivalence class [ main::$2 ] -Added variable main::$11 to live range equivalence class [ main::$11 ] +Added variable main::$8 to live range equivalence class [ main::$8 ] Added variable main::$6 to live range equivalence class [ main::$6 ] -Added variable main::$13 to live range equivalence class [ main::$13 ] +Added variable main::$10 to live range equivalence class [ main::$10 ] Added variable main::$7 to live range equivalence class [ main::$7 ] Complete equivalence classes [ main::i#2 main::i#1 ] [ main::i1#2 main::i1#1 ] [ main::$2 ] -[ main::$11 ] +[ main::$8 ] [ main::$6 ] -[ main::$13 ] +[ main::$10 ] [ main::$7 ] Allocated zp[1]:2 [ main::i#2 main::i#1 ] Allocated zp[1]:3 [ main::i1#2 main::i1#1 ] Allocated zp[1]:4 [ main::$2 ] -Allocated zp[1]:5 [ main::$11 ] +Allocated zp[1]:5 [ main::$8 ] Allocated zp[1]:6 [ main::$6 ] -Allocated zp[1]:7 [ main::$13 ] +Allocated zp[1]:7 [ main::$10 ] Allocated zp[1]:8 [ main::$7 ] INITIAL ASM @@ -287,8 +272,8 @@ main: { .label __7 = 8 .label i = 2 .label i1 = 3 - .label __11 = 5 - .label __13 = 7 + .label __8 = 5 + .label __10 = 7 // [5] phi from main to main::@1 [phi:main->main::@1] __b1_from_main: // [5] phi (byte) main::i#2 = (byte) 0 [phi:main->main::@1#0] -- vbuz1=vbuc1 @@ -307,12 +292,12 @@ main: { clc adc #1 sta.z __2 - // [7] (byte~) main::$11 ← (byte) main::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + // [7] (byte~) main::$8 ← (byte) main::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda.z i asl - sta.z __11 - // [8] (byte~) main::$6 ← (byte~) main::$11 + (byte) main::i#2 -- vbuz1=vbuz2_plus_vbuz3 - lda.z __11 + sta.z __8 + // [8] (byte~) main::$6 ← (byte~) main::$8 + (byte) main::i#2 -- vbuz1=vbuz2_plus_vbuz3 + lda.z __8 clc adc.z i sta.z __6 @@ -346,12 +331,12 @@ main: { jmp __b2 // main::@2 __b2: - // [15] (byte~) main::$13 ← (byte) main::i1#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + // [15] (byte~) main::$10 ← (byte) main::i1#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda.z i1 asl - sta.z __13 - // [16] (byte~) main::$7 ← (byte~) main::$13 + (byte) main::i1#2 -- vbuz1=vbuz2_plus_vbuz3 - lda.z __13 + sta.z __10 + // [16] (byte~) main::$7 ← (byte~) main::$10 + (byte) main::i1#2 -- vbuz1=vbuz2_plus_vbuz3 + lda.z __10 clc adc.z i1 sta.z __7 @@ -382,44 +367,44 @@ main: { REGISTER UPLIFT POTENTIAL REGISTERS Statement [6] (signed byte~) main::$2 ← - (signed byte)(byte) main::i#2 [ main::i#2 main::$2 ] ( main:2 [ main::i#2 main::$2 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:2 [ main::i#2 main::i#1 ] -Statement [7] (byte~) main::$11 ← (byte) main::i#2 << (byte) 1 [ main::i#2 main::$2 main::$11 ] ( main:2 [ main::i#2 main::$2 main::$11 ] ) always clobbers reg byte a +Statement [7] (byte~) main::$8 ← (byte) main::i#2 << (byte) 1 [ main::i#2 main::$2 main::$8 ] ( main:2 [ main::i#2 main::$2 main::$8 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:4 [ main::$2 ] -Statement [8] (byte~) main::$6 ← (byte~) main::$11 + (byte) main::i#2 [ main::i#2 main::$2 main::$6 ] ( main:2 [ main::i#2 main::$2 main::$6 ] ) always clobbers reg byte a +Statement [8] (byte~) main::$6 ← (byte~) main::$8 + (byte) main::i#2 [ main::i#2 main::$2 main::$6 ] ( main:2 [ main::i#2 main::$2 main::$6 ] ) always clobbers reg byte a Statement [9] *((signed byte*)(const struct Point*) points + (byte~) main::$6) ← (signed byte)(byte) main::i#2 [ main::i#2 main::$2 main::$6 ] ( main:2 [ main::i#2 main::$2 main::$6 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:6 [ main::$6 ] Statement [10] *((signed byte*)(const struct Point*) points+(const byte) OFFSET_STRUCT_POINT_Y + (byte~) main::$6) ← (signed byte~) main::$2 [ main::i#2 main::$6 ] ( main:2 [ main::i#2 main::$6 ] ) always clobbers reg byte a Statement [11] *((signed byte*)(const struct Point*) points+(const byte) OFFSET_STRUCT_POINT_Z + (byte~) main::$6) ← (signed byte)(byte) main::i#2 [ main::i#2 ] ( main:2 [ main::i#2 ] ) always clobbers reg byte a -Statement [15] (byte~) main::$13 ← (byte) main::i1#2 << (byte) 1 [ main::i1#2 main::$13 ] ( main:2 [ main::i1#2 main::$13 ] ) always clobbers reg byte a +Statement [15] (byte~) main::$10 ← (byte) main::i1#2 << (byte) 1 [ main::i1#2 main::$10 ] ( main:2 [ main::i1#2 main::$10 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:3 [ main::i1#2 main::i1#1 ] -Statement [16] (byte~) main::$7 ← (byte~) main::$13 + (byte) main::i1#2 [ main::i1#2 main::$7 ] ( main:2 [ main::i1#2 main::$7 ] ) always clobbers reg byte a +Statement [16] (byte~) main::$7 ← (byte~) main::$10 + (byte) main::i1#2 [ main::i1#2 main::$7 ] ( main:2 [ main::i1#2 main::$7 ] ) always clobbers reg byte a Statement [17] *((const struct Point*) main::SCREEN + (byte~) main::$7) ← memcpy(*((const struct Point*) points + (byte~) main::$7), struct Point, (const byte) SIZEOF_STRUCT_POINT) [ main::i1#2 ] ( main:2 [ main::i1#2 ] ) always clobbers reg byte a reg byte x reg byte y Removing always clobbered register reg byte x as potential for zp[1]:3 [ main::i1#2 main::i1#1 ] Removing always clobbered register reg byte y as potential for zp[1]:3 [ main::i1#2 main::i1#1 ] Statement [19] if((byte) main::i1#1!=(byte) 4) goto main::@2 [ main::i1#1 ] ( main:2 [ main::i1#1 ] ) always clobbers reg byte a Statement [6] (signed byte~) main::$2 ← - (signed byte)(byte) main::i#2 [ main::i#2 main::$2 ] ( main:2 [ main::i#2 main::$2 ] ) always clobbers reg byte a -Statement [7] (byte~) main::$11 ← (byte) main::i#2 << (byte) 1 [ main::i#2 main::$2 main::$11 ] ( main:2 [ main::i#2 main::$2 main::$11 ] ) always clobbers reg byte a -Statement [8] (byte~) main::$6 ← (byte~) main::$11 + (byte) main::i#2 [ main::i#2 main::$2 main::$6 ] ( main:2 [ main::i#2 main::$2 main::$6 ] ) always clobbers reg byte a +Statement [7] (byte~) main::$8 ← (byte) main::i#2 << (byte) 1 [ main::i#2 main::$2 main::$8 ] ( main:2 [ main::i#2 main::$2 main::$8 ] ) always clobbers reg byte a +Statement [8] (byte~) main::$6 ← (byte~) main::$8 + (byte) main::i#2 [ main::i#2 main::$2 main::$6 ] ( main:2 [ main::i#2 main::$2 main::$6 ] ) always clobbers reg byte a Statement [9] *((signed byte*)(const struct Point*) points + (byte~) main::$6) ← (signed byte)(byte) main::i#2 [ main::i#2 main::$2 main::$6 ] ( main:2 [ main::i#2 main::$2 main::$6 ] ) always clobbers reg byte a Statement [10] *((signed byte*)(const struct Point*) points+(const byte) OFFSET_STRUCT_POINT_Y + (byte~) main::$6) ← (signed byte~) main::$2 [ main::i#2 main::$6 ] ( main:2 [ main::i#2 main::$6 ] ) always clobbers reg byte a Statement [11] *((signed byte*)(const struct Point*) points+(const byte) OFFSET_STRUCT_POINT_Z + (byte~) main::$6) ← (signed byte)(byte) main::i#2 [ main::i#2 ] ( main:2 [ main::i#2 ] ) always clobbers reg byte a -Statement [15] (byte~) main::$13 ← (byte) main::i1#2 << (byte) 1 [ main::i1#2 main::$13 ] ( main:2 [ main::i1#2 main::$13 ] ) always clobbers reg byte a -Statement [16] (byte~) main::$7 ← (byte~) main::$13 + (byte) main::i1#2 [ main::i1#2 main::$7 ] ( main:2 [ main::i1#2 main::$7 ] ) always clobbers reg byte a +Statement [15] (byte~) main::$10 ← (byte) main::i1#2 << (byte) 1 [ main::i1#2 main::$10 ] ( main:2 [ main::i1#2 main::$10 ] ) always clobbers reg byte a +Statement [16] (byte~) main::$7 ← (byte~) main::$10 + (byte) main::i1#2 [ main::i1#2 main::$7 ] ( main:2 [ main::i1#2 main::$7 ] ) always clobbers reg byte a Statement [17] *((const struct Point*) main::SCREEN + (byte~) main::$7) ← memcpy(*((const struct Point*) points + (byte~) main::$7), struct Point, (const byte) SIZEOF_STRUCT_POINT) [ main::i1#2 ] ( main:2 [ main::i1#2 ] ) always clobbers reg byte a reg byte x reg byte y Statement [19] if((byte) main::i1#1!=(byte) 4) goto main::@2 [ main::i1#1 ] ( main:2 [ main::i1#1 ] ) always clobbers reg byte a Potential registers zp[1]:2 [ main::i#2 main::i#1 ] : zp[1]:2 , reg byte x , reg byte y , Potential registers zp[1]:3 [ main::i1#2 main::i1#1 ] : zp[1]:3 , Potential registers zp[1]:4 [ main::$2 ] : zp[1]:4 , reg byte x , reg byte y , -Potential registers zp[1]:5 [ main::$11 ] : zp[1]:5 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:5 [ main::$8 ] : zp[1]:5 , reg byte a , reg byte x , reg byte y , Potential registers zp[1]:6 [ main::$6 ] : zp[1]:6 , reg byte x , reg byte y , -Potential registers zp[1]:7 [ main::$13 ] : zp[1]:7 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:7 [ main::$10 ] : zp[1]:7 , reg byte a , reg byte x , reg byte y , Potential registers zp[1]:8 [ main::$7 ] : zp[1]:8 , reg byte a , reg byte x , reg byte y , REGISTER UPLIFT SCOPES -Uplift Scope [main] 27.5: zp[1]:3 [ main::i1#2 main::i1#1 ] 22.79: zp[1]:2 [ main::i#2 main::i#1 ] 22: zp[1]:5 [ main::$11 ] 22: zp[1]:7 [ main::$13 ] 22: zp[1]:8 [ main::$7 ] 14.67: zp[1]:6 [ main::$6 ] 5.5: zp[1]:4 [ main::$2 ] +Uplift Scope [main] 27.5: zp[1]:3 [ main::i1#2 main::i1#1 ] 22.79: zp[1]:2 [ main::i#2 main::i#1 ] 22: zp[1]:5 [ main::$8 ] 22: zp[1]:7 [ main::$10 ] 22: zp[1]:8 [ main::$7 ] 14.67: zp[1]:6 [ main::$6 ] 5.5: zp[1]:4 [ main::$2 ] Uplift Scope [Point] Uplift Scope [] -Uplifting [main] best 1298 combination zp[1]:3 [ main::i1#2 main::i1#1 ] reg byte x [ main::i#2 main::i#1 ] reg byte a [ main::$11 ] reg byte a [ main::$13 ] reg byte a [ main::$7 ] zp[1]:6 [ main::$6 ] zp[1]:4 [ main::$2 ] +Uplifting [main] best 1298 combination zp[1]:3 [ main::i1#2 main::i1#1 ] reg byte x [ main::i#2 main::i#1 ] reg byte a [ main::$8 ] reg byte a [ main::$10 ] reg byte a [ main::$7 ] zp[1]:6 [ main::$6 ] zp[1]:4 [ main::$2 ] Limited combination testing to 100 combinations of 1728 possible. Uplifting [Point] best 1298 combination Uplifting [] best 1298 combination @@ -481,10 +466,10 @@ main: { clc adc #1 sta.z __2 - // [7] (byte~) main::$11 ← (byte) main::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + // [7] (byte~) main::$8 ← (byte) main::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 txa asl - // [8] (byte~) main::$6 ← (byte~) main::$11 + (byte) main::i#2 -- vbuyy=vbuaa_plus_vbuxx + // [8] (byte~) main::$6 ← (byte~) main::$8 + (byte) main::i#2 -- vbuyy=vbuaa_plus_vbuxx stx.z $ff clc adc.z $ff @@ -515,10 +500,10 @@ main: { jmp __b2 // main::@2 __b2: - // [15] (byte~) main::$13 ← (byte) main::i1#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + // [15] (byte~) main::$10 ← (byte) main::i1#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda.z i1 asl - // [16] (byte~) main::$7 ← (byte~) main::$13 + (byte) main::i1#2 -- vbuaa=vbuaa_plus_vbuz1 + // [16] (byte~) main::$7 ← (byte~) main::$10 + (byte) main::i1#2 -- vbuaa=vbuaa_plus_vbuz1 clc adc.z i1 // [17] *((const struct Point*) main::SCREEN + (byte~) main::$7) ← memcpy(*((const struct Point*) points + (byte~) main::$7), struct Point, (const byte) SIZEOF_STRUCT_POINT) -- pssc1_derefidx_vbuaa=pssc2_derefidx_vbuaa_memcpy_vbuc3 @@ -587,11 +572,11 @@ FINAL SYMBOL TABLE (signed byte) Point::z (const byte) SIZEOF_STRUCT_POINT = (byte) 3 (void()) main() -(byte~) main::$11 reg byte a 22.0 -(byte~) main::$13 reg byte a 22.0 +(byte~) main::$10 reg byte a 22.0 (signed byte~) main::$2 zp[1]:3 5.5 (byte~) main::$6 reg byte y 14.666666666666666 (byte~) main::$7 reg byte a 22.0 +(byte~) main::$8 reg byte a 22.0 (label) main::@1 (label) main::@2 (label) main::@return @@ -607,9 +592,9 @@ FINAL SYMBOL TABLE reg byte x [ main::i#2 main::i#1 ] zp[1]:2 [ main::i1#2 main::i1#1 ] zp[1]:3 [ main::$2 ] -reg byte a [ main::$11 ] +reg byte a [ main::$8 ] reg byte y [ main::$6 ] -reg byte a [ main::$13 ] +reg byte a [ main::$10 ] reg byte a [ main::$7 ] @@ -653,10 +638,10 @@ main: { adc #1 sta.z __2 // points[i] = { (signed byte)i, -(signed byte)i, (signed byte)i } - // [7] (byte~) main::$11 ← (byte) main::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + // [7] (byte~) main::$8 ← (byte) main::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 txa asl - // [8] (byte~) main::$6 ← (byte~) main::$11 + (byte) main::i#2 -- vbuyy=vbuaa_plus_vbuxx + // [8] (byte~) main::$6 ← (byte~) main::$8 + (byte) main::i#2 -- vbuyy=vbuaa_plus_vbuxx stx.z $ff clc adc.z $ff @@ -685,10 +670,10 @@ main: { // main::@2 __b2: // SCREEN[i] = points[i] - // [15] (byte~) main::$13 ← (byte) main::i1#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + // [15] (byte~) main::$10 ← (byte) main::i1#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda.z i1 asl - // [16] (byte~) main::$7 ← (byte~) main::$13 + (byte) main::i1#2 -- vbuaa=vbuaa_plus_vbuz1 + // [16] (byte~) main::$7 ← (byte~) main::$10 + (byte) main::i1#2 -- vbuaa=vbuaa_plus_vbuz1 clc adc.z i1 // [17] *((const struct Point*) main::SCREEN + (byte~) main::$7) ← memcpy(*((const struct Point*) points + (byte~) main::$7), struct Point, (const byte) SIZEOF_STRUCT_POINT) -- pssc1_derefidx_vbuaa=pssc2_derefidx_vbuaa_memcpy_vbuc3 diff --git a/src/test/ref/struct-ptr-11.sym b/src/test/ref/struct-ptr-11.sym index 1783b3374..dfc3ccab0 100644 --- a/src/test/ref/struct-ptr-11.sym +++ b/src/test/ref/struct-ptr-11.sym @@ -8,11 +8,11 @@ (signed byte) Point::z (const byte) SIZEOF_STRUCT_POINT = (byte) 3 (void()) main() -(byte~) main::$11 reg byte a 22.0 -(byte~) main::$13 reg byte a 22.0 +(byte~) main::$10 reg byte a 22.0 (signed byte~) main::$2 zp[1]:3 5.5 (byte~) main::$6 reg byte y 14.666666666666666 (byte~) main::$7 reg byte a 22.0 +(byte~) main::$8 reg byte a 22.0 (label) main::@1 (label) main::@2 (label) main::@return @@ -28,7 +28,7 @@ reg byte x [ main::i#2 main::i#1 ] zp[1]:2 [ main::i1#2 main::i1#1 ] zp[1]:3 [ main::$2 ] -reg byte a [ main::$11 ] +reg byte a [ main::$8 ] reg byte y [ main::$6 ] -reg byte a [ main::$13 ] +reg byte a [ main::$10 ] reg byte a [ main::$7 ] diff --git a/src/test/ref/struct-ptr-17.log b/src/test/ref/struct-ptr-17.log index 16da6a0d4..e7036825a 100644 --- a/src/test/ref/struct-ptr-17.log +++ b/src/test/ref/struct-ptr-17.log @@ -19,8 +19,9 @@ Converted procedure call LValue to member unwinding { (byte~) main::$1_x, (byte~ Unwinding value copy *((const struct Point*) SCREEN + (byte~) main::$3) ← (struct Point~) main::$1 Adding value simple copy *((byte*)(const struct Point*) SCREEN+(const byte) OFFSET_STRUCT_POINT_X + (byte~) main::$3) ← (byte~) main::$1_x Adding value simple copy *((byte*)(const struct Point*) SCREEN+(const byte) OFFSET_STRUCT_POINT_Y + (byte~) main::$3) ← (byte~) main::$1_y -Adding struct value member variable copy (byte) get::p_x ← (byte) get::i -Adding struct value member variable copy (byte) get::p_y ← (byte) 7 +Unwinding value copy (struct Point) get::p ← (struct Point){ (byte) get::i, (byte) 7 } +Adding value simple copy (byte) get::p_x ← (byte) get::i +Adding value simple copy (byte) get::p_y ← (byte) 7 Unwinding value copy (struct Point) get::return ← (struct Point) get::p Adding value simple copy (byte) get::return_x ← (byte) get::p_x Adding value simple copy (byte) get::return_y ← (byte) get::p_y diff --git a/src/test/ref/struct-ptr-9.log b/src/test/ref/struct-ptr-9.log index bb7aec055..94758ee26 100644 --- a/src/test/ref/struct-ptr-9.log +++ b/src/test/ref/struct-ptr-9.log @@ -2,8 +2,9 @@ Fixing pointer array-indexing *((const struct Point*) points + (byte) main::i) Fixing pointer array-indexing *((const struct Point*) points + (byte) main::i1) Fixing pointer array-indexing *((const struct Point*) main::SCREEN + (byte) main::i1) Constantified RValue *((const struct Point*) points + (byte~) main::$2) ← (struct Point){ (byte) 2, (byte) main::i } -Adding struct value member variable copy *((byte*~) main::$4 + (byte~) main::$2) ← (byte) 2 -Adding struct value member variable copy *((byte*~) main::$5 + (byte~) main::$2) ← (byte) main::i +Unwinding value copy *((const struct Point*) points + (byte~) main::$2) ← (struct Point){ (byte) 2, (byte) main::i } +Adding value simple copy *((byte*)(const struct Point*) points+(const byte) OFFSET_STRUCT_POINT_X + (byte~) main::$2) ← (byte) 2 +Adding value simple copy *((byte*)(const struct Point*) points+(const byte) OFFSET_STRUCT_POINT_Y + (byte~) main::$2) ← (byte) main::i Adding value bulk copy *((const struct Point*) main::SCREEN + (byte~) main::$3) ← memcpy(*((const struct Point*) points + (byte~) main::$3), struct Point, (const byte) SIZEOF_STRUCT_POINT) Culled Empty Block (label) main::@4 @@ -18,10 +19,8 @@ main: scope:[main] from @1 main::@1: scope:[main] from main main::@1 (byte) main::i#2 ← phi( main/(byte) main::i#0 main::@1/(byte) main::i#1 ) (byte~) main::$2 ← (byte) main::i#2 * (const byte) SIZEOF_STRUCT_POINT - (byte*~) main::$4 ← (byte*)(const struct Point*) points + (const byte) OFFSET_STRUCT_POINT_X - *((byte*~) main::$4 + (byte~) main::$2) ← (byte) 2 - (byte*~) main::$5 ← (byte*)(const struct Point*) points + (const byte) OFFSET_STRUCT_POINT_Y - *((byte*~) main::$5 + (byte~) main::$2) ← (byte) main::i#2 + *((byte*)(const struct Point*) points+(const byte) OFFSET_STRUCT_POINT_X + (byte~) main::$2) ← (byte) 2 + *((byte*)(const struct Point*) points+(const byte) OFFSET_STRUCT_POINT_Y + (byte~) main::$2) ← (byte) main::i#2 (byte) main::i#1 ← (byte) main::i#2 + rangenext(0,1) (bool~) main::$0 ← (byte) main::i#1 != rangelast(0,1) if((bool~) main::$0) goto main::@1 @@ -62,8 +61,6 @@ SYMBOL TABLE SSA (bool~) main::$1 (byte~) main::$2 (byte~) main::$3 -(byte*~) main::$4 -(byte*~) main::$5 (label) main::@1 (label) main::@2 (label) main::@3 @@ -81,22 +78,17 @@ SYMBOL TABLE SSA Simplifying constant pointer cast (struct Point*) 1024 Successful SSA optimization PassNCastSimplification -Simple Condition (bool~) main::$0 [9] if((byte) main::i#1!=rangelast(0,1)) goto main::@1 -Simple Condition (bool~) main::$1 [16] if((byte) main::i1#1!=rangelast(0,1)) goto main::@3 +Simple Condition (bool~) main::$0 [7] if((byte) main::i#1!=rangelast(0,1)) goto main::@1 +Simple Condition (bool~) main::$1 [14] if((byte) main::i1#1!=rangelast(0,1)) goto main::@3 Successful SSA optimization Pass2ConditionalJumpSimplification -Constant right-side identified [3] (byte*~) main::$4 ← (byte*)(const struct Point*) points + (const byte) OFFSET_STRUCT_POINT_X -Constant right-side identified [5] (byte*~) main::$5 ← (byte*)(const struct Point*) points + (const byte) OFFSET_STRUCT_POINT_Y -Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::i#0 = 0 -Constant (const byte*) main::$4 = (byte*)points+OFFSET_STRUCT_POINT_X -Constant (const byte*) main::$5 = (byte*)points+OFFSET_STRUCT_POINT_Y Constant (const byte) main::i1#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [7] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [9] if(main::i#1!=rangelast(0,1)) goto main::@1 to (number) 2 -Resolved ranged next value [14] main::i1#1 ← ++ main::i1#2 to ++ -Resolved ranged comparison value [16] if(main::i1#1!=rangelast(0,1)) goto main::@3 to (number) 2 -Simplifying expression containing zero (byte*)points in +Resolved ranged next value [5] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [7] if(main::i#1!=rangelast(0,1)) goto main::@1 to (number) 2 +Resolved ranged next value [12] main::i1#1 ← ++ main::i1#2 to ++ +Resolved ranged comparison value [14] if(main::i1#1!=rangelast(0,1)) goto main::@3 to (number) 2 +Simplifying expression containing zero (byte*)points in [3] *((byte*)(const struct Point*) points+(const byte) OFFSET_STRUCT_POINT_X + (byte~) main::$2) ← (byte) 2 Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused constant (const byte) OFFSET_STRUCT_POINT_X Successful SSA optimization PassNEliminateUnusedVars @@ -114,10 +106,8 @@ Rewriting multiplication to use shift [7] (byte~) main::$3 ← (byte) main::i1#2 Successful SSA optimization Pass2MultiplyToShiftRewriting Inlining constant with var siblings (const byte) main::i#0 Inlining constant with var siblings (const byte) main::i1#0 -Constant inlined main::$5 = (byte*)(const struct Point*) points+(const byte) OFFSET_STRUCT_POINT_Y Constant inlined main::i#0 = (byte) 0 Constant inlined main::i1#0 = (byte) 0 -Constant inlined main::$4 = (byte*)(const struct Point*) points Successful SSA optimization Pass2ConstantInlining Added new block during phi lifting main::@5(between main::@1 and main::@1) Added new block during phi lifting main::@6(between main::@3 and main::@3)