1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2025-02-18 01:30:56 +00:00

Converting constant value lists directly to constant values during parse.

This commit is contained in:
jespergravgaard 2019-11-03 21:27:11 +01:00
parent 8d494cb587
commit cfb27e5915
113 changed files with 9237 additions and 10197 deletions

View File

@ -4,7 +4,7 @@ import dk.camelot64.kickc.NumberParser;
import dk.camelot64.kickc.SourceLoader;
import dk.camelot64.kickc.asm.AsmClobber;
import dk.camelot64.kickc.model.*;
import dk.camelot64.kickc.model.InternalError;
import dk.camelot64.kickc.model.iterator.ProgramValue;
import dk.camelot64.kickc.model.operators.*;
import dk.camelot64.kickc.model.statements.*;
import dk.camelot64.kickc.model.symbols.*;
@ -1403,9 +1403,30 @@ public class Pass0GenerateStatementSequence extends KickCParserBaseVisitor<Objec
private void addInitialAssignment(KickCParser.ExprContext initializer, Variable lValue, List<Comment> comments, StatementSource statementSource) {
PrePostModifierHandler.addPreModifiers(this, initializer, statementSource);
RValue rValue = (RValue) visit(initializer);
// Forward references are not allowed
if(lValue.isDeclaredConst() && rValue instanceof ForwardVariableRef) {
throw new CompileError("Variable used before being defined " + rValue.toString(), statementSource);
}
// Handle initializer value lists for constants
if(lValue.isDeclaredConst() && (rValue instanceof ValueList)) {
SymbolType declaredType = lValue.getType();
ProgramValue programValue = new ProgramValue.GenericValue(rValue);
boolean modified = PassNAddInitializerValueListTypeCasts.addValueCasts(declaredType, programValue, program, statementSource);
if(modified && programValue.get() instanceof CastValue) {
CastValue castValue = (CastValue) programValue.get();
if(castValue.getValue() instanceof ValueList) {
// Found value list with cast - look through all elements
ConstantValue constantValue = Pass2ConstantInitializerValueLists.getConstantValueFromList(castValue.getToType(), (ValueList) castValue.getValue(), program, statementSource);
if(constantValue != null) {
// Converted value list to constant!!
rValue = constantValue;
}
}
}
}
/* if(lValue.isDeclaredConst() && !(rValue instanceof ConstantValue)) {
throw new InternalError("RValue is not constant!");
}

View File

@ -4,7 +4,7 @@ import dk.camelot64.kickc.model.CompileError;
import dk.camelot64.kickc.model.InternalError;
import dk.camelot64.kickc.model.Program;
import dk.camelot64.kickc.model.iterator.ProgramValueIterator;
import dk.camelot64.kickc.model.statements.Statement;
import dk.camelot64.kickc.model.statements.StatementSource;
import dk.camelot64.kickc.model.symbols.StructDefinition;
import dk.camelot64.kickc.model.symbols.Variable;
import dk.camelot64.kickc.model.types.SymbolType;
@ -37,7 +37,7 @@ public class Pass2ConstantInitializerValueLists extends Pass2SsaOptimization {
CastValue castValue = (CastValue) programValue.get();
if(castValue.getValue() instanceof ValueList) {
// Found value list with cast - look through all elements
ConstantValue constantValue = getConstantValueFromList(castValue.getToType(), (ValueList) castValue.getValue(), currentStmt);
ConstantValue constantValue = getConstantValueFromList(castValue.getToType(), (ValueList) castValue.getValue(), getProgram(), currentStmt.getSource());
if(constantValue!=null) {
programValue.set(constantValue);
getLog().append("Identified constant from value list ("+castValue.getToType()+") "+constantValue.toString(getProgram()));
@ -57,7 +57,7 @@ public class Pass2ConstantInitializerValueLists extends Pass2SsaOptimization {
* @param valueList The list of values
* @return The constant value if all list elements are constant. null if elements are not constant
*/
private ConstantValue getConstantValueFromList(SymbolType declaredType, ValueList valueList, Statement currentStmt) {
public static ConstantValue getConstantValueFromList(SymbolType declaredType, ValueList valueList, Program program, StatementSource source) {
// Examine whether all list elements are constant
List<RValue> values = valueList.getList();
List<ConstantValue> constantValues = new ArrayList<>();
@ -75,9 +75,9 @@ public class Pass2ConstantInitializerValueLists extends Pass2SsaOptimization {
// Check that type of constant values match the array element type
SymbolType declaredElementType = ((SymbolTypeArray) declaredType).getElementType();
for(ConstantValue constantValue : constantValues) {
SymbolType elmType = constantValue.getType(getScope());
SymbolType elmType = constantValue.getType(program.getScope());
if(!elmType.equals(declaredElementType)) {
throw new CompileError("Initializer element "+constantValue.toString(getProgram())+" does not match array type "+declaredType.getTypeName(), currentStmt);
throw new CompileError("Initializer element "+constantValue.toString(program)+" does not match array type "+declaredType.getTypeName(), source);
}
}
// Return the constant array
@ -85,14 +85,14 @@ public class Pass2ConstantInitializerValueLists extends Pass2SsaOptimization {
} else if(declaredType instanceof SymbolTypeStruct) {
// Check that type of constant values match the struct member types
SymbolTypeStruct declaredStructType = (SymbolTypeStruct) declaredType;
StructDefinition structDefinition = declaredStructType.getStructDefinition(getScope());
StructDefinition structDefinition = declaredStructType.getStructDefinition(program.getScope());
Collection<Variable> memberDefs = structDefinition.getAllVariables(false);
if(memberDefs.size()!=constantValues.size()) {
throw new CompileError(
"Struct initializer has wrong size ("+valueList.getList().size()+"), " +
"which does not match the number of members in "+declaredStructType.getTypeName()+" (\"+size+\" members).\n" +
" Struct initializer: "+valueList.toString(getProgram()),
currentStmt);
" Struct initializer: "+valueList.toString(program),
source);
}
Iterator<Variable> memberDefIt = memberDefs.iterator();
LinkedHashMap<SymbolVariableRef, ConstantValue> memberValues = new LinkedHashMap<>();
@ -100,9 +100,9 @@ public class Pass2ConstantInitializerValueLists extends Pass2SsaOptimization {
Variable memberDef = memberDefIt.next();
SymbolType declaredElementType = memberDef.getType();
ConstantValue memberValue = constantValues.get(i);
SymbolType elmType = memberValue.getType(getScope());
SymbolType elmType = memberValue.getType(program.getScope());
if(!SymbolTypeConversion.assignmentTypeMatch(declaredElementType, elmType)) {
throw new CompileError("Initializer element "+ memberValue.toString(getProgram())+" does not match struct member type "+memberDef.toString(getProgram()), currentStmt);
throw new CompileError("Initializer element "+ memberValue.toString(program)+" does not match struct member type "+memberDef.toString(program), source);
}
memberValues.put(memberDef.getRef(), memberValue);
}

View File

@ -7,7 +7,7 @@ import dk.camelot64.kickc.model.iterator.ProgramExpressionBinary;
import dk.camelot64.kickc.model.iterator.ProgramExpressionIterator;
import dk.camelot64.kickc.model.iterator.ProgramValue;
import dk.camelot64.kickc.model.operators.Operators;
import dk.camelot64.kickc.model.statements.Statement;
import dk.camelot64.kickc.model.statements.StatementSource;
import dk.camelot64.kickc.model.symbols.StructDefinition;
import dk.camelot64.kickc.model.symbols.Variable;
import dk.camelot64.kickc.model.types.*;
@ -35,9 +35,9 @@ public class PassNAddInitializerValueListTypeCasts extends Pass2SsaOptimization
if(binary.getRight() instanceof ValueList && binary.getOperator().equals(Operators.ASSIGNMENT)) {
RValue left = binary.getLeft();
SymbolType declaredType = SymbolTypeInference.inferType(getProgram().getScope(), left);
boolean isModified = addValueCasts(declaredType, binary.getRightValue(), currentStmt);
boolean isModified = addValueCasts(declaredType, binary.getRightValue(), getProgram(), currentStmt.getSource());
if(isModified) {
getLog().append("Added casts to value list in " + (currentStmt == null ? "" : currentStmt.toString(getProgram(), false)));
getLog().append("Added casts to value list in " + currentStmt.toString(getProgram(), false));
modified.set(true);
}
}
@ -51,10 +51,10 @@ public class PassNAddInitializerValueListTypeCasts extends Pass2SsaOptimization
*
* @param declaredType The declared type of the value
* @param programValue The value wrapped in a program value
* @param currentStmt The current statement
* @param source The current statement
* @return true if anything was modified
*/
private boolean addValueCasts(SymbolType declaredType, ProgramValue programValue, Statement currentStmt) {
public static boolean addValueCasts(SymbolType declaredType, ProgramValue programValue, Program program, StatementSource source) {
boolean exprModified = false;
Value value = programValue.get();
if(value instanceof ValueList) {
@ -66,27 +66,27 @@ public class PassNAddInitializerValueListTypeCasts extends Pass2SsaOptimization
int size = valueList.getList().size();
// TODO: Check declared array size vs. actual size
for(int i = 0; i < size; i++) {
exprModified |= addValueCasts(declaredElmType, new ProgramValue.ProgramValueListElement(valueList, i), currentStmt);
exprModified |= addValueCasts(declaredElmType, new ProgramValue.ProgramValueListElement(valueList, i), program, source);
}
// Add a cast to the value list itself
programValue.set(new CastValue(declaredType, valueList));
} else if(declaredType instanceof SymbolTypeStruct) {
SymbolTypeStruct declaredStructType = (SymbolTypeStruct) declaredType;
// Recursively cast all sub-elements
StructDefinition structDefinition = declaredStructType.getStructDefinition(getScope());
StructDefinition structDefinition = declaredStructType.getStructDefinition(program.getScope());
Collection<Variable> memberDefinitions = structDefinition.getAllVariables(false);
int size = memberDefinitions.size();
if(size!=valueList.getList().size()) {
throw new CompileError(
"Struct initializer has wrong size ("+valueList.getList().size()+"), " +
"which does not match the number of members in "+declaredStructType.getTypeName()+" ("+size+" members).\n" +
" Struct initializer: "+valueList.toString(getProgram()),
currentStmt);
" Struct initializer: "+valueList.toString(program),
source);
}
Iterator<Variable> memberDefIt = memberDefinitions.iterator();
for(int i = 0; i < size; i++) {
Variable memberDef = memberDefIt.next();
exprModified |= addValueCasts(memberDef.getType(), new ProgramValue.ProgramValueListElement(valueList, i), currentStmt);
exprModified |= addValueCasts(memberDef.getType(), new ProgramValue.ProgramValueListElement(valueList, i), program, source);
}
// Add a cast to the value list itself
programValue.set(new CastValue(declaredType, valueList));
@ -95,11 +95,11 @@ public class PassNAddInitializerValueListTypeCasts extends Pass2SsaOptimization
throw new InternalError("Type not handled! "+declaredType);
}
} else {
SymbolType valueType = SymbolTypeInference.inferType(getProgram().getScope(), (RValue) value);
SymbolType valueType = SymbolTypeInference.inferType(program.getScope(), (RValue) value);
if(SymbolType.NUMBER.equals(valueType) || SymbolType.VAR.equals(valueType)) {
// Check if the value fits.
if(!SymbolTypeConversion.assignmentTypeMatch(declaredType, valueType)) {
throw new CompileError("Declared type " + declaredType + " does not match element type " + valueType, currentStmt);
throw new CompileError("Declared type " + declaredType + " does not match element type " + valueType, source);
}
// TODO: Test if the value matches the declared type!
// Add a cast to the value

View File

@ -1,24 +1,23 @@
Fixing pointer array-indexing *((signed word[]) VALS + (number) 1)
Fixing pointer array-indexing *((signed word[]) VALS + (byte) main::i)
Fixing pointer array-indexing *((const signed word[]) VALS + (number) 1)
Fixing pointer array-indexing *((const signed word[]) VALS + (byte) main::i)
Fixing pointer array-indexing *((const signed word*) SCREEN + (byte) idx)
Culled Empty Block (label) main::@2
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
(signed word[]) VALS ← { (number) 1, (number) 2, (number) 3, (number) 4 }
to:@1
(void()) main()
main: scope:[main] from @2
(byte) idx#15 ← phi( @2/(byte) idx#17 )
(signed word*) print::p#0 ← (signed word[]) VALS
(signed word*) print::p#0 ← (const signed word[]) VALS
call print
to:main::@3
main::@3: scope:[main] from main
(byte) idx#8 ← phi( main/(byte) idx#6 )
(byte) idx#0 ← (byte) idx#8
(number~) main::$6 ← (number) 1 * (const byte) SIZEOF_SIGNED_WORD
(signed word*~) main::$1 ← & *((signed word[]) VALS + (number~) main::$6)
(signed word*~) main::$1 ← & *((const signed word[]) VALS + (number~) main::$6)
(signed word*) print::p#1 ← (signed word*~) main::$1
call print
to:main::@4
@ -31,7 +30,7 @@ main::@1: scope:[main] from main::@4 main::@5
(byte) idx#16 ← phi( main::@4/(byte) idx#1 main::@5/(byte) idx#2 )
(byte) main::i#2 ← phi( main::@4/(byte) main::i#0 main::@5/(byte) main::i#1 )
(byte~) main::$7 ← (byte) main::i#2 * (const byte) SIZEOF_SIGNED_WORD
(signed word*~) main::$3 ← & *((signed word[]) VALS + (byte~) main::$7)
(signed word*~) main::$3 ← & *((const signed word[]) VALS + (byte~) main::$7)
(signed word*) print::p#2 ← (signed word*~) main::$3
call print
to:main::@5
@ -83,7 +82,7 @@ SYMBOL TABLE SSA
(label) @end
(const signed word*) SCREEN = (signed word*)(number) $400
(const byte) SIZEOF_SIGNED_WORD = (byte) 2
(signed word[]) VALS
(const signed word[]) VALS = { (signed word)(number) 1, (signed word)(number) 2, (signed word)(number) 3, (signed word)(number) 4 }
(byte) idx
(byte) idx#0
(byte) idx#1
@ -132,15 +131,13 @@ Adding number conversion cast (unumber) 1 in (number~) main::$6 ← (number) 1 *
Adding number conversion cast (unumber) main::$6 in (number~) main::$6 ← (unumber)(number) 1 * (const byte) SIZEOF_SIGNED_WORD
Adding number conversion cast (unumber) 0 in (byte) idx#4 ← (number) 0
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (signed word[]) VALS ← (signed word[]){ (signed word)(number) 1, (signed word)(number) 2, (signed word)(number) 3, (signed word)(number) 4 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (byte) idx#4 ← (unumber)(number) 0
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (signed word*) 1024
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 3
Simplifying constant integer cast 4
Simplifying constant pointer cast (signed word*) 1024
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
@ -166,24 +163,20 @@ Identical Phi Values (byte) idx#14 (byte) idx#10
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values (byte) idx#16 (byte) idx#13
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) main::$5 [22] if((byte) main::i#1!=rangelast(2,3)) goto main::@1
Simple Condition (bool~) main::$5 [21] if((byte) main::i#1!=rangelast(2,3)) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Rewriting array member address-of to pointer addition [7] (signed word*) print::p#1 ← (signed word[]) VALS + (byte~) main::$6
Rewriting array member address-of to pointer addition [15] (signed word*) print::p#2 ← (signed word[]) VALS + (byte~) main::$7
Rewriting array member address-of to pointer addition [6] (signed word*) print::p#1 ← (const signed word[]) VALS + (byte~) main::$6
Rewriting array member address-of to pointer addition [14] (signed word*) print::p#2 ← (const signed word[]) VALS + (byte~) main::$7
Successful SSA optimization PassNArrayElementAddressOfRewriting
Constant right-side identified [6] (byte~) main::$6 ← (byte) 1 * (const byte) SIZEOF_SIGNED_WORD
Constant right-side identified [5] (byte~) main::$6 ← (byte) 1 * (const byte) SIZEOF_SIGNED_WORD
Successful SSA optimization Pass2ConstantRValueConsolidation
Identified constant from value list (signed word[]) { (signed word) 1, (signed word) 2, (signed word) 3, (signed word) 4 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const signed word[]) VALS = { 1, 2, 3, 4 }
Constant (const signed word*) print::p#0 = VALS
Constant (const byte) main::$6 = 1*SIZEOF_SIGNED_WORD
Constant (const byte) main::i#0 = 2
Constant (const byte) idx#17 = 0
Successful SSA optimization Pass2ConstantIdentification
Constant (const signed word*) print::p#0 = VALS
Successful SSA optimization Pass2ConstantIdentification
Resolved ranged next value [20] main::i#1 ← ++ main::i#2 to ++
Resolved ranged comparison value [22] if(main::i#1!=rangelast(2,3)) goto main::@1 to (number) 4
Resolved ranged next value [19] main::i#1 ← ++ main::i#2 to ++
Resolved ranged comparison value [21] if(main::i#1!=rangelast(2,3)) goto main::@1 to (number) 4
Adding number conversion cast (unumber) 4 in if((byte) main::i#1!=(number) 4) goto main::@1
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant integer cast 4

View File

@ -5,12 +5,11 @@ Culled Empty Block (label) main::@4
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
(byte~) $0 ← (const byte) ITEM_COUNT * (const byte) ITEM_SIZE
(byte[$0]) items ← { (number) 0, (number) 0, (number) 0, (number) 0, (number) 0, (number) 0, (number) 0, (number) 0, (number) 0, (number) 0, (number) 0, (number) 0, (number) 0, (number) 0, (number) 0 }
to:@1
(void()) main()
main: scope:[main] from @1
(byte*) main::cur_item#0 ← (byte[$0]) items
(byte*) main::cur_item#0 ← (const byte[$0]) items
(number~) main::$0 ← (const byte) ITEM_COUNT - (number) 1
(byte) main::item#0 ← (byte) 0
to:main::@1
@ -57,7 +56,7 @@ SYMBOL TABLE SSA
(label) @end
(const byte) ITEM_COUNT = (byte) 3
(const byte) ITEM_SIZE = (byte) 5
(byte[$0]) items
(const byte[$0]) items = { (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0 }
(void()) main()
(number~) main::$0
(number~) main::$1
@ -94,8 +93,6 @@ Adding number conversion cast (unumber) $10 in (number~) main::$2 ← (byte) mai
Adding number conversion cast (unumber) main::$2 in (number~) main::$2 ← (byte) main::item#2 * (unumber)(number) $10
Adding number conversion cast (unumber) main::$3 in (number~) main::$3 ← (unumber~) main::$2 | (byte) main::sub#2
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (byte[$0]) items ← (byte[$0]){ (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
@ -129,28 +126,24 @@ Successful SSA optimization Pass2AliasElimination
Identical Phi Values (byte) main::item#2 (byte) main::item#4
Identical Phi Values (byte*) main::cur_item#2 (byte*) main::cur_item#4
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) main::$4 [14] if((byte) main::sub#1!=rangelast(0,main::$1)) goto main::@2
Simple Condition (bool~) main::$5 [19] if((byte) main::item#1!=rangelast(0,main::$0)) goto main::@1
Simple Condition (bool~) main::$4 [13] if((byte) main::sub#1!=rangelast(0,main::$1)) goto main::@2
Simple Condition (bool~) main::$5 [18] if((byte) main::item#1!=rangelast(0,main::$0)) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant right-side identified [0] (byte~) $0 ← (const byte) ITEM_COUNT * (const byte) ITEM_SIZE
Constant right-side identified [3] (byte~) main::$0 ← (const byte) ITEM_COUNT - (byte) 1
Constant right-side identified [6] (byte~) main::$1 ← (const byte) ITEM_SIZE - (byte) 1
Constant right-side identified [2] (byte~) main::$0 ← (const byte) ITEM_COUNT - (byte) 1
Constant right-side identified [5] (byte~) main::$1 ← (const byte) ITEM_SIZE - (byte) 1
Successful SSA optimization Pass2ConstantRValueConsolidation
Identified constant from value list (byte[$0]) { (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const byte) $0 = ITEM_COUNT*ITEM_SIZE
Constant (const byte[$0]) items = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
Constant (const byte*) main::cur_item#0 = items
Constant (const byte) main::$0 = ITEM_COUNT-1
Constant (const byte) main::item#0 = 0
Constant (const byte) main::$1 = ITEM_SIZE-1
Constant (const byte) main::sub#0 = 0
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte*) main::cur_item#0 = items
Successful SSA optimization Pass2ConstantIdentification
Resolved ranged next value [12] main::sub#1 ← ++ main::sub#2 to ++
Resolved ranged comparison value [14] if(main::sub#1!=rangelast(0,main::$1)) goto main::@2 to (const byte) main::$1+(number) 1
Resolved ranged next value [17] main::item#1 ← ++ main::item#4 to ++
Resolved ranged comparison value [19] if(main::item#1!=rangelast(0,main::$0)) goto main::@1 to (const byte) main::$0+(number) 1
Resolved ranged next value [11] main::sub#1 ← ++ main::sub#2 to ++
Resolved ranged comparison value [13] if(main::sub#1!=rangelast(0,main::$1)) goto main::@2 to (const byte) main::$1+(number) 1
Resolved ranged next value [16] main::item#1 ← ++ main::item#4 to ++
Resolved ranged comparison value [18] if(main::item#1!=rangelast(0,main::$0)) goto main::@1 to (const byte) main::$0+(number) 1
Adding number conversion cast (unumber) main::$1+1 in if((byte) main::sub#1!=(const byte) main::$1+(number) 1) goto main::@2
Adding number conversion cast (unumber) 1 in if((byte) main::sub#1!=(unumber)(const byte) main::$1+(number) 1) goto main::@2
Adding number conversion cast (unumber) main::$0+1 in if((byte) main::item#1!=(const byte) main::$0+(number) 1) goto main::@1
@ -166,9 +159,9 @@ Finalized unsigned number type (byte) 1
Successful SSA optimization PassNFinalizeNumberTypeConversions
Rewriting multiplication to use shift [2] (byte~) main::$2 ← (byte) main::item#4 * (byte) $10
Successful SSA optimization Pass2MultiplyToShiftRewriting
Inlining constant with var siblings (const byte*) main::cur_item#0
Inlining constant with var siblings (const byte) main::item#0
Inlining constant with var siblings (const byte) main::sub#0
Inlining constant with var siblings (const byte*) main::cur_item#0
Constant inlined main::sub#0 = (byte) 0
Constant inlined main::$1 = (const byte) ITEM_SIZE-(byte) 1
Constant inlined $0 = (const byte) ITEM_COUNT*(const byte) ITEM_SIZE

View File

@ -8,7 +8,6 @@ Culled Empty Block (label) test::@4
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
(byte[]) ref ← { (number) 3, (number) 4, (number) 3, (number) $12, (number) 9, (number) 1, (number) 4, (number) 2, (number) 4, (number) 5, (number) 1, (number) 0 }
(byte*~) $0 ← (const byte*) screen1 + (number) $28
(byte*) screen2#0 ← (byte*~) $0
to:@2
@ -136,8 +135,8 @@ test: scope:[test] from main main::@1 main::@10 main::@2 main::@3 main::@4 main
(byte) test::i#11 ← phi( main/(byte) test::i#0 main::@1/(byte) test::i#1 main::@10/(byte) test::i#10 main::@2/(byte) test::i#2 main::@3/(byte) test::i#3 main::@4/(byte) test::i#4 main::@5/(byte) test::i#5 main::@6/(byte) test::i#6 main::@7/(byte) test::i#7 main::@8/(byte) test::i#8 main::@9/(byte) test::i#9 )
(byte) test::a#11 ← phi( main/(byte) test::a#0 main::@1/(byte) test::a#1 main::@10/(byte) test::a#10 main::@2/(byte) test::a#2 main::@3/(byte) test::a#3 main::@4/(byte) test::a#4 main::@5/(byte) test::a#5 main::@6/(byte) test::a#6 main::@7/(byte) test::a#7 main::@8/(byte) test::a#8 main::@9/(byte) test::a#9 )
*((const byte*) screen1 + (byte) test::i#11) ← (byte) test::a#11
*((byte*) screen2#1 + (byte) test::i#11) ← *((byte[]) ref + (byte) test::i#11)
(bool~) test::$0 ← *((byte[]) ref + (byte) test::i#11) == (byte) test::a#11
*((byte*) screen2#1 + (byte) test::i#11) ← *((const byte[]) ref + (byte) test::i#11)
(bool~) test::$0 ← *((const byte[]) ref + (byte) test::i#11) == (byte) test::a#11
if((bool~) test::$0) goto test::@1
to:test::@3
test::@1: scope:[test] from test
@ -227,7 +226,7 @@ SYMBOL TABLE SSA
(byte) main::i#7
(byte) main::i#8
(byte) main::i#9
(byte[]) ref
(const byte[]) ref = { (byte)(number) 3, (byte)(number) 4, (byte)(number) 3, (byte)(number) $12, (byte)(number) 9, (byte)(number) 1, (byte)(number) 4, (byte)(number) 2, (byte)(number) 4, (byte)(number) 5, (byte)(number) 1, (byte)(number) 0 }
(const byte*) screen1 = (byte*)(number) $400
(byte*) screen2
(byte*) screen2#0
@ -292,13 +291,9 @@ Adding number conversion cast (unumber) 6 in (byte) main::a#8 ← (byte) main::a
Adding number conversion cast (unumber) 1 in (byte) main::a#9 ← (byte) main::a#19 | (number) 1
Adding number conversion cast (unumber) 1 in (byte) main::a#10 ← (byte) main::a#20 & (number) 1
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (byte[]) ref ← (byte[]){ (byte)(number) 3, (byte)(number) 4, (byte)(number) 3, (byte)(number) $12, (byte)(number) 9, (byte)(number) 1, (byte)(number) 4, (byte)(number) 2, (byte)(number) 4, (byte)(number) 5, (byte)(number) 1, (byte)(number) 0 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (byte) main::i#0 ← (unumber)(number) 0
Inlining cast (byte) main::a#0 ← (unumber)(number) 3
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Simplifying constant pointer cast (byte*) 55296
Simplifying constant integer cast 3
Simplifying constant integer cast 4
Simplifying constant integer cast 3
@ -311,6 +306,8 @@ Simplifying constant integer cast 4
Simplifying constant integer cast 5
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant pointer cast (byte*) 1024
Simplifying constant pointer cast (byte*) 55296
Simplifying constant integer cast $28
Simplifying constant integer cast 0
Simplifying constant integer cast 3
@ -367,13 +364,10 @@ Successful SSA optimization Pass2AliasElimination
Identical Phi Values (byte*) screen2#10 (byte*) screen2#0
Identical Phi Values (byte*) screen2#1 (byte*) screen2#10
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) test::$0 [76] if(*((byte[]) ref + (byte) test::i#11)==(byte) test::a#11) goto test::@1
Simple Condition (bool~) test::$0 [75] if(*((const byte[]) ref + (byte) test::i#11)==(byte) test::a#11) goto test::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant right-side identified [1] (byte*) screen2#0 ← (const byte*) screen1 + (byte) $28
Constant right-side identified [0] (byte*) screen2#0 ← (const byte*) screen1 + (byte) $28
Successful SSA optimization Pass2ConstantRValueConsolidation
Identified constant from value list (byte[]) { (byte) 3, (byte) 4, (byte) 3, (byte) $12, (byte) 9, (byte) 1, (byte) 4, (byte) 2, (byte) 4, (byte) 5, (byte) 1, (byte) 0 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const byte[]) ref = { 3, 4, 3, $12, 9, 1, 4, 2, 4, 5, 1, 0 }
Constant (const byte*) screen2#0 = screen1+$28
Constant (const byte) main::i#0 = 0
Constant (const byte) main::a#0 = 3

View File

@ -3,6 +3,7 @@ Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBa
Culled Empty Block (label) @1
Culled Empty Block (label) @2
Culled Empty Block (label) @3
Culled Empty Block (label) @4
Culled Empty Block (label) main::@4
Culled Empty Block (label) main::@3
Culled Empty Block (label) main::@5
@ -25,9 +26,6 @@ Culled Empty Block (label) fill::@6
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
to:@4
@4: scope:[] from @begin
(byte[]) bitmask ← { (number) $80, (number) $40, (number) $20, (number) $10, (number) 8, (number) 4, (number) 2, (number) 1 }
to:@8
(void()) main()
@ -269,7 +267,7 @@ plot::@1: scope:[plot] from plot
(number~) plot::$12 ← (signed word~) plot::$11 * (number) $140
(byte*) plot::location#3 ← (byte*) plot::location#2 + (number~) plot::$12
(number~) plot::$13 ← (signed word) plot::x#9 & (number) 7
(byte~) plot::$14 ← *((byte*) plot::location#3) | *((byte[]) bitmask + (number~) plot::$13)
(byte~) plot::$14 ← *((byte*) plot::location#3) | *((const byte[]) bitmask + (number~) plot::$13)
*((byte*) plot::location#3) ← (byte~) plot::$14
to:plot::@return
plot::@return: scope:[plot] from plot plot::@1
@ -302,7 +300,7 @@ fill::@2: scope:[fill] from fill::@1
fill::@return: scope:[fill] from fill::@1
return
to:@return
@8: scope:[] from @4
@8: scope:[] from @begin
call main
to:@9
@9: scope:[] from @8
@ -310,7 +308,6 @@ fill::@return: scope:[fill] from fill::@1
@end: scope:[] from @9
SYMBOL TABLE SSA
(label) @4
(label) @8
(label) @9
(label) @begin
@ -324,7 +321,7 @@ SYMBOL TABLE SSA
(const byte) VIC_DEN = (number) $10
(const byte*) VIC_MEMORY = (byte*)(number) $d018
(const byte) VIC_RSEL = (number) 8
(byte[]) bitmask
(const byte[]) bitmask = { (byte)(number) $80, (byte)(number) $40, (byte)(number) $20, (byte)(number) $10, (byte)(number) 8, (byte)(number) 4, (byte)(number) 2, (byte)(number) 1 }
(void()) circle((signed word) circle::xc , (signed word) circle::yc , (signed word) circle::r)
(signed word~) circle::$0
(number~) circle::$1
@ -597,8 +594,6 @@ Adding number conversion cast (snumber) plot::$12 in (number~) plot::$12 ← (si
Adding number conversion cast (snumber) 7 in (number~) plot::$13 ← (signed word) plot::x#9 & (number) 7
Adding number conversion cast (snumber) plot::$13 in (number~) plot::$13 ← (signed word) plot::x#9 & (snumber)(number) 7
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (byte[]) bitmask ← (byte[]){ (byte)(number) $80, (byte)(number) $40, (byte)(number) $20, (byte)(number) $10, (byte)(number) 8, (byte)(number) 4, (byte)(number) 2, (byte)(number) 1 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (signed word) fill::size#0 ← (snumber)(number) $28*(number) $19*(number) 8
Inlining cast (byte) fill::val#0 ← (unumber)(number) 0
Inlining cast (signed word) fill::size#1 ← (snumber)(number) $28*(number) $19
@ -753,24 +748,21 @@ Identical Phi Values (signed word) circle::yc#1 (signed word) circle::yc#13
Identical Phi Values (byte*) fill::end#1 (byte*) fill::end#0
Identical Phi Values (byte) fill::val#2 (byte) fill::val#4
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) main::$10 [23] if((signed word) main::i#2<(signed word) $b4) goto main::@2
Simple Condition (bool~) circle::$2 [41] if((signed word) circle::x1#10<=(signed word) circle::y#13) goto circle::@2
Simple Condition (bool~) circle::$3 [44] if((signed word) circle::p#3<(signed byte) 0) goto circle::@4
Simple Condition (bool~) fill::$1 [139] if((byte*) fill::addr#2!=(byte*) fill::end#0) goto fill::@2
Simple Condition (bool~) main::$10 [22] if((signed word) main::i#2<(signed word) $b4) goto main::@2
Simple Condition (bool~) circle::$2 [40] if((signed word) circle::x1#10<=(signed word) circle::y#13) goto circle::@2
Simple Condition (bool~) circle::$3 [43] if((signed word) circle::p#3<(signed byte) 0) goto circle::@4
Simple Condition (bool~) fill::$1 [138] if((byte*) fill::addr#2!=(byte*) fill::end#0) goto fill::@2
Successful SSA optimization Pass2ConditionalJumpSimplification
Rewriting ! if()-condition to reversed if() [117] (bool~) plot::$7 ← ! (bool~) plot::$6
Rewriting || if()-condition to two if()s [116] (bool~) plot::$6 ← (bool~) plot::$4 || (bool~) plot::$5
Rewriting || if()-condition to two if()s [114] (bool~) plot::$4 ← (bool~) plot::$2 || (bool~) plot::$3
Rewriting || if()-condition to two if()s [112] (bool~) plot::$2 ← (bool~) plot::$0 || (bool~) plot::$1
Rewriting ! if()-condition to reversed if() [116] (bool~) plot::$7 ← ! (bool~) plot::$6
Rewriting || if()-condition to two if()s [115] (bool~) plot::$6 ← (bool~) plot::$4 || (bool~) plot::$5
Rewriting || if()-condition to two if()s [113] (bool~) plot::$4 ← (bool~) plot::$2 || (bool~) plot::$3
Rewriting || if()-condition to two if()s [111] (bool~) plot::$2 ← (bool~) plot::$0 || (bool~) plot::$1
Successful SSA optimization Pass2ConditionalAndOrRewriting
Constant right-side identified [2] (signed word) fill::size#0 ← (snumber)(number) $28*(number) $19*(number) 8
Constant right-side identified [6] (signed word) fill::size#1 ← (snumber)(number) $28*(number) $19
Constant right-side identified [11] (word~) main::$2 ← (word)(const byte*) SCREEN
Constant right-side identified [14] (word~) main::$5 ← (word)(const byte*) BITMAP
Constant right-side identified [1] (signed word) fill::size#0 ← (snumber)(number) $28*(number) $19*(number) 8
Constant right-side identified [5] (signed word) fill::size#1 ← (snumber)(number) $28*(number) $19
Constant right-side identified [10] (word~) main::$2 ← (word)(const byte*) SCREEN
Constant right-side identified [13] (word~) main::$5 ← (word)(const byte*) BITMAP
Successful SSA optimization Pass2ConstantRValueConsolidation
Identified constant from value list (byte[]) { (byte) $80, (byte) $40, (byte) $20, (byte) $10, (byte) 8, (byte) 4, (byte) 2, (byte) 1 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const byte[]) bitmask = { $80, $40, $20, $10, 8, 4, 2, 1 }
Constant (const byte*) fill::start#0 = BITMAP
Constant (const signed word) fill::size#0 = (snumber)$28*$19*8
Constant (const byte) fill::val#0 = 0
@ -785,7 +777,7 @@ Constant (const signed word) circle::yc#0 = $64
Constant (const signed word) circle::x1#0 = 0
Constant (const byte*) plot::location#0 = BITMAP
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [31] if(true) goto main::@7
if() condition always true - replacing block destination [30] if(true) goto main::@7
Successful SSA optimization Pass2ConstantIfs
Removing unused block main::@return
Successful SSA optimization Pass2EliminateUnusedBlocks
@ -850,7 +842,6 @@ Successful SSA optimization Pass2ConstantInlining
Alias (signed word~) plot::$12 = (signed word) plot::$17
Successful SSA optimization Pass2AliasElimination
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @4
Adding NOP phi() at start of @8
Adding NOP phi() at start of @9
Adding NOP phi() at start of @end
@ -858,41 +849,40 @@ Adding NOP phi() at start of main
Adding NOP phi() at start of main::@9
Adding NOP phi() at start of main::@7
CALL GRAPH
Calls in [] to main:3
Calls in [main] to fill:7 fill:9 circle:17
Calls in [circle] to plot:40 plot:45 plot:50 plot:55 plot:60 plot:65 plot:70 plot:75
Calls in [] to main:2
Calls in [main] to fill:6 fill:8 circle:16
Calls in [circle] to plot:39 plot:44 plot:49 plot:54 plot:59 plot:64 plot:69 plot:74
Created 12 initial phi equivalence classes
Coalesced [19] main::i#5 ← main::i#1
Coalesced [22] circle::y#15 ← circle::r#0
Coalesced [23] circle::p#16 ← circle::p#0
Coalesced [33] circle::y#18 ← circle::y#1
Coalesced [34] circle::p#19 ← circle::p#2
Coalesced [38] plot::x#17 ← plot::x#0
Coalesced [39] plot::y#17 ← plot::y#0
Coalesced [43] plot::x#10 ← plot::x#1
Coalesced [44] plot::y#10 ← plot::y#1
Coalesced [48] plot::x#11 ← plot::x#2
Coalesced [49] plot::y#11 ← plot::y#2
Coalesced [53] plot::x#12 ← plot::x#3
Coalesced [54] plot::y#12 ← plot::y#3
Coalesced [58] plot::x#13 ← plot::x#4
Coalesced [59] plot::y#13 ← plot::y#4
Coalesced [63] plot::x#14 ← plot::x#5
Coalesced [64] plot::y#14 ← plot::y#5
Coalesced [68] plot::x#15 ← plot::x#6
Coalesced [69] plot::y#15 ← plot::y#6
Coalesced [73] plot::x#16 ← plot::x#7
Coalesced [74] plot::y#16 ← plot::y#7
Coalesced [77] circle::x1#15 ← circle::x1#1
Coalesced [78] circle::y#16 ← circle::y#10
Coalesced [79] circle::p#17 ← circle::p#10
Coalesced (already) [83] circle::y#17 ← circle::y#13
Coalesced [84] circle::p#18 ← circle::p#1
Coalesced [106] fill::addr#4 ← fill::addr#0
Coalesced [112] fill::addr#5 ← fill::addr#1
Coalesced [18] main::i#5 ← main::i#1
Coalesced [21] circle::y#15 ← circle::r#0
Coalesced [22] circle::p#16 ← circle::p#0
Coalesced [32] circle::y#18 ← circle::y#1
Coalesced [33] circle::p#19 ← circle::p#2
Coalesced [37] plot::x#17 ← plot::x#0
Coalesced [38] plot::y#17 ← plot::y#0
Coalesced [42] plot::x#10 ← plot::x#1
Coalesced [43] plot::y#10 ← plot::y#1
Coalesced [47] plot::x#11 ← plot::x#2
Coalesced [48] plot::y#11 ← plot::y#2
Coalesced [52] plot::x#12 ← plot::x#3
Coalesced [53] plot::y#12 ← plot::y#3
Coalesced [57] plot::x#13 ← plot::x#4
Coalesced [58] plot::y#13 ← plot::y#4
Coalesced [62] plot::x#14 ← plot::x#5
Coalesced [63] plot::y#14 ← plot::y#5
Coalesced [67] plot::x#15 ← plot::x#6
Coalesced [68] plot::y#15 ← plot::y#6
Coalesced [72] plot::x#16 ← plot::x#7
Coalesced [73] plot::y#16 ← plot::y#7
Coalesced [76] circle::x1#15 ← circle::x1#1
Coalesced [77] circle::y#16 ← circle::y#10
Coalesced [78] circle::p#17 ← circle::p#10
Coalesced (already) [82] circle::y#17 ← circle::y#13
Coalesced [83] circle::p#18 ← circle::p#1
Coalesced [105] fill::addr#4 ← fill::addr#0
Coalesced [111] fill::addr#5 ← fill::addr#1
Coalesced down to 9 phi equivalence classes
Culled Empty Block (label) @4
Culled Empty Block (label) @9
Renumbering block @8 to @1
Renumbering block main::@7 to main::@3

View File

@ -3,6 +3,7 @@ Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBa
Culled Empty Block (label) @1
Culled Empty Block (label) @2
Culled Empty Block (label) @3
Culled Empty Block (label) @4
Culled Empty Block (label) main::@2
Culled Empty Block (label) @5
Culled Empty Block (label) circle::@6
@ -19,9 +20,6 @@ Culled Empty Block (label) fill::@6
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
to:@4
@4: scope:[] from @begin
(byte[]) bitmask ← { (number) $80, (number) $40, (number) $20, (number) $10, (number) 8, (number) 4, (number) 2, (number) 1 }
to:@8
(void()) main()
@ -239,7 +237,7 @@ plot: scope:[plot] from circle::@11 circle::@12 circle::@13 circle::@14 circle:
(number~) plot::$4 ← (signed word~) plot::$3 * (number) $140
(byte*) plot::location#3 ← (byte*) plot::location#2 + (number~) plot::$4
(number~) plot::$5 ← (signed word) plot::x#8 & (number) 7
(byte~) plot::$6 ← *((byte*) plot::location#3) | *((byte[]) bitmask + (number~) plot::$5)
(byte~) plot::$6 ← *((byte*) plot::location#3) | *((const byte[]) bitmask + (number~) plot::$5)
*((byte*) plot::location#3) ← (byte~) plot::$6
to:plot::@return
plot::@return: scope:[plot] from plot
@ -272,7 +270,7 @@ fill::@2: scope:[fill] from fill::@1
fill::@return: scope:[fill] from fill::@1
return
to:@return
@8: scope:[] from @4
@8: scope:[] from @begin
call main
to:@9
@9: scope:[] from @8
@ -280,7 +278,6 @@ fill::@return: scope:[fill] from fill::@1
@end: scope:[] from @9
SYMBOL TABLE SSA
(label) @4
(label) @8
(label) @9
(label) @begin
@ -294,7 +291,7 @@ SYMBOL TABLE SSA
(const byte) VIC_DEN = (number) $10
(const byte*) VIC_MEMORY = (byte*)(number) $d018
(const byte) VIC_RSEL = (number) 8
(byte[]) bitmask
(const byte[]) bitmask = { (byte)(number) $80, (byte)(number) $40, (byte)(number) $20, (byte)(number) $10, (byte)(number) 8, (byte)(number) 4, (byte)(number) 2, (byte)(number) 1 }
(void()) circle((signed word) circle::xc , (signed word) circle::yc , (signed word) circle::r)
(signed word~) circle::$0
(number~) circle::$1
@ -541,8 +538,6 @@ Adding number conversion cast (snumber) plot::$4 in (number~) plot::$4 ← (sign
Adding number conversion cast (snumber) 7 in (number~) plot::$5 ← (signed word) plot::x#8 & (number) 7
Adding number conversion cast (snumber) plot::$5 in (number~) plot::$5 ← (signed word) plot::x#8 & (snumber)(number) 7
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (byte[]) bitmask ← (byte[]){ (byte)(number) $80, (byte)(number) $40, (byte)(number) $20, (byte)(number) $10, (byte)(number) 8, (byte)(number) 4, (byte)(number) 2, (byte)(number) 1 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (signed word) fill::size#0 ← (snumber)(number) $28*(number) $19*(number) 8
Inlining cast (byte) fill::val#0 ← (unumber)(number) 0
Inlining cast (signed word) fill::size#1 ← (snumber)(number) $28*(number) $19
@ -682,18 +677,15 @@ Identical Phi Values (signed word) circle::yc#1 (signed word) circle::yc#13
Identical Phi Values (byte*) fill::end#1 (byte*) fill::end#0
Identical Phi Values (byte) fill::val#2 (byte) fill::val#4
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) circle::$2 [34] if((signed word) circle::x1#10<=(signed word) circle::y#13) goto circle::@2
Simple Condition (bool~) circle::$3 [37] if((signed word) circle::p#3<(signed byte) 0) goto circle::@4
Simple Condition (bool~) fill::$1 [122] if((byte*) fill::addr#2!=(byte*) fill::end#0) goto fill::@2
Simple Condition (bool~) circle::$2 [33] if((signed word) circle::x1#10<=(signed word) circle::y#13) goto circle::@2
Simple Condition (bool~) circle::$3 [36] if((signed word) circle::p#3<(signed byte) 0) goto circle::@4
Simple Condition (bool~) fill::$1 [121] if((byte*) fill::addr#2!=(byte*) fill::end#0) goto fill::@2
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant right-side identified [2] (signed word) fill::size#0 ← (snumber)(number) $28*(number) $19*(number) 8
Constant right-side identified [6] (signed word) fill::size#1 ← (snumber)(number) $28*(number) $19
Constant right-side identified [11] (word~) main::$2 ← (word)(const byte*) SCREEN
Constant right-side identified [14] (word~) main::$5 ← (word)(const byte*) BITMAP
Constant right-side identified [1] (signed word) fill::size#0 ← (snumber)(number) $28*(number) $19*(number) 8
Constant right-side identified [5] (signed word) fill::size#1 ← (snumber)(number) $28*(number) $19
Constant right-side identified [10] (word~) main::$2 ← (word)(const byte*) SCREEN
Constant right-side identified [13] (word~) main::$5 ← (word)(const byte*) BITMAP
Successful SSA optimization Pass2ConstantRValueConsolidation
Identified constant from value list (byte[]) { (byte) $80, (byte) $40, (byte) $20, (byte) $10, (byte) 8, (byte) 4, (byte) 2, (byte) 1 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const byte[]) bitmask = { $80, $40, $20, $10, 8, 4, 2, 1 }
Constant (const byte*) fill::start#0 = BITMAP
Constant (const signed word) fill::size#0 = (snumber)$28*$19*8
Constant (const byte) fill::val#0 = 0
@ -708,7 +700,7 @@ Constant (const signed word) circle::r#0 = $32
Constant (const signed word) circle::x1#0 = 0
Constant (const byte*) plot::location#0 = BITMAP
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [24] if(true) goto main::@1
if() condition always true - replacing block destination [23] if(true) goto main::@1
Successful SSA optimization Pass2ConstantIfs
Removing unused block main::@return
Successful SSA optimization Pass2EliminateUnusedBlocks
@ -764,7 +756,6 @@ Successful SSA optimization Pass2ConstantInlining
Alias (signed word~) plot::$4 = (signed word) plot::$9
Successful SSA optimization Pass2AliasElimination
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @4
Adding NOP phi() at start of @8
Adding NOP phi() at start of @9
Adding NOP phi() at start of @end
@ -774,38 +765,37 @@ Adding NOP phi() at start of main::@5
Adding NOP phi() at start of main::@1
Adding NOP phi() at start of circle
CALL GRAPH
Calls in [] to main:3
Calls in [main] to fill:7 fill:9 circle:13
Calls in [circle] to plot:33 plot:38 plot:43 plot:48 plot:53 plot:58 plot:63 plot:68
Calls in [] to main:2
Calls in [main] to fill:6 fill:8 circle:12
Calls in [circle] to plot:32 plot:37 plot:42 plot:47 plot:52 plot:57 plot:62 plot:67
Created 11 initial phi equivalence classes
Coalesced [26] circle::y#17 ← circle::y#1
Coalesced [27] circle::p#18 ← circle::p#2
Coalesced [31] plot::x#16 ← plot::x#0
Coalesced [32] plot::y#16 ← plot::y#0
Coalesced [36] plot::x#9 ← plot::x#1
Coalesced [37] plot::y#9 ← plot::y#1
Coalesced [41] plot::x#10 ← plot::x#2
Coalesced [42] plot::y#10 ← plot::y#2
Coalesced [46] plot::x#11 ← plot::x#3
Coalesced [47] plot::y#11 ← plot::y#3
Coalesced [51] plot::x#12 ← plot::x#4
Coalesced [52] plot::y#12 ← plot::y#4
Coalesced [56] plot::x#13 ← plot::x#5
Coalesced [57] plot::y#13 ← plot::y#5
Coalesced [61] plot::x#14 ← plot::x#6
Coalesced [62] plot::y#14 ← plot::y#6
Coalesced [66] plot::x#15 ← plot::x#7
Coalesced [67] plot::y#15 ← plot::y#7
Coalesced [70] circle::x1#15 ← circle::x1#1
Coalesced [71] circle::y#15 ← circle::y#10
Coalesced [72] circle::p#16 ← circle::p#10
Coalesced (already) [76] circle::y#16 ← circle::y#13
Coalesced [77] circle::p#17 ← circle::p#1
Coalesced [95] fill::addr#4 ← fill::addr#0
Coalesced [101] fill::addr#5 ← fill::addr#1
Coalesced [25] circle::y#17 ← circle::y#1
Coalesced [26] circle::p#18 ← circle::p#2
Coalesced [30] plot::x#16 ← plot::x#0
Coalesced [31] plot::y#16 ← plot::y#0
Coalesced [35] plot::x#9 ← plot::x#1
Coalesced [36] plot::y#9 ← plot::y#1
Coalesced [40] plot::x#10 ← plot::x#2
Coalesced [41] plot::y#10 ← plot::y#2
Coalesced [45] plot::x#11 ← plot::x#3
Coalesced [46] plot::y#11 ← plot::y#3
Coalesced [50] plot::x#12 ← plot::x#4
Coalesced [51] plot::y#12 ← plot::y#4
Coalesced [55] plot::x#13 ← plot::x#5
Coalesced [56] plot::y#13 ← plot::y#5
Coalesced [60] plot::x#14 ← plot::x#6
Coalesced [61] plot::y#14 ← plot::y#6
Coalesced [65] plot::x#15 ← plot::x#7
Coalesced [66] plot::y#15 ← plot::y#7
Coalesced [69] circle::x1#15 ← circle::x1#1
Coalesced [70] circle::y#15 ← circle::y#10
Coalesced [71] circle::p#16 ← circle::p#10
Coalesced (already) [75] circle::y#16 ← circle::y#13
Coalesced [76] circle::p#17 ← circle::p#1
Coalesced [94] fill::addr#4 ← fill::addr#0
Coalesced [100] fill::addr#5 ← fill::addr#1
Coalesced down to 8 phi equivalence classes
Culled Empty Block (label) @4
Culled Empty Block (label) @9
Culled Empty Block (label) main::@5
Renumbering block @8 to @1

View File

@ -16,6 +16,7 @@ Identified constant variable (byte*) SCREEN
Identified constant variable (byte) plots_cnt
Culled Empty Block (label) main::@1
Culled Empty Block (label) main::@4
Culled Empty Block (label) @1
Culled Empty Block (label) plots::@4
Culled Empty Block (label) plots::@3
Culled Empty Block (label) plots::@5
@ -33,7 +34,7 @@ Culled Empty Block (label) init_screen::@12
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
to:@1
to:@2
(void()) main()
main: scope:[main] from @5
@ -72,10 +73,6 @@ main::@7: scope:[main] from main::@3
main::@return: scope:[main] from main::@7
return
to:@return
@1: scope:[] from @begin
(byte[]) plots_x ← { (number) $3c, (number) $50, (number) $6e, (number) $50, (number) $3c, (number) $28, (number) $a, (number) $28 }
(byte[]) plots_y ← { (number) $a, (number) $28, (number) $3c, (number) $50, (number) $6e, (number) $50, (number) $3c, (number) $28 }
to:@2
(void()) plots()
plots: scope:[plots] from main::@3
@ -88,8 +85,8 @@ plots::@1: scope:[plots] from plots plots::@7
to:plots::@return
plots::@2: scope:[plots] from plots::@1
(byte) plots::i#3 ← phi( plots::@1/(byte) plots::i#2 )
(byte) plot::x#0 ← *((byte[]) plots_x + (byte) plots::i#3)
(byte) plot::y#0 ← *((byte[]) plots_y + (byte) plots::i#3)
(byte) plot::x#0 ← *((const byte[]) plots_x + (byte) plots::i#3)
(byte) plot::y#0 ← *((const byte[]) plots_y + (byte) plots::i#3)
call plot
to:plots::@7
plots::@7: scope:[plots] from plots::@2
@ -99,7 +96,7 @@ plots::@7: scope:[plots] from plots::@2
plots::@return: scope:[plots] from plots::@1
return
to:@return
@2: scope:[] from @1
@2: scope:[] from @begin
(byte[$100]) plot_xlo ← { fill( $100, 0) }
(byte[$100]) plot_xhi ← { fill( $100, 0) }
(byte[$100]) plot_ylo ← { fill( $100, 0) }
@ -233,7 +230,6 @@ init_screen::@return: scope:[init_screen] from init_screen::@7
@end: scope:[] from @6
SYMBOL TABLE SSA
(label) @1
(label) @2
(label) @5
(label) @6
@ -375,8 +371,8 @@ SYMBOL TABLE SSA
(byte) plots::i#3
(byte) plots::i#4
(const byte) plots_cnt = (byte) 8
(byte[]) plots_x
(byte[]) plots_y
(const byte[]) plots_x = { (byte)(number) $3c, (byte)(number) $50, (byte)(number) $6e, (byte)(number) $50, (byte)(number) $3c, (byte)(number) $28, (byte)(number) $a, (byte)(number) $28 }
(const byte[]) plots_y = { (byte)(number) $a, (byte)(number) $28, (byte)(number) $3c, (byte)(number) $50, (byte)(number) $6e, (byte)(number) $50, (byte)(number) $3c, (byte)(number) $28 }
Adding number conversion cast (unumber) 0 in *((const byte*) BGCOL) ← (number) 0
Adding number conversion cast (unumber) 0 in *((const byte*) FGCOL) ← (number) 0
@ -409,9 +405,6 @@ Adding number conversion cast (unumber) 0 in *((byte*) init_screen::b#3) ← (nu
Adding number conversion cast (unumber) $400 in (byte*~) init_screen::$1 ← (const byte*) SCREEN + (number) $400
Adding number conversion cast (unumber) $14 in *((byte*) init_screen::c#3) ← (number) $14
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (byte[]) plots_x ← (byte[]){ (byte)(number) $3c, (byte)(number) $50, (byte)(number) $6e, (byte)(number) $50, (byte)(number) $3c, (byte)(number) $28, (byte)(number) $a, (byte)(number) $28 }
Added casts to value list in (byte[]) plots_y ← (byte[]){ (byte)(number) $a, (byte)(number) $28, (byte)(number) $3c, (byte)(number) $50, (byte)(number) $6e, (byte)(number) $50, (byte)(number) $3c, (byte)(number) $28 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast *((const byte*) BGCOL) ← (unumber)(number) 0
Inlining cast *((const byte*) FGCOL) ← (unumber)(number) 0
Inlining cast (word~) main::$3 ← (word)(const byte*) SCREEN
@ -427,6 +420,22 @@ Inlining cast *((byte*) init_screen::b#3) ← (unumber)(number) 0
Inlining cast *((byte*) init_screen::c#3) ← (unumber)(number) $14
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 8192
Simplifying constant integer cast $3c
Simplifying constant integer cast $50
Simplifying constant integer cast $6e
Simplifying constant integer cast $50
Simplifying constant integer cast $3c
Simplifying constant integer cast $28
Simplifying constant integer cast $a
Simplifying constant integer cast $28
Simplifying constant integer cast $a
Simplifying constant integer cast $28
Simplifying constant integer cast $3c
Simplifying constant integer cast $50
Simplifying constant integer cast $6e
Simplifying constant integer cast $50
Simplifying constant integer cast $3c
Simplifying constant integer cast $28
Simplifying constant pointer cast (byte*) 53265
Simplifying constant pointer cast (byte*) 53266
Simplifying constant pointer cast (byte*) 53272
@ -439,22 +448,6 @@ Simplifying constant integer cast 3
Simplifying constant integer cast $40
Simplifying constant integer cast $400
Simplifying constant integer cast $ff
Simplifying constant integer cast $3c
Simplifying constant integer cast $50
Simplifying constant integer cast $6e
Simplifying constant integer cast $50
Simplifying constant integer cast $3c
Simplifying constant integer cast $28
Simplifying constant integer cast $a
Simplifying constant integer cast $28
Simplifying constant integer cast $a
Simplifying constant integer cast $28
Simplifying constant integer cast $3c
Simplifying constant integer cast $50
Simplifying constant integer cast $6e
Simplifying constant integer cast $50
Simplifying constant integer cast $3c
Simplifying constant integer cast $28
Simplifying constant integer cast 0
Simplifying constant pointer cast (byte*) 0
Simplifying constant integer cast 0
@ -502,8 +495,8 @@ Inferred type updated to byte in (unumber~) init_plot_tables::$1 ← (byte) init
Inferred type updated to byte in (unumber~) init_plot_tables::$5 ← (byte) init_plot_tables::y#2 & (byte) 7
Inferred type updated to byte in (unumber~) init_plot_tables::$7 ← (byte~) init_plot_tables::$5 | (byte~) init_plot_tables::$6
Inferred type updated to byte in (unumber~) init_plot_tables::$9 ← (byte) init_plot_tables::y#2 & (byte) 7
Inversing boolean not [66] (bool~) init_plot_tables::$3 ← (byte) init_plot_tables::bits#1 != (byte) 0 from [65] (bool~) init_plot_tables::$2 ← (byte) init_plot_tables::bits#1 == (byte) 0
Inversing boolean not [85] (bool~) init_plot_tables::$11 ← (byte~) init_plot_tables::$9 != (byte) 7 from [84] (bool~) init_plot_tables::$10 ← (byte~) init_plot_tables::$9 == (byte) 7
Inversing boolean not [64] (bool~) init_plot_tables::$3 ← (byte) init_plot_tables::bits#1 != (byte) 0 from [63] (bool~) init_plot_tables::$2 ← (byte) init_plot_tables::bits#1 == (byte) 0
Inversing boolean not [83] (bool~) init_plot_tables::$11 ← (byte~) init_plot_tables::$9 != (byte) 7 from [82] (bool~) init_plot_tables::$10 ← (byte~) init_plot_tables::$9 == (byte) 7
Successful SSA optimization Pass2UnaryNotSimplification
Alias (byte) plots::i#2 = (byte) plots::i#3 (byte) plots::i#4
Alias (byte*) plot::plotter#0 = (byte*~) plot::$4
@ -521,35 +514,30 @@ Successful SSA optimization Pass2AliasElimination
Identical Phi Values (byte) plot::x#1 (byte) plot::x#0
Identical Phi Values (byte) plot::y#1 (byte) plot::y#0
Successful SSA optimization Pass2IdenticalPhiElimination
Identified duplicate assignment right side [83] (byte~) init_plot_tables::$9 ← (byte) init_plot_tables::y#2 & (byte) 7
Identified duplicate assignment right side [81] (byte~) init_plot_tables::$9 ← (byte) init_plot_tables::y#2 & (byte) 7
Successful SSA optimization Pass2DuplicateRValueIdentification
Simple Condition (bool~) main::$11 [16] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@2
Simple Condition (bool~) plots::$0 [27] if((byte) plots::i#2<(const byte) plots_cnt) goto plots::@2
Simple Condition (bool~) init_plot_tables::$3 [67] if((byte) init_plot_tables::bits#1!=(byte) 0) goto init_plot_tables::@2
Simple Condition (bool~) init_plot_tables::$4 [71] if((byte) init_plot_tables::x#1!=rangelast(0,$ff)) goto init_plot_tables::@1
Simple Condition (bool~) init_plot_tables::$11 [86] if((byte~) init_plot_tables::$9!=(byte) 7) goto init_plot_tables::@6
Simple Condition (bool~) init_plot_tables::$13 [90] if((byte) init_plot_tables::y#1!=rangelast(0,$ff)) goto init_plot_tables::@5
Simple Condition (bool~) init_screen::$0 [98] if((byte*) init_screen::b#2!=(const byte*) BITMAP+(word) $2000) goto init_screen::@2
Simple Condition (bool~) init_screen::$2 [106] if((byte*) init_screen::c#2!=(byte*~) init_screen::$1) goto init_screen::@8
Simple Condition (bool~) plots::$0 [25] if((byte) plots::i#2<(const byte) plots_cnt) goto plots::@2
Simple Condition (bool~) init_plot_tables::$3 [65] if((byte) init_plot_tables::bits#1!=(byte) 0) goto init_plot_tables::@2
Simple Condition (bool~) init_plot_tables::$4 [69] if((byte) init_plot_tables::x#1!=rangelast(0,$ff)) goto init_plot_tables::@1
Simple Condition (bool~) init_plot_tables::$11 [84] if((byte~) init_plot_tables::$9!=(byte) 7) goto init_plot_tables::@6
Simple Condition (bool~) init_plot_tables::$13 [88] if((byte) init_plot_tables::y#1!=rangelast(0,$ff)) goto init_plot_tables::@5
Simple Condition (bool~) init_screen::$0 [96] if((byte*) init_screen::b#2!=(const byte*) BITMAP+(word) $2000) goto init_screen::@2
Simple Condition (bool~) init_screen::$2 [104] if((byte*) init_screen::c#2!=(byte*~) init_screen::$1) goto init_screen::@8
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant right-side identified [2] (byte~) main::$0 ← (const byte) BMM | (const byte) DEN
Constant right-side identified [6] (word~) main::$3 ← (word)(const byte*) SCREEN
Constant right-side identified [8] (word~) main::$5 ← (word)(const byte*) BITMAP
Constant right-side identified [35] (byte[$100]) plot_xlo ← { fill( $100, 0) }
Constant right-side identified [36] (byte[$100]) plot_xhi ← { fill( $100, 0) }
Constant right-side identified [37] (byte[$100]) plot_ylo ← { fill( $100, 0) }
Constant right-side identified [38] (byte[$100]) plot_yhi ← { fill( $100, 0) }
Constant right-side identified [39] (byte[$100]) plot_bit ← { fill( $100, 0) }
Constant right-side identified [104] (byte*~) init_screen::$1 ← (const byte*) SCREEN + (word) $400
Constant right-side identified [33] (byte[$100]) plot_xlo ← { fill( $100, 0) }
Constant right-side identified [34] (byte[$100]) plot_xhi ← { fill( $100, 0) }
Constant right-side identified [35] (byte[$100]) plot_ylo ← { fill( $100, 0) }
Constant right-side identified [36] (byte[$100]) plot_yhi ← { fill( $100, 0) }
Constant right-side identified [37] (byte[$100]) plot_bit ← { fill( $100, 0) }
Constant right-side identified [102] (byte*~) init_screen::$1 ← (const byte*) SCREEN + (word) $400
Successful SSA optimization Pass2ConstantRValueConsolidation
Identified constant from value list (byte[]) { (byte) $3c, (byte) $50, (byte) $6e, (byte) $50, (byte) $3c, (byte) $28, (byte) $a, (byte) $28 }
Identified constant from value list (byte[]) { (byte) $a, (byte) $28, (byte) $3c, (byte) $50, (byte) $6e, (byte) $50, (byte) $3c, (byte) $28 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const byte) main::$0 = BMM|DEN
Constant (const word) main::$3 = (word)SCREEN
Constant (const word) main::$5 = (word)BITMAP
Constant (const byte[]) plots_x = { $3c, $50, $6e, $50, $3c, $28, $a, $28 }
Constant (const byte[]) plots_y = { $a, $28, $3c, $50, $6e, $50, $3c, $28 }
Constant (const byte) plots::i#0 = 0
Constant (const byte[$100]) plot_xlo = { fill( $100, 0) }
Constant (const byte[$100]) plot_xhi = { fill( $100, 0) }
@ -569,10 +557,10 @@ Constant (const byte*) init_screen::$1 = SCREEN+$400
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [20] if(true) goto main::@2
Successful SSA optimization Pass2ConstantIfs
Resolved ranged next value [69] init_plot_tables::x#1 ← ++ init_plot_tables::x#2 to ++
Resolved ranged comparison value [71] if(init_plot_tables::x#1!=rangelast(0,$ff)) goto init_plot_tables::@1 to (number) 0
Resolved ranged next value [88] init_plot_tables::y#1 ← ++ init_plot_tables::y#2 to ++
Resolved ranged comparison value [90] if(init_plot_tables::y#1!=rangelast(0,$ff)) goto init_plot_tables::@5 to (number) 0
Resolved ranged next value [67] init_plot_tables::x#1 ← ++ init_plot_tables::x#2 to ++
Resolved ranged comparison value [69] if(init_plot_tables::x#1!=rangelast(0,$ff)) goto init_plot_tables::@1 to (number) 0
Resolved ranged next value [86] init_plot_tables::y#1 ← ++ init_plot_tables::y#2 to ++
Resolved ranged comparison value [88] if(init_plot_tables::y#1!=rangelast(0,$ff)) goto init_plot_tables::@5 to (number) 0
Removing unused block main::@return
Successful SSA optimization Pass2EliminateUnusedBlocks
Adding number conversion cast (unumber) 0 in if((byte) init_plot_tables::x#1!=(number) 0) goto init_plot_tables::@1
@ -640,7 +628,6 @@ Added new block during phi lifting init_plot_tables::@10(between init_plot_table
Added new block during phi lifting init_plot_tables::@11(between init_plot_tables::@6 and init_plot_tables::@5)
Added new block during phi lifting init_plot_tables::@12(between init_plot_tables::@5 and init_plot_tables::@6)
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @1
Adding NOP phi() at start of @2
Adding NOP phi() at start of @5
Adding NOP phi() at start of @6
@ -654,23 +641,22 @@ Adding NOP phi() at start of init_plot_tables::@4
Adding NOP phi() at start of init_screen
Adding NOP phi() at start of init_screen::@3
CALL GRAPH
Calls in [] to main:4
Calls in [main] to init_screen:11 init_plot_tables:13 plots:17
Calls in [plots] to plot:25
Calls in [] to main:3
Calls in [main] to init_screen:10 init_plot_tables:12 plots:16
Calls in [plots] to plot:24
Created 9 initial phi equivalence classes
Coalesced [27] plots::i#5 ← plots::i#1
Coalesced [62] init_plot_tables::yoffs#7 ← init_plot_tables::yoffs#1
Coalesced [67] init_plot_tables::y#5 ← init_plot_tables::y#1
Coalesced [68] init_plot_tables::yoffs#5 ← init_plot_tables::yoffs#4
Coalesced (already) [69] init_plot_tables::yoffs#6 ← init_plot_tables::yoffs#2
Coalesced [70] init_plot_tables::x#5 ← init_plot_tables::x#1
Coalesced [71] init_plot_tables::bits#5 ← init_plot_tables::bits#4
Coalesced [72] init_plot_tables::bits#6 ← init_plot_tables::bits#1
Coalesced [82] init_screen::c#4 ← init_screen::c#1
Coalesced [85] init_screen::b#4 ← init_screen::b#1
Coalesced [26] plots::i#5 ← plots::i#1
Coalesced [61] init_plot_tables::yoffs#7 ← init_plot_tables::yoffs#1
Coalesced [66] init_plot_tables::y#5 ← init_plot_tables::y#1
Coalesced [67] init_plot_tables::yoffs#5 ← init_plot_tables::yoffs#4
Coalesced (already) [68] init_plot_tables::yoffs#6 ← init_plot_tables::yoffs#2
Coalesced [69] init_plot_tables::x#5 ← init_plot_tables::x#1
Coalesced [70] init_plot_tables::bits#5 ← init_plot_tables::bits#4
Coalesced [71] init_plot_tables::bits#6 ← init_plot_tables::bits#1
Coalesced [81] init_screen::c#4 ← init_screen::c#1
Coalesced [84] init_screen::b#4 ← init_screen::b#1
Coalesced down to 7 phi equivalence classes
Culled Empty Block (label) @1
Culled Empty Block (label) @2
Culled Empty Block (label) @6
Culled Empty Block (label) main::@6

View File

@ -44,8 +44,8 @@ main: scope:[main] from @1
[35] *((const byte*) DTV_BLITTER_CONTROL2) ← (const byte) DTV_BLIT_DEST_CONT
to:main::@1
main::@1: scope:[main] from main main::@1
[36] (byte~) main::$2 ← *((const byte*) DTV_BLITTER_CONTROL2) & (const byte) DTV_BLIT_STATUS_BUSY
[37] if((byte~) main::$2!=(byte) 0) goto main::@1
[36] (byte~) main::$0 ← *((const byte*) DTV_BLITTER_CONTROL2) & (const byte) DTV_BLIT_STATUS_BUSY
[37] if((byte~) main::$0!=(byte) 0) goto main::@1
to:main::@return
main::@return: scope:[main] from main::@1
[38] return

View File

@ -5,13 +5,11 @@ Culled Empty Block (label) @1
Culled Empty Block (label) @2
Culled Empty Block (label) @3
Culled Empty Block (label) @4
Culled Empty Block (label) @5
Culled Empty Block (label) main::@2
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
to:@5
@5: scope:[] from @begin
(byte[]) SRCB ← { (number) $80 }
to:@6
(void()) main()
@ -26,10 +24,8 @@ main: scope:[main] from @6
*((const byte*) DTV_BLITTER_SRCA_LIN_LO) ← <(word) $100
*((const byte*) DTV_BLITTER_SRCA_LIN_HI) ← >(word) $100
*((const byte*) DTV_BLITTER_SRCA_STEP) ← (number) 1
(byte~) main::$0 ← < (byte[]) SRCB
*((const byte*) DTV_BLITTER_SRCB_LO) ← (byte~) main::$0
(byte~) main::$1 ← > (byte[]) SRCB
*((const byte*) DTV_BLITTER_SRCB_MI) ← (byte~) main::$1
*((const byte*) DTV_BLITTER_SRCB_LO) ← <(const byte[]) SRCB
*((const byte*) DTV_BLITTER_SRCB_MI) ← >(const byte[]) SRCB
*((const byte*) DTV_BLITTER_SRCB_HI) ← (number) 0
*((const byte*) DTV_BLITTER_SRCB_MOD_LO) ← (number) 0
*((const byte*) DTV_BLITTER_SRCB_MOD_HI) ← (number) 0
@ -52,14 +48,14 @@ main: scope:[main] from @6
*((const byte*) DTV_BLITTER_CONTROL2) ← (const byte) DTV_BLIT_DEST_CONT
to:main::@1
main::@1: scope:[main] from main main::@1
(byte~) main::$2 ← *((const byte*) DTV_BLITTER_CONTROL2) & (const byte) DTV_BLIT_STATUS_BUSY
(bool~) main::$3 ← (byte~) main::$2 != (number) 0
if((bool~) main::$3) goto main::@1
(byte~) main::$0 ← *((const byte*) DTV_BLITTER_CONTROL2) & (const byte) DTV_BLIT_STATUS_BUSY
(bool~) main::$1 ← (byte~) main::$0 != (number) 0
if((bool~) main::$1) goto main::@1
to:main::@return
main::@return: scope:[main] from main::@1
return
to:@return
@6: scope:[] from @5
@6: scope:[] from @begin
call main
to:@7
@7: scope:[] from @6
@ -67,7 +63,6 @@ main::@return: scope:[main] from main::@1
@end: scope:[] from @7
SYMBOL TABLE SSA
(label) @5
(label) @6
(label) @7
(label) @begin
@ -115,12 +110,10 @@ SYMBOL TABLE SSA
(const byte) DTV_FEATURE_ENABLE = (number) 1
(const byte*) SCREEN = (byte*)(number) $400
(const byte[]) SRCA = (string) "camelot rules!"
(byte[]) SRCB
(const byte[]) SRCB = { (byte)(number) $80 }
(void()) main()
(byte~) main::$0
(byte~) main::$1
(byte~) main::$2
(bool~) main::$3
(bool~) main::$1
(label) main::@1
(label) main::@return
@ -142,10 +135,8 @@ Adding number conversion cast (unumber) <$14*$a in *((const byte*) DTV_BLITTER_L
Adding number conversion cast (unumber) $14 in *((const byte*) DTV_BLITTER_LEN_LO) ← ((unumber)) <(number) $14*(word) $a
Adding number conversion cast (unumber) >$14*$a in *((const byte*) DTV_BLITTER_LEN_HI) ← >(number) $14*(word) $a
Adding number conversion cast (unumber) $14 in *((const byte*) DTV_BLITTER_LEN_HI) ← ((unumber)) >(number) $14*(word) $a
Adding number conversion cast (unumber) 0 in (bool~) main::$3 ← (byte~) main::$2 != (number) 0
Adding number conversion cast (unumber) 0 in (bool~) main::$1 ← (byte~) main::$0 != (number) 0
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (byte[]) SRCB ← (byte[]){ (byte)(number) $80 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast *((const byte*) DTV_BLITTER_SRCA_HI) ← (unumber)(number) 0
Inlining cast *((const byte*) DTV_BLITTER_SRCA_MOD_LO) ← (unumber)(number) 0
Inlining cast *((const byte*) DTV_BLITTER_SRCA_MOD_HI) ← (unumber)(number) 0
@ -190,8 +181,8 @@ Simplifying constant pointer cast (byte*) 54074
Simplifying constant pointer cast (byte*) 54075
Simplifying constant pointer cast (byte*) 54079
Simplifying constant pointer cast (byte*) 1024
Simplifying constant pointer cast (byte*) 54078
Simplifying constant integer cast $80
Simplifying constant pointer cast (byte*) 54078
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
@ -230,38 +221,23 @@ Finalized unsigned number type (byte) $14
Finalized unsigned number type (byte) $14
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Simple Condition (bool~) main::$3 [37] if((byte~) main::$2!=(byte) 0) goto main::@1
Simple Condition (bool~) main::$1 [34] if((byte~) main::$0!=(byte) 0) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Identified constant from value list (byte[]) { (byte) $80 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const byte[]) SRCB = { $80 }
Successful SSA optimization Pass2ConstantIdentification
Simplifying constant evaluating to zero <(word) $100 in [8] *((const byte*) DTV_BLITTER_SRCA_LIN_LO) ← <(word) $100
Simplifying constant evaluating to zero <(word) $100 in [18] *((const byte*) DTV_BLITTER_SRCB_LIN_LO) ← <(word) $100
Simplifying constant evaluating to zero >(word) $15 in [25] *((const byte*) DTV_BLITTER_DEST_MOD_HI) ← >(word) $15
Simplifying constant evaluating to zero >(word) $13 in [27] *((const byte*) DTV_BLITTER_DEST_LIN_HI) ← >(word) $13
Simplifying constant evaluating to zero >(byte) $14*(word) $a in [30] *((const byte*) DTV_BLITTER_LEN_HI) ← >(byte) $14*(word) $a
Simplifying constant evaluating to zero <(word) $100 in [7] *((const byte*) DTV_BLITTER_SRCA_LIN_LO) ← <(word) $100
Simplifying constant evaluating to zero <(word) $100 in [15] *((const byte*) DTV_BLITTER_SRCB_LIN_LO) ← <(word) $100
Simplifying constant evaluating to zero >(word) $15 in [22] *((const byte*) DTV_BLITTER_DEST_MOD_HI) ← >(word) $15
Simplifying constant evaluating to zero >(word) $13 in [24] *((const byte*) DTV_BLITTER_DEST_LIN_HI) ← >(word) $13
Simplifying constant evaluating to zero >(byte) $14*(word) $a in [27] *((const byte*) DTV_BLITTER_LEN_HI) ← >(byte) $14*(word) $a
Successful SSA optimization PassNSimplifyConstantZero
Constant right-side identified [10] (byte~) main::$0 ← < (const byte[]) SRCB
Constant right-side identified [12] (byte~) main::$1 ← > (const byte[]) SRCB
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::$0 = <SRCB
Constant (const byte) main::$1 = >SRCB
Successful SSA optimization Pass2ConstantIdentification
Constant inlined main::$1 = >(const byte[]) SRCB
Constant inlined main::$0 = <(const byte[]) SRCB
Successful SSA optimization Pass2ConstantInlining
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @5
Adding NOP phi() at start of @6
Adding NOP phi() at start of @7
Adding NOP phi() at start of @end
CALL GRAPH
Calls in [] to main:3
Calls in [] to main:2
Created 0 initial phi equivalence classes
Coalesced down to 0 phi equivalence classes
Culled Empty Block (label) @5
Culled Empty Block (label) @7
Renumbering block @6 to @1
Adding NOP phi() at start of @begin
@ -315,8 +291,8 @@ main: scope:[main] from @1
[35] *((const byte*) DTV_BLITTER_CONTROL2) ← (const byte) DTV_BLIT_DEST_CONT
to:main::@1
main::@1: scope:[main] from main main::@1
[36] (byte~) main::$2 ← *((const byte*) DTV_BLITTER_CONTROL2) & (const byte) DTV_BLIT_STATUS_BUSY
[37] if((byte~) main::$2!=(byte) 0) goto main::@1
[36] (byte~) main::$0 ← *((const byte*) DTV_BLITTER_CONTROL2) & (const byte) DTV_BLIT_STATUS_BUSY
[37] if((byte~) main::$0!=(byte) 0) goto main::@1
to:main::@return
main::@return: scope:[main] from main::@1
[38] return
@ -325,13 +301,13 @@ main::@return: scope:[main] from main::@1
VARIABLE REGISTER WEIGHTS
(void()) main()
(byte~) main::$2 22.0
(byte~) main::$0 22.0
Initial phi equivalence classes
Added variable main::$2 to zero page equivalence class [ main::$2 ]
Added variable main::$0 to zero page equivalence class [ main::$0 ]
Complete equivalence classes
[ main::$2 ]
Allocated zp[1]:2 [ main::$2 ]
[ main::$0 ]
Allocated zp[1]:2 [ main::$0 ]
INITIAL ASM
Target platform is c64basic / MOS6502X
@ -427,7 +403,7 @@ __bend_from___b1:
__bend:
// main
main: {
.label __2 = 2
.label __0 = 2
// [4] *((const byte*) DTV_FEATURE) ← (const byte) DTV_FEATURE_ENABLE -- _deref_pbuc1=vbuc2
lda #DTV_FEATURE_ENABLE
sta DTV_FEATURE
@ -534,12 +510,12 @@ main: {
// wait til blitter is ready
// main::@1
__b1:
// [36] (byte~) main::$2 ← *((const byte*) DTV_BLITTER_CONTROL2) & (const byte) DTV_BLIT_STATUS_BUSY -- vbuz1=_deref_pbuc1_band_vbuc2
// [36] (byte~) main::$0 ← *((const byte*) DTV_BLITTER_CONTROL2) & (const byte) DTV_BLIT_STATUS_BUSY -- vbuz1=_deref_pbuc1_band_vbuc2
lda #DTV_BLIT_STATUS_BUSY
and DTV_BLITTER_CONTROL2
sta.z __2
// [37] if((byte~) main::$2!=(byte) 0) goto main::@1 -- vbuz1_neq_0_then_la1
lda.z __2
sta.z __0
// [37] if((byte~) main::$0!=(byte) 0) goto main::@1 -- vbuz1_neq_0_then_la1
lda.z __0
cmp #0
bne __b1
jmp __breturn
@ -586,14 +562,14 @@ Statement [32] *((const byte*) DTV_BLITTER_ALU) ← (const byte) DTV_BLIT_ADD [
Statement [33] *((const byte*) DTV_BLITTER_TRANSPARANCY) ← (const byte) DTV_BLIT_TRANSPARANCY_NONE [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [34] *((const byte*) DTV_BLITTER_CONTROL) ← (const byte) DTV_BLIT_FORCE_START|(const byte) DTV_BLIT_SRCA_FWD|(const byte) DTV_BLIT_SRCB_FWD|(const byte) DTV_BLIT_DEST_FWD [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [35] *((const byte*) DTV_BLITTER_CONTROL2) ← (const byte) DTV_BLIT_DEST_CONT [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [36] (byte~) main::$2 ← *((const byte*) DTV_BLITTER_CONTROL2) & (const byte) DTV_BLIT_STATUS_BUSY [ main::$2 ] ( main:2 [ main::$2 ] ) always clobbers reg byte a
Potential registers zp[1]:2 [ main::$2 ] : zp[1]:2 , reg byte a , reg byte x , reg byte y ,
Statement [36] (byte~) main::$0 ← *((const byte*) DTV_BLITTER_CONTROL2) & (const byte) DTV_BLIT_STATUS_BUSY [ main::$0 ] ( main:2 [ main::$0 ] ) always clobbers reg byte a
Potential registers zp[1]:2 [ main::$0 ] : zp[1]:2 , reg byte a , reg byte x , reg byte y ,
REGISTER UPLIFT SCOPES
Uplift Scope [main] 22: zp[1]:2 [ main::$2 ]
Uplift Scope [main] 22: zp[1]:2 [ main::$0 ]
Uplift Scope []
Uplifting [main] best 348 combination reg byte a [ main::$2 ]
Uplifting [main] best 348 combination reg byte a [ main::$0 ]
Uplifting [] best 348 combination
ASSEMBLER BEFORE OPTIMIZATION
@ -795,10 +771,10 @@ main: {
// wait til blitter is ready
// main::@1
__b1:
// [36] (byte~) main::$2 ← *((const byte*) DTV_BLITTER_CONTROL2) & (const byte) DTV_BLIT_STATUS_BUSY -- vbuaa=_deref_pbuc1_band_vbuc2
// [36] (byte~) main::$0 ← *((const byte*) DTV_BLITTER_CONTROL2) & (const byte) DTV_BLIT_STATUS_BUSY -- vbuaa=_deref_pbuc1_band_vbuc2
lda #DTV_BLIT_STATUS_BUSY
and DTV_BLITTER_CONTROL2
// [37] if((byte~) main::$2!=(byte) 0) goto main::@1 -- vbuaa_neq_0_then_la1
// [37] if((byte~) main::$0!=(byte) 0) goto main::@1 -- vbuaa_neq_0_then_la1
cmp #0
bne __b1
jmp __breturn
@ -888,11 +864,11 @@ FINAL SYMBOL TABLE
(const byte[]) SRCA = (string) "camelot rules!"
(const byte[]) SRCB = { (byte) $80 }
(void()) main()
(byte~) main::$2 reg byte a 22.0
(byte~) main::$0 reg byte a 22.0
(label) main::@1
(label) main::@return
reg byte a [ main::$2 ]
reg byte a [ main::$0 ]
FINAL ASSEMBLER
@ -1114,11 +1090,11 @@ main: {
// main::@1
__b1:
// *DTV_BLITTER_CONTROL2 & DTV_BLIT_STATUS_BUSY
// [36] (byte~) main::$2 ← *((const byte*) DTV_BLITTER_CONTROL2) & (const byte) DTV_BLIT_STATUS_BUSY -- vbuaa=_deref_pbuc1_band_vbuc2
// [36] (byte~) main::$0 ← *((const byte*) DTV_BLITTER_CONTROL2) & (const byte) DTV_BLIT_STATUS_BUSY -- vbuaa=_deref_pbuc1_band_vbuc2
lda #DTV_BLIT_STATUS_BUSY
and DTV_BLITTER_CONTROL2
// while((*DTV_BLITTER_CONTROL2 & DTV_BLIT_STATUS_BUSY)!=0)
// [37] if((byte~) main::$2!=(byte) 0) goto main::@1 -- vbuaa_neq_0_then_la1
// [37] if((byte~) main::$0!=(byte) 0) goto main::@1 -- vbuaa_neq_0_then_la1
cmp #0
bne __b1
// main::@return

View File

@ -46,8 +46,8 @@
(const byte[]) SRCA = (string) "camelot rules!"
(const byte[]) SRCB = { (byte) $80 }
(void()) main()
(byte~) main::$2 reg byte a 22.0
(byte~) main::$0 reg byte a 22.0
(label) main::@1
(label) main::@return
reg byte a [ main::$2 ]
reg byte a [ main::$0 ]

View File

@ -147,5 +147,5 @@ main: {
bne __b1
rts
}
SRCA: .byte 'c', 'a', 'm', 'e', 'l', 'o', 't', '!', ' '
SRCB: .byte $80
SRCA: .byte 'c', 'a', 'm', 'e', 'l', 'o', 't', '!', ' '

View File

@ -45,8 +45,8 @@ main: scope:[main] from @1
to:main::@1
main::@1: scope:[main] from main main::@1 main::@2
[36] (byte) main::r#2 ← phi( main/(byte) 0 main::@1/(byte) main::r#2 main::@2/(byte) main::r#1 )
[37] (byte~) main::$4 ← *((const byte*) DTV_BLITTER_CONTROL2) & (const byte) DTV_BLIT_STATUS_BUSY
[38] if((byte~) main::$4!=(byte) 0) goto main::@1
[37] (byte~) main::$2 ← *((const byte*) DTV_BLITTER_CONTROL2) & (const byte) DTV_BLIT_STATUS_BUSY
[38] if((byte~) main::$2!=(byte) 0) goto main::@1
to:main::@2
main::@2: scope:[main] from main::@1
[39] *((const byte*) DTV_BLITTER_CONTROL) ← (const byte) DTV_BLIT_FORCE_START|(const byte) DTV_BLIT_SRCA_FWD|(const byte) DTV_BLIT_SRCB_FWD|(const byte) DTV_BLIT_DEST_FWD

View File

@ -13,7 +13,6 @@ CONTROL FLOW GRAPH SSA
to:@5
@5: scope:[] from @begin
(byte[]) SRCA ← { (byte) 'c', (byte) 'a', (byte) 'm', (byte) 'e', (byte) 'l', (byte) 'o', (byte) 't', (byte) '!', (byte) ' ' }
(byte[]) SRCB ← { (number) $80 }
to:@6
(void()) main()
@ -30,10 +29,8 @@ main: scope:[main] from @6
*((const byte*) DTV_BLITTER_SRCA_LIN_LO) ← <(word) $100
*((const byte*) DTV_BLITTER_SRCA_LIN_HI) ← >(word) $100
*((const byte*) DTV_BLITTER_SRCA_STEP) ← (number) $10
(byte~) main::$2 ← < (byte[]) SRCB
*((const byte*) DTV_BLITTER_SRCB_LO) ← (byte~) main::$2
(byte~) main::$3 ← > (byte[]) SRCB
*((const byte*) DTV_BLITTER_SRCB_MI) ← (byte~) main::$3
*((const byte*) DTV_BLITTER_SRCB_LO) ← <(const byte[]) SRCB
*((const byte*) DTV_BLITTER_SRCB_MI) ← >(const byte[]) SRCB
*((const byte*) DTV_BLITTER_SRCB_HI) ← (number) 0
*((const byte*) DTV_BLITTER_SRCB_MOD_LO) ← (number) 0
*((const byte*) DTV_BLITTER_SRCB_MOD_HI) ← (number) 0
@ -58,16 +55,16 @@ main: scope:[main] from @6
to:main::@2
main::@2: scope:[main] from main main::@2 main::@3
(byte) main::r#3 ← phi( main/(byte) main::r#0 main::@2/(byte) main::r#3 main::@3/(byte) main::r#1 )
(byte~) main::$4 ← *((const byte*) DTV_BLITTER_CONTROL2) & (const byte) DTV_BLIT_STATUS_BUSY
(bool~) main::$5 ← (byte~) main::$4 != (number) 0
if((bool~) main::$5) goto main::@2
(byte~) main::$2 ← *((const byte*) DTV_BLITTER_CONTROL2) & (const byte) DTV_BLIT_STATUS_BUSY
(bool~) main::$3 ← (byte~) main::$2 != (number) 0
if((bool~) main::$3) goto main::@2
to:main::@3
main::@3: scope:[main] from main::@2
(byte) main::r#2 ← phi( main::@2/(byte) main::r#3 )
*((const byte*) DTV_BLITTER_CONTROL) ← (const byte) DTV_BLIT_FORCE_START|(const byte) DTV_BLIT_SRCA_FWD|(const byte) DTV_BLIT_SRCB_FWD|(const byte) DTV_BLIT_DEST_FWD
(byte) main::r#1 ← (byte) main::r#2 + rangenext(0,7)
(bool~) main::$6 ← (byte) main::r#1 != rangelast(0,7)
if((bool~) main::$6) goto main::@2
(bool~) main::$4 ← (byte) main::r#1 != rangelast(0,7)
if((bool~) main::$4) goto main::@2
to:main::@return
main::@return: scope:[main] from main::@3
return
@ -129,15 +126,13 @@ SYMBOL TABLE SSA
(const byte*) SCREEN = (byte*)(number) $400
(byte[]) SRCA
(const byte) SRCA_LEN = (number) 9
(byte[]) SRCB
(const byte[]) SRCB = { (byte)(number) $80 }
(void()) main()
(byte~) main::$0
(byte~) main::$1
(byte~) main::$2
(byte~) main::$3
(byte~) main::$4
(bool~) main::$5
(bool~) main::$6
(bool~) main::$3
(bool~) main::$4
(label) main::@2
(label) main::@3
(label) main::@return
@ -160,10 +155,8 @@ Adding number conversion cast (unumber) 0 in *((const byte*) DTV_BLITTER_DEST_MO
Adding number conversion cast (unumber) 0 in *((const byte*) DTV_BLITTER_DEST_MOD_HI) ← (number) 0
Adding number conversion cast (unumber) $10 in *((const byte*) DTV_BLITTER_DEST_STEP) ← (number) $10
Adding number conversion cast (unumber) 0 in *((const byte*) DTV_BLITTER_LEN_HI) ← (number) 0
Adding number conversion cast (unumber) 0 in (bool~) main::$5 ← (byte~) main::$4 != (number) 0
Adding number conversion cast (unumber) 0 in (bool~) main::$3 ← (byte~) main::$2 != (number) 0
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (byte[]) SRCB ← (byte[]){ (byte)(number) $80 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast *((const byte*) DTV_BLITTER_SRCA_HI) ← (unumber)(number) 0
Inlining cast *((const byte*) DTV_BLITTER_SRCA_MOD_LO) ← (unumber)(number) 0
Inlining cast *((const byte*) DTV_BLITTER_SRCA_MOD_HI) ← (unumber)(number) 0
@ -209,8 +202,8 @@ Simplifying constant pointer cast (byte*) 54074
Simplifying constant pointer cast (byte*) 54075
Simplifying constant pointer cast (byte*) 54079
Simplifying constant pointer cast (byte*) 1024
Simplifying constant pointer cast (byte*) 54078
Simplifying constant integer cast $80
Simplifying constant pointer cast (byte*) 54078
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
@ -243,22 +236,20 @@ Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias (byte) main::r#2 = (byte) main::r#3
Successful SSA optimization Pass2AliasElimination
Simple Condition (bool~) main::$5 [42] if((byte~) main::$4!=(byte) 0) goto main::@2
Simple Condition (bool~) main::$6 [47] if((byte) main::r#1!=rangelast(0,7)) goto main::@2
Simple Condition (bool~) main::$3 [39] if((byte~) main::$2!=(byte) 0) goto main::@2
Simple Condition (bool~) main::$4 [44] if((byte) main::r#1!=rangelast(0,7)) goto main::@2
Successful SSA optimization Pass2ConditionalJumpSimplification
Identified constant from value list (byte[]) { (byte) 'c', (byte) 'a', (byte) 'm', (byte) 'e', (byte) 'l', (byte) 'o', (byte) 't', (byte) '!', (byte) ' ' }
Identified constant from value list (byte[]) { (byte) $80 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const byte[]) SRCA = { 'c', 'a', 'm', 'e', 'l', 'o', 't', '!', ' ' }
Constant (const byte[]) SRCB = { $80 }
Constant (const byte) main::r#0 = 0
Successful SSA optimization Pass2ConstantIdentification
Resolved ranged next value [45] main::r#1 ← ++ main::r#2 to ++
Resolved ranged comparison value [47] if(main::r#1!=rangelast(0,7)) goto main::@2 to (number) 8
Simplifying constant evaluating to zero <(word) $100 in [11] *((const byte*) DTV_BLITTER_SRCA_LIN_LO) ← <(word) $100
Simplifying constant evaluating to zero <(word) $100 in [21] *((const byte*) DTV_BLITTER_SRCB_LIN_LO) ← <(word) $100
Simplifying constant evaluating to zero <(const byte*) SCREEN in [24] *((const byte*) DTV_BLITTER_DEST_LO) ← <(const byte*) SCREEN
Simplifying constant evaluating to zero <(word) $100 in [29] *((const byte*) DTV_BLITTER_DEST_LIN_LO) ← <(word) $100
Resolved ranged next value [42] main::r#1 ← ++ main::r#2 to ++
Resolved ranged comparison value [44] if(main::r#1!=rangelast(0,7)) goto main::@2 to (number) 8
Simplifying constant evaluating to zero <(word) $100 in [10] *((const byte*) DTV_BLITTER_SRCA_LIN_LO) ← <(word) $100
Simplifying constant evaluating to zero <(word) $100 in [18] *((const byte*) DTV_BLITTER_SRCB_LIN_LO) ← <(word) $100
Simplifying constant evaluating to zero <(const byte*) SCREEN in [21] *((const byte*) DTV_BLITTER_DEST_LO) ← <(const byte*) SCREEN
Simplifying constant evaluating to zero <(word) $100 in [26] *((const byte*) DTV_BLITTER_DEST_LIN_LO) ← <(word) $100
Successful SSA optimization PassNSimplifyConstantZero
Adding number conversion cast (unumber) 8 in if((byte) main::r#1!=(number) 8) goto main::@2
Successful SSA optimization PassNAddNumberTypeConversions
@ -268,19 +259,13 @@ Finalized unsigned number type (byte) 8
Successful SSA optimization PassNFinalizeNumberTypeConversions
Constant right-side identified [2] (byte~) main::$0 ← < (const byte[]) SRCA
Constant right-side identified [4] (byte~) main::$1 ← > (const byte[]) SRCA
Constant right-side identified [12] (byte~) main::$2 ← < (const byte[]) SRCB
Constant right-side identified [14] (byte~) main::$3 ← > (const byte[]) SRCB
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::$0 = <SRCA
Constant (const byte) main::$1 = >SRCA
Constant (const byte) main::$2 = <SRCB
Constant (const byte) main::$3 = >SRCB
Successful SSA optimization Pass2ConstantIdentification
Inlining constant with var siblings (const byte) main::r#0
Constant inlined main::r#0 = (byte) 0
Constant inlined main::$3 = >(const byte[]) SRCB
Constant inlined main::$1 = >(const byte[]) SRCA
Constant inlined main::$2 = <(const byte[]) SRCB
Constant inlined main::r#0 = (byte) 0
Constant inlined main::$0 = <(const byte[]) SRCA
Successful SSA optimization Pass2ConstantInlining
Added new block during phi lifting main::@5(between main::@2 and main::@2)
@ -356,8 +341,8 @@ main: scope:[main] from @1
to:main::@1
main::@1: scope:[main] from main main::@1 main::@2
[36] (byte) main::r#2 ← phi( main/(byte) 0 main::@1/(byte) main::r#2 main::@2/(byte) main::r#1 )
[37] (byte~) main::$4 ← *((const byte*) DTV_BLITTER_CONTROL2) & (const byte) DTV_BLIT_STATUS_BUSY
[38] if((byte~) main::$4!=(byte) 0) goto main::@1
[37] (byte~) main::$2 ← *((const byte*) DTV_BLITTER_CONTROL2) & (const byte) DTV_BLIT_STATUS_BUSY
[38] if((byte~) main::$2!=(byte) 0) goto main::@1
to:main::@2
main::@2: scope:[main] from main::@1
[39] *((const byte*) DTV_BLITTER_CONTROL) ← (const byte) DTV_BLIT_FORCE_START|(const byte) DTV_BLIT_SRCA_FWD|(const byte) DTV_BLIT_SRCB_FWD|(const byte) DTV_BLIT_DEST_FWD
@ -371,19 +356,19 @@ main::@return: scope:[main] from main::@2
VARIABLE REGISTER WEIGHTS
(void()) main()
(byte~) main::$4 202.0
(byte~) main::$2 202.0
(byte) main::r
(byte) main::r#1 16.5
(byte) main::r#2 56.0
Initial phi equivalence classes
[ main::r#2 main::r#1 ]
Added variable main::$4 to zero page equivalence class [ main::$4 ]
Added variable main::$2 to zero page equivalence class [ main::$2 ]
Complete equivalence classes
[ main::r#2 main::r#1 ]
[ main::$4 ]
[ main::$2 ]
Allocated zp[1]:2 [ main::r#2 main::r#1 ]
Allocated zp[1]:3 [ main::$4 ]
Allocated zp[1]:3 [ main::$2 ]
INITIAL ASM
Target platform is c64basic / MOS6502X
@ -479,7 +464,7 @@ __bend_from___b1:
__bend:
// main
main: {
.label __4 = 3
.label __2 = 3
.label r = 2
// [4] *((const byte*) DTV_FEATURE) ← (const byte) DTV_FEATURE_ENABLE -- _deref_pbuc1=vbuc2
lda #DTV_FEATURE_ENABLE
@ -597,12 +582,12 @@ main: {
jmp __b1
// main::@1
__b1:
// [37] (byte~) main::$4 ← *((const byte*) DTV_BLITTER_CONTROL2) & (const byte) DTV_BLIT_STATUS_BUSY -- vbuz1=_deref_pbuc1_band_vbuc2
// [37] (byte~) main::$2 ← *((const byte*) DTV_BLITTER_CONTROL2) & (const byte) DTV_BLIT_STATUS_BUSY -- vbuz1=_deref_pbuc1_band_vbuc2
lda #DTV_BLIT_STATUS_BUSY
and DTV_BLITTER_CONTROL2
sta.z __4
// [38] if((byte~) main::$4!=(byte) 0) goto main::@1 -- vbuz1_neq_0_then_la1
lda.z __4
sta.z __2
// [38] if((byte~) main::$2!=(byte) 0) goto main::@1 -- vbuz1_neq_0_then_la1
lda.z __2
cmp #0
bne __b1_from___b1
jmp __b2
@ -625,8 +610,8 @@ main: {
rts
}
// File Data
SRCA: .byte 'c', 'a', 'm', 'e', 'l', 'o', 't', '!', ' '
SRCB: .byte $80
SRCA: .byte 'c', 'a', 'm', 'e', 'l', 'o', 't', '!', ' '
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [4] *((const byte*) DTV_FEATURE) ← (const byte) DTV_FEATURE_ENABLE [ ] ( main:2 [ ] ) always clobbers reg byte a
@ -661,7 +646,7 @@ Statement [32] *((const byte*) DTV_BLITTER_ALU) ← (const byte) DTV_BLIT_ADD [
Statement [33] *((const byte*) DTV_BLITTER_TRANSPARANCY) ← (const byte) DTV_BLIT_TRANSPARANCY_NONE [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [34] *((const byte*) DTV_BLITTER_CONTROL) ← (const byte) DTV_BLIT_FORCE_START|(const byte) DTV_BLIT_SRCA_FWD|(const byte) DTV_BLIT_SRCB_FWD|(const byte) DTV_BLIT_DEST_FWD [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [35] *((const byte*) DTV_BLITTER_CONTROL2) ← (const byte) DTV_BLIT_DEST_CONT [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [37] (byte~) main::$4 ← *((const byte*) DTV_BLITTER_CONTROL2) & (const byte) DTV_BLIT_STATUS_BUSY [ main::r#2 main::$4 ] ( main:2 [ main::r#2 main::$4 ] ) always clobbers reg byte a
Statement [37] (byte~) main::$2 ← *((const byte*) DTV_BLITTER_CONTROL2) & (const byte) DTV_BLIT_STATUS_BUSY [ main::r#2 main::$2 ] ( main:2 [ main::r#2 main::$2 ] ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp[1]:2 [ main::r#2 main::r#1 ]
Statement [39] *((const byte*) DTV_BLITTER_CONTROL) ← (const byte) DTV_BLIT_FORCE_START|(const byte) DTV_BLIT_SRCA_FWD|(const byte) DTV_BLIT_SRCB_FWD|(const byte) DTV_BLIT_DEST_FWD [ main::r#2 ] ( main:2 [ main::r#2 ] ) always clobbers reg byte a
Statement [4] *((const byte*) DTV_FEATURE) ← (const byte) DTV_FEATURE_ENABLE [ ] ( main:2 [ ] ) always clobbers reg byte a
@ -696,16 +681,16 @@ Statement [32] *((const byte*) DTV_BLITTER_ALU) ← (const byte) DTV_BLIT_ADD [
Statement [33] *((const byte*) DTV_BLITTER_TRANSPARANCY) ← (const byte) DTV_BLIT_TRANSPARANCY_NONE [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [34] *((const byte*) DTV_BLITTER_CONTROL) ← (const byte) DTV_BLIT_FORCE_START|(const byte) DTV_BLIT_SRCA_FWD|(const byte) DTV_BLIT_SRCB_FWD|(const byte) DTV_BLIT_DEST_FWD [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [35] *((const byte*) DTV_BLITTER_CONTROL2) ← (const byte) DTV_BLIT_DEST_CONT [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [37] (byte~) main::$4 ← *((const byte*) DTV_BLITTER_CONTROL2) & (const byte) DTV_BLIT_STATUS_BUSY [ main::r#2 main::$4 ] ( main:2 [ main::r#2 main::$4 ] ) always clobbers reg byte a
Statement [37] (byte~) main::$2 ← *((const byte*) DTV_BLITTER_CONTROL2) & (const byte) DTV_BLIT_STATUS_BUSY [ main::r#2 main::$2 ] ( main:2 [ main::r#2 main::$2 ] ) always clobbers reg byte a
Statement [39] *((const byte*) DTV_BLITTER_CONTROL) ← (const byte) DTV_BLIT_FORCE_START|(const byte) DTV_BLIT_SRCA_FWD|(const byte) DTV_BLIT_SRCB_FWD|(const byte) DTV_BLIT_DEST_FWD [ main::r#2 ] ( main:2 [ main::r#2 ] ) always clobbers reg byte a
Potential registers zp[1]:2 [ main::r#2 main::r#1 ] : zp[1]:2 , reg byte x , reg byte y ,
Potential registers zp[1]:3 [ main::$4 ] : zp[1]:3 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:3 [ main::$2 ] : zp[1]:3 , reg byte a , reg byte x , reg byte y ,
REGISTER UPLIFT SCOPES
Uplift Scope [main] 202: zp[1]:3 [ main::$4 ] 72.5: zp[1]:2 [ main::r#2 main::r#1 ]
Uplift Scope [main] 202: zp[1]:3 [ main::$2 ] 72.5: zp[1]:2 [ main::r#2 main::r#1 ]
Uplift Scope []
Uplifting [main] best 2515 combination reg byte a [ main::$4 ] reg byte x [ main::r#2 main::r#1 ]
Uplifting [main] best 2515 combination reg byte a [ main::$2 ] reg byte x [ main::r#2 main::r#1 ]
Uplifting [] best 2515 combination
ASSEMBLER BEFORE OPTIMIZATION
@ -916,10 +901,10 @@ main: {
jmp __b1
// main::@1
__b1:
// [37] (byte~) main::$4 ← *((const byte*) DTV_BLITTER_CONTROL2) & (const byte) DTV_BLIT_STATUS_BUSY -- vbuaa=_deref_pbuc1_band_vbuc2
// [37] (byte~) main::$2 ← *((const byte*) DTV_BLITTER_CONTROL2) & (const byte) DTV_BLIT_STATUS_BUSY -- vbuaa=_deref_pbuc1_band_vbuc2
lda #DTV_BLIT_STATUS_BUSY
and DTV_BLITTER_CONTROL2
// [38] if((byte~) main::$4!=(byte) 0) goto main::@1 -- vbuaa_neq_0_then_la1
// [38] if((byte~) main::$2!=(byte) 0) goto main::@1 -- vbuaa_neq_0_then_la1
cmp #0
bne __b1_from___b1
jmp __b2
@ -941,8 +926,8 @@ main: {
rts
}
// File Data
SRCA: .byte 'c', 'a', 'm', 'e', 'l', 'o', 't', '!', ' '
SRCB: .byte $80
SRCA: .byte 'c', 'a', 'm', 'e', 'l', 'o', 't', '!', ' '
ASSEMBLER OPTIMIZATIONS
Removing instruction jmp __b1
@ -1034,7 +1019,7 @@ FINAL SYMBOL TABLE
(const byte) SRCA_LEN = (number) 9
(const byte[]) SRCB = { (byte) $80 }
(void()) main()
(byte~) main::$4 reg byte a 202.0
(byte~) main::$2 reg byte a 202.0
(label) main::@1
(label) main::@2
(label) main::@return
@ -1043,7 +1028,7 @@ FINAL SYMBOL TABLE
(byte) main::r#2 reg byte x 56.0
reg byte x [ main::r#2 main::r#1 ]
reg byte a [ main::$4 ]
reg byte a [ main::$2 ]
FINAL ASSEMBLER
@ -1266,11 +1251,11 @@ main: {
// main::@1
__b1:
// *DTV_BLITTER_CONTROL2 & DTV_BLIT_STATUS_BUSY
// [37] (byte~) main::$4 ← *((const byte*) DTV_BLITTER_CONTROL2) & (const byte) DTV_BLIT_STATUS_BUSY -- vbuaa=_deref_pbuc1_band_vbuc2
// [37] (byte~) main::$2 ← *((const byte*) DTV_BLITTER_CONTROL2) & (const byte) DTV_BLIT_STATUS_BUSY -- vbuaa=_deref_pbuc1_band_vbuc2
lda #DTV_BLIT_STATUS_BUSY
and DTV_BLITTER_CONTROL2
// while((*DTV_BLITTER_CONTROL2 & DTV_BLIT_STATUS_BUSY)!=0)
// [38] if((byte~) main::$4!=(byte) 0) goto main::@1 -- vbuaa_neq_0_then_la1
// [38] if((byte~) main::$2!=(byte) 0) goto main::@1 -- vbuaa_neq_0_then_la1
cmp #0
bne __b1
// main::@2
@ -1291,6 +1276,6 @@ main: {
rts
}
// File Data
SRCA: .byte 'c', 'a', 'm', 'e', 'l', 'o', 't', '!', ' '
SRCB: .byte $80
SRCA: .byte 'c', 'a', 'm', 'e', 'l', 'o', 't', '!', ' '

View File

@ -47,7 +47,7 @@
(const byte) SRCA_LEN = (number) 9
(const byte[]) SRCB = { (byte) $80 }
(void()) main()
(byte~) main::$4 reg byte a 202.0
(byte~) main::$2 reg byte a 202.0
(label) main::@1
(label) main::@2
(label) main::@return
@ -56,4 +56,4 @@
(byte) main::r#2 reg byte x 56.0
reg byte x [ main::r#2 main::r#1 ]
reg byte a [ main::$4 ]
reg byte a [ main::$2 ]

View File

@ -26,7 +26,6 @@ main: scope:[main] from @6
asm { sei }
*((const byte*) DTV_FEATURE) ← (const byte) DTV_FEATURE_ENABLE
*((const byte*) DTV_CONTROL) ← (const byte) DTV_HIGHCOLOR|(const byte) DTV_BORDER_OFF|(const byte) DTV_BADLINE_OFF
(byte[$10]) main::palette ← { (number) 0, (number) 1, (number) 2, (number) 3, (number) 4, (number) 5, (number) 6, (number) 7, (number) 8, (number) 9, (number) $a, (number) $b, (number) $c, (number) $d, (number) $e, (number) $f }
to:main::@1
main::@1: scope:[main] from main main::@12
if(true) goto main::@4
@ -52,8 +51,8 @@ main::@11: scope:[main] from main::@10
to:main::@12
main::@12: scope:[main] from main::@11 main::@12
(byte) main::c#2 ← phi( main::@11/(byte) main::c#0 main::@12/(byte) main::c#1 )
*((const byte*) DTV_PALETTE + (byte) main::c#2) ← *((byte[$10]) main::palette + (byte) main::c#2)
*((byte[$10]) main::palette + (byte) main::c#2) ← ++ *((byte[$10]) main::palette + (byte) main::c#2)
*((const byte*) DTV_PALETTE + (byte) main::c#2) ← *((const byte[$10]) main::palette + (byte) main::c#2)
*((const byte[$10]) main::palette + (byte) main::c#2) ← ++ *((const byte[$10]) main::palette + (byte) main::c#2)
(byte) main::c#1 ← (byte) main::c#2 + rangenext(0,$f)
(bool~) main::$4 ← (byte) main::c#1 != rangelast(0,$f)
if((bool~) main::$4) goto main::@12
@ -97,7 +96,7 @@ SYMBOL TABLE SSA
(byte) main::c#0
(byte) main::c#1
(byte) main::c#2
(byte[$10]) main::palette
(const byte[$10]) main::palette = { (byte)(number) 0, (byte)(number) 1, (byte)(number) 2, (byte)(number) 3, (byte)(number) 4, (byte)(number) 5, (byte)(number) 6, (byte)(number) 7, (byte)(number) 8, (byte)(number) 9, (byte)(number) $a, (byte)(number) $b, (byte)(number) $c, (byte)(number) $d, (byte)(number) $e, (byte)(number) $f }
(byte) main::r
(byte) main::r#0
(byte) main::r#1
@ -106,8 +105,6 @@ SYMBOL TABLE SSA
Adding number conversion cast (unumber) $40 in (bool~) main::$0 ← *((const byte*) RASTER) != (number) $40
Adding number conversion cast (unumber) 0 in *((const byte*) BGCOL) ← (number) 0
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (byte[$10]) main::palette ← (byte[$10]){ (byte)(number) 0, (byte)(number) 1, (byte)(number) 2, (byte)(number) 3, (byte)(number) 4, (byte)(number) 5, (byte)(number) 6, (byte)(number) 7, (byte)(number) 8, (byte)(number) 9, (byte)(number) $a, (byte)(number) $b, (byte)(number) $c, (byte)(number) $d, (byte)(number) $e, (byte)(number) $f }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast *((const byte*) BGCOL) ← (unumber)(number) 0
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 53266
@ -137,22 +134,19 @@ Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) $40
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Simple Condition (bool~) main::$0 [6] if(*((const byte*) RASTER)!=(byte) $40) goto main::@4
Simple Condition (bool~) main::$2 [14] if((byte) main::r#1!=rangelast($31,$ff)) goto main::@10
Simple Condition (bool~) main::$4 [21] if((byte) main::c#1!=rangelast(0,$f)) goto main::@12
Simple Condition (bool~) main::$0 [5] if(*((const byte*) RASTER)!=(byte) $40) goto main::@4
Simple Condition (bool~) main::$2 [13] if((byte) main::r#1!=rangelast($31,$ff)) goto main::@10
Simple Condition (bool~) main::$4 [20] if((byte) main::c#1!=rangelast(0,$f)) goto main::@12
Successful SSA optimization Pass2ConditionalJumpSimplification
Identified constant from value list (byte[$10]) { (byte) 0, (byte) 1, (byte) 2, (byte) 3, (byte) 4, (byte) 5, (byte) 6, (byte) 7, (byte) 8, (byte) 9, (byte) $a, (byte) $b, (byte) $c, (byte) $d, (byte) $e, (byte) $f }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const byte[$10]) main::palette = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, $a, $b, $c, $d, $e, $f }
Constant (const byte) main::r#0 = $31
Constant (const byte) main::c#0 = 0
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [4] if(true) goto main::@4
if() condition always true - replacing block destination [3] if(true) goto main::@4
Successful SSA optimization Pass2ConstantIfs
Resolved ranged next value [12] main::r#1 ← ++ main::r#2 to ++
Resolved ranged comparison value [14] if(main::r#1!=rangelast($31,$ff)) goto main::@10 to (number) 0
Resolved ranged next value [19] main::c#1 ← ++ main::c#2 to ++
Resolved ranged comparison value [21] if(main::c#1!=rangelast(0,$f)) goto main::@12 to (number) $10
Resolved ranged next value [11] main::r#1 ← ++ main::r#2 to ++
Resolved ranged comparison value [13] if(main::r#1!=rangelast($31,$ff)) goto main::@10 to (number) 0
Resolved ranged next value [18] main::c#1 ← ++ main::c#2 to ++
Resolved ranged comparison value [20] if(main::c#1!=rangelast(0,$f)) goto main::@12 to (number) $10
Removing unused block main::@return
Successful SSA optimization Pass2EliminateUnusedBlocks
Adding number conversion cast (unumber) 0 in if((byte) main::r#1!=(number) 0) goto main::@10

View File

@ -126,6 +126,41 @@
.label FORM_SCREEN = $400
// Charset used for the FORM
.label FORM_CHARSET = $1800
.label form_ctrl_bmm = form_fields_val+1
.label form_ctrl_mcm = form_fields_val+2
.label form_ctrl_ecm = form_fields_val+3
.label form_ctrl_hicol = form_fields_val+4
.label form_ctrl_line = form_fields_val+5
.label form_ctrl_colof = form_fields_val+6
.label form_ctrl_chunk = form_fields_val+7
.label form_ctrl_borof = form_fields_val+8
.label form_ctrl_overs = form_fields_val+9
.label form_a_pattern = form_fields_val+$a
.label form_a_start_hi = form_fields_val+$b
.label form_a_start_lo = form_fields_val+$c
.label form_a_step_hi = form_fields_val+$d
.label form_a_step_lo = form_fields_val+$e
.label form_a_mod_hi = form_fields_val+$f
.label form_a_mod_lo = form_fields_val+$10
.label form_b_pattern = form_fields_val+$11
.label form_b_start_hi = form_fields_val+$12
.label form_b_start_lo = form_fields_val+$13
.label form_b_step_hi = form_fields_val+$14
.label form_b_step_lo = form_fields_val+$15
.label form_b_mod_hi = form_fields_val+$16
.label form_b_mod_lo = form_fields_val+$17
.label form_vic_screen = form_fields_val+$18
.label form_vic_gfx = form_fields_val+$19
.label form_vic_cols = form_fields_val+$1a
.label form_dtv_palet = form_fields_val+$1b
.label form_vic_bg0_hi = form_fields_val+$1c
.label form_vic_bg0_lo = form_fields_val+$1d
.label form_vic_bg1_hi = form_fields_val+$1e
.label form_vic_bg1_lo = form_fields_val+$1f
.label form_vic_bg2_hi = form_fields_val+$20
.label form_vic_bg2_lo = form_fields_val+$21
.label form_vic_bg3_hi = form_fields_val+$22
.label form_vic_bg3_lo = form_fields_val+$23
// The number of frames to use for a full blink cycle
.const FORM_CURSOR_BLINK = $28
// Number of form fields
@ -177,7 +212,7 @@ gfx_mode: {
.label vic_colors = 6
.label col = $b
.label cy = $a
lda form_fields_val+5
lda form_ctrl_line
cmp #0
beq b1
ldx #DTV_LINEAR
@ -185,35 +220,35 @@ gfx_mode: {
b1:
ldx #0
__b1:
lda form_fields_val+8
lda form_ctrl_borof
cmp #0
beq __b2
txa
ora #DTV_BORDER_OFF
tax
__b2:
lda form_fields_val+4
lda form_ctrl_hicol
cmp #0
beq __b3
txa
ora #DTV_HIGHCOLOR
tax
__b3:
lda form_fields_val+9
lda form_ctrl_overs
cmp #0
beq __b4
txa
ora #DTV_OVERSCAN
tax
__b4:
lda form_fields_val+6
lda form_ctrl_colof
cmp #0
beq __b5
txa
ora #DTV_COLORRAM_OFF
tax
__b5:
lda form_fields_val+7
lda form_ctrl_chunk
cmp #0
beq __b6
txa
@ -221,7 +256,7 @@ gfx_mode: {
tax
__b6:
stx DTV_CONTROL
lda form_fields_val+3
lda form_ctrl_ecm
cmp #0
beq b2
ldx #VIC_DEN|VIC_RSEL|3|VIC_ECM
@ -229,7 +264,7 @@ gfx_mode: {
b2:
ldx #VIC_DEN|VIC_RSEL|3
__b7:
lda form_fields_val+1
lda form_ctrl_bmm
cmp #0
beq __b8
txa
@ -237,7 +272,7 @@ gfx_mode: {
tax
__b8:
stx VIC_CONTROL
lda form_fields_val+2
lda form_ctrl_mcm
cmp #0
beq b3
lda #VIC_CSEL|VIC_MCM
@ -246,14 +281,14 @@ gfx_mode: {
lda #VIC_CSEL
__b9:
sta VIC_CONTROL2
lda form_fields_val+$b
lda form_a_start_hi
asl
asl
asl
asl
ora form_fields_val+$c
ora form_a_start_lo
tax
lda form_fields_val+$a
lda form_a_pattern
jsr get_plane
txa
clc
@ -282,30 +317,30 @@ gfx_mode: {
sta.z __26+1
lda.z __26
sta DTV_PLANEA_START_HI
lda form_fields_val+$d
lda form_a_step_hi
asl
asl
asl
asl
ora form_fields_val+$e
ora form_a_step_lo
sta DTV_PLANEA_STEP
lda form_fields_val+$f
lda form_a_mod_hi
asl
asl
asl
asl
ora form_fields_val+$10
ora form_a_mod_lo
sta DTV_PLANEA_MODULO_LO
lda #0
sta DTV_PLANEA_MODULO_HI
lda form_fields_val+$12
lda form_b_start_hi
asl
asl
asl
asl
ora form_fields_val+$13
ora form_b_start_lo
tax
lda form_fields_val+$11
lda form_b_pattern
jsr get_plane
txa
clc
@ -334,19 +369,19 @@ gfx_mode: {
sta.z __40+1
lda.z __40
sta DTV_PLANEB_START_HI
lda form_fields_val+$14
lda form_b_step_hi
asl
asl
asl
asl
ora form_fields_val+$15
ora form_b_step_lo
sta DTV_PLANEB_STEP
lda form_fields_val+$16
lda form_b_mod_hi
asl
asl
asl
asl
ora form_fields_val+$17
ora form_b_mod_lo
sta DTV_PLANEB_MODULO_LO
lda #0
sta DTV_PLANEB_MODULO_HI
@ -356,7 +391,7 @@ gfx_mode: {
// Set VIC Bank bits to output - all others to input
lda #3^VIC_SCREEN0/$4000
sta CIA2_PORT_A
lda form_fields_val+$18
lda form_vic_screen
jsr get_vic_screen
lda.z __52
and #<$3fff
@ -372,7 +407,7 @@ gfx_mode: {
bne !-
lda.z __53
sta.z __54
lda form_fields_val+$19
lda form_vic_gfx
jsr get_vic_charset
lda.z __57
and #<$3fff
@ -386,7 +421,7 @@ gfx_mode: {
// Set VIC Bank
// VIC memory
sta VIC_MEMORY
lda form_fields_val+$1a
lda form_vic_cols
jsr get_vic_screen
lda #0
sta.z cy
@ -418,36 +453,36 @@ gfx_mode: {
// Background colors
lda #0
sta BORDERCOL
lda form_fields_val+$1c
lda form_vic_bg0_hi
asl
asl
asl
asl
ora form_fields_val+$1d
ora form_vic_bg0_lo
sta BGCOL1
lda form_fields_val+$1e
lda form_vic_bg1_hi
asl
asl
asl
asl
ora form_fields_val+$1f
ora form_vic_bg1_lo
sta BGCOL2
lda form_fields_val+$20
lda form_vic_bg2_hi
asl
asl
asl
asl
ora form_fields_val+$21
ora form_vic_bg2_lo
sta BGCOL3
lda form_fields_val+$22
lda form_vic_bg3_hi
asl
asl
asl
asl
ora form_fields_val+$23
ora form_vic_bg3_lo
sta BGCOL4
// DTV Palette
lda form_fields_val+$1b
lda form_dtv_palet
cmp #0
beq b4
ldx #0
@ -2539,28 +2574,18 @@ keyboard_init: {
sta CIA1_PORT_B_DDR
rts
}
// Default vallues for the palette
DTV_PALETTE_DEFAULT: .byte 0, $f, $36, $be, $58, $db, $86, $ff, $29, $26, $3b, 5, 7, $df, $9a, $a
print_hextab: .text "0123456789abcdef"
// Keyboard row bitmask as expected by CIA#1 Port A when reading a specific keyboard matrix row (rows are numbered 0-7)
keyboard_matrix_row_bitmask: .byte $fe, $fd, $fb, $f7, $ef, $df, $bf, $7f
// Keyboard matrix column bitmasks for a specific keybooard matrix column when reading the keyboard. (columns are numbered 0-7)
keyboard_matrix_col_bitmask: .byte 1, 2, 4, 8, $10, $20, $40, $80
// Charset ROM
FORM_TEXT: .text " C64 DTV Graphics Mode Explorer @ @ PRESET 0 Standard Charset @ @ CONTROL PLANE A VIC II @ bmm 0 pattern p0 screen s0 @ mcm 0 start 00 gfx g0 @ ecm 0 step 00 colors c0 @ hicolor 0 modulo 00 @ linear 0 COLORS @ color off 0 PLANE B palet 0 @ chunky 0 pattern p0 bgcol0 00 @ border off 0 start 00 bgcol1 00 @ overscan 0 step 00 bgcol2 00 @ modulo 00 bgcol3 00 @"
.byte 0
FORM_COLS: .text "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@ @aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@ @ nnnnnnnnnnnn mmmmmmmmmm ooooooooo @ nnnnnnnnnnnn mmmmmmmmmm ooooooooo @ nnnnnnnnnnnn mmmmmmmmmm ooooooooo @ nnnnnnnnnnnn mmmmmmmmmm ooooooooo @ nnnnnnnnnnnn mmmmmmmmmm @ nnnnnnnnnnnn jjjjjjjjj @ nnnnnnnnnnnn mmmmmmmmmm jjjjjjjjj @ nnnnnnnnnnnn mmmmmmmmmm jjjjjjjjj @ nnnnnnnnnnnn mmmmmmmmmm jjjjjjjjj @ nnnnnnnnnnnn mmmmmmmmmm jjjjjjjjj @ nnnnnnnnnnnn mmmmmmmmmm jjjjjjjjj @ nnnnnnnnnnnn mmmmmmmmmm jjjjjjjjj @"
.byte 0
// Default vallues for the palette
DTV_PALETTE_DEFAULT: .byte 0, $f, $36, $be, $58, $db, $86, $ff, $29, $26, $3b, 5, 7, $df, $9a, $a
// Keyboard row bitmask as expected by CIA#1 Port A when reading a specific keyboard matrix row (rows are numbered 0-7)
keyboard_matrix_row_bitmask: .byte $fe, $fd, $fb, $f7, $ef, $df, $bf, $7f
// Keyboard matrix column bitmasks for a specific keybooard matrix column when reading the keyboard. (columns are numbered 0-7)
keyboard_matrix_col_bitmask: .byte 1, 2, 4, 8, $10, $20, $40, $80
// Keyboard event buffer. Contains keycodes for key presses/releases. Presses are represented by the keycode. Releases by keycode | $40. The buffer is filled by keyboard_scan()
keyboard_events: .fill 8, 0
// The values scanned values for each row. Set by keyboard_scan() and used by keyboard_get_event()
keyboard_scan_values: .fill 8, 0
// Tables for the plotter - initialized by calling bitmap_draw_init();
bitmap_plot_xlo: .fill $100, 0
bitmap_plot_xhi: .fill $100, 0
bitmap_plot_ylo: .fill $100, 0
bitmap_plot_yhi: .fill $100, 0
bitmap_plot_bit: .fill $100, 0
// Form fields x/y-positions
form_fields_x: .byte 8, $c, $c, $c, $c, $c, $c, $c, $c, $c, $19, $18, $19, $18, $19, $18, $19, $19, $18, $19, $18, $19, $18, $19, $25, $25, $25, $25, $24, $25, $24, $25, $24, $25, $24, $25
form_fields_y: .byte 2, 5, 6, 7, 8, 9, $a, $b, $c, $d, 5, 6, 6, 7, 7, 8, 8, $b, $c, $c, $d, $d, $e, $e, 5, 6, 7, $a, $b, $b, $c, $c, $d, $d, $e, $e
@ -2590,6 +2615,16 @@ keyboard_init: {
preset_sixsfred2: .byte 9, 1, 1, 1, 0, 1, 0, 0, 0, 0, 9, 0, 0, 0, 1, 0, 0, $a, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0
// Preset: 8bpp Pixel Cell
preset_8bpppixelcell: .byte $a, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, $b, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0
// Keyboard event buffer. Contains keycodes for key presses/releases. Presses are represented by the keycode. Releases by keycode | $40. The buffer is filled by keyboard_scan()
keyboard_events: .fill 8, 0
// The values scanned values for each row. Set by keyboard_scan() and used by keyboard_get_event()
keyboard_scan_values: .fill 8, 0
// Tables for the plotter - initialized by calling bitmap_draw_init();
bitmap_plot_xlo: .fill $100, 0
bitmap_plot_xhi: .fill $100, 0
bitmap_plot_ylo: .fill $100, 0
bitmap_plot_yhi: .fill $100, 0
bitmap_plot_bit: .fill $100, 0
// Table with addresses of the y-lines of the form. The first line contains the address of the form screen.
form_line_lo: .fill $19, 0
form_line_hi: .fill $19, 0

View File

@ -36,42 +36,42 @@ main::@4: scope:[main] from main::@2
(void()) gfx_mode()
gfx_mode: scope:[gfx_mode] from main::@4
[16] if(*((const byte[]) form_fields_val+(byte) 5)==(byte) 0) goto gfx_mode::@1
[16] if(*((const byte*) form_ctrl_line)==(byte) 0) goto gfx_mode::@1
to:gfx_mode::@10
gfx_mode::@10: scope:[gfx_mode] from gfx_mode
[17] phi()
to:gfx_mode::@1
gfx_mode::@1: scope:[gfx_mode] from gfx_mode gfx_mode::@10
[18] (byte) gfx_mode::dtv_control#14 ← phi( gfx_mode/(byte) 0 gfx_mode::@10/(const byte) DTV_LINEAR )
[19] if(*((const byte[]) form_fields_val+(byte) 8)==(byte) 0) goto gfx_mode::@2
[19] if(*((const byte*) form_ctrl_borof)==(byte) 0) goto gfx_mode::@2
to:gfx_mode::@11
gfx_mode::@11: scope:[gfx_mode] from gfx_mode::@1
[20] (byte) gfx_mode::dtv_control#2 ← (byte) gfx_mode::dtv_control#14 | (const byte) DTV_BORDER_OFF
to:gfx_mode::@2
gfx_mode::@2: scope:[gfx_mode] from gfx_mode::@1 gfx_mode::@11
[21] (byte) gfx_mode::dtv_control#15 ← phi( gfx_mode::@1/(byte) gfx_mode::dtv_control#14 gfx_mode::@11/(byte) gfx_mode::dtv_control#2 )
[22] if(*((const byte[]) form_fields_val+(byte) 4)==(byte) 0) goto gfx_mode::@3
[22] if(*((const byte*) form_ctrl_hicol)==(byte) 0) goto gfx_mode::@3
to:gfx_mode::@12
gfx_mode::@12: scope:[gfx_mode] from gfx_mode::@2
[23] (byte) gfx_mode::dtv_control#3 ← (byte) gfx_mode::dtv_control#15 | (const byte) DTV_HIGHCOLOR
to:gfx_mode::@3
gfx_mode::@3: scope:[gfx_mode] from gfx_mode::@12 gfx_mode::@2
[24] (byte) gfx_mode::dtv_control#10 ← phi( gfx_mode::@12/(byte) gfx_mode::dtv_control#3 gfx_mode::@2/(byte) gfx_mode::dtv_control#15 )
[25] if(*((const byte[]) form_fields_val+(byte) 9)==(byte) 0) goto gfx_mode::@4
[25] if(*((const byte*) form_ctrl_overs)==(byte) 0) goto gfx_mode::@4
to:gfx_mode::@13
gfx_mode::@13: scope:[gfx_mode] from gfx_mode::@3
[26] (byte) gfx_mode::dtv_control#4 ← (byte) gfx_mode::dtv_control#10 | (const byte) DTV_OVERSCAN
to:gfx_mode::@4
gfx_mode::@4: scope:[gfx_mode] from gfx_mode::@13 gfx_mode::@3
[27] (byte) gfx_mode::dtv_control#11 ← phi( gfx_mode::@13/(byte) gfx_mode::dtv_control#4 gfx_mode::@3/(byte) gfx_mode::dtv_control#10 )
[28] if(*((const byte[]) form_fields_val+(byte) 6)==(byte) 0) goto gfx_mode::@5
[28] if(*((const byte*) form_ctrl_colof)==(byte) 0) goto gfx_mode::@5
to:gfx_mode::@14
gfx_mode::@14: scope:[gfx_mode] from gfx_mode::@4
[29] (byte) gfx_mode::dtv_control#5 ← (byte) gfx_mode::dtv_control#11 | (const byte) DTV_COLORRAM_OFF
to:gfx_mode::@5
gfx_mode::@5: scope:[gfx_mode] from gfx_mode::@14 gfx_mode::@4
[30] (byte) gfx_mode::dtv_control#13 ← phi( gfx_mode::@14/(byte) gfx_mode::dtv_control#5 gfx_mode::@4/(byte) gfx_mode::dtv_control#11 )
[31] if(*((const byte[]) form_fields_val+(byte) 7)==(byte) 0) goto gfx_mode::@6
[31] if(*((const byte*) form_ctrl_chunk)==(byte) 0) goto gfx_mode::@6
to:gfx_mode::@15
gfx_mode::@15: scope:[gfx_mode] from gfx_mode::@5
[32] (byte) gfx_mode::dtv_control#6 ← (byte) gfx_mode::dtv_control#13 | (const byte) DTV_CHUNKY
@ -79,14 +79,14 @@ gfx_mode::@15: scope:[gfx_mode] from gfx_mode::@5
gfx_mode::@6: scope:[gfx_mode] from gfx_mode::@15 gfx_mode::@5
[33] (byte) gfx_mode::dtv_control#12 ← phi( gfx_mode::@15/(byte) gfx_mode::dtv_control#6 gfx_mode::@5/(byte) gfx_mode::dtv_control#13 )
[34] *((const byte*) DTV_CONTROL) ← (byte) gfx_mode::dtv_control#12
[35] if(*((const byte[]) form_fields_val+(byte) 3)==(byte) 0) goto gfx_mode::@7
[35] if(*((const byte*) form_ctrl_ecm)==(byte) 0) goto gfx_mode::@7
to:gfx_mode::@16
gfx_mode::@16: scope:[gfx_mode] from gfx_mode::@6
[36] phi()
to:gfx_mode::@7
gfx_mode::@7: scope:[gfx_mode] from gfx_mode::@16 gfx_mode::@6
[37] (byte) gfx_mode::vic_control#5 ← phi( gfx_mode::@16/(const byte) VIC_DEN|(const byte) VIC_RSEL|(byte) 3|(const byte) VIC_ECM gfx_mode::@6/(const byte) VIC_DEN|(const byte) VIC_RSEL|(byte) 3 )
[38] if(*((const byte[]) form_fields_val+(byte) 1)==(byte) 0) goto gfx_mode::@8
[38] if(*((const byte*) form_ctrl_bmm)==(byte) 0) goto gfx_mode::@8
to:gfx_mode::@17
gfx_mode::@17: scope:[gfx_mode] from gfx_mode::@7
[39] (byte) gfx_mode::vic_control#2 ← (byte) gfx_mode::vic_control#5 | (const byte) VIC_BMM
@ -94,7 +94,7 @@ gfx_mode::@17: scope:[gfx_mode] from gfx_mode::@7
gfx_mode::@8: scope:[gfx_mode] from gfx_mode::@17 gfx_mode::@7
[40] (byte) gfx_mode::vic_control#4 ← phi( gfx_mode::@17/(byte) gfx_mode::vic_control#2 gfx_mode::@7/(byte) gfx_mode::vic_control#5 )
[41] *((const byte*) VIC_CONTROL) ← (byte) gfx_mode::vic_control#4
[42] if(*((const byte[]) form_fields_val+(byte) 2)==(byte) 0) goto gfx_mode::@9
[42] if(*((const byte*) form_ctrl_mcm)==(byte) 0) goto gfx_mode::@9
to:gfx_mode::@18
gfx_mode::@18: scope:[gfx_mode] from gfx_mode::@8
[43] phi()
@ -102,9 +102,9 @@ gfx_mode::@18: scope:[gfx_mode] from gfx_mode::@8
gfx_mode::@9: scope:[gfx_mode] from gfx_mode::@18 gfx_mode::@8
[44] (byte) gfx_mode::vic_control2#2 ← phi( gfx_mode::@18/(const byte) VIC_CSEL|(const byte) VIC_MCM gfx_mode::@8/(const byte) VIC_CSEL )
[45] *((const byte*) VIC_CONTROL2) ← (byte) gfx_mode::vic_control2#2
[46] (byte~) gfx_mode::$18 ← *((const byte[]) form_fields_val+(byte) $b) << (byte) 4
[47] (byte) gfx_mode::plane_a_offs#0 ← (byte~) gfx_mode::$18 | *((const byte[]) form_fields_val+(byte) $c)
[48] (byte) get_plane::idx#0 ← *((const byte[]) form_fields_val+(byte) $a)
[46] (byte~) gfx_mode::$18 ← *((const byte*) form_a_start_hi) << (byte) 4
[47] (byte) gfx_mode::plane_a_offs#0 ← (byte~) gfx_mode::$18 | *((const byte*) form_a_start_lo)
[48] (byte) get_plane::idx#0 ← *((const byte*) form_a_pattern)
[49] call get_plane
[50] (dword) get_plane::return#16 ← (dword) get_plane::return#14
to:gfx_mode::@27
@ -119,16 +119,16 @@ gfx_mode::@27: scope:[gfx_mode] from gfx_mode::@9
[58] (word~) gfx_mode::$26 ← > (dword) gfx_mode::plane_a#0
[59] (byte~) gfx_mode::$27 ← < (word~) gfx_mode::$26
[60] *((const byte*) DTV_PLANEA_START_HI) ← (byte~) gfx_mode::$27
[61] (byte~) gfx_mode::$28 ← *((const byte[]) form_fields_val+(byte) $d) << (byte) 4
[62] (byte~) gfx_mode::$29 ← (byte~) gfx_mode::$28 | *((const byte[]) form_fields_val+(byte) $e)
[61] (byte~) gfx_mode::$28 ← *((const byte*) form_a_step_hi) << (byte) 4
[62] (byte~) gfx_mode::$29 ← (byte~) gfx_mode::$28 | *((const byte*) form_a_step_lo)
[63] *((const byte*) DTV_PLANEA_STEP) ← (byte~) gfx_mode::$29
[64] (byte~) gfx_mode::$30 ← *((const byte[]) form_fields_val+(byte) $f) << (byte) 4
[65] (byte~) gfx_mode::$31 ← (byte~) gfx_mode::$30 | *((const byte[]) form_fields_val+(byte) $10)
[64] (byte~) gfx_mode::$30 ← *((const byte*) form_a_mod_hi) << (byte) 4
[65] (byte~) gfx_mode::$31 ← (byte~) gfx_mode::$30 | *((const byte*) form_a_mod_lo)
[66] *((const byte*) DTV_PLANEA_MODULO_LO) ← (byte~) gfx_mode::$31
[67] *((const byte*) DTV_PLANEA_MODULO_HI) ← (byte) 0
[68] (byte~) gfx_mode::$32 ← *((const byte[]) form_fields_val+(byte) $12) << (byte) 4
[69] (byte) gfx_mode::plane_b_offs#0 ← (byte~) gfx_mode::$32 | *((const byte[]) form_fields_val+(byte) $13)
[70] (byte) get_plane::idx#1 ← *((const byte[]) form_fields_val+(byte) $11)
[68] (byte~) gfx_mode::$32 ← *((const byte*) form_b_start_hi) << (byte) 4
[69] (byte) gfx_mode::plane_b_offs#0 ← (byte~) gfx_mode::$32 | *((const byte*) form_b_start_lo)
[70] (byte) get_plane::idx#1 ← *((const byte*) form_b_pattern)
[71] call get_plane
[72] (dword) get_plane::return#17 ← (dword) get_plane::return#14
to:gfx_mode::@28
@ -143,16 +143,16 @@ gfx_mode::@28: scope:[gfx_mode] from gfx_mode::@27
[80] (word~) gfx_mode::$40 ← > (dword) gfx_mode::plane_b#0
[81] (byte~) gfx_mode::$41 ← < (word~) gfx_mode::$40
[82] *((const byte*) DTV_PLANEB_START_HI) ← (byte~) gfx_mode::$41
[83] (byte~) gfx_mode::$42 ← *((const byte[]) form_fields_val+(byte) $14) << (byte) 4
[84] (byte~) gfx_mode::$43 ← (byte~) gfx_mode::$42 | *((const byte[]) form_fields_val+(byte) $15)
[83] (byte~) gfx_mode::$42 ← *((const byte*) form_b_step_hi) << (byte) 4
[84] (byte~) gfx_mode::$43 ← (byte~) gfx_mode::$42 | *((const byte*) form_b_step_lo)
[85] *((const byte*) DTV_PLANEB_STEP) ← (byte~) gfx_mode::$43
[86] (byte~) gfx_mode::$44 ← *((const byte[]) form_fields_val+(byte) $16) << (byte) 4
[87] (byte~) gfx_mode::$45 ← (byte~) gfx_mode::$44 | *((const byte[]) form_fields_val+(byte) $17)
[86] (byte~) gfx_mode::$44 ← *((const byte*) form_b_mod_hi) << (byte) 4
[87] (byte~) gfx_mode::$45 ← (byte~) gfx_mode::$44 | *((const byte*) form_b_mod_lo)
[88] *((const byte*) DTV_PLANEB_MODULO_LO) ← (byte~) gfx_mode::$45
[89] *((const byte*) DTV_PLANEB_MODULO_HI) ← (byte) 0
[90] *((const byte*) CIA2_PORT_A_DDR) ← (byte) 3
[91] *((const byte*) CIA2_PORT_A) ← (byte) 3^(byte)(word)(const byte*) VIC_SCREEN0/(word) $4000
[92] (byte) get_vic_screen::idx#0 ← *((const byte[]) form_fields_val+(byte) $18)
[92] (byte) get_vic_screen::idx#0 ← *((const byte*) form_vic_screen)
[93] call get_vic_screen
[94] (byte*) get_vic_screen::return#10 ← (byte*) get_vic_screen::return#5
to:gfx_mode::@29
@ -161,7 +161,7 @@ gfx_mode::@29: scope:[gfx_mode] from gfx_mode::@28
[96] (word~) gfx_mode::$52 ← (word)(byte*~) gfx_mode::$51 & (word) $3fff
[97] (word~) gfx_mode::$53 ← (word~) gfx_mode::$52 >> (byte) 6
[98] (byte~) gfx_mode::$54 ← (byte)(word~) gfx_mode::$53
[99] (byte) get_vic_charset::idx#0 ← *((const byte[]) form_fields_val+(byte) $19)
[99] (byte) get_vic_charset::idx#0 ← *((const byte*) form_vic_gfx)
[100] call get_vic_charset
[101] (byte*) get_vic_charset::return#4 ← (byte*) get_vic_charset::return#2
to:gfx_mode::@30
@ -172,7 +172,7 @@ gfx_mode::@30: scope:[gfx_mode] from gfx_mode::@29
[105] (byte~) gfx_mode::$59 ← (byte~) gfx_mode::$58 >> (byte) 2
[106] (byte~) gfx_mode::$60 ← (byte~) gfx_mode::$54 | (byte~) gfx_mode::$59
[107] *((const byte*) VIC_MEMORY) ← (byte~) gfx_mode::$60
[108] (byte) get_vic_screen::idx#1 ← *((const byte[]) form_fields_val+(byte) $1a)
[108] (byte) get_vic_screen::idx#1 ← *((const byte*) form_vic_cols)
[109] call get_vic_screen
[110] (byte*) get_vic_screen::return#11 ← (byte*) get_vic_screen::return#5
to:gfx_mode::@31
@ -200,19 +200,19 @@ gfx_mode::@21: scope:[gfx_mode] from gfx_mode::@20
to:gfx_mode::@22
gfx_mode::@22: scope:[gfx_mode] from gfx_mode::@21
[121] *((const byte*) BORDERCOL) ← (byte) 0
[122] (byte~) gfx_mode::$62 ← *((const byte[]) form_fields_val+(byte) $1c) << (byte) 4
[123] (byte~) gfx_mode::$63 ← (byte~) gfx_mode::$62 | *((const byte[]) form_fields_val+(byte) $1d)
[122] (byte~) gfx_mode::$62 ← *((const byte*) form_vic_bg0_hi) << (byte) 4
[123] (byte~) gfx_mode::$63 ← (byte~) gfx_mode::$62 | *((const byte*) form_vic_bg0_lo)
[124] *((const byte*) BGCOL1) ← (byte~) gfx_mode::$63
[125] (byte~) gfx_mode::$64 ← *((const byte[]) form_fields_val+(byte) $1e) << (byte) 4
[126] (byte~) gfx_mode::$65 ← (byte~) gfx_mode::$64 | *((const byte[]) form_fields_val+(byte) $1f)
[125] (byte~) gfx_mode::$64 ← *((const byte*) form_vic_bg1_hi) << (byte) 4
[126] (byte~) gfx_mode::$65 ← (byte~) gfx_mode::$64 | *((const byte*) form_vic_bg1_lo)
[127] *((const byte*) BGCOL2) ← (byte~) gfx_mode::$65
[128] (byte~) gfx_mode::$66 ← *((const byte[]) form_fields_val+(byte) $20) << (byte) 4
[129] (byte~) gfx_mode::$67 ← (byte~) gfx_mode::$66 | *((const byte[]) form_fields_val+(byte) $21)
[128] (byte~) gfx_mode::$66 ← *((const byte*) form_vic_bg2_hi) << (byte) 4
[129] (byte~) gfx_mode::$67 ← (byte~) gfx_mode::$66 | *((const byte*) form_vic_bg2_lo)
[130] *((const byte*) BGCOL3) ← (byte~) gfx_mode::$67
[131] (byte~) gfx_mode::$68 ← *((const byte[]) form_fields_val+(byte) $22) << (byte) 4
[132] (byte~) gfx_mode::$69 ← (byte~) gfx_mode::$68 | *((const byte[]) form_fields_val+(byte) $23)
[131] (byte~) gfx_mode::$68 ← *((const byte*) form_vic_bg3_hi) << (byte) 4
[132] (byte~) gfx_mode::$69 ← (byte~) gfx_mode::$68 | *((const byte*) form_vic_bg3_lo)
[133] *((const byte*) BGCOL4) ← (byte~) gfx_mode::$69
[134] if(*((const byte[]) form_fields_val+(byte) $1b)==(byte) 0) goto gfx_mode::@24
[134] if(*((const byte*) form_dtv_palet)==(byte) 0) goto gfx_mode::@24
to:gfx_mode::@23
gfx_mode::@23: scope:[gfx_mode] from gfx_mode::@22 gfx_mode::@23
[135] (byte) gfx_mode::j#2 ← phi( gfx_mode::@22/(byte) 0 gfx_mode::@23/(byte) gfx_mode::j#1 )
@ -262,10 +262,10 @@ keyboard_event_get::@return: scope:[keyboard_event_get] from keyboard_event_get
(void()) keyboard_event_scan()
keyboard_event_scan: scope:[keyboard_event_scan] from form_control::@3 gfx_mode::@26
[157] (byte) keyboard_events_size#99 ← phi( form_control::@3/(byte) keyboard_events_size#47 gfx_mode::@26/(byte) keyboard_events_size#24 )
[157] (byte) keyboard_events_size#98 ← phi( form_control::@3/(byte) keyboard_events_size#47 gfx_mode::@26/(byte) keyboard_events_size#24 )
to:keyboard_event_scan::@7
keyboard_event_scan::@7: scope:[keyboard_event_scan] from keyboard_event_scan keyboard_event_scan::@8
[158] (byte) keyboard_events_size#109 ← phi( keyboard_event_scan/(byte) keyboard_events_size#99 keyboard_event_scan::@8/(byte) keyboard_events_size#100 )
[158] (byte) keyboard_events_size#107 ← phi( keyboard_event_scan/(byte) keyboard_events_size#98 keyboard_event_scan::@8/(byte) keyboard_events_size#100 )
[158] (byte) keyboard_event_scan::keycode#11 ← phi( keyboard_event_scan/(byte) 0 keyboard_event_scan::@8/(byte) keyboard_event_scan::keycode#13 )
[158] (byte) keyboard_event_scan::row#2 ← phi( keyboard_event_scan/(byte) 0 keyboard_event_scan::@8/(byte) keyboard_event_scan::row#1 )
[159] (byte) keyboard_matrix_read::rowid#0 ← (byte) keyboard_event_scan::row#2
@ -280,7 +280,7 @@ keyboard_event_scan::@16: scope:[keyboard_event_scan] from keyboard_event_scan:
[164] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte) 8
to:keyboard_event_scan::@8
keyboard_event_scan::@8: scope:[keyboard_event_scan] from keyboard_event_scan::@15 keyboard_event_scan::@16
[165] (byte) keyboard_events_size#100 ← phi( keyboard_event_scan::@15/(byte) keyboard_events_size#108 keyboard_event_scan::@16/(byte) keyboard_events_size#109 )
[165] (byte) keyboard_events_size#100 ← phi( keyboard_event_scan::@15/(byte) keyboard_events_size#106 keyboard_event_scan::@16/(byte) keyboard_events_size#107 )
[165] (byte) keyboard_event_scan::keycode#13 ← phi( keyboard_event_scan::@15/(byte) keyboard_event_scan::keycode#14 keyboard_event_scan::@16/(byte) keyboard_event_scan::keycode#1 )
[166] (byte) keyboard_event_scan::row#1 ← ++ (byte) keyboard_event_scan::row#2
[167] if((byte) keyboard_event_scan::row#1!=(byte) 8) goto keyboard_event_scan::@7
@ -338,7 +338,7 @@ keyboard_event_scan::@return: scope:[keyboard_event_scan] from keyboard_event_s
[193] return
to:@return
keyboard_event_scan::@9: scope:[keyboard_event_scan] from keyboard_event_scan::@10 keyboard_event_scan::@19
[194] (byte) keyboard_events_size#18 ← phi( keyboard_event_scan::@10/(byte) keyboard_events_size#108 keyboard_event_scan::@19/(byte) keyboard_events_size#109 )
[194] (byte) keyboard_events_size#18 ← phi( keyboard_event_scan::@10/(byte) keyboard_events_size#106 keyboard_event_scan::@19/(byte) keyboard_events_size#107 )
[194] (byte) keyboard_event_scan::keycode#10 ← phi( keyboard_event_scan::@10/(byte) keyboard_event_scan::keycode#14 keyboard_event_scan::@19/(byte) keyboard_event_scan::keycode#11 )
[194] (byte) keyboard_event_scan::col#2 ← phi( keyboard_event_scan::@10/(byte) keyboard_event_scan::col#1 keyboard_event_scan::@19/(byte) 0 )
[195] (byte~) keyboard_event_scan::$15 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte[8]) keyboard_scan_values + (byte) keyboard_event_scan::row#2)
@ -357,7 +357,7 @@ keyboard_event_scan::@14: scope:[keyboard_event_scan] from keyboard_event_scan:
[202] (byte) keyboard_events_size#2 ← ++ (byte) keyboard_events_size#18
to:keyboard_event_scan::@10
keyboard_event_scan::@10: scope:[keyboard_event_scan] from keyboard_event_scan::@11 keyboard_event_scan::@12 keyboard_event_scan::@14 keyboard_event_scan::@9
[203] (byte) keyboard_events_size#108 ← phi( keyboard_event_scan::@9/(byte) keyboard_events_size#18 keyboard_event_scan::@11/(byte) keyboard_events_size#1 keyboard_event_scan::@12/(byte) keyboard_events_size#18 keyboard_event_scan::@14/(byte) keyboard_events_size#2 )
[203] (byte) keyboard_events_size#106 ← phi( keyboard_event_scan::@9/(byte) keyboard_events_size#18 keyboard_event_scan::@11/(byte) keyboard_events_size#1 keyboard_event_scan::@12/(byte) keyboard_events_size#18 keyboard_event_scan::@14/(byte) keyboard_events_size#2 )
[204] (byte) keyboard_event_scan::keycode#14 ← ++ (byte) keyboard_event_scan::keycode#10
[205] (byte) keyboard_event_scan::col#1 ← ++ (byte) keyboard_event_scan::col#2
[206] if((byte) keyboard_event_scan::col#1!=(byte) 8) goto keyboard_event_scan::@9
@ -850,11 +850,11 @@ form_set_screen::@return: scope:[form_set_screen] from form_set_screen::@1
(void()) print_str_lines((byte*) print_str_lines::str)
print_str_lines: scope:[print_str_lines] from form_mode::@12 form_mode::@9
[412] (byte*) print_str_lines::str#5 ← phi( form_mode::@9/(const byte[]) FORM_COLS form_mode::@12/(const byte[]) FORM_TEXT )
[413] (byte*~) print_char_cursor#71 ← (byte*) print_set_screen::screen#2
[413] (byte*~) print_char_cursor#68 ← (byte*) print_set_screen::screen#2
to:print_str_lines::@1
print_str_lines::@1: scope:[print_str_lines] from print_str_lines print_str_lines::@6
[414] (byte*) print_line_cursor#2 ← phi( print_str_lines/(byte*) print_set_screen::screen#2 print_str_lines::@6/(byte*) print_line_cursor#22 )
[414] (byte*) print_char_cursor#22 ← phi( print_str_lines/(byte*~) print_char_cursor#71 print_str_lines::@6/(byte*~) print_char_cursor#72 )
[414] (byte*) print_char_cursor#22 ← phi( print_str_lines/(byte*~) print_char_cursor#68 print_str_lines::@6/(byte*~) print_char_cursor#69 )
[414] (byte*) print_str_lines::str#3 ← phi( print_str_lines/(byte*) print_str_lines::str#5 print_str_lines::@6/(byte*) print_str_lines::str#0 )
[415] if((byte) 0!=*((byte*) print_str_lines::str#3)) goto print_str_lines::@2
to:print_str_lines::@return
@ -881,7 +881,7 @@ print_str_lines::@5: scope:[print_str_lines] from print_str_lines::@3
[426] call print_ln
to:print_str_lines::@6
print_str_lines::@6: scope:[print_str_lines] from print_str_lines::@5
[427] (byte*~) print_char_cursor#72 ← (byte*) print_line_cursor#22
[427] (byte*~) print_char_cursor#69 ← (byte*) print_line_cursor#22
to:print_str_lines::@1
(void()) print_ln()

File diff suppressed because it is too large Load Diff

View File

@ -378,6 +378,20 @@
(byte) dtvSetCpuBankSegment1::cpuBankIdx#1 reg byte a 202.0
(byte) dtvSetCpuBankSegment1::cpuBankIdx#11 reg byte a 4.0
(byte) dtvSetCpuBankSegment1::cpuBankIdx#13 reg byte a 105.0
(const byte*) form_a_mod_hi = (const byte[]) form_fields_val+(byte) $f
(const byte*) form_a_mod_lo = (const byte[]) form_fields_val+(byte) $10
(const byte*) form_a_pattern = (const byte[]) form_fields_val+(byte) $a
(const byte*) form_a_start_hi = (const byte[]) form_fields_val+(byte) $b
(const byte*) form_a_start_lo = (const byte[]) form_fields_val+(byte) $c
(const byte*) form_a_step_hi = (const byte[]) form_fields_val+(byte) $d
(const byte*) form_a_step_lo = (const byte[]) form_fields_val+(byte) $e
(const byte*) form_b_mod_hi = (const byte[]) form_fields_val+(byte) $16
(const byte*) form_b_mod_lo = (const byte[]) form_fields_val+(byte) $17
(const byte*) form_b_pattern = (const byte[]) form_fields_val+(byte) $11
(const byte*) form_b_start_hi = (const byte[]) form_fields_val+(byte) $12
(const byte*) form_b_start_lo = (const byte[]) form_fields_val+(byte) $13
(const byte*) form_b_step_hi = (const byte[]) form_fields_val+(byte) $14
(const byte*) form_b_step_lo = (const byte[]) form_fields_val+(byte) $15
(byte()) form_control()
(byte~) form_control::$12 reg byte a 4.0
(byte~) form_control::$13 reg byte a 4.0
@ -414,12 +428,22 @@
(byte) form_control::return
(byte) form_control::return#0 reg byte a 2002.0
(byte) form_control::return#2 reg byte x 333.6666666666667
(const byte*) form_ctrl_bmm = (const byte[]) form_fields_val+(byte) 1
(const byte*) form_ctrl_borof = (const byte[]) form_fields_val+(byte) 8
(const byte*) form_ctrl_chunk = (const byte[]) form_fields_val+(byte) 7
(const byte*) form_ctrl_colof = (const byte[]) form_fields_val+(byte) 6
(const byte*) form_ctrl_ecm = (const byte[]) form_fields_val+(byte) 3
(const byte*) form_ctrl_hicol = (const byte[]) form_fields_val+(byte) 4
(const byte*) form_ctrl_line = (const byte[]) form_fields_val+(byte) 5
(const byte*) form_ctrl_mcm = (const byte[]) form_fields_val+(byte) 2
(const byte*) form_ctrl_overs = (const byte[]) form_fields_val+(byte) 9
(signed byte) form_cursor_count
(signed byte) form_cursor_count#1 form_cursor_count zp[1]:16 0.3333333333333333
(signed byte) form_cursor_count#15 form_cursor_count zp[1]:16 0.4
(signed byte) form_cursor_count#16 form_cursor_count zp[1]:16 65.82352941176472
(signed byte) form_cursor_count#21 form_cursor_count zp[1]:16 221.2
(signed byte) form_cursor_count#5 form_cursor_count zp[1]:16 2.0
(const byte*) form_dtv_palet = (const byte[]) form_fields_val+(byte) $1b
(byte) form_field_idx
(byte) form_field_idx#1 form_field_idx zp[1]:9 0.3333333333333333
(byte) form_field_idx#18 form_field_idx zp[1]:9 65.94117647058826
@ -498,6 +522,17 @@
(byte) form_set_screen::y
(byte) form_set_screen::y#1 reg byte x 151.5
(byte) form_set_screen::y#2 reg byte x 67.33333333333333
(const byte*) form_vic_bg0_hi = (const byte[]) form_fields_val+(byte) $1c
(const byte*) form_vic_bg0_lo = (const byte[]) form_fields_val+(byte) $1d
(const byte*) form_vic_bg1_hi = (const byte[]) form_fields_val+(byte) $1e
(const byte*) form_vic_bg1_lo = (const byte[]) form_fields_val+(byte) $1f
(const byte*) form_vic_bg2_hi = (const byte[]) form_fields_val+(byte) $20
(const byte*) form_vic_bg2_lo = (const byte[]) form_fields_val+(byte) $21
(const byte*) form_vic_bg3_hi = (const byte[]) form_fields_val+(byte) $22
(const byte*) form_vic_bg3_lo = (const byte[]) form_fields_val+(byte) $23
(const byte*) form_vic_cols = (const byte[]) form_fields_val+(byte) $1a
(const byte*) form_vic_gfx = (const byte[]) form_fields_val+(byte) $19
(const byte*) form_vic_screen = (const byte[]) form_fields_val+(byte) $18
(dword()) get_plane((byte) get_plane::idx)
(label) get_plane::@1
(label) get_plane::@10
@ -1054,15 +1089,15 @@
(byte) keyboard_events_size
(byte) keyboard_events_size#1 keyboard_events_size zp[1]:8 200002.0
(byte) keyboard_events_size#100 keyboard_events_size zp[1]:8 882.6176470588235
(byte) keyboard_events_size#108 keyboard_events_size zp[1]:8 102001.2
(byte) keyboard_events_size#109 keyboard_events_size zp[1]:8 4286.428571428572
(byte) keyboard_events_size#106 keyboard_events_size zp[1]:8 102001.2
(byte) keyboard_events_size#107 keyboard_events_size zp[1]:8 4286.428571428572
(byte) keyboard_events_size#18 keyboard_events_size zp[1]:8 81000.90000000001
(byte) keyboard_events_size#2 keyboard_events_size zp[1]:8 200002.0
(byte) keyboard_events_size#24 keyboard_events_size zp[1]:8 6.766666666666667
(byte) keyboard_events_size#27 keyboard_events_size zp[1]:8 0.3333333333333333
(byte) keyboard_events_size#4 keyboard_events_size zp[1]:8 3.0
(byte) keyboard_events_size#47 keyboard_events_size zp[1]:8 73.73333333333335
(byte) keyboard_events_size#99 keyboard_events_size zp[1]:8 105.0
(byte) keyboard_events_size#98 keyboard_events_size zp[1]:8 105.0
(void()) keyboard_init()
(label) keyboard_init::@return
(const byte[8]) keyboard_matrix_col_bitmask = { (byte) 1, (byte) 2, (byte) 4, (byte) 8, (byte) $10, (byte) $20, (byte) $40, (byte) $80 }
@ -1123,8 +1158,8 @@
(byte*) print_char_cursor#20 print_char_cursor zp[2]:11 821.0
(byte*) print_char_cursor#22 print_char_cursor zp[2]:11 102.0
(byte*) print_char_cursor#38 print_char_cursor zp[2]:11 572.0
(byte*~) print_char_cursor#71 print_char_cursor zp[2]:11 4.0
(byte*~) print_char_cursor#72 print_char_cursor zp[2]:11 202.0
(byte*~) print_char_cursor#68 print_char_cursor zp[2]:11 4.0
(byte*~) print_char_cursor#69 print_char_cursor zp[2]:11 202.0
(void()) print_cls()
(label) print_cls::@return
(const byte[]) print_hextab = (string) "0123456789abcdef"z
@ -1226,7 +1261,7 @@ zp[2]:6 [ gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3
reg byte x [ gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::cp#1 ]
reg byte a [ gfx_init_plane_charset8::c#2 gfx_init_plane_charset8::c#3 ]
reg byte x [ gfx_init_plane_8bppchunky::gfxbCpuBank#4 gfx_init_plane_8bppchunky::gfxbCpuBank#7 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::gfxbCpuBank#2 ]
zp[1]:8 [ gfx_init_vic_bitmap::l#2 gfx_init_vic_bitmap::l#1 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 gfx_init_plane_fill::fill#6 keyboard_events_size#18 keyboard_events_size#109 keyboard_events_size#99 keyboard_events_size#47 keyboard_events_size#27 keyboard_events_size#24 keyboard_events_size#100 keyboard_events_size#4 keyboard_events_size#108 keyboard_events_size#1 keyboard_events_size#2 ]
zp[1]:8 [ gfx_init_vic_bitmap::l#2 gfx_init_vic_bitmap::l#1 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 gfx_init_plane_fill::fill#6 keyboard_events_size#18 keyboard_events_size#107 keyboard_events_size#98 keyboard_events_size#47 keyboard_events_size#27 keyboard_events_size#24 keyboard_events_size#100 keyboard_events_size#4 keyboard_events_size#106 keyboard_events_size#1 keyboard_events_size#2 ]
reg byte x [ bitmap_plot::x#4 bitmap_plot::x#1 bitmap_plot::x#0 bitmap_plot::x#3 bitmap_plot::x#2 ]
reg byte y [ bitmap_plot::y#4 bitmap_plot::y#1 bitmap_plot::y#0 bitmap_plot::y#3 bitmap_plot::y#2 ]
zp[1]:9 [ bitmap_line_ydxi::yd#5 bitmap_line_ydxi::yd#1 bitmap_line_ydxi::yd#0 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x1#0 bitmap_line_xdyi::x1#1 bitmap_line::x0#0 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x1#0 bitmap_line_xdyd::x1#1 gfx_init_plane_horisontal2::ay#4 gfx_init_plane_horisontal2::ay#1 form_field_idx#28 form_field_idx#1 form_field_idx#18 form_field_idx#31 form_field_idx#6 form_field_idx#5 ]
@ -1237,7 +1272,7 @@ reg byte x [ bitmap_clear::x#2 bitmap_clear::x#1 ]
reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ]
reg byte y [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ]
reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ]
zp[2]:11 [ gfx_init_charset::chargen#2 gfx_init_charset::chargen#3 gfx_init_charset::chargen#1 bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::x#1 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::gfxa#1 memset::dst#2 memset::dst#4 memset::dst#1 memset::str#0 print_char_cursor#20 print_char_cursor#22 print_char_cursor#71 print_char_cursor#72 print_char_cursor#38 print_char_cursor#1 print_str_at::at#2 print_str_at::at#0 gfx_mode::col#2 gfx_mode::col#3 gfx_mode::col#1 ]
zp[2]:11 [ gfx_init_charset::chargen#2 gfx_init_charset::chargen#3 gfx_init_charset::chargen#1 bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::x#1 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::gfxa#1 memset::dst#2 memset::dst#4 memset::dst#1 memset::str#0 print_char_cursor#20 print_char_cursor#22 print_char_cursor#68 print_char_cursor#69 print_char_cursor#38 print_char_cursor#1 print_str_at::at#2 print_str_at::at#0 gfx_mode::col#2 gfx_mode::col#3 gfx_mode::col#1 ]
reg byte x [ gfx_init_charset::l#2 gfx_init_charset::l#1 ]
zp[1]:13 [ gfx_init_screen4::cy#4 gfx_init_screen4::cy#1 gfx_init_charset::c#4 gfx_init_charset::c#1 bitmap_line_ydxi::e#3 bitmap_line_ydxi::e#0 bitmap_line_ydxi::e#6 bitmap_line_ydxi::e#2 bitmap_line_ydxi::e#1 bitmap_line_xdyi::y#3 bitmap_line_xdyi::y#5 bitmap_line_xdyi::y#0 bitmap_line_xdyi::y#1 bitmap_line_xdyi::y#6 bitmap_line_xdyi::y#2 bitmap_line::y0#0 bitmap_line_xdyd::y#3 bitmap_line_xdyd::y#5 bitmap_line_xdyd::y#0 bitmap_line_xdyd::y#1 bitmap_line_xdyd::y#6 bitmap_line_xdyd::y#2 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::y1#0 bitmap_line_ydxd::y1#1 gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::y#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 keyboard_event_pressed::keycode#4 keyboard_event_scan::keycode#10 keyboard_event_scan::keycode#11 keyboard_event_scan::keycode#13 keyboard_event_scan::keycode#14 keyboard_event_scan::keycode#1 ]
zp[2]:14 [ gfx_init_screen4::ch#2 gfx_init_screen4::ch#3 gfx_init_screen4::ch#1 gfx_init_charset::charset#2 gfx_init_charset::charset#3 gfx_init_charset::charset#1 bitmap_clear::bitmap#2 bitmap_clear::bitmap#3 bitmap_clear::bitmap#5 bitmap_clear::bitmap#1 bitmap_clear::bitmap#0 gfx_init_plane_8bppchunky::gfxb#4 gfx_init_plane_8bppchunky::gfxb#3 gfx_init_plane_8bppchunky::gfxb#5 gfx_init_plane_8bppchunky::gfxb#1 gfx_init_plane_fill::gfxb#2 gfx_init_plane_fill::gfxb#3 gfx_init_plane_fill::gfxb#1 gfx_init_plane_fill::gfxb#6 gfx_init_plane_fill::gfxb#0 gfx_init_plane_fill::$4 gfx_init_plane_fill::$5 print_line_cursor#21 print_line_cursor#2 print_set_screen::screen#2 print_line_cursor#22 apply_preset::preset#15 get_vic_charset::return#2 get_vic_charset::return#4 gfx_mode::$56 gfx_mode::$57 ]

View File

@ -2337,14 +2337,14 @@ memset: {
print_set_screen: {
rts
}
MENU_TEXT: .text "C64DTV Graphics Modes CCLHBME@ OHIIMCC@ LUNCMMM@----------------------------------------@1. Standard Char (V) 0000000@2. Extended Color Char (V) 0000001@3. Multicolor Char (V) 0000010@4. Standard Bitmap (V) 0000100@5. Multicolor Bitmap (V) 0000110@6. High Color Standard Char (H) 0001000@7. High Extended Color Char (H) 0001001@8. High Multicolor Char (H) 0001010@9. High Multicolor Bitmap (H) 0001110@a. Sixs Fred 2 (D) 0010111@b. Two Plane Bitmap (D) 0011101@c. Sixs Fred (2 Plane MC BM) (D) 0011111@d. 8bpp Pixel Cell (D) 0111011@e. Chunky 8bpp Bitmap (D) 1111011@----------------------------------------@ (V) vicII (H) vicII+hicol (D) c64dtv@"
.byte 0
// Default vallues for the palette
DTV_PALETTE_DEFAULT: .byte 0, $f, $36, $be, $58, $db, $86, $ff, $29, $26, $3b, 5, 7, $df, $9a, $a
// Keyboard row bitmask as expected by CIA#1 Port A when reading a specific keyboard matrix row (rows are numbered 0-7)
keyboard_matrix_row_bitmask: .byte $fe, $fd, $fb, $f7, $ef, $df, $bf, $7f
// Keyboard matrix column bitmasks for a specific keybooard matrix column when reading the keyboard. (columns are numbered 0-7)
keyboard_matrix_col_bitmask: .byte 1, 2, 4, 8, $10, $20, $40, $80
MENU_TEXT: .text "C64DTV Graphics Modes CCLHBME@ OHIIMCC@ LUNCMMM@----------------------------------------@1. Standard Char (V) 0000000@2. Extended Color Char (V) 0000001@3. Multicolor Char (V) 0000010@4. Standard Bitmap (V) 0000100@5. Multicolor Bitmap (V) 0000110@6. High Color Standard Char (H) 0001000@7. High Extended Color Char (H) 0001001@8. High Multicolor Char (H) 0001010@9. High Multicolor Bitmap (H) 0001110@a. Sixs Fred 2 (D) 0010111@b. Two Plane Bitmap (D) 0011101@c. Sixs Fred (2 Plane MC BM) (D) 0011111@d. 8bpp Pixel Cell (D) 0111011@e. Chunky 8bpp Bitmap (D) 1111011@----------------------------------------@ (V) vicII (H) vicII+hicol (D) c64dtv@"
.byte 0
// Tables for the plotter - initialized by calling bitmap_draw_init();
bitmap_plot_xlo: .fill $100, 0
bitmap_plot_xhi: .fill $100, 0

View File

@ -1559,7 +1559,7 @@ print_str_lines: scope:[print_str_lines] from menu::@30
to:print_str_lines::@1
print_str_lines::@1: scope:[print_str_lines] from print_str_lines print_str_lines::@6
[865] (byte*) print_line_cursor#17 ← phi( print_str_lines/(const byte*) menu::SCREEN print_str_lines::@6/(byte*) print_line_cursor#19 )
[865] (byte*) print_char_cursor#19 ← phi( print_str_lines/(const byte*) menu::SCREEN print_str_lines::@6/(byte*~) print_char_cursor#99 )
[865] (byte*) print_char_cursor#19 ← phi( print_str_lines/(const byte*) menu::SCREEN print_str_lines::@6/(byte*~) print_char_cursor#98 )
[865] (byte*) print_str_lines::str#2 ← phi( print_str_lines/(const byte[]) MENU_TEXT print_str_lines::@6/(byte*) print_str_lines::str#0 )
[866] if((byte) 0!=*((byte*) print_str_lines::str#2)) goto print_str_lines::@2
to:print_str_lines::@return
@ -1586,7 +1586,7 @@ print_str_lines::@5: scope:[print_str_lines] from print_str_lines::@3
[877] call print_ln
to:print_str_lines::@6
print_str_lines::@6: scope:[print_str_lines] from print_str_lines::@5
[878] (byte*~) print_char_cursor#99 ← (byte*) print_line_cursor#19
[878] (byte*~) print_char_cursor#98 ← (byte*) print_line_cursor#19
to:print_str_lines::@1
(void()) print_ln()

File diff suppressed because it is too large Load Diff

View File

@ -1044,7 +1044,7 @@
(byte*) print_char_cursor#17 print_char_cursor zp[2]:4 821.0
(byte*) print_char_cursor#19 print_char_cursor zp[2]:4 101.0
(byte*) print_char_cursor#32 print_char_cursor zp[2]:4 572.0
(byte*~) print_char_cursor#99 print_char_cursor zp[2]:4 202.0
(byte*~) print_char_cursor#98 print_char_cursor zp[2]:4 202.0
(void()) print_cls()
(label) print_cls::@return
(byte*) print_line_cursor
@ -1119,7 +1119,7 @@ reg byte x [ mode_ecmchar::i#2 mode_ecmchar::i#1 ]
reg byte x [ mode_ecmchar::cx#2 mode_ecmchar::cx#1 ]
reg byte x [ mode_stdchar::i#2 mode_stdchar::i#1 ]
reg byte x [ mode_stdchar::cx#2 mode_stdchar::cx#1 ]
zp[2]:4 [ print_char_cursor#17 print_char_cursor#19 print_char_cursor#99 print_char_cursor#32 print_char_cursor#1 mode_stdchar::ch#2 mode_stdchar::ch#3 mode_stdchar::ch#1 mode_ecmchar::ch#2 mode_ecmchar::ch#3 mode_ecmchar::ch#1 mode_mcchar::ch#2 mode_mcchar::ch#3 mode_mcchar::ch#1 mode_hicolecmchar::col#2 mode_hicolecmchar::col#3 mode_hicolecmchar::col#1 mode_hicolmcchar::ch#2 mode_hicolmcchar::ch#3 mode_hicolmcchar::ch#1 mode_sixsfred2::gfxa#2 mode_sixsfred2::gfxa#3 mode_sixsfred2::gfxa#1 mode_twoplanebitmap::gfxb#2 mode_twoplanebitmap::gfxb#3 mode_twoplanebitmap::gfxb#1 mode_sixsfred::col#2 mode_sixsfred::col#3 mode_sixsfred::col#1 mode_8bpppixelcell::chargen#2 mode_8bpppixelcell::chargen#4 mode_8bpppixelcell::chargen#1 mode_8bppchunkybmm::x#2 mode_8bppchunkybmm::x#1 menu::c#2 menu::c#1 ]
zp[2]:4 [ print_char_cursor#17 print_char_cursor#19 print_char_cursor#98 print_char_cursor#32 print_char_cursor#1 mode_stdchar::ch#2 mode_stdchar::ch#3 mode_stdchar::ch#1 mode_ecmchar::ch#2 mode_ecmchar::ch#3 mode_ecmchar::ch#1 mode_mcchar::ch#2 mode_mcchar::ch#3 mode_mcchar::ch#1 mode_hicolecmchar::col#2 mode_hicolecmchar::col#3 mode_hicolecmchar::col#1 mode_hicolmcchar::ch#2 mode_hicolmcchar::ch#3 mode_hicolmcchar::ch#1 mode_sixsfred2::gfxa#2 mode_sixsfred2::gfxa#3 mode_sixsfred2::gfxa#1 mode_twoplanebitmap::gfxb#2 mode_twoplanebitmap::gfxb#3 mode_twoplanebitmap::gfxb#1 mode_sixsfred::col#2 mode_sixsfred::col#3 mode_sixsfred::col#1 mode_8bpppixelcell::chargen#2 mode_8bpppixelcell::chargen#4 mode_8bpppixelcell::chargen#1 mode_8bppchunkybmm::x#2 mode_8bppchunkybmm::x#1 menu::c#2 menu::c#1 ]
reg byte a [ keyboard_key_pressed::return#2 ]
reg byte a [ menu::$24 ]
reg byte a [ keyboard_key_pressed::return#24 ]

View File

@ -7,12 +7,11 @@ CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from @1
(signed byte[]) main::sbs ← { (number) -1, (number) -2, (number) -3, (number) -4 }
(byte) main::i#0 ← (byte) 0
to:main::@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::$0 ← ((byte)) *((signed byte[]) main::sbs + (byte) main::i#2)
(byte~) main::$0 ← ((byte)) *((const signed byte[]) main::sbs + (byte) main::i#2)
*((const byte*) main::SCREEN + (byte) main::i#2) ← (byte~) main::$0
(byte) main::i#1 ← (byte) main::i#2 + rangenext(0,3)
(bool~) main::$1 ← (byte) main::i#1 != rangelast(0,3)
@ -43,27 +42,22 @@ SYMBOL TABLE SSA
(byte) main::i#0
(byte) main::i#1
(byte) main::i#2
(signed byte[]) main::sbs
(const signed byte[]) main::sbs = { (signed byte)(number) -1, (signed byte)(number) -2, (signed byte)(number) -3, (signed byte)(number) -4 }
Added casts to value list in (signed byte[]) main::sbs ← (signed byte[]){ (signed byte)(number) -1, (signed byte)(number) -2, (signed byte)(number) -3, (signed byte)(number) -4 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (byte~) main::$0 ← (byte)*((signed byte[]) main::sbs + (byte) main::i#2)
Inlining cast (byte~) main::$0 ← (byte)*((const signed byte[]) main::sbs + (byte) main::i#2)
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast -1
Simplifying constant integer cast -2
Simplifying constant integer cast -3
Simplifying constant integer cast -4
Simplifying constant pointer cast (byte*) 1024
Successful SSA optimization PassNCastSimplification
Simple Condition (bool~) main::$1 [7] if((byte) main::i#1!=rangelast(0,3)) goto main::@1
Simple Condition (bool~) main::$1 [6] if((byte) main::i#1!=rangelast(0,3)) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Identified constant from value list (signed byte[]) { (signed byte) -1, (signed byte) -2, (signed byte) -3, (signed byte) -4 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const signed byte[]) main::sbs = { -1, -2, -3, -4 }
Constant (const byte) main::i#0 = 0
Successful SSA optimization Pass2ConstantIdentification
Resolved ranged next value [5] main::i#1 ← ++ main::i#2 to ++
Resolved ranged comparison value [7] if(main::i#1!=rangelast(0,3)) goto main::@1 to (number) 4
Resolved ranged next value [4] main::i#1 ← ++ main::i#2 to ++
Resolved ranged comparison value [6] if(main::i#1!=rangelast(0,3)) goto main::@1 to (number) 4
Adding number conversion cast (unumber) 4 in if((byte) main::i#1!=(number) 4) goto main::@1
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant integer cast 4

View File

@ -10,7 +10,7 @@ CONTROL FLOW GRAPH SSA
@begin: scope:[] from
(byte*~) $0 ← ((byte*)) (number) $400
(byte*~) $1 ← ((byte*)) (number) $1400
(byte*[]) screens ← { (byte*~) $0, (byte*~) $1 }
(byte*[]) screens ← { (byte*)(byte*~) $0, (byte*)(byte*~) $1 }
to:@3
(void()) main()
@ -112,6 +112,8 @@ Inlining cast *((byte*~) main::$1) ← (unumber)(number) $22
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Simplifying constant pointer cast (byte*) 5120
Simplifying constant integer cast (byte*~) $0
Simplifying constant integer cast (byte*~) $1
Simplifying constant integer cast 0
Simplifying constant integer cast $378
Simplifying constant integer cast (byte*~) main::spritePtr1_$0

View File

@ -11,7 +11,7 @@ CONTROL FLOW GRAPH SSA
@begin: scope:[] from
(byte*~) $0 ← ((byte*)) (number) $400
(byte*~) $1 ← ((byte*)) (number) $1400
(byte*[]) screens ← { (byte*~) $0, (byte*~) $1 }
(byte*[]) screens ← { (byte*)(byte*~) $0, (byte*)(byte*~) $1 }
to:@3
(void()) main()
@ -109,6 +109,8 @@ Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Simplifying constant pointer cast (byte*) 1024
Simplifying constant pointer cast (byte*) 5120
Simplifying constant integer cast (byte*~) $0
Simplifying constant integer cast (byte*~) $1
Simplifying constant integer cast 0
Simplifying constant integer cast $378
Simplifying constant integer cast *((byte*~) main::spritePtr1_$0)

View File

@ -41,7 +41,7 @@ main::@return: scope:[main] from main
@3: scope:[] from @begin
(void()*~) $0 ← & interrupt(HARDWARE_ALL)(void()) nmiHandler()
(void()*~) $1 ← & (void()) entryPoint()
(void()*[]) VECTORS ← { (void()*~) $0, (void()*~) $1 }
(void()*[]) VECTORS ← { (void()*)(void()*~) $0, (void()*)(void()*~) $1 }
call main
to:@4
@4: scope:[] from @3
@ -73,6 +73,8 @@ interrupt(HARDWARE_ALL)(void()) nmiHandler()
(label) nmiHandler::@return
Simplifying constant pointer cast (byte*) 49178
Simplifying constant integer cast (void()*~) $0
Simplifying constant integer cast (void()*~) $1
Successful SSA optimization PassNCastSimplification
Simple Condition (bool~) entryPoint::$0 [6] if((byte) entryPoint::i#1!=rangelast(0,$31)) goto entryPoint::@1
Successful SSA optimization Pass2ConditionalJumpSimplification

View File

@ -1235,7 +1235,7 @@ mulf16s::@return: scope:[mulf16s] from mulf16s::@2
@60: scope:[] from @51
(byte*) bitmap_screen#25 ← phi( @51/(byte*) bitmap_screen#27 )
(byte*) bitmap_gfx#26 ← phi( @51/(byte*) bitmap_gfx#28 )
(struct Segment[$16]) letter_c ← { { (const byte) MOVE_TO, { (number) $6c, (number) $92 }, { (number) 0, (number) 0 } }, { (const byte) SPLINE_TO, { (number) $59, (number) $b6 }, { (number) $67, (number) $a9 } }, { (const byte) SPLINE_TO, { (number) $3b, (number) $c3 }, { (number) $4b, (number) $c3 } }, { (const byte) SPLINE_TO, { (number) $17, (number) $b2 }, { (number) $26, (number) $c3 } }, { (const byte) SPLINE_TO, { (number) 9, (number) $84 }, { (number) 9, (number) $a1 } }, { (const byte) SPLINE_TO, { (number) $19, (number) $57 }, { (number) 9, (number) $68 } }, { (const byte) SPLINE_TO, { (number) $41, (number) $45 }, { (number) $2a, (number) $45 } }, { (const byte) SPLINE_TO, { (number) $5d, (number) $4f }, { (number) $52, (number) $45 } }, { (const byte) SPLINE_TO, { (number) $69, (number) $62 }, { (number) $69, (number) $58 } }, { (const byte) SPLINE_TO, { (number) $66, (number) $6a }, { (number) $69, (number) $67 } }, { (const byte) SPLINE_TO, { (number) $5d, (number) $6d }, { (number) $62, (number) $6d } }, { (const byte) SPLINE_TO, { (number) $51, (number) $68 }, { (number) $55, (number) $6d } }, { (const byte) SPLINE_TO, { (number) $4e, (number) $5d }, { (number) $4f, (number) $65 } }, { (const byte) SPLINE_TO, { (number) $49, (number) $52 }, { (number) $4e, (number) $56 } }, { (const byte) SPLINE_TO, { (number) $3d, (number) $4e }, { (number) $45, (number) $4e } }, { (const byte) SPLINE_TO, { (number) $28, (number) $58 }, { (number) $30, (number) $4e } }, { (const byte) SPLINE_TO, { (number) $1d, (number) $79 }, { (number) $1d, (number) $64 } }, { (const byte) SPLINE_TO, { (number) $28, (number) $9e }, { (number) $1d, (number) $8e } }, { (const byte) SPLINE_TO, { (number) $44, (number) $ae }, { (number) $32, (number) $ae } }, { (const byte) SPLINE_TO, { (number) $5b, (number) $a6 }, { (number) $50, (number) $ae } }, { (const byte) SPLINE_TO, { (number) $68, (number) $90 }, { (number) $62, (number) $a0 } }, { (const byte) LINE_TO, { (number) $6c, (number) $92 }, { (number) 0, (number) 0 } } }
(struct Segment[$16]) letter_c ← { (struct Segment){ (const byte) MOVE_TO, (struct SplineVector16){ (signed word)(number) $6c, (signed word)(number) $92 }, (struct SplineVector16){ (signed word)(number) 0, (signed word)(number) 0 } }, (struct Segment){ (const byte) SPLINE_TO, (struct SplineVector16){ (signed word)(number) $59, (signed word)(number) $b6 }, (struct SplineVector16){ (signed word)(number) $67, (signed word)(number) $a9 } }, (struct Segment){ (const byte) SPLINE_TO, (struct SplineVector16){ (signed word)(number) $3b, (signed word)(number) $c3 }, (struct SplineVector16){ (signed word)(number) $4b, (signed word)(number) $c3 } }, (struct Segment){ (const byte) SPLINE_TO, (struct SplineVector16){ (signed word)(number) $17, (signed word)(number) $b2 }, (struct SplineVector16){ (signed word)(number) $26, (signed word)(number) $c3 } }, (struct Segment){ (const byte) SPLINE_TO, (struct SplineVector16){ (signed word)(number) 9, (signed word)(number) $84 }, (struct SplineVector16){ (signed word)(number) 9, (signed word)(number) $a1 } }, (struct Segment){ (const byte) SPLINE_TO, (struct SplineVector16){ (signed word)(number) $19, (signed word)(number) $57 }, (struct SplineVector16){ (signed word)(number) 9, (signed word)(number) $68 } }, (struct Segment){ (const byte) SPLINE_TO, (struct SplineVector16){ (signed word)(number) $41, (signed word)(number) $45 }, (struct SplineVector16){ (signed word)(number) $2a, (signed word)(number) $45 } }, (struct Segment){ (const byte) SPLINE_TO, (struct SplineVector16){ (signed word)(number) $5d, (signed word)(number) $4f }, (struct SplineVector16){ (signed word)(number) $52, (signed word)(number) $45 } }, (struct Segment){ (const byte) SPLINE_TO, (struct SplineVector16){ (signed word)(number) $69, (signed word)(number) $62 }, (struct SplineVector16){ (signed word)(number) $69, (signed word)(number) $58 } }, (struct Segment){ (const byte) SPLINE_TO, (struct SplineVector16){ (signed word)(number) $66, (signed word)(number) $6a }, (struct SplineVector16){ (signed word)(number) $69, (signed word)(number) $67 } }, (struct Segment){ (const byte) SPLINE_TO, (struct SplineVector16){ (signed word)(number) $5d, (signed word)(number) $6d }, (struct SplineVector16){ (signed word)(number) $62, (signed word)(number) $6d } }, (struct Segment){ (const byte) SPLINE_TO, (struct SplineVector16){ (signed word)(number) $51, (signed word)(number) $68 }, (struct SplineVector16){ (signed word)(number) $55, (signed word)(number) $6d } }, (struct Segment){ (const byte) SPLINE_TO, (struct SplineVector16){ (signed word)(number) $4e, (signed word)(number) $5d }, (struct SplineVector16){ (signed word)(number) $4f, (signed word)(number) $65 } }, (struct Segment){ (const byte) SPLINE_TO, (struct SplineVector16){ (signed word)(number) $49, (signed word)(number) $52 }, (struct SplineVector16){ (signed word)(number) $4e, (signed word)(number) $56 } }, (struct Segment){ (const byte) SPLINE_TO, (struct SplineVector16){ (signed word)(number) $3d, (signed word)(number) $4e }, (struct SplineVector16){ (signed word)(number) $45, (signed word)(number) $4e } }, (struct Segment){ (const byte) SPLINE_TO, (struct SplineVector16){ (signed word)(number) $28, (signed word)(number) $58 }, (struct SplineVector16){ (signed word)(number) $30, (signed word)(number) $4e } }, (struct Segment){ (const byte) SPLINE_TO, (struct SplineVector16){ (signed word)(number) $1d, (signed word)(number) $79 }, (struct SplineVector16){ (signed word)(number) $1d, (signed word)(number) $64 } }, (struct Segment){ (const byte) SPLINE_TO, (struct SplineVector16){ (signed word)(number) $28, (signed word)(number) $9e }, (struct SplineVector16){ (signed word)(number) $1d, (signed word)(number) $8e } }, (struct Segment){ (const byte) SPLINE_TO, (struct SplineVector16){ (signed word)(number) $44, (signed word)(number) $ae }, (struct SplineVector16){ (signed word)(number) $32, (signed word)(number) $ae } }, (struct Segment){ (const byte) SPLINE_TO, (struct SplineVector16){ (signed word)(number) $5b, (signed word)(number) $a6 }, (struct SplineVector16){ (signed word)(number) $50, (signed word)(number) $ae } }, (struct Segment){ (const byte) SPLINE_TO, (struct SplineVector16){ (signed word)(number) $68, (signed word)(number) $90 }, (struct SplineVector16){ (signed word)(number) $62, (signed word)(number) $a0 } }, (struct Segment){ (const byte) LINE_TO, (struct SplineVector16){ (signed word)(number) $6c, (signed word)(number) $92 }, (struct SplineVector16){ (signed word)(number) 0, (signed word)(number) 0 } } }
to:@63
(void()) main()
@ -3109,8 +3109,6 @@ Adding number conversion cast (snumber) rotate::$10 in (number~) rotate::$10 ←
Adding number conversion cast (snumber) 2 in (number~) rotate::$13 ← (signed word~) rotate::$12 * (number) 2
Adding number conversion cast (snumber) rotate::$13 in (number~) rotate::$13 ← (signed word~) rotate::$12 * (snumber)(number) 2
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (struct Segment[$16]) letter_c ← (struct Segment[$16]){ (struct Segment){ (const byte) MOVE_TO, (struct SplineVector16){ (signed word)(number) $6c, (signed word)(number) $92 }, (struct SplineVector16){ (signed word)(number) 0, (signed word)(number) 0 } }, (struct Segment){ (const byte) SPLINE_TO, (struct SplineVector16){ (signed word)(number) $59, (signed word)(number) $b6 }, (struct SplineVector16){ (signed word)(number) $67, (signed word)(number) $a9 } }, (struct Segment){ (const byte) SPLINE_TO, (struct SplineVector16){ (signed word)(number) $3b, (signed word)(number) $c3 }, (struct SplineVector16){ (signed word)(number) $4b, (signed word)(number) $c3 } }, (struct Segment){ (const byte) SPLINE_TO, (struct SplineVector16){ (signed word)(number) $17, (signed word)(number) $b2 }, (struct SplineVector16){ (signed word)(number) $26, (signed word)(number) $c3 } }, (struct Segment){ (const byte) SPLINE_TO, (struct SplineVector16){ (signed word)(number) 9, (signed word)(number) $84 }, (struct SplineVector16){ (signed word)(number) 9, (signed word)(number) $a1 } }, (struct Segment){ (const byte) SPLINE_TO, (struct SplineVector16){ (signed word)(number) $19, (signed word)(number) $57 }, (struct SplineVector16){ (signed word)(number) 9, (signed word)(number) $68 } }, (struct Segment){ (const byte) SPLINE_TO, (struct SplineVector16){ (signed word)(number) $41, (signed word)(number) $45 }, (struct SplineVector16){ (signed word)(number) $2a, (signed word)(number) $45 } }, (struct Segment){ (const byte) SPLINE_TO, (struct SplineVector16){ (signed word)(number) $5d, (signed word)(number) $4f }, (struct SplineVector16){ (signed word)(number) $52, (signed word)(number) $45 } }, (struct Segment){ (const byte) SPLINE_TO, (struct SplineVector16){ (signed word)(number) $69, (signed word)(number) $62 }, (struct SplineVector16){ (signed word)(number) $69, (signed word)(number) $58 } }, (struct Segment){ (const byte) SPLINE_TO, (struct SplineVector16){ (signed word)(number) $66, (signed word)(number) $6a }, (struct SplineVector16){ (signed word)(number) $69, (signed word)(number) $67 } }, (struct Segment){ (const byte) SPLINE_TO, (struct SplineVector16){ (signed word)(number) $5d, (signed word)(number) $6d }, (struct SplineVector16){ (signed word)(number) $62, (signed word)(number) $6d } }, (struct Segment){ (const byte) SPLINE_TO, (struct SplineVector16){ (signed word)(number) $51, (signed word)(number) $68 }, (struct SplineVector16){ (signed word)(number) $55, (signed word)(number) $6d } }, (struct Segment){ (const byte) SPLINE_TO, (struct SplineVector16){ (signed word)(number) $4e, (signed word)(number) $5d }, (struct SplineVector16){ (signed word)(number) $4f, (signed word)(number) $65 } }, (struct Segment){ (const byte) SPLINE_TO, (struct SplineVector16){ (signed word)(number) $49, (signed word)(number) $52 }, (struct SplineVector16){ (signed word)(number) $4e, (signed word)(number) $56 } }, (struct Segment){ (const byte) SPLINE_TO, (struct SplineVector16){ (signed word)(number) $3d, (signed word)(number) $4e }, (struct SplineVector16){ (signed word)(number) $45, (signed word)(number) $4e } }, (struct Segment){ (const byte) SPLINE_TO, (struct SplineVector16){ (signed word)(number) $28, (signed word)(number) $58 }, (struct SplineVector16){ (signed word)(number) $30, (signed word)(number) $4e } }, (struct Segment){ (const byte) SPLINE_TO, (struct SplineVector16){ (signed word)(number) $1d, (signed word)(number) $79 }, (struct SplineVector16){ (signed word)(number) $1d, (signed word)(number) $64 } }, (struct Segment){ (const byte) SPLINE_TO, (struct SplineVector16){ (signed word)(number) $28, (signed word)(number) $9e }, (struct SplineVector16){ (signed word)(number) $1d, (signed word)(number) $8e } }, (struct Segment){ (const byte) SPLINE_TO, (struct SplineVector16){ (signed word)(number) $44, (signed word)(number) $ae }, (struct SplineVector16){ (signed word)(number) $32, (signed word)(number) $ae } }, (struct Segment){ (const byte) SPLINE_TO, (struct SplineVector16){ (signed word)(number) $5b, (signed word)(number) $a6 }, (struct SplineVector16){ (signed word)(number) $50, (signed word)(number) $ae } }, (struct Segment){ (const byte) SPLINE_TO, (struct SplineVector16){ (signed word)(number) $68, (signed word)(number) $90 }, (struct SplineVector16){ (signed word)(number) $62, (signed word)(number) $a0 } }, (struct Segment){ (const byte) LINE_TO, (struct SplineVector16){ (signed word)(number) $6c, (signed word)(number) $92 }, (struct SplineVector16){ (signed word)(number) 0, (signed word)(number) 0 } } }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (byte*~) memset::$2 ← (byte*)(void*) memset::str#3
Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#3
Inlining cast (byte) bitmap_init::bits#0 ← (unumber)(number) $80

View File

@ -1641,23 +1641,6 @@ sprites_irq: {
keyboard_matrix_row_bitmask: .byte $fe, $fd, $fb, $f7, $ef, $df, $bf, $7f
// Keyboard matrix column bitmasks for a specific keybooard matrix column when reading the keyboard. (columns are numbered 0-7)
keyboard_matrix_col_bitmask: .byte 1, 2, 4, 8, $10, $20, $40, $80
// Keyboard event buffer. Contains keycodes for key presses/releases. Presses are represented by the keycode. Releases by keycode | $40. The buffer is filled by keyboard_scan()
keyboard_events: .fill 8, 0
// The values scanned values for each row. Set by keyboard_scan() and used by keyboard_get_event()
keyboard_scan_values: .fill 8, 0
// The playfield. 0 is empty non-zero is color.
// The playfield is layed out line by line, meaning the first 10 bytes are line 1, the next 10 line 2 and so forth,
playfield: .fill PLAYFIELD_LINES*PLAYFIELD_COLS, 0
// The color #1 to use for the pieces for each level
PIECES_COLORS_1: .byte BLUE, GREEN, PURPLE, BLUE, RED, LIGHT_GREEN, RED, BLUE, LIGHT_BLUE, RED, BLUE, GREEN, PURPLE, BLUE, RED, LIGHT_GREEN, RED, BLUE, LIGHT_BLUE, RED, BLUE, GREEN, PURPLE, BLUE, RED, LIGHT_GREEN, RED, BLUE, LIGHT_BLUE, RED
// The color #2 to use for the pieces for each level
PIECES_COLORS_2: .byte CYAN, LIGHT_GREEN, PINK, LIGHT_GREEN, LIGHT_GREEN, LIGHT_BLUE, DARK_GREY, PURPLE, RED, ORANGE, CYAN, LIGHT_GREEN, PINK, LIGHT_GREEN, LIGHT_GREEN, LIGHT_BLUE, DARK_GREY, PURPLE, RED, ORANGE, CYAN, LIGHT_GREEN, PINK, LIGHT_GREEN, LIGHT_GREEN, LIGHT_BLUE, DARK_GREY, PURPLE, RED, ORANGE
// Pointers to the screen address for rendering each playfield line
// The lines for screen 1 is aligned with 0x80 and screen 2 with 0x40 - so XOR'ing with 0x40 gives screen 2 lines.
.align $80
screen_lines_1: .fill 2*PLAYFIELD_LINES, 0
.align $40
screen_lines_2: .fill 2*PLAYFIELD_LINES, 0
// The T-piece
.align $40
PIECE_T: .byte 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0
@ -1686,16 +1669,33 @@ sprites_irq: {
// The initial X/Y for each piece
PIECES_START_X: .byte 4, 4, 4, 4, 4, 4, 4
PIECES_START_Y: .byte 1, 1, 1, 1, 1, 0, 1
// Pointers to the playfield address for each playfield line
playfield_lines: .fill 2*PLAYFIELD_LINES, 0
// Indixes into the playfield for each playfield line
playfield_lines_idx: .fill PLAYFIELD_LINES+1, 0
// The speed of moving down the piece when soft-drop is not activated
// This array holds the number of frames per move by level (0-29). For all levels 29+ the value is 1.
MOVEDOWN_SLOW_SPEEDS: .byte $30, $2b, $26, $21, $1c, $17, $12, $d, 8, 6, 5, 5, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1
// Base Score values for removing 0-4 lines (in BCD)
// These values are added to score_add_bcd for each level gained.
SCORE_BASE_BCD: .dword 0, $40, $100, $300, $1200
// Keyboard event buffer. Contains keycodes for key presses/releases. Presses are represented by the keycode. Releases by keycode | $40. The buffer is filled by keyboard_scan()
keyboard_events: .fill 8, 0
// The values scanned values for each row. Set by keyboard_scan() and used by keyboard_get_event()
keyboard_scan_values: .fill 8, 0
// The playfield. 0 is empty non-zero is color.
// The playfield is layed out line by line, meaning the first 10 bytes are line 1, the next 10 line 2 and so forth,
playfield: .fill PLAYFIELD_LINES*PLAYFIELD_COLS, 0
// The color #1 to use for the pieces for each level
PIECES_COLORS_1: .byte BLUE, GREEN, PURPLE, BLUE, RED, LIGHT_GREEN, RED, BLUE, LIGHT_BLUE, RED, BLUE, GREEN, PURPLE, BLUE, RED, LIGHT_GREEN, RED, BLUE, LIGHT_BLUE, RED, BLUE, GREEN, PURPLE, BLUE, RED, LIGHT_GREEN, RED, BLUE, LIGHT_BLUE, RED
// The color #2 to use for the pieces for each level
PIECES_COLORS_2: .byte CYAN, LIGHT_GREEN, PINK, LIGHT_GREEN, LIGHT_GREEN, LIGHT_BLUE, DARK_GREY, PURPLE, RED, ORANGE, CYAN, LIGHT_GREEN, PINK, LIGHT_GREEN, LIGHT_GREEN, LIGHT_BLUE, DARK_GREY, PURPLE, RED, ORANGE, CYAN, LIGHT_GREEN, PINK, LIGHT_GREEN, LIGHT_GREEN, LIGHT_BLUE, DARK_GREY, PURPLE, RED, ORANGE
// Pointers to the screen address for rendering each playfield line
// The lines for screen 1 is aligned with 0x80 and screen 2 with 0x40 - so XOR'ing with 0x40 gives screen 2 lines.
.align $80
screen_lines_1: .fill 2*PLAYFIELD_LINES, 0
.align $40
screen_lines_2: .fill 2*PLAYFIELD_LINES, 0
// Pointers to the playfield address for each playfield line
playfield_lines: .fill 2*PLAYFIELD_LINES, 0
// Indixes into the playfield for each playfield line
playfield_lines_idx: .fill PLAYFIELD_LINES+1, 0
// Score values for removing 0-4 lines (in BCD)
// These values are updated based on the players level and the base values from SCORE_BASE_BCD
score_add_bcd: .fill 4*5, 0

File diff suppressed because it is too large Load Diff

View File

@ -141,9 +141,9 @@ syscall2::@return: scope:[syscall2] from syscall2
@7: scope:[] from @begin
(void()*~) $0 ← & (void()) syscall1()
(void()*~) $1 ← & (void()) syscall2()
(struct SysCall[]) SYSCALLS ← { { (const byte) JMP, (void()*~) $0, (const byte) NOP }, { (const byte) JMP, (void()*~) $1, (const byte) NOP } }
(struct SysCall[]) SYSCALLS ← { (struct SysCall){ (const byte) JMP, (void()*)(void()*~) $0, (const byte) NOP }, (struct SysCall){ (const byte) JMP, (void()*)(void()*~) $1, (const byte) NOP } }
(void()*~) $2 ← & (void()) main()
(struct SysCall[]) SYSCALL_RESET ← { { (const byte) JMP, (void()*~) $2, (const byte) NOP } }
(struct SysCall[]) SYSCALL_RESET ← { (struct SysCall){ (const byte) JMP, (void()*)(void()*~) $2, (const byte) NOP } }
call main
to:@8
@8: scope:[] from @7
@ -278,6 +278,9 @@ Simplifying constant integer cast $36
Simplifying constant integer cast $42
Simplifying constant integer cast $4f
Simplifying constant integer cast $4e
Simplifying constant integer cast (void()*~) $0
Simplifying constant integer cast (void()*~) $1
Simplifying constant integer cast (void()*~) $2
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $14

View File

@ -436,9 +436,9 @@ init_font_hex: {
bne __b1
rts
}
print_hextab: .text "0123456789abcdef"
// Bit patterns for symbols 0-f (3x5 pixels) used in font hex
FONT_HEX_PROTO: .byte 2, 5, 5, 5, 2, 6, 2, 2, 2, 7, 6, 1, 2, 4, 7, 6, 1, 2, 1, 6, 5, 5, 7, 1, 1, 7, 4, 6, 1, 6, 3, 4, 6, 5, 2, 7, 1, 1, 1, 1, 2, 5, 2, 5, 2, 2, 5, 3, 1, 1, 2, 5, 7, 5, 5, 6, 5, 6, 5, 6, 2, 5, 4, 5, 2, 6, 5, 5, 5, 6, 7, 4, 6, 4, 7, 7, 4, 6, 4, 4
print_hextab: .text "0123456789abcdef"
// Angles representing ATAN(0.5), ATAN(0.25), ATAN(0.125), ...
CORDIC_ATAN2_ANGLES_16:
.for (var i=0; i<CORDIC_ITERATIONS_16; i++)

View File

@ -1,5 +1,5 @@
Resolved forward reference FONT_HEX_PROTO to (byte[]) FONT_HEX_PROTO
Resolved forward reference FONT_HEX_PROTO to (byte[]) FONT_HEX_PROTO
Resolved forward reference FONT_HEX_PROTO to (const byte[]) FONT_HEX_PROTO
Resolved forward reference FONT_HEX_PROTO to (const byte[]) FONT_HEX_PROTO
Fixing pointer addition (word*~) bsearch16u::$7 ← (word*) bsearch16u::items + (byte~) bsearch16u::$6
Fixing pointer addition (word*~) bsearch16u::$15 ← (word*) bsearch16u::pivot + (number) 1
Fixing pointer addition (word*~) bsearch16u::$1 ← (word*) bsearch16u::items - (number) 1
@ -88,14 +88,14 @@ CONTROL FLOW GRAPH SSA
(void()) init_font_hex((byte*) init_font_hex::charset)
init_font_hex: scope:[init_font_hex] from main
(byte*) init_font_hex::charset#6 ← phi( main/(byte*) init_font_hex::charset#1 )
(byte*) init_font_hex::proto_hi#0 ← (byte[]) FONT_HEX_PROTO
(byte*) init_font_hex::proto_hi#0 ← (const byte[]) FONT_HEX_PROTO
(byte) init_font_hex::c#0 ← (byte) 0
to:init_font_hex::@1
init_font_hex::@1: scope:[init_font_hex] from init_font_hex init_font_hex::@5
(byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) init_font_hex::c#0 init_font_hex::@5/(byte) init_font_hex::c#1 )
(byte*) init_font_hex::proto_hi#6 ← phi( init_font_hex/(byte*) init_font_hex::proto_hi#0 init_font_hex::@5/(byte*) init_font_hex::proto_hi#1 )
(byte*) init_font_hex::charset#5 ← phi( init_font_hex/(byte*) init_font_hex::charset#6 init_font_hex::@5/(byte*) init_font_hex::charset#7 )
(byte*) init_font_hex::proto_lo#0 ← (byte[]) FONT_HEX_PROTO
(byte*) init_font_hex::proto_lo#0 ← (const byte[]) FONT_HEX_PROTO
(byte) init_font_hex::c1#0 ← (byte) 0
to:init_font_hex::@2
init_font_hex::@2: scope:[init_font_hex] from init_font_hex::@1 init_font_hex::@4
@ -156,7 +156,6 @@ init_font_hex::@return: scope:[init_font_hex] from init_font_hex::@5
return
to:@return
@1: scope:[] from @begin
(byte[]) FONT_HEX_PROTO ← { (number) 2, (number) 5, (number) 5, (number) 5, (number) 2, (number) 6, (number) 2, (number) 2, (number) 2, (number) 7, (number) 6, (number) 1, (number) 2, (number) 4, (number) 7, (number) 6, (number) 1, (number) 2, (number) 1, (number) 6, (number) 5, (number) 5, (number) 7, (number) 1, (number) 1, (number) 7, (number) 4, (number) 6, (number) 1, (number) 6, (number) 3, (number) 4, (number) 6, (number) 5, (number) 2, (number) 7, (number) 1, (number) 1, (number) 1, (number) 1, (number) 2, (number) 5, (number) 2, (number) 5, (number) 2, (number) 2, (number) 5, (number) 3, (number) 1, (number) 1, (number) 2, (number) 5, (number) 7, (number) 5, (number) 5, (number) 6, (number) 5, (number) 6, (number) 5, (number) 6, (number) 2, (number) 5, (number) 4, (number) 5, (number) 2, (number) 6, (number) 5, (number) 5, (number) 5, (number) 6, (number) 7, (number) 4, (number) 6, (number) 4, (number) 7, (number) 7, (number) 4, (number) 6, (number) 4, (number) 4 }
(word[CORDIC_ITERATIONS_16]) CORDIC_ATAN2_ANGLES_16 ← kickasm {{ .for (var i=0; i<CORDIC_ITERATIONS_16; i++)
.word 256*2*256*atan(1/pow(2,i))/PI/2
}}
@ -641,7 +640,7 @@ SYMBOL TABLE SSA
(word[CORDIC_ITERATIONS_16]) CORDIC_ATAN2_ANGLES_16
(const byte) CORDIC_ITERATIONS_16 = (number) $f
(const byte*) D018 = (byte*)(number) $d018
(byte[]) FONT_HEX_PROTO
(const byte[]) FONT_HEX_PROTO = { (byte)(number) 2, (byte)(number) 5, (byte)(number) 5, (byte)(number) 5, (byte)(number) 2, (byte)(number) 6, (byte)(number) 2, (byte)(number) 2, (byte)(number) 2, (byte)(number) 7, (byte)(number) 6, (byte)(number) 1, (byte)(number) 2, (byte)(number) 4, (byte)(number) 7, (byte)(number) 6, (byte)(number) 1, (byte)(number) 2, (byte)(number) 1, (byte)(number) 6, (byte)(number) 5, (byte)(number) 5, (byte)(number) 7, (byte)(number) 1, (byte)(number) 1, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 1, (byte)(number) 6, (byte)(number) 3, (byte)(number) 4, (byte)(number) 6, (byte)(number) 5, (byte)(number) 2, (byte)(number) 7, (byte)(number) 1, (byte)(number) 1, (byte)(number) 1, (byte)(number) 1, (byte)(number) 2, (byte)(number) 5, (byte)(number) 2, (byte)(number) 5, (byte)(number) 2, (byte)(number) 2, (byte)(number) 5, (byte)(number) 3, (byte)(number) 1, (byte)(number) 1, (byte)(number) 2, (byte)(number) 5, (byte)(number) 7, (byte)(number) 5, (byte)(number) 5, (byte)(number) 6, (byte)(number) 5, (byte)(number) 6, (byte)(number) 5, (byte)(number) 6, (byte)(number) 2, (byte)(number) 5, (byte)(number) 4, (byte)(number) 5, (byte)(number) 2, (byte)(number) 6, (byte)(number) 5, (byte)(number) 5, (byte)(number) 5, (byte)(number) 6, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 4, (byte)(number) 7, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 4, (byte)(number) 4 }
(const byte) RADIX::BINARY = (number) 2
(const byte) RADIX::DECIMAL = (number) $a
(const byte) RADIX::HEXADECIMAL = (number) $10
@ -1150,8 +1149,6 @@ Adding number conversion cast (unumber) $80 in (number~) main::$10 ← (word) ma
Adding number conversion cast (unumber) main::$10 in (number~) main::$10 ← (word) main::angle_w#0 + (unumber)(number) $80
Adding number conversion cast (unumber) main::$11 in (number~) main::$11 ← > (unumber~) main::$10
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (byte[]) FONT_HEX_PROTO ← (byte[]){ (byte)(number) 2, (byte)(number) 5, (byte)(number) 5, (byte)(number) 5, (byte)(number) 2, (byte)(number) 6, (byte)(number) 2, (byte)(number) 2, (byte)(number) 2, (byte)(number) 7, (byte)(number) 6, (byte)(number) 1, (byte)(number) 2, (byte)(number) 4, (byte)(number) 7, (byte)(number) 6, (byte)(number) 1, (byte)(number) 2, (byte)(number) 1, (byte)(number) 6, (byte)(number) 5, (byte)(number) 5, (byte)(number) 7, (byte)(number) 1, (byte)(number) 1, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 1, (byte)(number) 6, (byte)(number) 3, (byte)(number) 4, (byte)(number) 6, (byte)(number) 5, (byte)(number) 2, (byte)(number) 7, (byte)(number) 1, (byte)(number) 1, (byte)(number) 1, (byte)(number) 1, (byte)(number) 2, (byte)(number) 5, (byte)(number) 2, (byte)(number) 5, (byte)(number) 2, (byte)(number) 2, (byte)(number) 5, (byte)(number) 3, (byte)(number) 1, (byte)(number) 1, (byte)(number) 2, (byte)(number) 5, (byte)(number) 7, (byte)(number) 5, (byte)(number) 5, (byte)(number) 6, (byte)(number) 5, (byte)(number) 6, (byte)(number) 5, (byte)(number) 6, (byte)(number) 2, (byte)(number) 5, (byte)(number) 4, (byte)(number) 5, (byte)(number) 2, (byte)(number) 6, (byte)(number) 5, (byte)(number) 5, (byte)(number) 5, (byte)(number) 6, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 4, (byte)(number) 7, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 4, (byte)(number) 4 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (byte) init_font_hex::idx#0 ← (unumber)(number) 0
Inlining cast *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#0) ← (unumber)(number) 0
Inlining cast *((byte*) init_font_hex::charset#4 + (byte) init_font_hex::idx#6) ← (unumber)(number) 0
@ -1166,6 +1163,86 @@ Inlining cast (signed word~) main::$5 ← (signed word)(word~) main::$4
Inlining cast (byte~) main::$6 ← (byte)(signed byte) main::y#2
Inlining cast (signed word~) main::$8 ← (signed word)(word~) main::$7
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 6
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 7
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 4
Simplifying constant integer cast 7
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 1
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 7
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 7
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 6
Simplifying constant integer cast 3
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 7
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 3
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 7
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 4
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 7
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 4
Simplifying constant integer cast 7
Simplifying constant integer cast 7
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 4
Simplifying constant integer cast 4
Simplifying constant pointer cast (byte*) 53272
Simplifying constant pointer cast (byte*) 55296
Simplifying constant pointer cast (byte*) 8192
@ -1180,86 +1257,6 @@ Simplifying constant integer cast 0
Simplifying constant integer cast 5
Simplifying constant integer cast 8
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 6
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 7
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 4
Simplifying constant integer cast 7
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 1
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 7
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 7
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 6
Simplifying constant integer cast 3
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 7
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 3
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 7
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 4
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 7
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 4
Simplifying constant integer cast 7
Simplifying constant integer cast 7
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 4
Simplifying constant integer cast 4
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
@ -1337,10 +1334,10 @@ Inferred type updated to byte in (unumber~) main::toD0181_$7 ← (byte~) main::t
Inferred type updated to byte in (unumber~) main::toD0181_$8 ← (byte~) main::toD0181_$3 | (byte~) main::toD0181_$7
Inferred type updated to word in (unumber~) main::$10 ← (word) main::angle_w#0 + (byte) $80
Inferred type updated to byte in (unumber~) main::$11 ← > (word~) main::$10
Inversing boolean not [61] (bool~) atan2_16::$17 ← (signed word) atan2_16::yi#3 != (signed byte) 0 from [60] (bool~) atan2_16::$16 ← (signed word) atan2_16::yi#3 == (signed byte) 0
Inversing boolean not [70] (bool~) atan2_16::$11 ← (signed word) atan2_16::x#4 >= (signed byte) 0 from [69] (bool~) atan2_16::$10 ← (signed word) atan2_16::x#4 < (signed byte) 0
Inversing boolean not [81] (bool~) atan2_16::$19 ← (byte) 0 == (byte) atan2_16::shift#4 from [80] (bool~) atan2_16::$24 ← (byte) 0 != (byte) atan2_16::shift#4
Inversing boolean not [105] (bool~) atan2_16::$14 ← (signed word) atan2_16::y#4 >= (signed byte) 0 from [104] (bool~) atan2_16::$13 ← (signed word) atan2_16::y#4 < (signed byte) 0
Inversing boolean not [60] (bool~) atan2_16::$17 ← (signed word) atan2_16::yi#3 != (signed byte) 0 from [59] (bool~) atan2_16::$16 ← (signed word) atan2_16::yi#3 == (signed byte) 0
Inversing boolean not [69] (bool~) atan2_16::$11 ← (signed word) atan2_16::x#4 >= (signed byte) 0 from [68] (bool~) atan2_16::$10 ← (signed word) atan2_16::x#4 < (signed byte) 0
Inversing boolean not [80] (bool~) atan2_16::$19 ← (byte) 0 == (byte) atan2_16::shift#4 from [79] (bool~) atan2_16::$24 ← (byte) 0 != (byte) atan2_16::shift#4
Inversing boolean not [104] (bool~) atan2_16::$14 ← (signed word) atan2_16::y#4 >= (signed byte) 0 from [103] (bool~) atan2_16::$13 ← (signed word) atan2_16::y#4 < (signed byte) 0
Successful SSA optimization Pass2UnaryNotSimplification
Alias (byte*) init_font_hex::charset#3 = (byte*) init_font_hex::charset#4
Alias (byte) init_font_hex::idx#2 = (byte) init_font_hex::idx#6
@ -1477,28 +1474,27 @@ Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) init_font_hex::$3 [19] if((byte) init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3
Simple Condition (bool~) init_font_hex::$4 [29] if((byte) init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2
Simple Condition (bool~) init_font_hex::$5 [34] if((byte) init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1
Simple Condition (bool~) atan2_16::$0 [40] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1
Simple Condition (bool~) atan2_16::$5 [49] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4
Simple Condition (bool~) atan2_16::$17 [62] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@16
Simple Condition (bool~) atan2_16::$11 [71] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7
Simple Condition (bool~) atan2_16::$18 [74] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@19
Simple Condition (bool~) atan2_16::$19 [82] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@25
Simple Condition (bool~) atan2_16::$20 [85] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@26
Simple Condition (bool~) atan2_16::$21 [102] if((byte) atan2_16::i#1!=rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@15
Simple Condition (bool~) atan2_16::$14 [106] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8
Simple Condition (bool~) main::$14 [219] if((signed byte) main::x#1!=rangelast(-$13,$14)) goto main::@2
Simple Condition (bool~) main::$15 [223] if((signed byte) main::y#1!=rangelast(-$c,$c)) goto main::@1
Simple Condition (bool~) diff::$0 [238] if((byte) diff::bb1#0<(byte) diff::bb2#0) goto diff::@1
Simple Condition (bool~) atan2_16::$0 [39] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1
Simple Condition (bool~) atan2_16::$5 [48] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4
Simple Condition (bool~) atan2_16::$17 [61] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@16
Simple Condition (bool~) atan2_16::$11 [70] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7
Simple Condition (bool~) atan2_16::$18 [73] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@19
Simple Condition (bool~) atan2_16::$19 [81] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@25
Simple Condition (bool~) atan2_16::$20 [84] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@26
Simple Condition (bool~) atan2_16::$21 [101] if((byte) atan2_16::i#1!=rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@15
Simple Condition (bool~) atan2_16::$14 [105] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8
Simple Condition (bool~) main::$14 [218] if((signed byte) main::x#1!=rangelast(-$13,$14)) goto main::@2
Simple Condition (bool~) main::$15 [222] if((signed byte) main::y#1!=rangelast(-$c,$c)) goto main::@1
Simple Condition (bool~) diff::$0 [237] if((byte) diff::bb1#0<(byte) diff::bb2#0) goto diff::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Negating conditional jump and destination [102] if((byte) atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@17
Negating conditional jump and destination [101] if((byte) atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@17
Successful SSA optimization Pass2ConditionalJumpSequenceImprovement
Identified constant from value list (byte[]) { (byte) 2, (byte) 5, (byte) 5, (byte) 5, (byte) 2, (byte) 6, (byte) 2, (byte) 2, (byte) 2, (byte) 7, (byte) 6, (byte) 1, (byte) 2, (byte) 4, (byte) 7, (byte) 6, (byte) 1, (byte) 2, (byte) 1, (byte) 6, (byte) 5, (byte) 5, (byte) 7, (byte) 1, (byte) 1, (byte) 7, (byte) 4, (byte) 6, (byte) 1, (byte) 6, (byte) 3, (byte) 4, (byte) 6, (byte) 5, (byte) 2, (byte) 7, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 2, (byte) 5, (byte) 2, (byte) 5, (byte) 2, (byte) 2, (byte) 5, (byte) 3, (byte) 1, (byte) 1, (byte) 2, (byte) 5, (byte) 7, (byte) 5, (byte) 5, (byte) 6, (byte) 5, (byte) 6, (byte) 5, (byte) 6, (byte) 2, (byte) 5, (byte) 4, (byte) 5, (byte) 2, (byte) 6, (byte) 5, (byte) 5, (byte) 5, (byte) 6, (byte) 7, (byte) 4, (byte) 6, (byte) 4, (byte) 7, (byte) 7, (byte) 4, (byte) 6, (byte) 4, (byte) 4 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const byte*) init_font_hex::proto_hi#0 = FONT_HEX_PROTO
Constant (const byte) init_font_hex::c#0 = 0
Constant (const byte*) init_font_hex::proto_lo#0 = FONT_HEX_PROTO
Constant (const byte) init_font_hex::c1#0 = 0
Constant (const byte) init_font_hex::idx#0 = 0
Constant (const byte) init_font_hex::i#0 = 0
Constant (const byte[]) FONT_HEX_PROTO = { 2, 5, 5, 5, 2, 6, 2, 2, 2, 7, 6, 1, 2, 4, 7, 6, 1, 2, 1, 6, 5, 5, 7, 1, 1, 7, 4, 6, 1, 6, 3, 4, 6, 5, 2, 7, 1, 1, 1, 1, 2, 5, 2, 5, 2, 2, 5, 3, 1, 1, 2, 5, 7, 5, 5, 6, 5, 6, 5, 6, 2, 5, 4, 5, 2, 6, 5, 5, 5, 6, 7, 4, 6, 4, 7, 7, 4, 6, 4, 4 }
Constant (const word[CORDIC_ITERATIONS_16]) CORDIC_ATAN2_ANGLES_16 = kickasm {{ .for (var i=0; i<CORDIC_ITERATIONS_16; i++)
.word 256*2*256*atan(1/pow(2,i))/PI/2
}}
@ -1517,13 +1513,11 @@ Constant (const word) main::diff_sum#0 = 0
Constant (const signed byte) main::y#0 = -$c
Constant (const signed byte) main::x#0 = -$13
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte*) init_font_hex::proto_hi#0 = FONT_HEX_PROTO
Constant (const byte*) init_font_hex::proto_lo#0 = FONT_HEX_PROTO
Constant (const word) main::toD0181_$0 = (word)main::toD0181_screen#0
Constant (const word) main::toD0181_$4 = (word)main::toD0181_gfx#0
Constant (const byte*) main::screen_ref#0 = SCREEN_REF
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [230] if(true) goto main::@6
if() condition always true - replacing block destination [229] if(true) goto main::@6
Successful SSA optimization Pass2ConstantIfs
Resolved ranged next value [17] init_font_hex::i#1 ← ++ init_font_hex::i#2 to ++
Resolved ranged comparison value [19] if(init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3 to (number) 5
@ -1531,12 +1525,12 @@ Resolved ranged next value [27] init_font_hex::c1#1 ← ++ init_font_hex::c1#4 t
Resolved ranged comparison value [29] if(init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 to (number) $10
Resolved ranged next value [32] init_font_hex::c#1 ← ++ init_font_hex::c#6 to ++
Resolved ranged comparison value [34] if(init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 to (number) $10
Resolved ranged next value [100] atan2_16::i#1 ← ++ atan2_16::i#2 to ++
Resolved ranged comparison value [102] 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
Resolved ranged next value [217] main::x#1 ← ++ main::x#2 to ++
Resolved ranged comparison value [219] if(main::x#1!=rangelast(-$13,$14)) goto main::@2 to (number) $15
Resolved ranged next value [221] main::y#1 ← ++ main::y#4 to ++
Resolved ranged comparison value [223] if(main::y#1!=rangelast(-$c,$c)) goto main::@1 to (number) $d
Resolved ranged next value [99] atan2_16::i#1 ← ++ atan2_16::i#2 to ++
Resolved ranged comparison value [101] 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
Resolved ranged next value [216] main::x#1 ← ++ main::x#2 to ++
Resolved ranged comparison value [218] if(main::x#1!=rangelast(-$13,$14)) goto main::@2 to (number) $15
Resolved ranged next value [220] main::y#1 ← ++ main::y#4 to ++
Resolved ranged comparison value [222] if(main::y#1!=rangelast(-$c,$c)) goto main::@1 to (number) $d
Simplifying expression containing zero init_font_hex::charset#2 in [8] *((byte*) init_font_hex::charset#2 + (const byte) init_font_hex::idx#0) ← (byte) 0
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused variable (byte) init_font_hex::idx#4 and assignment [15] (byte) init_font_hex::idx#4 ← ++ (byte) init_font_hex::idx#3
@ -1600,13 +1594,13 @@ Rewriting division to use shift [31] (word) atan2_16::angle#1 ← (word) atan2_1
Rewriting multiplication to use shift [45] (byte~) atan2_16::$22 ← (byte) atan2_16::i#2 * (const byte) SIZEOF_WORD
Rewriting multiplication to use shift [49] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 * (const byte) SIZEOF_WORD
Successful SSA optimization Pass2MultiplyToShiftRewriting
Inlining constant with var siblings (const byte*) init_font_hex::proto_hi#0
Inlining constant with var siblings (const byte) init_font_hex::c#0
Inlining constant with var siblings (const byte*) init_font_hex::proto_lo#0
Inlining constant with var siblings (const byte) init_font_hex::c1#0
Inlining constant with var siblings (const byte) init_font_hex::idx#0
Inlining constant with var siblings (const byte) init_font_hex::i#0
Inlining constant with var siblings (const byte*) init_font_hex::charset#1
Inlining constant with var siblings (const byte*) init_font_hex::proto_hi#0
Inlining constant with var siblings (const byte*) init_font_hex::proto_lo#0
Inlining constant with var siblings (const byte) init_font_hex::idx#1
Inlining constant with var siblings (const word) atan2_16::angle#0
Inlining constant with var siblings (const byte) atan2_16::i#0
@ -3235,9 +3229,9 @@ init_font_hex: {
rts
}
// File Data
print_hextab: .text "0123456789abcdef"
// Bit patterns for symbols 0-f (3x5 pixels) used in font hex
FONT_HEX_PROTO: .byte 2, 5, 5, 5, 2, 6, 2, 2, 2, 7, 6, 1, 2, 4, 7, 6, 1, 2, 1, 6, 5, 5, 7, 1, 1, 7, 4, 6, 1, 6, 3, 4, 6, 5, 2, 7, 1, 1, 1, 1, 2, 5, 2, 5, 2, 2, 5, 3, 1, 1, 2, 5, 7, 5, 5, 6, 5, 6, 5, 6, 2, 5, 4, 5, 2, 6, 5, 5, 5, 6, 7, 4, 6, 4, 7, 7, 4, 6, 4, 4
print_hextab: .text "0123456789abcdef"
// Angles representing ATAN(0.5), ATAN(0.25), ATAN(0.125), ...
CORDIC_ATAN2_ANGLES_16:
.for (var i=0; i<CORDIC_ITERATIONS_16; i++)
@ -4301,9 +4295,9 @@ init_font_hex: {
rts
}
// File Data
print_hextab: .text "0123456789abcdef"
// Bit patterns for symbols 0-f (3x5 pixels) used in font hex
FONT_HEX_PROTO: .byte 2, 5, 5, 5, 2, 6, 2, 2, 2, 7, 6, 1, 2, 4, 7, 6, 1, 2, 1, 6, 5, 5, 7, 1, 1, 7, 4, 6, 1, 6, 3, 4, 6, 5, 2, 7, 1, 1, 1, 1, 2, 5, 2, 5, 2, 2, 5, 3, 1, 1, 2, 5, 7, 5, 5, 6, 5, 6, 5, 6, 2, 5, 4, 5, 2, 6, 5, 5, 5, 6, 7, 4, 6, 4, 7, 7, 4, 6, 4, 4
print_hextab: .text "0123456789abcdef"
// Angles representing ATAN(0.5), ATAN(0.25), ATAN(0.125), ...
CORDIC_ATAN2_ANGLES_16:
.for (var i=0; i<CORDIC_ITERATIONS_16; i++)
@ -5486,9 +5480,9 @@ init_font_hex: {
rts
}
// File Data
print_hextab: .text "0123456789abcdef"
// Bit patterns for symbols 0-f (3x5 pixels) used in font hex
FONT_HEX_PROTO: .byte 2, 5, 5, 5, 2, 6, 2, 2, 2, 7, 6, 1, 2, 4, 7, 6, 1, 2, 1, 6, 5, 5, 7, 1, 1, 7, 4, 6, 1, 6, 3, 4, 6, 5, 2, 7, 1, 1, 1, 1, 2, 5, 2, 5, 2, 2, 5, 3, 1, 1, 2, 5, 7, 5, 5, 6, 5, 6, 5, 6, 2, 5, 4, 5, 2, 6, 5, 5, 5, 6, 7, 4, 6, 4, 7, 7, 4, 6, 4, 4
print_hextab: .text "0123456789abcdef"
// Angles representing ATAN(0.5), ATAN(0.25), ATAN(0.125), ...
CORDIC_ATAN2_ANGLES_16:
.for (var i=0; i<CORDIC_ITERATIONS_16; i++)

View File

@ -1,5 +1,5 @@
Resolved forward reference FONT_HEX_PROTO to (byte[]) FONT_HEX_PROTO
Resolved forward reference FONT_HEX_PROTO to (byte[]) FONT_HEX_PROTO
Resolved forward reference FONT_HEX_PROTO to (const byte[]) FONT_HEX_PROTO
Resolved forward reference FONT_HEX_PROTO to (const byte[]) FONT_HEX_PROTO
Fixing pointer array-indexing *((word[CORDIC_ITERATIONS_16]) CORDIC_ATAN2_ANGLES_16 + (byte) atan2_16::i)
Fixing pointer array-indexing *((word[CORDIC_ITERATIONS_16]) CORDIC_ATAN2_ANGLES_16 + (byte) atan2_16::i)
Warning! Adding boolean cast to non-boolean sub-expression (byte) atan2_16::shift
@ -39,14 +39,14 @@ CONTROL FLOW GRAPH SSA
(void()) init_font_hex((byte*) init_font_hex::charset)
init_font_hex: scope:[init_font_hex] from main
(byte*) init_font_hex::charset#6 ← phi( main/(byte*) init_font_hex::charset#1 )
(byte*) init_font_hex::proto_hi#0 ← (byte[]) FONT_HEX_PROTO
(byte*) init_font_hex::proto_hi#0 ← (const byte[]) FONT_HEX_PROTO
(byte) init_font_hex::c#0 ← (byte) 0
to:init_font_hex::@1
init_font_hex::@1: scope:[init_font_hex] from init_font_hex init_font_hex::@5
(byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) init_font_hex::c#0 init_font_hex::@5/(byte) init_font_hex::c#1 )
(byte*) init_font_hex::proto_hi#6 ← phi( init_font_hex/(byte*) init_font_hex::proto_hi#0 init_font_hex::@5/(byte*) init_font_hex::proto_hi#1 )
(byte*) init_font_hex::charset#5 ← phi( init_font_hex/(byte*) init_font_hex::charset#6 init_font_hex::@5/(byte*) init_font_hex::charset#7 )
(byte*) init_font_hex::proto_lo#0 ← (byte[]) FONT_HEX_PROTO
(byte*) init_font_hex::proto_lo#0 ← (const byte[]) FONT_HEX_PROTO
(byte) init_font_hex::c1#0 ← (byte) 0
to:init_font_hex::@2
init_font_hex::@2: scope:[init_font_hex] from init_font_hex::@1 init_font_hex::@4
@ -107,7 +107,6 @@ init_font_hex::@return: scope:[init_font_hex] from init_font_hex::@5
return
to:@return
@1: scope:[] from @begin
(byte[]) FONT_HEX_PROTO ← { (number) 2, (number) 5, (number) 5, (number) 5, (number) 2, (number) 6, (number) 2, (number) 2, (number) 2, (number) 7, (number) 6, (number) 1, (number) 2, (number) 4, (number) 7, (number) 6, (number) 1, (number) 2, (number) 1, (number) 6, (number) 5, (number) 5, (number) 7, (number) 1, (number) 1, (number) 7, (number) 4, (number) 6, (number) 1, (number) 6, (number) 3, (number) 4, (number) 6, (number) 5, (number) 2, (number) 7, (number) 1, (number) 1, (number) 1, (number) 1, (number) 2, (number) 5, (number) 2, (number) 5, (number) 2, (number) 2, (number) 5, (number) 3, (number) 1, (number) 1, (number) 2, (number) 5, (number) 7, (number) 5, (number) 5, (number) 6, (number) 5, (number) 6, (number) 5, (number) 6, (number) 2, (number) 5, (number) 4, (number) 5, (number) 2, (number) 6, (number) 5, (number) 5, (number) 5, (number) 6, (number) 7, (number) 4, (number) 6, (number) 4, (number) 7, (number) 7, (number) 4, (number) 6, (number) 4, (number) 4 }
(word[CORDIC_ITERATIONS_16]) CORDIC_ATAN2_ANGLES_16 ← kickasm {{ .for (var i=0; i<CORDIC_ITERATIONS_16; i++)
.word 256*2*256*atan(1/pow(2,i))/PI/2
}}
@ -430,7 +429,7 @@ SYMBOL TABLE SSA
(word[CORDIC_ITERATIONS_16]) CORDIC_ATAN2_ANGLES_16
(const byte) CORDIC_ITERATIONS_16 = (number) $f
(const byte*) D018 = (byte*)(number) $d018
(byte[]) FONT_HEX_PROTO
(const byte[]) FONT_HEX_PROTO = { (byte)(number) 2, (byte)(number) 5, (byte)(number) 5, (byte)(number) 5, (byte)(number) 2, (byte)(number) 6, (byte)(number) 2, (byte)(number) 2, (byte)(number) 2, (byte)(number) 7, (byte)(number) 6, (byte)(number) 1, (byte)(number) 2, (byte)(number) 4, (byte)(number) 7, (byte)(number) 6, (byte)(number) 1, (byte)(number) 2, (byte)(number) 1, (byte)(number) 6, (byte)(number) 5, (byte)(number) 5, (byte)(number) 7, (byte)(number) 1, (byte)(number) 1, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 1, (byte)(number) 6, (byte)(number) 3, (byte)(number) 4, (byte)(number) 6, (byte)(number) 5, (byte)(number) 2, (byte)(number) 7, (byte)(number) 1, (byte)(number) 1, (byte)(number) 1, (byte)(number) 1, (byte)(number) 2, (byte)(number) 5, (byte)(number) 2, (byte)(number) 5, (byte)(number) 2, (byte)(number) 2, (byte)(number) 5, (byte)(number) 3, (byte)(number) 1, (byte)(number) 1, (byte)(number) 2, (byte)(number) 5, (byte)(number) 7, (byte)(number) 5, (byte)(number) 5, (byte)(number) 6, (byte)(number) 5, (byte)(number) 6, (byte)(number) 5, (byte)(number) 6, (byte)(number) 2, (byte)(number) 5, (byte)(number) 4, (byte)(number) 5, (byte)(number) 2, (byte)(number) 6, (byte)(number) 5, (byte)(number) 5, (byte)(number) 5, (byte)(number) 6, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 4, (byte)(number) 7, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 4, (byte)(number) 4 }
(const byte*) SCREEN = (byte*)(number) $2800
(const byte) SIZEOF_WORD = (byte) 2
(word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y)
@ -804,8 +803,6 @@ Adding number conversion cast (unumber) $80 in (number~) main::$9 ← (word) mai
Adding number conversion cast (unumber) main::$9 in (number~) main::$9 ← (word) main::angle_w#0 + (unumber)(number) $80
Adding number conversion cast (unumber) main::$10 in (number~) main::$10 ← > (unumber~) main::$9
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (byte[]) FONT_HEX_PROTO ← (byte[]){ (byte)(number) 2, (byte)(number) 5, (byte)(number) 5, (byte)(number) 5, (byte)(number) 2, (byte)(number) 6, (byte)(number) 2, (byte)(number) 2, (byte)(number) 2, (byte)(number) 7, (byte)(number) 6, (byte)(number) 1, (byte)(number) 2, (byte)(number) 4, (byte)(number) 7, (byte)(number) 6, (byte)(number) 1, (byte)(number) 2, (byte)(number) 1, (byte)(number) 6, (byte)(number) 5, (byte)(number) 5, (byte)(number) 7, (byte)(number) 1, (byte)(number) 1, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 1, (byte)(number) 6, (byte)(number) 3, (byte)(number) 4, (byte)(number) 6, (byte)(number) 5, (byte)(number) 2, (byte)(number) 7, (byte)(number) 1, (byte)(number) 1, (byte)(number) 1, (byte)(number) 1, (byte)(number) 2, (byte)(number) 5, (byte)(number) 2, (byte)(number) 5, (byte)(number) 2, (byte)(number) 2, (byte)(number) 5, (byte)(number) 3, (byte)(number) 1, (byte)(number) 1, (byte)(number) 2, (byte)(number) 5, (byte)(number) 7, (byte)(number) 5, (byte)(number) 5, (byte)(number) 6, (byte)(number) 5, (byte)(number) 6, (byte)(number) 5, (byte)(number) 6, (byte)(number) 2, (byte)(number) 5, (byte)(number) 4, (byte)(number) 5, (byte)(number) 2, (byte)(number) 6, (byte)(number) 5, (byte)(number) 5, (byte)(number) 5, (byte)(number) 6, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 4, (byte)(number) 7, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 4, (byte)(number) 4 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (byte) init_font_hex::idx#0 ← (unumber)(number) 0
Inlining cast *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#0) ← (unumber)(number) 0
Inlining cast *((byte*) init_font_hex::charset#4 + (byte) init_font_hex::idx#6) ← (unumber)(number) 0
@ -818,6 +815,86 @@ Inlining cast (signed word~) main::$4 ← (signed word)(word~) main::$3
Inlining cast (byte~) main::$5 ← (byte)(signed byte) main::y#2
Inlining cast (signed word~) main::$7 ← (signed word)(word~) main::$6
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 6
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 7
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 4
Simplifying constant integer cast 7
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 1
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 7
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 7
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 6
Simplifying constant integer cast 3
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 7
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 3
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 7
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 4
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 7
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 4
Simplifying constant integer cast 7
Simplifying constant integer cast 7
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 4
Simplifying constant integer cast 4
Simplifying constant pointer cast (byte*) 53272
Simplifying constant pointer cast (byte*) 55296
Simplifying constant pointer cast (byte*) 8192
@ -832,86 +909,6 @@ Simplifying constant integer cast 0
Simplifying constant integer cast 5
Simplifying constant integer cast 8
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 6
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 7
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 4
Simplifying constant integer cast 7
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 1
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 7
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 7
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 6
Simplifying constant integer cast 3
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 7
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 3
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 7
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 4
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 7
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 4
Simplifying constant integer cast 7
Simplifying constant integer cast 7
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 4
Simplifying constant integer cast 4
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
@ -981,10 +978,10 @@ Inferred type updated to byte in (unumber~) main::toD0181_$7 ← (byte~) main::t
Inferred type updated to byte in (unumber~) main::toD0181_$8 ← (byte~) main::toD0181_$3 | (byte~) main::toD0181_$7
Inferred type updated to word in (unumber~) main::$9 ← (word) main::angle_w#0 + (byte) $80
Inferred type updated to byte in (unumber~) main::$10 ← > (word~) main::$9
Inversing boolean not [61] (bool~) atan2_16::$17 ← (signed word) atan2_16::yi#3 != (signed byte) 0 from [60] (bool~) atan2_16::$16 ← (signed word) atan2_16::yi#3 == (signed byte) 0
Inversing boolean not [70] (bool~) atan2_16::$11 ← (signed word) atan2_16::x#4 >= (signed byte) 0 from [69] (bool~) atan2_16::$10 ← (signed word) atan2_16::x#4 < (signed byte) 0
Inversing boolean not [81] (bool~) atan2_16::$19 ← (byte) 0 == (byte) atan2_16::shift#4 from [80] (bool~) atan2_16::$24 ← (byte) 0 != (byte) atan2_16::shift#4
Inversing boolean not [105] (bool~) atan2_16::$14 ← (signed word) atan2_16::y#4 >= (signed byte) 0 from [104] (bool~) atan2_16::$13 ← (signed word) atan2_16::y#4 < (signed byte) 0
Inversing boolean not [60] (bool~) atan2_16::$17 ← (signed word) atan2_16::yi#3 != (signed byte) 0 from [59] (bool~) atan2_16::$16 ← (signed word) atan2_16::yi#3 == (signed byte) 0
Inversing boolean not [69] (bool~) atan2_16::$11 ← (signed word) atan2_16::x#4 >= (signed byte) 0 from [68] (bool~) atan2_16::$10 ← (signed word) atan2_16::x#4 < (signed byte) 0
Inversing boolean not [80] (bool~) atan2_16::$19 ← (byte) 0 == (byte) atan2_16::shift#4 from [79] (bool~) atan2_16::$24 ← (byte) 0 != (byte) atan2_16::shift#4
Inversing boolean not [104] (bool~) atan2_16::$14 ← (signed word) atan2_16::y#4 >= (signed byte) 0 from [103] (bool~) atan2_16::$13 ← (signed word) atan2_16::y#4 < (signed byte) 0
Successful SSA optimization Pass2UnaryNotSimplification
Alias (byte*) init_font_hex::charset#3 = (byte*) init_font_hex::charset#4
Alias (byte) init_font_hex::idx#2 = (byte) init_font_hex::idx#6
@ -1082,27 +1079,26 @@ Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) init_font_hex::$3 [19] if((byte) init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3
Simple Condition (bool~) init_font_hex::$4 [29] if((byte) init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2
Simple Condition (bool~) init_font_hex::$5 [34] if((byte) init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1
Simple Condition (bool~) atan2_16::$0 [40] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1
Simple Condition (bool~) atan2_16::$5 [49] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4
Simple Condition (bool~) atan2_16::$17 [62] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@16
Simple Condition (bool~) atan2_16::$11 [71] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7
Simple Condition (bool~) atan2_16::$18 [74] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@19
Simple Condition (bool~) atan2_16::$19 [82] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@25
Simple Condition (bool~) atan2_16::$20 [85] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@26
Simple Condition (bool~) atan2_16::$21 [102] if((byte) atan2_16::i#1!=rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@15
Simple Condition (bool~) atan2_16::$14 [106] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8
Simple Condition (bool~) main::$11 [167] if((signed byte) main::x#1!=rangelast(-$13,$14)) goto main::@2
Simple Condition (bool~) main::$12 [171] if((signed byte) main::y#1!=rangelast(-$c,$c)) goto main::@1
Simple Condition (bool~) atan2_16::$0 [39] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1
Simple Condition (bool~) atan2_16::$5 [48] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4
Simple Condition (bool~) atan2_16::$17 [61] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@16
Simple Condition (bool~) atan2_16::$11 [70] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7
Simple Condition (bool~) atan2_16::$18 [73] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@19
Simple Condition (bool~) atan2_16::$19 [81] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@25
Simple Condition (bool~) atan2_16::$20 [84] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@26
Simple Condition (bool~) atan2_16::$21 [101] if((byte) atan2_16::i#1!=rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@15
Simple Condition (bool~) atan2_16::$14 [105] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8
Simple Condition (bool~) main::$11 [166] if((signed byte) main::x#1!=rangelast(-$13,$14)) goto main::@2
Simple Condition (bool~) main::$12 [170] if((signed byte) main::y#1!=rangelast(-$c,$c)) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Negating conditional jump and destination [102] if((byte) atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@17
Negating conditional jump and destination [101] if((byte) atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@17
Successful SSA optimization Pass2ConditionalJumpSequenceImprovement
Identified constant from value list (byte[]) { (byte) 2, (byte) 5, (byte) 5, (byte) 5, (byte) 2, (byte) 6, (byte) 2, (byte) 2, (byte) 2, (byte) 7, (byte) 6, (byte) 1, (byte) 2, (byte) 4, (byte) 7, (byte) 6, (byte) 1, (byte) 2, (byte) 1, (byte) 6, (byte) 5, (byte) 5, (byte) 7, (byte) 1, (byte) 1, (byte) 7, (byte) 4, (byte) 6, (byte) 1, (byte) 6, (byte) 3, (byte) 4, (byte) 6, (byte) 5, (byte) 2, (byte) 7, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 2, (byte) 5, (byte) 2, (byte) 5, (byte) 2, (byte) 2, (byte) 5, (byte) 3, (byte) 1, (byte) 1, (byte) 2, (byte) 5, (byte) 7, (byte) 5, (byte) 5, (byte) 6, (byte) 5, (byte) 6, (byte) 5, (byte) 6, (byte) 2, (byte) 5, (byte) 4, (byte) 5, (byte) 2, (byte) 6, (byte) 5, (byte) 5, (byte) 5, (byte) 6, (byte) 7, (byte) 4, (byte) 6, (byte) 4, (byte) 7, (byte) 7, (byte) 4, (byte) 6, (byte) 4, (byte) 4 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const byte*) init_font_hex::proto_hi#0 = FONT_HEX_PROTO
Constant (const byte) init_font_hex::c#0 = 0
Constant (const byte*) init_font_hex::proto_lo#0 = FONT_HEX_PROTO
Constant (const byte) init_font_hex::c1#0 = 0
Constant (const byte) init_font_hex::idx#0 = 0
Constant (const byte) init_font_hex::i#0 = 0
Constant (const byte[]) FONT_HEX_PROTO = { 2, 5, 5, 5, 2, 6, 2, 2, 2, 7, 6, 1, 2, 4, 7, 6, 1, 2, 1, 6, 5, 5, 7, 1, 1, 7, 4, 6, 1, 6, 3, 4, 6, 5, 2, 7, 1, 1, 1, 1, 2, 5, 2, 5, 2, 2, 5, 3, 1, 1, 2, 5, 7, 5, 5, 6, 5, 6, 5, 6, 2, 5, 4, 5, 2, 6, 5, 5, 5, 6, 7, 4, 6, 4, 7, 7, 4, 6, 4, 4 }
Constant (const word[CORDIC_ITERATIONS_16]) CORDIC_ATAN2_ANGLES_16 = kickasm {{ .for (var i=0; i<CORDIC_ITERATIONS_16; i++)
.word 256*2*256*atan(1/pow(2,i))/PI/2
}}
@ -1115,12 +1111,10 @@ Constant (const byte*) main::screen#0 = SCREEN
Constant (const signed byte) main::y#0 = -$c
Constant (const signed byte) main::x#0 = -$13
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte*) init_font_hex::proto_hi#0 = FONT_HEX_PROTO
Constant (const byte*) init_font_hex::proto_lo#0 = FONT_HEX_PROTO
Constant (const word) main::toD0181_$0 = (word)main::toD0181_screen#0
Constant (const word) main::toD0181_$4 = (word)main::toD0181_gfx#0
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [172] if(true) goto main::@6
if() condition always true - replacing block destination [171] if(true) goto main::@6
Successful SSA optimization Pass2ConstantIfs
Resolved ranged next value [17] init_font_hex::i#1 ← ++ init_font_hex::i#2 to ++
Resolved ranged comparison value [19] if(init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3 to (number) 5
@ -1128,12 +1122,12 @@ Resolved ranged next value [27] init_font_hex::c1#1 ← ++ init_font_hex::c1#4 t
Resolved ranged comparison value [29] if(init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 to (number) $10
Resolved ranged next value [32] init_font_hex::c#1 ← ++ init_font_hex::c#6 to ++
Resolved ranged comparison value [34] if(init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 to (number) $10
Resolved ranged next value [100] atan2_16::i#1 ← ++ atan2_16::i#2 to ++
Resolved ranged comparison value [102] 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
Resolved ranged next value [165] main::x#1 ← ++ main::x#2 to ++
Resolved ranged comparison value [167] if(main::x#1!=rangelast(-$13,$14)) goto main::@2 to (number) $15
Resolved ranged next value [169] main::y#1 ← ++ main::y#4 to ++
Resolved ranged comparison value [171] if(main::y#1!=rangelast(-$c,$c)) goto main::@1 to (number) $d
Resolved ranged next value [99] atan2_16::i#1 ← ++ atan2_16::i#2 to ++
Resolved ranged comparison value [101] 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
Resolved ranged next value [164] main::x#1 ← ++ main::x#2 to ++
Resolved ranged comparison value [166] if(main::x#1!=rangelast(-$13,$14)) goto main::@2 to (number) $15
Resolved ranged next value [168] main::y#1 ← ++ main::y#4 to ++
Resolved ranged comparison value [170] if(main::y#1!=rangelast(-$c,$c)) goto main::@1 to (number) $d
Simplifying expression containing zero init_font_hex::charset#2 in [8] *((byte*) init_font_hex::charset#2 + (const byte) init_font_hex::idx#0) ← (byte) 0
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused variable (byte) init_font_hex::idx#4 and assignment [15] (byte) init_font_hex::idx#4 ← ++ (byte) init_font_hex::idx#3
@ -1197,13 +1191,13 @@ Rewriting division to use shift [31] (word) atan2_16::angle#1 ← (word) atan2_1
Rewriting multiplication to use shift [45] (byte~) atan2_16::$22 ← (byte) atan2_16::i#2 * (const byte) SIZEOF_WORD
Rewriting multiplication to use shift [49] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 * (const byte) SIZEOF_WORD
Successful SSA optimization Pass2MultiplyToShiftRewriting
Inlining constant with var siblings (const byte*) init_font_hex::proto_hi#0
Inlining constant with var siblings (const byte) init_font_hex::c#0
Inlining constant with var siblings (const byte*) init_font_hex::proto_lo#0
Inlining constant with var siblings (const byte) init_font_hex::c1#0
Inlining constant with var siblings (const byte) init_font_hex::idx#0
Inlining constant with var siblings (const byte) init_font_hex::i#0
Inlining constant with var siblings (const byte*) init_font_hex::charset#1
Inlining constant with var siblings (const byte*) init_font_hex::proto_hi#0
Inlining constant with var siblings (const byte*) init_font_hex::proto_lo#0
Inlining constant with var siblings (const byte) init_font_hex::idx#1
Inlining constant with var siblings (const word) atan2_16::angle#0
Inlining constant with var siblings (const byte) atan2_16::i#0

View File

@ -1,5 +1,5 @@
Resolved forward reference FONT_HEX_PROTO to (byte[]) FONT_HEX_PROTO
Resolved forward reference FONT_HEX_PROTO to (byte[]) FONT_HEX_PROTO
Resolved forward reference FONT_HEX_PROTO to (const byte[]) FONT_HEX_PROTO
Resolved forward reference FONT_HEX_PROTO to (const byte[]) FONT_HEX_PROTO
Fixing pointer array-indexing *((word[CORDIC_ITERATIONS_16]) CORDIC_ATAN2_ANGLES_16 + (byte) atan2_16::i)
Fixing pointer array-indexing *((word[CORDIC_ITERATIONS_16]) CORDIC_ATAN2_ANGLES_16 + (byte) atan2_16::i)
Warning! Adding boolean cast to non-boolean sub-expression (byte) atan2_16::shift
@ -44,14 +44,14 @@ CONTROL FLOW GRAPH SSA
(void()) init_font_hex((byte*) init_font_hex::charset)
init_font_hex: scope:[init_font_hex] from main
(byte*) init_font_hex::charset#6 ← phi( main/(byte*) init_font_hex::charset#1 )
(byte*) init_font_hex::proto_hi#0 ← (byte[]) FONT_HEX_PROTO
(byte*) init_font_hex::proto_hi#0 ← (const byte[]) FONT_HEX_PROTO
(byte) init_font_hex::c#0 ← (byte) 0
to:init_font_hex::@1
init_font_hex::@1: scope:[init_font_hex] from init_font_hex init_font_hex::@5
(byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) init_font_hex::c#0 init_font_hex::@5/(byte) init_font_hex::c#1 )
(byte*) init_font_hex::proto_hi#6 ← phi( init_font_hex/(byte*) init_font_hex::proto_hi#0 init_font_hex::@5/(byte*) init_font_hex::proto_hi#1 )
(byte*) init_font_hex::charset#5 ← phi( init_font_hex/(byte*) init_font_hex::charset#6 init_font_hex::@5/(byte*) init_font_hex::charset#7 )
(byte*) init_font_hex::proto_lo#0 ← (byte[]) FONT_HEX_PROTO
(byte*) init_font_hex::proto_lo#0 ← (const byte[]) FONT_HEX_PROTO
(byte) init_font_hex::c1#0 ← (byte) 0
to:init_font_hex::@2
init_font_hex::@2: scope:[init_font_hex] from init_font_hex::@1 init_font_hex::@4
@ -112,7 +112,6 @@ init_font_hex::@return: scope:[init_font_hex] from init_font_hex::@5
return
to:@return
@1: scope:[] from @begin
(byte[]) FONT_HEX_PROTO ← { (number) 2, (number) 5, (number) 5, (number) 5, (number) 2, (number) 6, (number) 2, (number) 2, (number) 2, (number) 7, (number) 6, (number) 1, (number) 2, (number) 4, (number) 7, (number) 6, (number) 1, (number) 2, (number) 1, (number) 6, (number) 5, (number) 5, (number) 7, (number) 1, (number) 1, (number) 7, (number) 4, (number) 6, (number) 1, (number) 6, (number) 3, (number) 4, (number) 6, (number) 5, (number) 2, (number) 7, (number) 1, (number) 1, (number) 1, (number) 1, (number) 2, (number) 5, (number) 2, (number) 5, (number) 2, (number) 2, (number) 5, (number) 3, (number) 1, (number) 1, (number) 2, (number) 5, (number) 7, (number) 5, (number) 5, (number) 6, (number) 5, (number) 6, (number) 5, (number) 6, (number) 2, (number) 5, (number) 4, (number) 5, (number) 2, (number) 6, (number) 5, (number) 5, (number) 5, (number) 6, (number) 7, (number) 4, (number) 6, (number) 4, (number) 7, (number) 7, (number) 4, (number) 6, (number) 4, (number) 4 }
(word[CORDIC_ITERATIONS_16]) CORDIC_ATAN2_ANGLES_16 ← kickasm {{ .for (var i=0; i<CORDIC_ITERATIONS_16; i++)
.word 256*2*256*atan(1/pow(2,i))/PI/2
}}
@ -487,7 +486,7 @@ SYMBOL TABLE SSA
(word[CORDIC_ITERATIONS_16]) CORDIC_ATAN2_ANGLES_16
(const byte) CORDIC_ITERATIONS_16 = (number) $f
(const byte*) D018 = (byte*)(number) $d018
(byte[]) FONT_HEX_PROTO
(const byte[]) FONT_HEX_PROTO = { (byte)(number) 2, (byte)(number) 5, (byte)(number) 5, (byte)(number) 5, (byte)(number) 2, (byte)(number) 6, (byte)(number) 2, (byte)(number) 2, (byte)(number) 2, (byte)(number) 7, (byte)(number) 6, (byte)(number) 1, (byte)(number) 2, (byte)(number) 4, (byte)(number) 7, (byte)(number) 6, (byte)(number) 1, (byte)(number) 2, (byte)(number) 1, (byte)(number) 6, (byte)(number) 5, (byte)(number) 5, (byte)(number) 7, (byte)(number) 1, (byte)(number) 1, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 1, (byte)(number) 6, (byte)(number) 3, (byte)(number) 4, (byte)(number) 6, (byte)(number) 5, (byte)(number) 2, (byte)(number) 7, (byte)(number) 1, (byte)(number) 1, (byte)(number) 1, (byte)(number) 1, (byte)(number) 2, (byte)(number) 5, (byte)(number) 2, (byte)(number) 5, (byte)(number) 2, (byte)(number) 2, (byte)(number) 5, (byte)(number) 3, (byte)(number) 1, (byte)(number) 1, (byte)(number) 2, (byte)(number) 5, (byte)(number) 7, (byte)(number) 5, (byte)(number) 5, (byte)(number) 6, (byte)(number) 5, (byte)(number) 6, (byte)(number) 5, (byte)(number) 6, (byte)(number) 2, (byte)(number) 5, (byte)(number) 4, (byte)(number) 5, (byte)(number) 2, (byte)(number) 6, (byte)(number) 5, (byte)(number) 5, (byte)(number) 5, (byte)(number) 6, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 4, (byte)(number) 7, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 4, (byte)(number) 4 }
(const byte*) RASTER = (byte*)(number) $d012
(const byte*) SCREEN = (byte*)(number) $2800
(const byte) SIZEOF_WORD = (byte) 2
@ -921,8 +920,6 @@ Adding number conversion cast (unumber) init_angle_screen::$14 in (number~) init
Adding number conversion cast (unumber) $28 in (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#3 - (number) $28
Adding number conversion cast (unumber) $28 in (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#3 + (number) $28
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (byte[]) FONT_HEX_PROTO ← (byte[]){ (byte)(number) 2, (byte)(number) 5, (byte)(number) 5, (byte)(number) 5, (byte)(number) 2, (byte)(number) 6, (byte)(number) 2, (byte)(number) 2, (byte)(number) 2, (byte)(number) 7, (byte)(number) 6, (byte)(number) 1, (byte)(number) 2, (byte)(number) 4, (byte)(number) 7, (byte)(number) 6, (byte)(number) 1, (byte)(number) 2, (byte)(number) 1, (byte)(number) 6, (byte)(number) 5, (byte)(number) 5, (byte)(number) 7, (byte)(number) 1, (byte)(number) 1, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 1, (byte)(number) 6, (byte)(number) 3, (byte)(number) 4, (byte)(number) 6, (byte)(number) 5, (byte)(number) 2, (byte)(number) 7, (byte)(number) 1, (byte)(number) 1, (byte)(number) 1, (byte)(number) 1, (byte)(number) 2, (byte)(number) 5, (byte)(number) 2, (byte)(number) 5, (byte)(number) 2, (byte)(number) 2, (byte)(number) 5, (byte)(number) 3, (byte)(number) 1, (byte)(number) 1, (byte)(number) 2, (byte)(number) 5, (byte)(number) 7, (byte)(number) 5, (byte)(number) 5, (byte)(number) 6, (byte)(number) 5, (byte)(number) 6, (byte)(number) 5, (byte)(number) 6, (byte)(number) 2, (byte)(number) 5, (byte)(number) 4, (byte)(number) 5, (byte)(number) 2, (byte)(number) 6, (byte)(number) 5, (byte)(number) 5, (byte)(number) 5, (byte)(number) 6, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 4, (byte)(number) 7, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 4, (byte)(number) 4 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (byte) init_font_hex::idx#0 ← (unumber)(number) 0
Inlining cast *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#0) ← (unumber)(number) 0
Inlining cast *((byte*) init_font_hex::charset#4 + (byte) init_font_hex::idx#6) ← (unumber)(number) 0
@ -936,6 +933,86 @@ Inlining cast (byte) init_angle_screen::xb#0 ← (unumber)(number) $27
Inlining cast (signed word~) init_angle_screen::$6 ← (signed word)(word~) init_angle_screen::$5
Inlining cast (signed word~) init_angle_screen::$9 ← (signed word)(word~) init_angle_screen::$8
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 6
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 7
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 4
Simplifying constant integer cast 7
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 1
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 7
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 7
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 6
Simplifying constant integer cast 3
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 7
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 3
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 7
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 4
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 7
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 4
Simplifying constant integer cast 7
Simplifying constant integer cast 7
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 4
Simplifying constant integer cast 4
Simplifying constant pointer cast (byte*) 53266
Simplifying constant pointer cast (byte*) 53272
Simplifying constant pointer cast (byte*) 8192
@ -949,86 +1026,6 @@ Simplifying constant integer cast 0
Simplifying constant integer cast 5
Simplifying constant integer cast 8
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 6
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 7
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 4
Simplifying constant integer cast 7
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 1
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 7
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 7
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 6
Simplifying constant integer cast 3
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 7
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 3
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 7
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 4
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 7
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 4
Simplifying constant integer cast 7
Simplifying constant integer cast 7
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 4
Simplifying constant integer cast 4
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
@ -1126,11 +1123,11 @@ Inferred type updated to word in (unumber~) init_angle_screen::$11 ← (word) in
Inferred type updated to byte in (unumber~) init_angle_screen::$12 ← > (word~) init_angle_screen::$11
Inferred type updated to byte in (unumber~) init_angle_screen::$13 ← (byte) $80 + (byte) init_angle_screen::ang_w#0
Inferred type updated to byte in (unumber~) init_angle_screen::$14 ← (byte) $80 - (byte) init_angle_screen::ang_w#0
Inversing boolean not [61] (bool~) atan2_16::$17 ← (signed word) atan2_16::yi#3 != (signed byte) 0 from [60] (bool~) atan2_16::$16 ← (signed word) atan2_16::yi#3 == (signed byte) 0
Inversing boolean not [70] (bool~) atan2_16::$11 ← (signed word) atan2_16::x#4 >= (signed byte) 0 from [69] (bool~) atan2_16::$10 ← (signed word) atan2_16::x#4 < (signed byte) 0
Inversing boolean not [81] (bool~) atan2_16::$19 ← (byte) 0 == (byte) atan2_16::shift#4 from [80] (bool~) atan2_16::$24 ← (byte) 0 != (byte) atan2_16::shift#4
Inversing boolean not [105] (bool~) atan2_16::$14 ← (signed word) atan2_16::y#4 >= (signed byte) 0 from [104] (bool~) atan2_16::$13 ← (signed word) atan2_16::y#4 < (signed byte) 0
Inversing boolean not [148] (bool~) main::$5 ← (byte*) main::clear_char#2 >= (const byte*) CHARSET+(word) $800 from [147] (bool~) main::$4 ← (byte*) main::clear_char#2 < (const byte*) CHARSET+(word) $800
Inversing boolean not [60] (bool~) atan2_16::$17 ← (signed word) atan2_16::yi#3 != (signed byte) 0 from [59] (bool~) atan2_16::$16 ← (signed word) atan2_16::yi#3 == (signed byte) 0
Inversing boolean not [69] (bool~) atan2_16::$11 ← (signed word) atan2_16::x#4 >= (signed byte) 0 from [68] (bool~) atan2_16::$10 ← (signed word) atan2_16::x#4 < (signed byte) 0
Inversing boolean not [80] (bool~) atan2_16::$19 ← (byte) 0 == (byte) atan2_16::shift#4 from [79] (bool~) atan2_16::$24 ← (byte) 0 != (byte) atan2_16::shift#4
Inversing boolean not [104] (bool~) atan2_16::$14 ← (signed word) atan2_16::y#4 >= (signed byte) 0 from [103] (bool~) atan2_16::$13 ← (signed word) atan2_16::y#4 < (signed byte) 0
Inversing boolean not [147] (bool~) main::$5 ← (byte*) main::clear_char#2 >= (const byte*) CHARSET+(word) $800 from [146] (bool~) main::$4 ← (byte*) main::clear_char#2 < (const byte*) CHARSET+(word) $800
Successful SSA optimization Pass2UnaryNotSimplification
Alias (byte*) init_font_hex::charset#3 = (byte*) init_font_hex::charset#4
Alias (byte) init_font_hex::idx#2 = (byte) init_font_hex::idx#6
@ -1236,29 +1233,28 @@ Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) init_font_hex::$3 [19] if((byte) init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3
Simple Condition (bool~) init_font_hex::$4 [29] if((byte) init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2
Simple Condition (bool~) init_font_hex::$5 [34] if((byte) init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1
Simple Condition (bool~) atan2_16::$0 [40] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1
Simple Condition (bool~) atan2_16::$5 [49] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4
Simple Condition (bool~) atan2_16::$17 [62] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@16
Simple Condition (bool~) atan2_16::$11 [71] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7
Simple Condition (bool~) atan2_16::$18 [74] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@19
Simple Condition (bool~) atan2_16::$19 [82] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@25
Simple Condition (bool~) atan2_16::$20 [85] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@26
Simple Condition (bool~) atan2_16::$21 [102] if((byte) atan2_16::i#1!=rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@15
Simple Condition (bool~) atan2_16::$14 [106] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8
Simple Condition (bool~) main::$3 [145] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@4
Simple Condition (bool~) main::$5 [149] if((byte*) main::clear_char#5>=(const byte*) CHARSET+(word) $800) goto main::@1
Simple Condition (bool~) init_angle_screen::$2 [165] if((byte) init_angle_screen::x#2<=(byte) $13) goto init_angle_screen::@3
Simple Condition (bool~) init_angle_screen::$16 [202] if((byte) init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1
Simple Condition (bool~) atan2_16::$0 [39] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1
Simple Condition (bool~) atan2_16::$5 [48] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4
Simple Condition (bool~) atan2_16::$17 [61] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@16
Simple Condition (bool~) atan2_16::$11 [70] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7
Simple Condition (bool~) atan2_16::$18 [73] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@19
Simple Condition (bool~) atan2_16::$19 [81] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@25
Simple Condition (bool~) atan2_16::$20 [84] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@26
Simple Condition (bool~) atan2_16::$21 [101] if((byte) atan2_16::i#1!=rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@15
Simple Condition (bool~) atan2_16::$14 [105] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8
Simple Condition (bool~) main::$3 [144] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@4
Simple Condition (bool~) main::$5 [148] if((byte*) main::clear_char#5>=(const byte*) CHARSET+(word) $800) goto main::@1
Simple Condition (bool~) init_angle_screen::$2 [164] if((byte) init_angle_screen::x#2<=(byte) $13) goto init_angle_screen::@3
Simple Condition (bool~) init_angle_screen::$16 [201] if((byte) init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Negating conditional jump and destination [102] if((byte) atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@17
Negating conditional jump and destination [101] if((byte) atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@17
Successful SSA optimization Pass2ConditionalJumpSequenceImprovement
Identified constant from value list (byte[]) { (byte) 2, (byte) 5, (byte) 5, (byte) 5, (byte) 2, (byte) 6, (byte) 2, (byte) 2, (byte) 2, (byte) 7, (byte) 6, (byte) 1, (byte) 2, (byte) 4, (byte) 7, (byte) 6, (byte) 1, (byte) 2, (byte) 1, (byte) 6, (byte) 5, (byte) 5, (byte) 7, (byte) 1, (byte) 1, (byte) 7, (byte) 4, (byte) 6, (byte) 1, (byte) 6, (byte) 3, (byte) 4, (byte) 6, (byte) 5, (byte) 2, (byte) 7, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 2, (byte) 5, (byte) 2, (byte) 5, (byte) 2, (byte) 2, (byte) 5, (byte) 3, (byte) 1, (byte) 1, (byte) 2, (byte) 5, (byte) 7, (byte) 5, (byte) 5, (byte) 6, (byte) 5, (byte) 6, (byte) 5, (byte) 6, (byte) 2, (byte) 5, (byte) 4, (byte) 5, (byte) 2, (byte) 6, (byte) 5, (byte) 5, (byte) 5, (byte) 6, (byte) 7, (byte) 4, (byte) 6, (byte) 4, (byte) 7, (byte) 7, (byte) 4, (byte) 6, (byte) 4, (byte) 4 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const byte*) init_font_hex::proto_hi#0 = FONT_HEX_PROTO
Constant (const byte) init_font_hex::c#0 = 0
Constant (const byte*) init_font_hex::proto_lo#0 = FONT_HEX_PROTO
Constant (const byte) init_font_hex::c1#0 = 0
Constant (const byte) init_font_hex::idx#0 = 0
Constant (const byte) init_font_hex::i#0 = 0
Constant (const byte[]) FONT_HEX_PROTO = { 2, 5, 5, 5, 2, 6, 2, 2, 2, 7, 6, 1, 2, 4, 7, 6, 1, 2, 1, 6, 5, 5, 7, 1, 1, 7, 4, 6, 1, 6, 3, 4, 6, 5, 2, 7, 1, 1, 1, 1, 2, 5, 2, 5, 2, 2, 5, 3, 1, 1, 2, 5, 7, 5, 5, 6, 5, 6, 5, 6, 2, 5, 4, 5, 2, 6, 5, 5, 5, 6, 7, 4, 6, 4, 7, 7, 4, 6, 4, 4 }
Constant (const word[CORDIC_ITERATIONS_16]) CORDIC_ATAN2_ANGLES_16 = kickasm {{ .for (var i=0; i<CORDIC_ITERATIONS_16; i++)
.word 256*2*256*atan(1/pow(2,i))/PI/2
}}
@ -1273,12 +1269,10 @@ Constant (const byte) init_angle_screen::y#0 = 0
Constant (const byte) init_angle_screen::x#0 = 0
Constant (const byte) init_angle_screen::xb#0 = $27
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte*) init_font_hex::proto_hi#0 = FONT_HEX_PROTO
Constant (const byte*) init_font_hex::proto_lo#0 = FONT_HEX_PROTO
Constant (const word) main::toD0181_$0 = (word)main::toD0181_screen#0
Constant (const word) main::toD0181_$4 = (word)main::toD0181_gfx#0
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [142] if(true) goto main::@4
if() condition always true - replacing block destination [141] if(true) goto main::@4
Successful SSA optimization Pass2ConstantIfs
Resolved ranged next value [17] init_font_hex::i#1 ← ++ init_font_hex::i#2 to ++
Resolved ranged comparison value [19] if(init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3 to (number) 5
@ -1286,11 +1280,11 @@ Resolved ranged next value [27] init_font_hex::c1#1 ← ++ init_font_hex::c1#4 t
Resolved ranged comparison value [29] if(init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 to (number) $10
Resolved ranged next value [32] init_font_hex::c#1 ← ++ init_font_hex::c#6 to ++
Resolved ranged comparison value [34] if(init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 to (number) $10
Resolved ranged next value [100] atan2_16::i#1 ← ++ atan2_16::i#2 to ++
Resolved ranged comparison value [102] 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
Resolved ranged next value [200] init_angle_screen::y#1 ← ++ init_angle_screen::y#5 to ++
Resolved ranged comparison value [202] if(init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 to (number) $d
Rewriting conditional comparison [165] if((byte) init_angle_screen::x#2<=(byte) $13) goto init_angle_screen::@3
Resolved ranged next value [99] atan2_16::i#1 ← ++ atan2_16::i#2 to ++
Resolved ranged comparison value [101] 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
Resolved ranged next value [199] init_angle_screen::y#1 ← ++ init_angle_screen::y#5 to ++
Resolved ranged comparison value [201] if(init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 to (number) $d
Rewriting conditional comparison [164] if((byte) init_angle_screen::x#2<=(byte) $13) goto init_angle_screen::@3
Simplifying expression containing zero init_font_hex::charset#2 in [8] *((byte*) init_font_hex::charset#2 + (const byte) init_font_hex::idx#0) ← (byte) 0
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused variable (byte) init_font_hex::idx#4 and assignment [15] (byte) init_font_hex::idx#4 ← ++ (byte) init_font_hex::idx#3
@ -1361,13 +1355,13 @@ Rewriting multiplication to use shift [49] (byte~) atan2_16::$23 ← (byte) atan
Rewriting multiplication to use shift [71] (byte~) init_angle_screen::$3 ← (byte) init_angle_screen::x#2 * (byte) 2
Rewriting multiplication to use shift [75] (byte~) init_angle_screen::$7 ← (byte) init_angle_screen::y#5 * (byte) 2
Successful SSA optimization Pass2MultiplyToShiftRewriting
Inlining constant with var siblings (const byte*) init_font_hex::proto_hi#0
Inlining constant with var siblings (const byte) init_font_hex::c#0
Inlining constant with var siblings (const byte*) init_font_hex::proto_lo#0
Inlining constant with var siblings (const byte) init_font_hex::c1#0
Inlining constant with var siblings (const byte) init_font_hex::idx#0
Inlining constant with var siblings (const byte) init_font_hex::i#0
Inlining constant with var siblings (const byte*) init_font_hex::charset#1
Inlining constant with var siblings (const byte*) init_font_hex::proto_hi#0
Inlining constant with var siblings (const byte*) init_font_hex::proto_lo#0
Inlining constant with var siblings (const byte) init_font_hex::idx#1
Inlining constant with var siblings (const word) atan2_16::angle#0
Inlining constant with var siblings (const byte) atan2_16::i#0

View File

@ -1,5 +1,5 @@
Resolved forward reference FONT_HEX_PROTO to (byte[]) FONT_HEX_PROTO
Resolved forward reference FONT_HEX_PROTO to (byte[]) FONT_HEX_PROTO
Resolved forward reference FONT_HEX_PROTO to (const byte[]) FONT_HEX_PROTO
Resolved forward reference FONT_HEX_PROTO to (const byte[]) FONT_HEX_PROTO
Fixing pointer array-indexing *((word[CORDIC_ITERATIONS_16]) CORDIC_ATAN2_ANGLES_16 + (byte) atan2_16::i)
Fixing pointer array-indexing *((word[CORDIC_ITERATIONS_16]) CORDIC_ATAN2_ANGLES_16 + (byte) atan2_16::i)
Warning! Adding boolean cast to non-boolean sub-expression (byte) atan2_16::shift
@ -7,6 +7,7 @@ Identified constant variable (byte*) main::col00
Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx
Inlined call (byte~) main::$1 ← call toD018 (const byte*) SCREEN (const byte*) CHARSET
Culled Empty Block (label) init_font_hex::@6
Culled Empty Block (label) @1
Culled Empty Block (label) @2
Culled Empty Block (label) @3
Culled Empty Block (label) @4
@ -30,19 +31,19 @@ Culled Empty Block (label) main::@10
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
to:@1
to:@6
(void()) init_font_hex((byte*) init_font_hex::charset)
init_font_hex: scope:[init_font_hex] from main
(byte*) init_font_hex::charset#6 ← phi( main/(byte*) init_font_hex::charset#1 )
(byte*) init_font_hex::proto_hi#0 ← (byte[]) FONT_HEX_PROTO
(byte*) init_font_hex::proto_hi#0 ← (const byte[]) FONT_HEX_PROTO
(byte) init_font_hex::c#0 ← (byte) 0
to:init_font_hex::@1
init_font_hex::@1: scope:[init_font_hex] from init_font_hex init_font_hex::@5
(byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) init_font_hex::c#0 init_font_hex::@5/(byte) init_font_hex::c#1 )
(byte*) init_font_hex::proto_hi#6 ← phi( init_font_hex/(byte*) init_font_hex::proto_hi#0 init_font_hex::@5/(byte*) init_font_hex::proto_hi#1 )
(byte*) init_font_hex::charset#5 ← phi( init_font_hex/(byte*) init_font_hex::charset#6 init_font_hex::@5/(byte*) init_font_hex::charset#7 )
(byte*) init_font_hex::proto_lo#0 ← (byte[]) FONT_HEX_PROTO
(byte*) init_font_hex::proto_lo#0 ← (const byte[]) FONT_HEX_PROTO
(byte) init_font_hex::c1#0 ← (byte) 0
to:init_font_hex::@2
init_font_hex::@2: scope:[init_font_hex] from init_font_hex::@1 init_font_hex::@4
@ -102,10 +103,7 @@ init_font_hex::@5: scope:[init_font_hex] from init_font_hex::@4
init_font_hex::@return: scope:[init_font_hex] from init_font_hex::@5
return
to:@return
@1: scope:[] from @begin
(byte[]) FONT_HEX_PROTO ← { (number) 2, (number) 5, (number) 5, (number) 5, (number) 2, (number) 6, (number) 2, (number) 2, (number) 2, (number) 7, (number) 6, (number) 1, (number) 2, (number) 4, (number) 7, (number) 6, (number) 1, (number) 2, (number) 1, (number) 6, (number) 5, (number) 5, (number) 7, (number) 1, (number) 1, (number) 7, (number) 4, (number) 6, (number) 1, (number) 6, (number) 3, (number) 4, (number) 6, (number) 5, (number) 2, (number) 7, (number) 1, (number) 1, (number) 1, (number) 1, (number) 2, (number) 5, (number) 2, (number) 5, (number) 2, (number) 2, (number) 5, (number) 3, (number) 1, (number) 1, (number) 2, (number) 5, (number) 7, (number) 5, (number) 5, (number) 6, (number) 5, (number) 6, (number) 5, (number) 6, (number) 2, (number) 5, (number) 4, (number) 5, (number) 2, (number) 6, (number) 5, (number) 5, (number) 5, (number) 6, (number) 7, (number) 4, (number) 6, (number) 4, (number) 7, (number) 7, (number) 4, (number) 6, (number) 4, (number) 4 }
to:@6
@6: scope:[] from @1
@6: scope:[] from @begin
(byte[CORDIC_ITERATIONS_8]) CORDIC_ATAN2_ANGLES_8 ← kickasm {{ .fill CORDIC_ITERATIONS_8, 2*256*atan(1/pow(2,i))/PI/2
}}
to:@8
@ -343,7 +341,6 @@ main::@return: scope:[main] from main::@5
@end: scope:[] from @9
SYMBOL TABLE SSA
(label) @1
(label) @6
(label) @8
(label) @9
@ -354,7 +351,7 @@ SYMBOL TABLE SSA
(byte[CORDIC_ITERATIONS_8]) CORDIC_ATAN2_ANGLES_8
(const byte) CORDIC_ITERATIONS_8 = (number) 8
(const byte*) D018 = (byte*)(number) $d018
(byte[]) FONT_HEX_PROTO
(const byte[]) FONT_HEX_PROTO = { (byte)(number) 2, (byte)(number) 5, (byte)(number) 5, (byte)(number) 5, (byte)(number) 2, (byte)(number) 6, (byte)(number) 2, (byte)(number) 2, (byte)(number) 2, (byte)(number) 7, (byte)(number) 6, (byte)(number) 1, (byte)(number) 2, (byte)(number) 4, (byte)(number) 7, (byte)(number) 6, (byte)(number) 1, (byte)(number) 2, (byte)(number) 1, (byte)(number) 6, (byte)(number) 5, (byte)(number) 5, (byte)(number) 7, (byte)(number) 1, (byte)(number) 1, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 1, (byte)(number) 6, (byte)(number) 3, (byte)(number) 4, (byte)(number) 6, (byte)(number) 5, (byte)(number) 2, (byte)(number) 7, (byte)(number) 1, (byte)(number) 1, (byte)(number) 1, (byte)(number) 1, (byte)(number) 2, (byte)(number) 5, (byte)(number) 2, (byte)(number) 5, (byte)(number) 2, (byte)(number) 2, (byte)(number) 5, (byte)(number) 3, (byte)(number) 1, (byte)(number) 1, (byte)(number) 2, (byte)(number) 5, (byte)(number) 7, (byte)(number) 5, (byte)(number) 5, (byte)(number) 6, (byte)(number) 5, (byte)(number) 6, (byte)(number) 5, (byte)(number) 6, (byte)(number) 2, (byte)(number) 5, (byte)(number) 4, (byte)(number) 5, (byte)(number) 2, (byte)(number) 6, (byte)(number) 5, (byte)(number) 5, (byte)(number) 5, (byte)(number) 6, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 4, (byte)(number) 7, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 4, (byte)(number) 4 }
(const byte*) SCREEN = (byte*)(number) $2800
(byte()) atan2_8((signed byte) atan2_8::x , (signed byte) atan2_8::y)
(bool~) atan2_8::$0
@ -644,8 +641,6 @@ Adding number conversion cast (unumber) $f in (number~) main::toD0181_$7 ← (un
Adding number conversion cast (unumber) main::toD0181_$7 in (number~) main::toD0181_$7 ← (unumber~) main::toD0181_$6 & (unumber)(number) $f
Adding number conversion cast (unumber) main::toD0181_$8 in (number~) main::toD0181_$8 ← (unumber~) main::toD0181_$3 | (unumber~) main::toD0181_$7
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (byte[]) FONT_HEX_PROTO ← (byte[]){ (byte)(number) 2, (byte)(number) 5, (byte)(number) 5, (byte)(number) 5, (byte)(number) 2, (byte)(number) 6, (byte)(number) 2, (byte)(number) 2, (byte)(number) 2, (byte)(number) 7, (byte)(number) 6, (byte)(number) 1, (byte)(number) 2, (byte)(number) 4, (byte)(number) 7, (byte)(number) 6, (byte)(number) 1, (byte)(number) 2, (byte)(number) 1, (byte)(number) 6, (byte)(number) 5, (byte)(number) 5, (byte)(number) 7, (byte)(number) 1, (byte)(number) 1, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 1, (byte)(number) 6, (byte)(number) 3, (byte)(number) 4, (byte)(number) 6, (byte)(number) 5, (byte)(number) 2, (byte)(number) 7, (byte)(number) 1, (byte)(number) 1, (byte)(number) 1, (byte)(number) 1, (byte)(number) 2, (byte)(number) 5, (byte)(number) 2, (byte)(number) 5, (byte)(number) 2, (byte)(number) 2, (byte)(number) 5, (byte)(number) 3, (byte)(number) 1, (byte)(number) 1, (byte)(number) 2, (byte)(number) 5, (byte)(number) 7, (byte)(number) 5, (byte)(number) 5, (byte)(number) 6, (byte)(number) 5, (byte)(number) 6, (byte)(number) 5, (byte)(number) 6, (byte)(number) 2, (byte)(number) 5, (byte)(number) 4, (byte)(number) 5, (byte)(number) 2, (byte)(number) 6, (byte)(number) 5, (byte)(number) 5, (byte)(number) 5, (byte)(number) 6, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 4, (byte)(number) 7, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 4, (byte)(number) 4 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (byte) init_font_hex::idx#0 ← (unumber)(number) 0
Inlining cast *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#0) ← (unumber)(number) 0
Inlining cast *((byte*) init_font_hex::charset#4 + (byte) init_font_hex::idx#6) ← (unumber)(number) 0
@ -654,6 +649,86 @@ Inlining cast (byte) atan2_8::angle#0 ← (unumber)(number) 0
Inlining cast (word~) main::toD0181_$0 ← (word)(byte*) main::toD0181_screen#1
Inlining cast (word~) main::toD0181_$4 ← (word)(byte*) main::toD0181_gfx#1
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 6
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 7
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 4
Simplifying constant integer cast 7
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 1
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 7
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 7
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 6
Simplifying constant integer cast 3
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 7
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 3
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 7
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 4
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 7
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 4
Simplifying constant integer cast 7
Simplifying constant integer cast 7
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 4
Simplifying constant integer cast 4
Simplifying constant pointer cast (byte*) 53272
Simplifying constant pointer cast (byte*) 55296
Simplifying constant pointer cast (byte*) 8192
@ -668,86 +743,6 @@ Simplifying constant integer cast 0
Simplifying constant integer cast 5
Simplifying constant integer cast 8
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 6
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 7
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 4
Simplifying constant integer cast 7
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 1
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 7
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 7
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 6
Simplifying constant integer cast 3
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 7
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 3
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 7
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 4
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 7
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 4
Simplifying constant integer cast 7
Simplifying constant integer cast 7
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 4
Simplifying constant integer cast 4
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
@ -796,9 +791,9 @@ Inferred type updated to byte in (unumber~) main::toD0181_$3 ← > (word~) main:
Inferred type updated to byte in (unumber~) main::toD0181_$6 ← (byte~) main::toD0181_$5 / (byte) 4
Inferred type updated to byte in (unumber~) main::toD0181_$7 ← (byte~) main::toD0181_$6 & (byte) $f
Inferred type updated to byte in (unumber~) main::toD0181_$8 ← (byte~) main::toD0181_$3 | (byte~) main::toD0181_$7
Inversing boolean not [61] (bool~) atan2_8::$18 ← (signed byte) atan2_8::yi#3 != (signed byte) 0 from [60] (bool~) atan2_8::$17 ← (signed byte) atan2_8::yi#3 == (signed byte) 0
Inversing boolean not [74] (bool~) atan2_8::$12 ← (signed byte) atan2_8::x#4 >= (signed byte) 0 from [73] (bool~) atan2_8::$11 ← (signed byte) atan2_8::x#4 < (signed byte) 0
Inversing boolean not [90] (bool~) atan2_8::$15 ← (signed byte) atan2_8::y#4 >= (signed byte) 0 from [89] (bool~) atan2_8::$14 ← (signed byte) atan2_8::y#4 < (signed byte) 0
Inversing boolean not [60] (bool~) atan2_8::$18 ← (signed byte) atan2_8::yi#3 != (signed byte) 0 from [59] (bool~) atan2_8::$17 ← (signed byte) atan2_8::yi#3 == (signed byte) 0
Inversing boolean not [73] (bool~) atan2_8::$12 ← (signed byte) atan2_8::x#4 >= (signed byte) 0 from [72] (bool~) atan2_8::$11 ← (signed byte) atan2_8::x#4 < (signed byte) 0
Inversing boolean not [89] (bool~) atan2_8::$15 ← (signed byte) atan2_8::y#4 >= (signed byte) 0 from [88] (bool~) atan2_8::$14 ← (signed byte) atan2_8::y#4 < (signed byte) 0
Successful SSA optimization Pass2UnaryNotSimplification
Alias (byte*) init_font_hex::charset#3 = (byte*) init_font_hex::charset#4
Alias (byte) init_font_hex::idx#2 = (byte) init_font_hex::idx#6
@ -868,25 +863,24 @@ Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) init_font_hex::$3 [19] if((byte) init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3
Simple Condition (bool~) init_font_hex::$4 [29] if((byte) init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2
Simple Condition (bool~) init_font_hex::$5 [34] if((byte) init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1
Simple Condition (bool~) atan2_8::$0 [40] if((signed byte) atan2_8::y#0>(signed byte) 0) goto atan2_8::@1
Simple Condition (bool~) atan2_8::$5 [49] if((signed byte) atan2_8::x#0>(signed byte) 0) goto atan2_8::@4
Simple Condition (bool~) atan2_8::$18 [62] if((signed byte) atan2_8::yi#3!=(signed byte) 0) goto atan2_8::@16
Simple Condition (bool~) atan2_8::$21 [69] if((signed byte) atan2_8::yi#3>(signed byte) 0) goto atan2_8::@18
Simple Condition (bool~) atan2_8::$12 [75] if((signed byte) atan2_8::x#0>=(signed byte) 0) goto atan2_8::@7
Simple Condition (bool~) atan2_8::$22 [87] if((byte) atan2_8::i#1!=rangelast(0,CORDIC_ITERATIONS_8-1)) goto atan2_8::@15
Simple Condition (bool~) atan2_8::$15 [91] if((signed byte) atan2_8::y#0>=(signed byte) 0) goto atan2_8::@8
Simple Condition (bool~) main::$3 [139] if((signed byte) main::x#1!=rangelast(-$13,$14)) goto main::@2
Simple Condition (bool~) main::$4 [143] if((signed byte) main::y#1!=rangelast(-$c,$c)) goto main::@1
Simple Condition (bool~) atan2_8::$0 [39] if((signed byte) atan2_8::y#0>(signed byte) 0) goto atan2_8::@1
Simple Condition (bool~) atan2_8::$5 [48] if((signed byte) atan2_8::x#0>(signed byte) 0) goto atan2_8::@4
Simple Condition (bool~) atan2_8::$18 [61] if((signed byte) atan2_8::yi#3!=(signed byte) 0) goto atan2_8::@16
Simple Condition (bool~) atan2_8::$21 [68] if((signed byte) atan2_8::yi#3>(signed byte) 0) goto atan2_8::@18
Simple Condition (bool~) atan2_8::$12 [74] if((signed byte) atan2_8::x#0>=(signed byte) 0) goto atan2_8::@7
Simple Condition (bool~) atan2_8::$22 [86] if((byte) atan2_8::i#1!=rangelast(0,CORDIC_ITERATIONS_8-1)) goto atan2_8::@15
Simple Condition (bool~) atan2_8::$15 [90] if((signed byte) atan2_8::y#0>=(signed byte) 0) goto atan2_8::@8
Simple Condition (bool~) main::$3 [138] if((signed byte) main::x#1!=rangelast(-$13,$14)) goto main::@2
Simple Condition (bool~) main::$4 [142] if((signed byte) main::y#1!=rangelast(-$c,$c)) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Negating conditional jump and destination [87] if((byte) atan2_8::i#1==rangelast(0,CORDIC_ITERATIONS_8-1)) goto atan2_8::@17
Negating conditional jump and destination [86] if((byte) atan2_8::i#1==rangelast(0,CORDIC_ITERATIONS_8-1)) goto atan2_8::@17
Successful SSA optimization Pass2ConditionalJumpSequenceImprovement
Identified constant from value list (byte[]) { (byte) 2, (byte) 5, (byte) 5, (byte) 5, (byte) 2, (byte) 6, (byte) 2, (byte) 2, (byte) 2, (byte) 7, (byte) 6, (byte) 1, (byte) 2, (byte) 4, (byte) 7, (byte) 6, (byte) 1, (byte) 2, (byte) 1, (byte) 6, (byte) 5, (byte) 5, (byte) 7, (byte) 1, (byte) 1, (byte) 7, (byte) 4, (byte) 6, (byte) 1, (byte) 6, (byte) 3, (byte) 4, (byte) 6, (byte) 5, (byte) 2, (byte) 7, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 2, (byte) 5, (byte) 2, (byte) 5, (byte) 2, (byte) 2, (byte) 5, (byte) 3, (byte) 1, (byte) 1, (byte) 2, (byte) 5, (byte) 7, (byte) 5, (byte) 5, (byte) 6, (byte) 5, (byte) 6, (byte) 5, (byte) 6, (byte) 2, (byte) 5, (byte) 4, (byte) 5, (byte) 2, (byte) 6, (byte) 5, (byte) 5, (byte) 5, (byte) 6, (byte) 7, (byte) 4, (byte) 6, (byte) 4, (byte) 7, (byte) 7, (byte) 4, (byte) 6, (byte) 4, (byte) 4 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const byte*) init_font_hex::proto_hi#0 = FONT_HEX_PROTO
Constant (const byte) init_font_hex::c#0 = 0
Constant (const byte*) init_font_hex::proto_lo#0 = FONT_HEX_PROTO
Constant (const byte) init_font_hex::c1#0 = 0
Constant (const byte) init_font_hex::idx#0 = 0
Constant (const byte) init_font_hex::i#0 = 0
Constant (const byte[]) FONT_HEX_PROTO = { 2, 5, 5, 5, 2, 6, 2, 2, 2, 7, 6, 1, 2, 4, 7, 6, 1, 2, 1, 6, 5, 5, 7, 1, 1, 7, 4, 6, 1, 6, 3, 4, 6, 5, 2, 7, 1, 1, 1, 1, 2, 5, 2, 5, 2, 2, 5, 3, 1, 1, 2, 5, 7, 5, 5, 6, 5, 6, 5, 6, 2, 5, 4, 5, 2, 6, 5, 5, 5, 6, 7, 4, 6, 4, 7, 7, 4, 6, 4, 4 }
Constant (const byte[CORDIC_ITERATIONS_8]) CORDIC_ATAN2_ANGLES_8 = kickasm {{ .fill CORDIC_ITERATIONS_8, 2*256*atan(1/pow(2,i))/PI/2
}}
Constant (const byte) atan2_8::angle#0 = 0
@ -898,12 +892,10 @@ Constant (const byte*) main::screen#0 = SCREEN
Constant (const signed byte) main::y#0 = -$c
Constant (const signed byte) main::x#0 = -$13
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte*) init_font_hex::proto_hi#0 = FONT_HEX_PROTO
Constant (const byte*) init_font_hex::proto_lo#0 = FONT_HEX_PROTO
Constant (const word) main::toD0181_$0 = (word)main::toD0181_screen#0
Constant (const word) main::toD0181_$4 = (word)main::toD0181_gfx#0
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [144] if(true) goto main::@6
if() condition always true - replacing block destination [143] if(true) goto main::@6
Successful SSA optimization Pass2ConstantIfs
Resolved ranged next value [17] init_font_hex::i#1 ← ++ init_font_hex::i#2 to ++
Resolved ranged comparison value [19] if(init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3 to (number) 5
@ -911,12 +903,12 @@ Resolved ranged next value [27] init_font_hex::c1#1 ← ++ init_font_hex::c1#4 t
Resolved ranged comparison value [29] if(init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 to (number) $10
Resolved ranged next value [32] init_font_hex::c#1 ← ++ init_font_hex::c#6 to ++
Resolved ranged comparison value [34] if(init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 to (number) $10
Resolved ranged next value [85] atan2_8::i#1 ← ++ atan2_8::i#2 to ++
Resolved ranged comparison value [87] if(atan2_8::i#1==rangelast(0,CORDIC_ITERATIONS_8-1)) goto atan2_8::@17 to (const byte) CORDIC_ITERATIONS_8-(byte) 1+(number) 1
Resolved ranged next value [137] main::x#1 ← ++ main::x#2 to ++
Resolved ranged comparison value [139] if(main::x#1!=rangelast(-$13,$14)) goto main::@2 to (number) $15
Resolved ranged next value [141] main::y#1 ← ++ main::y#4 to ++
Resolved ranged comparison value [143] if(main::y#1!=rangelast(-$c,$c)) goto main::@1 to (number) $d
Resolved ranged next value [84] atan2_8::i#1 ← ++ atan2_8::i#2 to ++
Resolved ranged comparison value [86] if(atan2_8::i#1==rangelast(0,CORDIC_ITERATIONS_8-1)) goto atan2_8::@17 to (const byte) CORDIC_ITERATIONS_8-(byte) 1+(number) 1
Resolved ranged next value [136] main::x#1 ← ++ main::x#2 to ++
Resolved ranged comparison value [138] if(main::x#1!=rangelast(-$13,$14)) goto main::@2 to (number) $15
Resolved ranged next value [140] main::y#1 ← ++ main::y#4 to ++
Resolved ranged comparison value [142] if(main::y#1!=rangelast(-$c,$c)) goto main::@1 to (number) $d
Simplifying expression containing zero init_font_hex::charset#2 in [8] *((byte*) init_font_hex::charset#2 + (const byte) init_font_hex::idx#0) ← (byte) 0
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused variable (byte) init_font_hex::idx#4 and assignment [15] (byte) init_font_hex::idx#4 ← ++ (byte) init_font_hex::idx#3
@ -972,13 +964,13 @@ Constant (const byte) main::toD0181_return#0 = main::toD0181_$3|main::toD0181_$7
Successful SSA optimization Pass2ConstantIdentification
Rewriting division to use shift [34] (byte) atan2_8::angle#1 ← (byte) atan2_8::angle#6 / (byte) 2
Successful SSA optimization Pass2MultiplyToShiftRewriting
Inlining constant with var siblings (const byte*) init_font_hex::proto_hi#0
Inlining constant with var siblings (const byte) init_font_hex::c#0
Inlining constant with var siblings (const byte*) init_font_hex::proto_lo#0
Inlining constant with var siblings (const byte) init_font_hex::c1#0
Inlining constant with var siblings (const byte) init_font_hex::idx#0
Inlining constant with var siblings (const byte) init_font_hex::i#0
Inlining constant with var siblings (const byte*) init_font_hex::charset#1
Inlining constant with var siblings (const byte*) init_font_hex::proto_hi#0
Inlining constant with var siblings (const byte*) init_font_hex::proto_lo#0
Inlining constant with var siblings (const byte) init_font_hex::idx#1
Inlining constant with var siblings (const byte) atan2_8::angle#0
Inlining constant with var siblings (const byte) atan2_8::i#0
@ -1022,7 +1014,6 @@ Added new block during phi lifting atan2_8::@30(between atan2_8::@7 and atan2_8:
Added new block during phi lifting main::@14(between main::@3 and main::@1)
Added new block during phi lifting main::@15(between main::@13 and main::@2)
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @1
Adding NOP phi() at start of @6
Adding NOP phi() at start of @8
Adding NOP phi() at start of @9
@ -1034,48 +1025,47 @@ Adding NOP phi() at start of main::toD0181_@return
Adding NOP phi() at start of main::@5
Adding NOP phi() at start of init_font_hex
CALL GRAPH
Calls in [] to main:4
Calls in [main] to init_font_hex:8 atan2_8:18
Calls in [] to main:3
Calls in [main] to init_font_hex:7 atan2_8:17
Created 24 initial phi equivalence classes
Coalesced [14] main::screen#7 ← main::screen#4
Coalesced [29] main::y#6 ← main::y#1
Coalesced [30] main::screen#6 ← main::screen#1
Coalesced [31] main::x#4 ← main::x#1
Coalesced (already) [32] main::screen#8 ← main::screen#1
Coalesced [35] atan2_8::yi#12 ← atan2_8::$2
Coalesced [39] atan2_8::xi#9 ← atan2_8::$7
Coalesced [41] atan2_8::yi#14 ← atan2_8::yi#0
Coalesced [42] atan2_8::xi#11 ← atan2_8::xi#0
Coalesced [45] atan2_8::angle#17 ← atan2_8::angle#12
Coalesced [50] atan2_8::angle#22 ← atan2_8::angle#4
Coalesced [54] atan2_8::return#5 ← atan2_8::angle#5
Coalesced [57] atan2_8::return#6 ← atan2_8::angle#11
Coalesced [58] atan2_8::angle#21 ← atan2_8::angle#1
Coalesced [65] atan2_8::yi#16 ← atan2_8::yi#2
Coalesced [66] atan2_8::angle#20 ← atan2_8::angle#3
Coalesced [67] atan2_8::xi#13 ← atan2_8::xi#2
Coalesced [71] atan2_8::yi#13 ← atan2_8::yi#7
Coalesced [72] atan2_8::xi#10 ← atan2_8::xi#7
Coalesced [73] atan2_8::i#7 ← atan2_8::i#1
Coalesced [74] atan2_8::angle#16 ← atan2_8::angle#13
Coalesced (already) [75] atan2_8::angle#18 ← atan2_8::angle#13
Coalesced [79] atan2_8::yi#15 ← atan2_8::yi#1
Coalesced [80] atan2_8::angle#19 ← atan2_8::angle#2
Coalesced [81] atan2_8::xi#12 ← atan2_8::xi#1
Not coalescing [82] atan2_8::xi#8 ← atan2_8::x#0
Not coalescing [83] atan2_8::yi#11 ← atan2_8::y#0
Coalesced [86] init_font_hex::charset#9 ← init_font_hex::charset#5
Coalesced [108] init_font_hex::charset#8 ← init_font_hex::charset#0
Coalesced [109] init_font_hex::proto_hi#7 ← init_font_hex::proto_hi#1
Coalesced [110] init_font_hex::c#7 ← init_font_hex::c#1
Coalesced (already) [111] init_font_hex::charset#10 ← init_font_hex::charset#0
Coalesced [112] init_font_hex::proto_lo#5 ← init_font_hex::proto_lo#1
Coalesced [113] init_font_hex::c1#5 ← init_font_hex::c1#1
Coalesced [114] init_font_hex::i#3 ← init_font_hex::i#1
Coalesced [115] init_font_hex::idx#7 ← init_font_hex::idx#2
Coalesced [13] main::screen#7 ← main::screen#4
Coalesced [28] main::y#6 ← main::y#1
Coalesced [29] main::screen#6 ← main::screen#1
Coalesced [30] main::x#4 ← main::x#1
Coalesced (already) [31] main::screen#8 ← main::screen#1
Coalesced [34] atan2_8::yi#12 ← atan2_8::$2
Coalesced [38] atan2_8::xi#9 ← atan2_8::$7
Coalesced [40] atan2_8::yi#14 ← atan2_8::yi#0
Coalesced [41] atan2_8::xi#11 ← atan2_8::xi#0
Coalesced [44] atan2_8::angle#17 ← atan2_8::angle#12
Coalesced [49] atan2_8::angle#22 ← atan2_8::angle#4
Coalesced [53] atan2_8::return#5 ← atan2_8::angle#5
Coalesced [56] atan2_8::return#6 ← atan2_8::angle#11
Coalesced [57] atan2_8::angle#21 ← atan2_8::angle#1
Coalesced [64] atan2_8::yi#16 ← atan2_8::yi#2
Coalesced [65] atan2_8::angle#20 ← atan2_8::angle#3
Coalesced [66] atan2_8::xi#13 ← atan2_8::xi#2
Coalesced [70] atan2_8::yi#13 ← atan2_8::yi#7
Coalesced [71] atan2_8::xi#10 ← atan2_8::xi#7
Coalesced [72] atan2_8::i#7 ← atan2_8::i#1
Coalesced [73] atan2_8::angle#16 ← atan2_8::angle#13
Coalesced (already) [74] atan2_8::angle#18 ← atan2_8::angle#13
Coalesced [78] atan2_8::yi#15 ← atan2_8::yi#1
Coalesced [79] atan2_8::angle#19 ← atan2_8::angle#2
Coalesced [80] atan2_8::xi#12 ← atan2_8::xi#1
Not coalescing [81] atan2_8::xi#8 ← atan2_8::x#0
Not coalescing [82] atan2_8::yi#11 ← atan2_8::y#0
Coalesced [85] init_font_hex::charset#9 ← init_font_hex::charset#5
Coalesced [107] init_font_hex::charset#8 ← init_font_hex::charset#0
Coalesced [108] init_font_hex::proto_hi#7 ← init_font_hex::proto_hi#1
Coalesced [109] init_font_hex::c#7 ← init_font_hex::c#1
Coalesced (already) [110] init_font_hex::charset#10 ← init_font_hex::charset#0
Coalesced [111] init_font_hex::proto_lo#5 ← init_font_hex::proto_lo#1
Coalesced [112] init_font_hex::c1#5 ← init_font_hex::c1#1
Coalesced [113] init_font_hex::i#3 ← init_font_hex::i#1
Coalesced [114] init_font_hex::idx#7 ← init_font_hex::idx#2
Coalesced down to 17 phi equivalence classes
Culled Empty Block (label) @1
Culled Empty Block (label) @6
Culled Empty Block (label) @9
Culled Empty Block (label) main::@12

View File

@ -431,9 +431,6 @@ main::@return: scope:[main] from main::@3
to:@return
@41: scope:[] from @16
(byte*) print_screen#47 ← phi( @16/(byte*) print_screen#0 )
(signed byte[8]) xs ← { (number) -$34, (number) -$34, (number) -$34, (number) 0, (number) 0, (number) $34, (number) $34, (number) $34 }
(signed byte[8]) ys ← { (number) -$34, (number) 0, (number) $34, (number) -$34, (number) $34, (number) -$34, (number) 0, (number) $34 }
(signed byte[8]) zs ← { (number) $34, (number) $34, (number) $34, (number) $34, (number) $34, (number) $34, (number) $34, (number) $34 }
(signed byte[8]) xrs ← { fill( 8, 0) }
(signed byte[8]) yrs ← { fill( 8, 0) }
(signed byte[8]) zrs ← { fill( 8, 0) }
@ -523,9 +520,9 @@ anim::@22: scope:[anim] from anim::@28 anim::@29
(signed byte) sx#25 ← phi( anim::@28/(signed byte) sx#26 anim::@29/(signed byte) sx#21 )
(byte) anim::i#2 ← phi( anim::@28/(byte) anim::i#0 anim::@29/(byte) anim::i#1 )
*((const byte*) BORDERCOL) ← ++ *((const byte*) BORDERCOL)
(signed byte) rotate_matrix::x#0 ← *((signed byte[8]) xs + (byte) anim::i#2)
(signed byte) rotate_matrix::y#0 ← *((signed byte[8]) ys + (byte) anim::i#2)
(signed byte) rotate_matrix::z#0 ← *((signed byte[8]) zs + (byte) anim::i#2)
(signed byte) rotate_matrix::x#0 ← *((const signed byte[8]) xs + (byte) anim::i#2)
(signed byte) rotate_matrix::y#0 ← *((const signed byte[8]) ys + (byte) anim::i#2)
(signed byte) rotate_matrix::z#0 ← *((const signed byte[8]) zs + (byte) anim::i#2)
call rotate_matrix
to:anim::@29
anim::@29: scope:[anim] from anim::@22
@ -675,7 +672,7 @@ debug_print_init::@1: scope:[debug_print_init] from debug_print_init::@17 debug
(byte*) debug_print_init::at_line#1 ← phi( debug_print_init::@17/(byte*) debug_print_init::at_line#0 debug_print_init::@3/(byte*) debug_print_init::at_line#4 )
(byte*~) debug_print_init::$30 ← (byte*) debug_print_init::at_line#1 + (number) $28*(number) 0
(byte*~) debug_print_init::$31 ← (byte*~) debug_print_init::$30 + (byte) debug_print_init::c#2
(signed byte) print_sbyte_at::b#1 ← *((signed byte[8]) xs + (byte) debug_print_init::i#2)
(signed byte) print_sbyte_at::b#1 ← *((const signed byte[8]) xs + (byte) debug_print_init::i#2)
(byte*) print_sbyte_at::at#0 ← (byte*~) debug_print_init::$31
call print_sbyte_at
to:debug_print_init::@18
@ -686,7 +683,7 @@ debug_print_init::@18: scope:[debug_print_init] from debug_print_init::@1
(byte*) debug_print_init::at_line#2 ← phi( debug_print_init::@1/(byte*) debug_print_init::at_line#1 )
(byte*~) debug_print_init::$33 ← (byte*) debug_print_init::at_line#2 + (number) $28*(number) 1
(byte*~) debug_print_init::$34 ← (byte*~) debug_print_init::$33 + (byte) debug_print_init::c#3
(signed byte) print_sbyte_at::b#2 ← *((signed byte[8]) ys + (byte) debug_print_init::i#3)
(signed byte) print_sbyte_at::b#2 ← *((const signed byte[8]) ys + (byte) debug_print_init::i#3)
(byte*) print_sbyte_at::at#1 ← (byte*~) debug_print_init::$34
call print_sbyte_at
to:debug_print_init::@19
@ -697,7 +694,7 @@ debug_print_init::@19: scope:[debug_print_init] from debug_print_init::@18
(byte*) debug_print_init::at_line#3 ← phi( debug_print_init::@18/(byte*) debug_print_init::at_line#2 )
(byte*~) debug_print_init::$36 ← (byte*) debug_print_init::at_line#3 + (number) $28*(number) 2
(byte*~) debug_print_init::$37 ← (byte*~) debug_print_init::$36 + (byte) debug_print_init::c#4
(signed byte) print_sbyte_at::b#3 ← *((signed byte[8]) zs + (byte) debug_print_init::i#4)
(signed byte) print_sbyte_at::b#3 ← *((const signed byte[8]) zs + (byte) debug_print_init::i#4)
(byte*) print_sbyte_at::at#2 ← (byte*~) debug_print_init::$37
call print_sbyte_at
to:debug_print_init::@20
@ -2155,15 +2152,15 @@ SYMBOL TABLE SSA
(signed byte[8]) xps
(const signed byte*) xr = (signed byte*)(number) $f0
(signed byte[8]) xrs
(signed byte[8]) xs
(const signed byte[8]) xs = { (signed byte)(number) -$34, (signed byte)(number) -$34, (signed byte)(number) -$34, (signed byte)(number) 0, (signed byte)(number) 0, (signed byte)(number) $34, (signed byte)(number) $34, (signed byte)(number) $34 }
(const signed byte*) yp = (signed byte*)(number) $f5
(signed byte[8]) yps
(const signed byte*) yr = (signed byte*)(number) $f1
(signed byte[8]) yrs
(signed byte[8]) ys
(const signed byte[8]) ys = { (signed byte)(number) -$34, (signed byte)(number) 0, (signed byte)(number) $34, (signed byte)(number) -$34, (signed byte)(number) $34, (signed byte)(number) -$34, (signed byte)(number) 0, (signed byte)(number) $34 }
(const signed byte*) zr = (signed byte*)(number) $f2
(signed byte[8]) zrs
(signed byte[8]) zs
(const signed byte[8]) zs = { (signed byte)(number) $34, (signed byte)(number) $34, (signed byte)(number) $34, (signed byte)(number) $34, (signed byte)(number) $34, (signed byte)(number) $34, (signed byte)(number) $34, (signed byte)(number) $34 }
Adding number conversion cast (unumber) 0 in (bool~) memset::$0 ← (word) memset::num#1 > (number) 0
Adding number conversion cast (unumber) 0 in (bool~) print_str_at::$0 ← (number) 0 != *((byte*) print_str_at::str#13)
@ -2301,10 +2298,6 @@ Adding number conversion cast (unumber) 8 in *((signed byte[9]) rotation_matrix
Adding number conversion cast (unumber) $40 in (signed byte*~) $0 ← (signed byte[$140]) SINH + (number) $40
Adding number conversion cast (unumber) $40 in (signed byte*~) $1 ← (signed byte[$140]) SINQ + (number) $40
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (signed byte[8]) xs ← (signed byte[8]){ (signed byte)(number) -$34, (signed byte)(number) -$34, (signed byte)(number) -$34, (signed byte)(number) 0, (signed byte)(number) 0, (signed byte)(number) $34, (signed byte)(number) $34, (signed byte)(number) $34 }
Added casts to value list in (signed byte[8]) ys ← (signed byte[8]){ (signed byte)(number) -$34, (signed byte)(number) 0, (signed byte)(number) $34, (signed byte)(number) -$34, (signed byte)(number) $34, (signed byte)(number) -$34, (signed byte)(number) 0, (signed byte)(number) $34 }
Added casts to value list in (signed byte[8]) zs ← (signed byte[8]){ (signed byte)(number) $34, (signed byte)(number) $34, (signed byte)(number) $34, (signed byte)(number) $34, (signed byte)(number) $34, (signed byte)(number) $34, (signed byte)(number) $34, (signed byte)(number) $34 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (byte*~) memset::$2 ← (byte*)(void*) memset::str#2
Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#2
Inlining cast (byte*) print_screen#0 ← (byte*)(number) $400
@ -2351,6 +2344,30 @@ Simplifying constant pointer cast (byte*) 53266
Simplifying constant pointer cast (byte*) 53269
Simplifying constant pointer cast (byte*) 53280
Simplifying constant pointer cast (byte*) 53287
Simplifying constant integer cast -$34
Simplifying constant integer cast -$34
Simplifying constant integer cast -$34
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $34
Simplifying constant integer cast $34
Simplifying constant integer cast $34
Simplifying constant integer cast -$34
Simplifying constant integer cast 0
Simplifying constant integer cast $34
Simplifying constant integer cast -$34
Simplifying constant integer cast $34
Simplifying constant integer cast -$34
Simplifying constant integer cast 0
Simplifying constant integer cast $34
Simplifying constant integer cast $34
Simplifying constant integer cast $34
Simplifying constant integer cast $34
Simplifying constant integer cast $34
Simplifying constant integer cast $34
Simplifying constant integer cast $34
Simplifying constant integer cast $34
Simplifying constant integer cast $34
Simplifying constant pointer cast (byte*) 55296
Simplifying constant pointer cast (byte*) 1024
Simplifying constant pointer cast (signed byte*) 240
@ -2372,30 +2389,6 @@ Simplifying constant integer cast 4
Simplifying constant integer cast $f
Simplifying constant integer cast 1
Simplifying constant integer cast $3e8
Simplifying constant integer cast -$34
Simplifying constant integer cast -$34
Simplifying constant integer cast -$34
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $34
Simplifying constant integer cast $34
Simplifying constant integer cast $34
Simplifying constant integer cast -$34
Simplifying constant integer cast 0
Simplifying constant integer cast $34
Simplifying constant integer cast -$34
Simplifying constant integer cast $34
Simplifying constant integer cast -$34
Simplifying constant integer cast 0
Simplifying constant integer cast $34
Simplifying constant integer cast $34
Simplifying constant integer cast $34
Simplifying constant integer cast $34
Simplifying constant integer cast $34
Simplifying constant integer cast $34
Simplifying constant integer cast $34
Simplifying constant integer cast $34
Simplifying constant integer cast $34
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $ff
@ -2799,52 +2792,45 @@ Simple Condition (bool~) memset::$1 [3] if((word) memset::num#0<=(byte) 0) goto
Simple Condition (bool~) memset::$4 [13] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5
Simple Condition (bool~) print_str_at::$0 [24] if((byte) 0!=*((byte*) print_str_at::str#13)) goto print_str_at::@2
Simple Condition (bool~) print_sbyte_at::$0 [32] if((signed byte) print_sbyte_at::b#22<(signed byte) 0) goto print_sbyte_at::@1
Simple Condition (bool~) anim::$0 [109] if(*((const byte*) RASTER)!=(byte) $ff) goto anim::@4
Simple Condition (bool~) anim::$1 [112] if(*((const byte*) RASTER)!=(byte) $fe) goto anim::@10
Simple Condition (bool~) anim::$2 [115] if(*((const byte*) RASTER)!=(byte) $fd) goto anim::@16
Simple Condition (bool~) anim::$13 [149] if((byte) anim::i#1!=rangelast(0,7)) goto anim::@22
Simple Condition (bool~) debug_print_init::$67 [281] if((byte) debug_print_init::j#1!=rangelast(0,3)) goto debug_print_init::@2
Simple Condition (bool~) debug_print_init::$68 [286] if((byte) debug_print_init::i#1!=rangelast(0,7)) goto debug_print_init::@1
Simple Condition (bool~) debug_print::$31 [475] if((byte) debug_print::i#1!=rangelast(0,7)) goto debug_print::@1
Simple Condition (bool~) sprites_init::$3 [488] if((byte) sprites_init::i#1!=rangelast(0,7)) goto sprites_init::@1
Simple Condition (bool~) anim::$0 [106] if(*((const byte*) RASTER)!=(byte) $ff) goto anim::@4
Simple Condition (bool~) anim::$1 [109] if(*((const byte*) RASTER)!=(byte) $fe) goto anim::@10
Simple Condition (bool~) anim::$2 [112] if(*((const byte*) RASTER)!=(byte) $fd) goto anim::@16
Simple Condition (bool~) anim::$13 [146] if((byte) anim::i#1!=rangelast(0,7)) goto anim::@22
Simple Condition (bool~) debug_print_init::$67 [278] if((byte) debug_print_init::j#1!=rangelast(0,3)) goto debug_print_init::@2
Simple Condition (bool~) debug_print_init::$68 [283] if((byte) debug_print_init::i#1!=rangelast(0,7)) goto debug_print_init::@1
Simple Condition (bool~) debug_print::$31 [472] if((byte) debug_print::i#1!=rangelast(0,7)) goto debug_print::@1
Simple Condition (bool~) sprites_init::$3 [485] if((byte) sprites_init::i#1!=rangelast(0,7)) goto sprites_init::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant right-side identified [96] (signed byte[8]) xrs ← { fill( 8, 0) }
Constant right-side identified [97] (signed byte[8]) yrs ← { fill( 8, 0) }
Constant right-side identified [98] (signed byte[8]) zrs ← { fill( 8, 0) }
Constant right-side identified [99] (signed byte[8]) pps ← { fill( 8, 0) }
Constant right-side identified [100] (signed byte[8]) xps ← { fill( 8, 0) }
Constant right-side identified [101] (signed byte[8]) yps ← { fill( 8, 0) }
Constant right-side identified [163] (byte*~) debug_print_init::$1 ← (const byte*) SCREEN + (byte)(number) $28*(number) 0
Constant right-side identified [168] (byte*~) debug_print_init::$4 ← (const byte*) SCREEN + (byte)(number) $28*(number) 1
Constant right-side identified [173] (byte*~) debug_print_init::$7 ← (const byte*) SCREEN + (byte)(number) $28*(number) 2
Constant right-side identified [178] (byte*) print_str_at::at#4 ← (const byte*) SCREEN + (word)(number) $28*(number) $10
Constant right-side identified [182] (byte*) print_str_at::at#5 ← (const byte*) SCREEN + (word)(number) $28*(number) $11
Constant right-side identified [186] (byte*) print_str_at::at#6 ← (const byte*) SCREEN + (word)(number) $28*(number) $12
Constant right-side identified [190] (byte*) print_str_at::at#7 ← (const byte*) SCREEN + (word)(number) $28*(number) $13
Constant right-side identified [194] (byte*) print_str_at::at#8 ← (const byte*) SCREEN + (word)(number) $28*(number) $14
Constant right-side identified [198] (byte*) print_str_at::at#9 ← (const byte*) SCREEN + (word)(number) $28*(number) $15
Constant right-side identified [202] (byte*) print_str_at::at#10 ← (const byte*) SCREEN + (word)(number) $28*(number) $16
Constant right-side identified [206] (byte*) print_str_at::at#11 ← (const byte*) SCREEN + (word)(number) $28*(number) $17
Constant right-side identified [210] (byte*) print_str_at::at#12 ← (const byte*) SCREEN + (word)(number) $28*(number) $18
Constant right-side identified [214] (byte*) debug_print_init::at_line#0 ← (const byte*) SCREEN + (word)(number) $10*(number) $28
Constant right-side identified [217] (byte*) debug_print_init::at_cols#0 ← (const byte*) debug_print_init::COLS + (word)(number) $10*(number) $28
Constant right-side identified [431] (byte*) debug_print::at_line#0 ← (const byte*) SCREEN + (word)(number) $13*(number) $28
Constant right-side identified [478] (byte*) sprites_init::sprites_ptr#0 ← (const byte*) sprites_init::SCREEN + (word) $3f8
Constant right-side identified [482] (byte*~) sprites_init::$1 ← (const byte*) SPRITE / (byte) $40
Constant right-side identified [491] (signed byte[9]) rotation_matrix ← { fill( 9, 0) }
Constant right-side identified [93] (signed byte[8]) xrs ← { fill( 8, 0) }
Constant right-side identified [94] (signed byte[8]) yrs ← { fill( 8, 0) }
Constant right-side identified [95] (signed byte[8]) zrs ← { fill( 8, 0) }
Constant right-side identified [96] (signed byte[8]) pps ← { fill( 8, 0) }
Constant right-side identified [97] (signed byte[8]) xps ← { fill( 8, 0) }
Constant right-side identified [98] (signed byte[8]) yps ← { fill( 8, 0) }
Constant right-side identified [160] (byte*~) debug_print_init::$1 ← (const byte*) SCREEN + (byte)(number) $28*(number) 0
Constant right-side identified [165] (byte*~) debug_print_init::$4 ← (const byte*) SCREEN + (byte)(number) $28*(number) 1
Constant right-side identified [170] (byte*~) debug_print_init::$7 ← (const byte*) SCREEN + (byte)(number) $28*(number) 2
Constant right-side identified [175] (byte*) print_str_at::at#4 ← (const byte*) SCREEN + (word)(number) $28*(number) $10
Constant right-side identified [179] (byte*) print_str_at::at#5 ← (const byte*) SCREEN + (word)(number) $28*(number) $11
Constant right-side identified [183] (byte*) print_str_at::at#6 ← (const byte*) SCREEN + (word)(number) $28*(number) $12
Constant right-side identified [187] (byte*) print_str_at::at#7 ← (const byte*) SCREEN + (word)(number) $28*(number) $13
Constant right-side identified [191] (byte*) print_str_at::at#8 ← (const byte*) SCREEN + (word)(number) $28*(number) $14
Constant right-side identified [195] (byte*) print_str_at::at#9 ← (const byte*) SCREEN + (word)(number) $28*(number) $15
Constant right-side identified [199] (byte*) print_str_at::at#10 ← (const byte*) SCREEN + (word)(number) $28*(number) $16
Constant right-side identified [203] (byte*) print_str_at::at#11 ← (const byte*) SCREEN + (word)(number) $28*(number) $17
Constant right-side identified [207] (byte*) print_str_at::at#12 ← (const byte*) SCREEN + (word)(number) $28*(number) $18
Constant right-side identified [211] (byte*) debug_print_init::at_line#0 ← (const byte*) SCREEN + (word)(number) $10*(number) $28
Constant right-side identified [214] (byte*) debug_print_init::at_cols#0 ← (const byte*) debug_print_init::COLS + (word)(number) $10*(number) $28
Constant right-side identified [428] (byte*) debug_print::at_line#0 ← (const byte*) SCREEN + (word)(number) $13*(number) $28
Constant right-side identified [475] (byte*) sprites_init::sprites_ptr#0 ← (const byte*) sprites_init::SCREEN + (word) $3f8
Constant right-side identified [479] (byte*~) sprites_init::$1 ← (const byte*) SPRITE / (byte) $40
Constant right-side identified [488] (signed byte[9]) rotation_matrix ← { fill( 9, 0) }
Successful SSA optimization Pass2ConstantRValueConsolidation
Identified constant from value list (signed byte[8]) { (signed byte) -$34, (signed byte) -$34, (signed byte) -$34, (signed byte) 0, (signed byte) 0, (signed byte) $34, (signed byte) $34, (signed byte) $34 }
Identified constant from value list (signed byte[8]) { (signed byte) -$34, (signed byte) 0, (signed byte) $34, (signed byte) -$34, (signed byte) $34, (signed byte) -$34, (signed byte) 0, (signed byte) $34 }
Identified constant from value list (signed byte[8]) { (signed byte) $34, (signed byte) $34, (signed byte) $34, (signed byte) $34, (signed byte) $34, (signed byte) $34, (signed byte) $34, (signed byte) $34 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const byte*) print_screen#0 = (byte*) 1024
Constant (const byte) print_char_at::ch#0 = '-'
Constant (const byte) print_char_at::ch#1 = ' '
Constant (const byte) memset::c#0 = ' '
Constant (const word) memset::num#0 = $3e8
Constant (const signed byte[8]) xs = { -$34, -$34, -$34, 0, 0, $34, $34, $34 }
Constant (const signed byte[8]) ys = { -$34, 0, $34, -$34, $34, -$34, 0, $34 }
Constant (const signed byte[8]) zs = { $34, $34, $34, $34, $34, $34, $34, $34 }
Constant (const signed byte[8]) xrs = { fill( 8, 0) }
Constant (const signed byte[8]) yrs = { fill( 8, 0) }
Constant (const signed byte[8]) zrs = { fill( 8, 0) }
@ -2973,43 +2959,43 @@ Constant (const byte*) memset::dst#0 = (byte*)memset::str#0
Constant (const void*) memset::return#2 = memset::str#0
Successful SSA optimization Pass2ConstantIdentification
if() condition always false - eliminating [3] if((const word) memset::num#0<=(byte) 0) goto memset::@1
if() condition always true - replacing block destination [106] if(true) goto anim::@4
if() condition always true - replacing block destination [103] if(true) goto anim::@4
Successful SSA optimization Pass2ConstantIfs
Resolved ranged next value [147] anim::i#1 ← ++ anim::i#2 to ++
Resolved ranged comparison value [149] if(anim::i#1!=rangelast(0,7)) goto anim::@22 to (number) 8
Resolved ranged next value [279] debug_print_init::j#1 ← ++ debug_print_init::j#2 to ++
Resolved ranged comparison value [281] if(debug_print_init::j#1!=rangelast(0,3)) goto debug_print_init::@2 to (number) 4
Resolved ranged next value [284] debug_print_init::i#1 ← ++ debug_print_init::i#2 to ++
Resolved ranged comparison value [286] if(debug_print_init::i#1!=rangelast(0,7)) goto debug_print_init::@1 to (number) 8
Resolved ranged next value [473] debug_print::i#1 ← ++ debug_print::i#2 to ++
Resolved ranged comparison value [475] if(debug_print::i#1!=rangelast(0,7)) goto debug_print::@1 to (number) 8
Resolved ranged next value [486] sprites_init::i#1 ← ++ sprites_init::i#2 to ++
Resolved ranged comparison value [488] if(sprites_init::i#1!=rangelast(0,7)) goto sprites_init::@1 to (number) 8
Converting *(pointer+n) to pointer[n] [246] *((byte*~) debug_print_init::$42) ← (byte) debug_print_init::col#0 -- *(debug_print_init::$41 + debug_print_init::j#2)
Converting *(pointer+n) to pointer[n] [250] *((byte*~) debug_print_init::$45) ← (byte) debug_print_init::col#0 -- *(debug_print_init::$44 + debug_print_init::j#2)
Converting *(pointer+n) to pointer[n] [254] *((byte*~) debug_print_init::$48) ← (byte) debug_print_init::col#0 -- *(debug_print_init::$47 + debug_print_init::j#2)
Converting *(pointer+n) to pointer[n] [258] *((byte*~) debug_print_init::$51) ← (byte) debug_print_init::col#0 -- *(debug_print_init::$50 + debug_print_init::j#2)
Converting *(pointer+n) to pointer[n] [262] *((byte*~) debug_print_init::$54) ← (byte) debug_print_init::col#0 -- *(debug_print_init::$53 + debug_print_init::j#2)
Converting *(pointer+n) to pointer[n] [266] *((byte*~) debug_print_init::$57) ← (byte) debug_print_init::col#0 -- *(debug_print_init::$56 + debug_print_init::j#2)
Converting *(pointer+n) to pointer[n] [270] *((byte*~) debug_print_init::$60) ← (byte) debug_print_init::col#0 -- *(debug_print_init::$59 + debug_print_init::j#2)
Converting *(pointer+n) to pointer[n] [274] *((byte*~) debug_print_init::$63) ← (byte) debug_print_init::col#0 -- *(debug_print_init::$62 + debug_print_init::j#2)
Converting *(pointer+n) to pointer[n] [278] *((byte*~) debug_print_init::$66) ← (byte) debug_print_init::col#0 -- *(debug_print_init::$65 + debug_print_init::j#2)
Resolved ranged next value [144] anim::i#1 ← ++ anim::i#2 to ++
Resolved ranged comparison value [146] if(anim::i#1!=rangelast(0,7)) goto anim::@22 to (number) 8
Resolved ranged next value [276] debug_print_init::j#1 ← ++ debug_print_init::j#2 to ++
Resolved ranged comparison value [278] if(debug_print_init::j#1!=rangelast(0,3)) goto debug_print_init::@2 to (number) 4
Resolved ranged next value [281] debug_print_init::i#1 ← ++ debug_print_init::i#2 to ++
Resolved ranged comparison value [283] if(debug_print_init::i#1!=rangelast(0,7)) goto debug_print_init::@1 to (number) 8
Resolved ranged next value [470] debug_print::i#1 ← ++ debug_print::i#2 to ++
Resolved ranged comparison value [472] if(debug_print::i#1!=rangelast(0,7)) goto debug_print::@1 to (number) 8
Resolved ranged next value [483] sprites_init::i#1 ← ++ sprites_init::i#2 to ++
Resolved ranged comparison value [485] if(sprites_init::i#1!=rangelast(0,7)) goto sprites_init::@1 to (number) 8
Converting *(pointer+n) to pointer[n] [243] *((byte*~) debug_print_init::$42) ← (byte) debug_print_init::col#0 -- *(debug_print_init::$41 + debug_print_init::j#2)
Converting *(pointer+n) to pointer[n] [247] *((byte*~) debug_print_init::$45) ← (byte) debug_print_init::col#0 -- *(debug_print_init::$44 + debug_print_init::j#2)
Converting *(pointer+n) to pointer[n] [251] *((byte*~) debug_print_init::$48) ← (byte) debug_print_init::col#0 -- *(debug_print_init::$47 + debug_print_init::j#2)
Converting *(pointer+n) to pointer[n] [255] *((byte*~) debug_print_init::$51) ← (byte) debug_print_init::col#0 -- *(debug_print_init::$50 + debug_print_init::j#2)
Converting *(pointer+n) to pointer[n] [259] *((byte*~) debug_print_init::$54) ← (byte) debug_print_init::col#0 -- *(debug_print_init::$53 + debug_print_init::j#2)
Converting *(pointer+n) to pointer[n] [263] *((byte*~) debug_print_init::$57) ← (byte) debug_print_init::col#0 -- *(debug_print_init::$56 + debug_print_init::j#2)
Converting *(pointer+n) to pointer[n] [267] *((byte*~) debug_print_init::$60) ← (byte) debug_print_init::col#0 -- *(debug_print_init::$59 + debug_print_init::j#2)
Converting *(pointer+n) to pointer[n] [271] *((byte*~) debug_print_init::$63) ← (byte) debug_print_init::col#0 -- *(debug_print_init::$62 + debug_print_init::j#2)
Converting *(pointer+n) to pointer[n] [275] *((byte*~) debug_print_init::$66) ← (byte) debug_print_init::col#0 -- *(debug_print_init::$65 + debug_print_init::j#2)
Successful SSA optimization Pass2InlineDerefIdx
Simplifying constant evaluating to zero (byte)(number) $28*(number) 0 in
Simplifying constant evaluating to zero (byte)(number) $28*(number) 0 in [221] (byte*~) debug_print_init::$30 ← (const byte*) debug_print_init::at_line#0 + (byte)(number) $28*(number) 0
Simplifying constant evaluating to zero (byte)(number) $28*(number) 0 in [243] (byte*~) debug_print_init::$40 ← (const byte*) debug_print_init::at_cols#0 + (byte)(number) $28*(number) 0
Simplifying constant evaluating to zero (byte)(number) $28*(number) 0 in [436] (byte*~) debug_print::$13 ← (const byte*) debug_print::at_line#0 + (byte)(number) $28*(number) 0
Simplifying constant evaluating to zero (byte)(number) $28*(number) 0 in [218] (byte*~) debug_print_init::$30 ← (const byte*) debug_print_init::at_line#0 + (byte)(number) $28*(number) 0
Simplifying constant evaluating to zero (byte)(number) $28*(number) 0 in [240] (byte*~) debug_print_init::$40 ← (const byte*) debug_print_init::at_cols#0 + (byte)(number) $28*(number) 0
Simplifying constant evaluating to zero (byte)(number) $28*(number) 0 in [433] (byte*~) debug_print::$13 ← (const byte*) debug_print::at_line#0 + (byte)(number) $28*(number) 0
Successful SSA optimization PassNSimplifyConstantZero
Simplifying expression containing zero SCREEN in
Simplifying expression containing zero debug_print_init::at_line#0 in [221] (byte*~) debug_print_init::$30 ← (const byte*) debug_print_init::at_line#0 + (byte) 0
Simplifying expression containing zero debug_print_init::at_cols#0 in [243] (byte*~) debug_print_init::$40 ← (const byte*) debug_print_init::at_cols#0 + (byte) 0
Simplifying expression containing zero rotation_matrix in [325] (signed byte) debug_print::print_sbyte_pos4_sb#0 ← *((const signed byte[9]) rotation_matrix + (byte) 0)
Simplifying expression containing zero debug_print::at_line#0 in [436] (byte*~) debug_print::$13 ← (const byte*) debug_print::at_line#0 + (byte) 0
Simplifying expression containing zero calculate_matrix::sy#0 in [493] (signed byte) calculate_matrix::t1#0 ← (signed byte) calculate_matrix::sy#0 - (const signed byte) calculate_matrix::sz#0
Simplifying expression containing zero calculate_matrix::sy#0 in [495] (signed byte) calculate_matrix::t2#0 ← (signed byte) calculate_matrix::sy#0 + (const signed byte) calculate_matrix::sz#0
Simplifying expression containing zero calculate_matrix::sx#0 in [497] (signed byte) calculate_matrix::t3#0 ← (signed byte) calculate_matrix::sx#0 + (const signed byte) calculate_matrix::sz#0
Simplifying expression containing zero calculate_matrix::sx#0 in [499] (signed byte) calculate_matrix::t4#0 ← (signed byte) calculate_matrix::sx#0 - (const signed byte) calculate_matrix::sz#0
Simplifying expression containing zero rotation_matrix in [514] *((const signed byte[9]) rotation_matrix + (byte) 0) ← (signed byte~) calculate_matrix::$10
Simplifying expression containing zero debug_print_init::at_line#0 in [218] (byte*~) debug_print_init::$30 ← (const byte*) debug_print_init::at_line#0 + (byte) 0
Simplifying expression containing zero debug_print_init::at_cols#0 in [240] (byte*~) debug_print_init::$40 ← (const byte*) debug_print_init::at_cols#0 + (byte) 0
Simplifying expression containing zero rotation_matrix in [322] (signed byte) debug_print::print_sbyte_pos4_sb#0 ← *((const signed byte[9]) rotation_matrix + (byte) 0)
Simplifying expression containing zero debug_print::at_line#0 in [433] (byte*~) debug_print::$13 ← (const byte*) debug_print::at_line#0 + (byte) 0
Simplifying expression containing zero calculate_matrix::sy#0 in [490] (signed byte) calculate_matrix::t1#0 ← (signed byte) calculate_matrix::sy#0 - (const signed byte) calculate_matrix::sz#0
Simplifying expression containing zero calculate_matrix::sy#0 in [492] (signed byte) calculate_matrix::t2#0 ← (signed byte) calculate_matrix::sy#0 + (const signed byte) calculate_matrix::sz#0
Simplifying expression containing zero calculate_matrix::sx#0 in [494] (signed byte) calculate_matrix::t3#0 ← (signed byte) calculate_matrix::sx#0 + (const signed byte) calculate_matrix::sz#0
Simplifying expression containing zero calculate_matrix::sx#0 in [496] (signed byte) calculate_matrix::t4#0 ← (signed byte) calculate_matrix::sx#0 - (const signed byte) calculate_matrix::sz#0
Simplifying expression containing zero rotation_matrix in [511] *((const signed byte[9]) rotation_matrix + (byte) 0) ← (signed byte~) calculate_matrix::$10
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused variable (byte*~) debug_print_init::$42 and assignment [115] (byte*~) debug_print_init::$42 ← (byte*~) debug_print_init::$41 + (byte) debug_print_init::j#2
Eliminating unused variable (byte*~) debug_print_init::$45 and assignment [119] (byte*~) debug_print_init::$45 ← (byte*~) debug_print_init::$44 + (byte) debug_print_init::j#2

View File

@ -417,11 +417,11 @@ bitmap_init: {
bne __b3
rts
}
lines_x: .byte $3c, $50, $6e, $50, $3c, $28, $a, $28, $3c
lines_y: .byte $a, $28, $3c, $50, $6e, $50, $3c, $28, $a
// Tables for the plotter - initialized by calling bitmap_draw_init();
bitmap_plot_xlo: .fill $100, 0
bitmap_plot_xhi: .fill $100, 0
bitmap_plot_ylo: .fill $100, 0
bitmap_plot_yhi: .fill $100, 0
bitmap_plot_bit: .fill $100, 0
lines_x: .byte $3c, $50, $6e, $50, $3c, $28, $a, $28, $3c
lines_y: .byte $a, $28, $3c, $50, $6e, $50, $3c, $28, $a

View File

@ -30,6 +30,7 @@ Culled Empty Block (label) @10
Culled Empty Block (label) bitmap_line_ydxi::@4
Culled Empty Block (label) @11
Culled Empty Block (label) bitmap_line_ydxd::@4
Culled Empty Block (label) @12
Culled Empty Block (label) main::@2
Culled Empty Block (label) @13
Culled Empty Block (label) lines::@4
@ -51,7 +52,7 @@ CONTROL FLOW GRAPH SSA
(byte[$100]) bitmap_plot_ylo ← { fill( $100, 0) }
(byte[$100]) bitmap_plot_yhi ← { fill( $100, 0) }
(byte[$100]) bitmap_plot_bit ← { fill( $100, 0) }
to:@12
to:@15
(void()) bitmap_init((byte*) bitmap_init::bitmap)
bitmap_init: scope:[bitmap_init] from main
@ -612,10 +613,6 @@ bitmap_line_ydxd::@3: scope:[bitmap_line_ydxd] from bitmap_line_ydxd::@5
bitmap_line_ydxd::@return: scope:[bitmap_line_ydxd] from bitmap_line_ydxd::@2
return
to:@return
@12: scope:[] from @4
(byte[]) lines_x ← { (number) $3c, (number) $50, (number) $6e, (number) $50, (number) $3c, (number) $28, (number) $a, (number) $28, (number) $3c }
(byte[]) lines_y ← { (number) $a, (number) $28, (number) $3c, (number) $50, (number) $6e, (number) $50, (number) $3c, (number) $28, (number) $a }
to:@15
(void()) main()
main: scope:[main] from @15
@ -665,10 +662,10 @@ lines::@2: scope:[lines] from lines::@1
(byte) lines::l#3 ← phi( lines::@1/(byte) lines::l#2 )
(number~) lines::$1 ← (byte) lines::l#3 + (number) 1
(number~) lines::$2 ← (byte) lines::l#3 + (number) 1
(byte) bitmap_line::x0#0 ← *((byte[]) lines_x + (byte) lines::l#3)
(byte) bitmap_line::x1#0 ← *((byte[]) lines_x + (number~) lines::$1)
(byte) bitmap_line::y0#0 ← *((byte[]) lines_y + (byte) lines::l#3)
(byte) bitmap_line::y1#0 ← *((byte[]) lines_y + (number~) lines::$2)
(byte) bitmap_line::x0#0 ← *((const byte[]) lines_x + (byte) lines::l#3)
(byte) bitmap_line::x1#0 ← *((const byte[]) lines_x + (number~) lines::$1)
(byte) bitmap_line::y0#0 ← *((const byte[]) lines_y + (byte) lines::l#3)
(byte) bitmap_line::y1#0 ← *((const byte[]) lines_y + (number~) lines::$2)
call bitmap_line
to:lines::@7
lines::@7: scope:[lines] from lines::@2
@ -696,7 +693,7 @@ init_screen::@2: scope:[init_screen] from init_screen::@1
init_screen::@return: scope:[init_screen] from init_screen::@1
return
to:@return
@15: scope:[] from @12
@15: scope:[] from @4
call main
to:@16
@16: scope:[] from @15
@ -704,7 +701,6 @@ init_screen::@return: scope:[init_screen] from init_screen::@1
@end: scope:[] from @16
SYMBOL TABLE SSA
(label) @12
(label) @15
(label) @16
(label) @4
@ -1229,8 +1225,8 @@ SYMBOL TABLE SSA
(byte) lines::l#3
(byte) lines::l#4
(const byte) lines_cnt = (byte) 8
(byte[]) lines_x
(byte[]) lines_y
(const byte[]) lines_x = { (byte)(number) $3c, (byte)(number) $50, (byte)(number) $6e, (byte)(number) $50, (byte)(number) $3c, (byte)(number) $28, (byte)(number) $a, (byte)(number) $28, (byte)(number) $3c }
(const byte[]) lines_y = { (byte)(number) $a, (byte)(number) $28, (byte)(number) $3c, (byte)(number) $50, (byte)(number) $6e, (byte)(number) $50, (byte)(number) $3c, (byte)(number) $28, (byte)(number) $a }
(void()) main()
(word~) main::$0
(number~) main::$1
@ -1300,9 +1296,6 @@ Adding number conversion cast (unumber) lines::$2 in (number~) lines::$2 ← (by
Adding number conversion cast (unumber) $400 in (bool~) init_screen::$0 ← (byte*) init_screen::c#2 != (const byte*) SCREEN+(number) $400
Adding number conversion cast (unumber) $14 in *((byte*) init_screen::c#3) ← (number) $14
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (byte[]) lines_x ← (byte[]){ (byte)(number) $3c, (byte)(number) $50, (byte)(number) $6e, (byte)(number) $50, (byte)(number) $3c, (byte)(number) $28, (byte)(number) $a, (byte)(number) $28, (byte)(number) $3c }
Added casts to value list in (byte[]) lines_y ← (byte[]){ (byte)(number) $a, (byte)(number) $28, (byte)(number) $3c, (byte)(number) $50, (byte)(number) $6e, (byte)(number) $50, (byte)(number) $3c, (byte)(number) $28, (byte)(number) $a }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (byte) bitmap_init::bits#0 ← (unumber)(number) $80
Inlining cast (byte) bitmap_init::bits#2 ← (unumber)(number) $80
Inlining cast (byte*) bitmap_init::yoffs#0 ← (byte*)(number) 0
@ -1323,6 +1316,24 @@ Simplifying constant pointer cast (byte*) 53265
Simplifying constant pointer cast (byte*) 53272
Simplifying constant pointer cast (byte*) 1024
Simplifying constant pointer cast (byte*) 8192
Simplifying constant integer cast $3c
Simplifying constant integer cast $50
Simplifying constant integer cast $6e
Simplifying constant integer cast $50
Simplifying constant integer cast $3c
Simplifying constant integer cast $28
Simplifying constant integer cast $a
Simplifying constant integer cast $28
Simplifying constant integer cast $3c
Simplifying constant integer cast $a
Simplifying constant integer cast $28
Simplifying constant integer cast $3c
Simplifying constant integer cast $50
Simplifying constant integer cast $6e
Simplifying constant integer cast $50
Simplifying constant integer cast $3c
Simplifying constant integer cast $28
Simplifying constant integer cast $a
Simplifying constant integer cast $80
Simplifying constant integer cast $f8
Simplifying constant integer cast 1
@ -1349,24 +1360,6 @@ Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast $3c
Simplifying constant integer cast $50
Simplifying constant integer cast $6e
Simplifying constant integer cast $50
Simplifying constant integer cast $3c
Simplifying constant integer cast $28
Simplifying constant integer cast $a
Simplifying constant integer cast $28
Simplifying constant integer cast $3c
Simplifying constant integer cast $a
Simplifying constant integer cast $28
Simplifying constant integer cast $3c
Simplifying constant integer cast $50
Simplifying constant integer cast $6e
Simplifying constant integer cast $50
Simplifying constant integer cast $3c
Simplifying constant integer cast $28
Simplifying constant integer cast $a
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast (const byte) VIC_BMM|(const byte) VIC_DEN|(const byte) VIC_RSEL|(unumber)(number) 3
@ -1564,20 +1557,17 @@ Simple Condition (bool~) bitmap_line_ydxi::$4 [224] if((byte) bitmap_line_ydxi::
Simple Condition (bool~) bitmap_line_ydxi::$7 [228] if((byte) bitmap_line_ydxi::y#2!=(byte~) bitmap_line_ydxi::$6) goto bitmap_line_ydxi::@1
Simple Condition (bool~) bitmap_line_ydxd::$4 [248] if((byte) bitmap_line_ydxd::yd#5>=(byte) bitmap_line_ydxd::e#1) goto bitmap_line_ydxd::@2
Simple Condition (bool~) bitmap_line_ydxd::$7 [252] if((byte) bitmap_line_ydxd::y#3!=(byte~) bitmap_line_ydxd::$6) goto bitmap_line_ydxd::@1
Simple Condition (bool~) lines::$0 [282] if((byte) lines::l#2<(const byte) lines_cnt) goto lines::@2
Simple Condition (bool~) init_screen::$0 [297] if((byte*) init_screen::c#2!=(const byte*) SCREEN+(word) $400) goto init_screen::@2
Simple Condition (bool~) lines::$0 [280] if((byte) lines::l#2<(const byte) lines_cnt) goto lines::@2
Simple Condition (bool~) init_screen::$0 [295] if((byte*) init_screen::c#2!=(const byte*) SCREEN+(word) $400) goto init_screen::@2
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant right-side identified [0] (byte[$100]) bitmap_plot_xlo ← { fill( $100, 0) }
Constant right-side identified [1] (byte[$100]) bitmap_plot_xhi ← { fill( $100, 0) }
Constant right-side identified [2] (byte[$100]) bitmap_plot_ylo ← { fill( $100, 0) }
Constant right-side identified [3] (byte[$100]) bitmap_plot_yhi ← { fill( $100, 0) }
Constant right-side identified [4] (byte[$100]) bitmap_plot_bit ← { fill( $100, 0) }
Constant right-side identified [263] (word~) main::$0 ← (word)(const byte*) SCREEN
Constant right-side identified [266] (word~) main::$3 ← (word)(const byte*) BITMAP
Constant right-side identified [261] (word~) main::$0 ← (word)(const byte*) SCREEN
Constant right-side identified [264] (word~) main::$3 ← (word)(const byte*) BITMAP
Successful SSA optimization Pass2ConstantRValueConsolidation
Identified constant from value list (byte[]) { (byte) $3c, (byte) $50, (byte) $6e, (byte) $50, (byte) $3c, (byte) $28, (byte) $a, (byte) $28, (byte) $3c }
Identified constant from value list (byte[]) { (byte) $a, (byte) $28, (byte) $3c, (byte) $50, (byte) $6e, (byte) $50, (byte) $3c, (byte) $28, (byte) $a }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const byte[$100]) bitmap_plot_xlo = { fill( $100, 0) }
Constant (const byte[$100]) bitmap_plot_xhi = { fill( $100, 0) }
Constant (const byte[$100]) bitmap_plot_ylo = { fill( $100, 0) }
@ -1592,15 +1582,13 @@ Constant (const byte) bitmap_clear::y#0 = 0
Constant (const byte) bitmap_clear::x#0 = 0
Constant (const byte) bitmap_line::xd#0 = 0
Constant (const byte) bitmap_line::yd#0 = 0
Constant (const byte[]) lines_x = { $3c, $50, $6e, $50, $3c, $28, $a, $28, $3c }
Constant (const byte[]) lines_y = { $a, $28, $3c, $50, $6e, $50, $3c, $28, $a }
Constant (const word) main::$0 = (word)SCREEN
Constant (const word) main::$3 = (word)BITMAP
Constant (const byte*) bitmap_init::bitmap#0 = BITMAP
Constant (const byte) lines::l#0 = 0
Constant (const byte*) init_screen::c#0 = SCREEN
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [277] if(true) goto main::@1
if() condition always true - replacing block destination [275] if(true) goto main::@1
Successful SSA optimization Pass2ConstantIfs
Resolved ranged next value [20] bitmap_init::x#1 ← ++ bitmap_init::x#2 to ++
Resolved ranged comparison value [22] if(bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 to (number) 0
@ -1710,7 +1698,6 @@ Added new block during phi lifting bitmap_line_ydxd::@6(between bitmap_line_ydxd
Added new block during phi lifting bitmap_line_ydxd::@7(between bitmap_line_ydxd::@5 and bitmap_line_ydxd::@2)
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @4
Adding NOP phi() at start of @12
Adding NOP phi() at start of @15
Adding NOP phi() at start of @16
Adding NOP phi() at start of @end
@ -1733,121 +1720,120 @@ Adding NOP phi() at start of bitmap_init
Adding NOP phi() at start of bitmap_init::@3
Adding NOP phi() at start of bitmap_init::@4
CALL GRAPH
Calls in [] to main:4
Calls in [main] to bitmap_init:11 bitmap_clear:13 init_screen:15 lines:18
Calls in [lines] to bitmap_line:28
Calls in [bitmap_line] to bitmap_line_ydxi:46 bitmap_line_xdyi:59 bitmap_line_ydxd:73 bitmap_line_xdyd:85 bitmap_line_ydxd:101 bitmap_line_xdyd:113 bitmap_line_ydxi:127 bitmap_line_xdyi:139
Calls in [bitmap_line_xdyi] to bitmap_plot:151
Calls in [bitmap_line_ydxi] to bitmap_plot:185
Calls in [bitmap_line_xdyd] to bitmap_plot:212
Calls in [bitmap_line_ydxd] to bitmap_plot:239
Calls in [] to main:3
Calls in [main] to bitmap_init:10 bitmap_clear:12 init_screen:14 lines:17
Calls in [lines] to bitmap_line:27
Calls in [bitmap_line] to bitmap_line_ydxi:45 bitmap_line_xdyi:58 bitmap_line_ydxd:72 bitmap_line_xdyd:84 bitmap_line_ydxd:100 bitmap_line_xdyd:112 bitmap_line_ydxi:126 bitmap_line_xdyi:138
Calls in [bitmap_line_xdyi] to bitmap_plot:150
Calls in [bitmap_line_ydxi] to bitmap_plot:184
Calls in [bitmap_line_xdyd] to bitmap_plot:211
Calls in [bitmap_line_ydxd] to bitmap_plot:238
Created 54 initial phi equivalence classes
Coalesced [30] lines::l#5 ← lines::l#1
Coalesced [41] bitmap_line_ydxi::xd#8 ← bitmap_line_ydxi::xd#0
Coalesced [42] bitmap_line_ydxi::x#9 ← bitmap_line_ydxi::x#0
Coalesced [43] bitmap_line_ydxi::y#9 ← bitmap_line_ydxi::y#0
Coalesced [44] bitmap_line_ydxi::yd#8 ← bitmap_line_ydxi::yd#0
Coalesced [45] bitmap_line_ydxi::y1#8 ← bitmap_line_ydxi::y1#0
Coalesced [54] bitmap_line_xdyi::yd#7 ← bitmap_line_xdyi::yd#0
Coalesced [55] bitmap_line_xdyi::x#8 ← bitmap_line_xdyi::x#0
Coalesced [56] bitmap_line_xdyi::y#8 ← bitmap_line_xdyi::y#0
Coalesced [57] bitmap_line_xdyi::xd#7 ← bitmap_line_xdyi::xd#0
Coalesced [58] bitmap_line_xdyi::x1#7 ← bitmap_line_xdyi::x1#0
Coalesced [68] bitmap_line_ydxd::xd#7 ← bitmap_line_ydxd::xd#0
Coalesced [69] bitmap_line_ydxd::x#8 ← bitmap_line_ydxd::x#0
Coalesced [70] bitmap_line_ydxd::y#9 ← bitmap_line_ydxd::y#0
Coalesced [71] bitmap_line_ydxd::yd#7 ← bitmap_line_ydxd::yd#0
Coalesced [72] bitmap_line_ydxd::y1#7 ← bitmap_line_ydxd::y1#0
Coalesced [80] bitmap_line_xdyd::yd#7 ← bitmap_line_xdyd::yd#0
Coalesced [81] bitmap_line_xdyd::x#8 ← bitmap_line_xdyd::x#0
Coalesced [82] bitmap_line_xdyd::y#8 ← bitmap_line_xdyd::y#0
Coalesced [83] bitmap_line_xdyd::xd#7 ← bitmap_line_xdyd::xd#0
Coalesced [84] bitmap_line_xdyd::x1#7 ← bitmap_line_xdyd::x1#0
Coalesced [96] bitmap_line_ydxd::xd#8 ← bitmap_line_ydxd::xd#1
Coalesced [97] bitmap_line_ydxd::x#9 ← bitmap_line_ydxd::x#1
Coalesced [98] bitmap_line_ydxd::y#10 ← bitmap_line_ydxd::y#1
Coalesced [99] bitmap_line_ydxd::yd#8 ← bitmap_line_ydxd::yd#1
Coalesced [100] bitmap_line_ydxd::y1#8 ← bitmap_line_ydxd::y1#1
Coalesced [108] bitmap_line_xdyd::yd#8 ← bitmap_line_xdyd::yd#1
Coalesced [109] bitmap_line_xdyd::x#9 ← bitmap_line_xdyd::x#1
Coalesced [110] bitmap_line_xdyd::y#9 ← bitmap_line_xdyd::y#1
Coalesced [111] bitmap_line_xdyd::xd#8 ← bitmap_line_xdyd::xd#1
Coalesced [112] bitmap_line_xdyd::x1#8 ← bitmap_line_xdyd::x1#1
Coalesced [122] bitmap_line_ydxi::xd#7 ← bitmap_line_ydxi::xd#1
Coalesced [123] bitmap_line_ydxi::x#8 ← bitmap_line_ydxi::x#1
Coalesced [124] bitmap_line_ydxi::y#8 ← bitmap_line_ydxi::y#1
Coalesced [125] bitmap_line_ydxi::yd#7 ← bitmap_line_ydxi::yd#1
Coalesced [126] bitmap_line_ydxi::y1#7 ← bitmap_line_ydxi::y1#1
Coalesced [134] bitmap_line_xdyi::yd#8 ← bitmap_line_xdyi::yd#1
Coalesced [135] bitmap_line_xdyi::x#9 ← bitmap_line_xdyi::x#1
Coalesced [136] bitmap_line_xdyi::y#9 ← bitmap_line_xdyi::y#1
Coalesced [137] bitmap_line_xdyi::xd#8 ← bitmap_line_xdyi::xd#1
Coalesced [138] bitmap_line_xdyi::x1#8 ← bitmap_line_xdyi::x1#1
Coalesced [143] bitmap_line_xdyi::x#10 ← bitmap_line_xdyi::x#6
Coalesced [144] bitmap_line_xdyi::y#10 ← bitmap_line_xdyi::y#5
Coalesced [145] bitmap_line_xdyi::e#7 ← bitmap_line_xdyi::e#0
Coalesced [149] bitmap_plot::x#6 ← bitmap_plot::x#0
Coalesced [150] bitmap_plot::y#6 ← bitmap_plot::y#0
Coalesced [157] bitmap_line_xdyi::y#12 ← bitmap_line_xdyi::y#2
Coalesced [158] bitmap_line_xdyi::e#9 ← bitmap_line_xdyi::e#2
Coalesced [163] bitmap_line_xdyi::x#11 ← bitmap_line_xdyi::x#2
Coalesced [164] bitmap_line_xdyi::y#11 ← bitmap_line_xdyi::y#6
Coalesced [165] bitmap_line_xdyi::e#8 ← bitmap_line_xdyi::e#6
Coalesced (already) [166] bitmap_line_xdyi::y#13 ← bitmap_line_xdyi::y#3
Coalesced [167] bitmap_line_xdyi::e#10 ← bitmap_line_xdyi::e#1
Coalesced [177] bitmap_line_ydxi::x#10 ← bitmap_line_ydxi::x#5
Coalesced [178] bitmap_line_ydxi::y#10 ← bitmap_line_ydxi::y#6
Coalesced [179] bitmap_line_ydxi::e#7 ← bitmap_line_ydxi::e#0
Coalesced [183] bitmap_plot::x#8 ← bitmap_plot::x#2
Coalesced [184] bitmap_plot::y#8 ← bitmap_plot::y#2
Coalesced [191] bitmap_line_ydxi::x#12 ← bitmap_line_ydxi::x#2
Coalesced [192] bitmap_line_ydxi::e#9 ← bitmap_line_ydxi::e#2
Coalesced [197] bitmap_line_ydxi::x#11 ← bitmap_line_ydxi::x#6
Coalesced [198] bitmap_line_ydxi::y#11 ← bitmap_line_ydxi::y#2
Coalesced [199] bitmap_line_ydxi::e#8 ← bitmap_line_ydxi::e#6
Coalesced (already) [200] bitmap_line_ydxi::x#13 ← bitmap_line_ydxi::x#3
Coalesced [201] bitmap_line_ydxi::e#10 ← bitmap_line_ydxi::e#1
Coalesced [204] bitmap_line_xdyd::x#10 ← bitmap_line_xdyd::x#6
Coalesced [205] bitmap_line_xdyd::y#10 ← bitmap_line_xdyd::y#5
Coalesced [206] bitmap_line_xdyd::e#7 ← bitmap_line_xdyd::e#0
Coalesced [210] bitmap_plot::x#5 ← bitmap_plot::x#1
Coalesced [211] bitmap_plot::y#5 ← bitmap_plot::y#1
Coalesced [218] bitmap_line_xdyd::y#12 ← bitmap_line_xdyd::y#2
Coalesced [219] bitmap_line_xdyd::e#9 ← bitmap_line_xdyd::e#2
Coalesced [224] bitmap_line_xdyd::x#11 ← bitmap_line_xdyd::x#2
Coalesced [225] bitmap_line_xdyd::y#11 ← bitmap_line_xdyd::y#6
Coalesced [226] bitmap_line_xdyd::e#8 ← bitmap_line_xdyd::e#6
Coalesced (already) [227] bitmap_line_xdyd::y#13 ← bitmap_line_xdyd::y#3
Coalesced [228] bitmap_line_xdyd::e#10 ← bitmap_line_xdyd::e#1
Coalesced [231] bitmap_line_ydxd::x#10 ← bitmap_line_ydxd::x#5
Coalesced [232] bitmap_line_ydxd::y#11 ← bitmap_line_ydxd::y#7
Coalesced [233] bitmap_line_ydxd::e#7 ← bitmap_line_ydxd::e#0
Coalesced [237] bitmap_plot::x#7 ← bitmap_plot::x#3
Coalesced [238] bitmap_plot::y#7 ← bitmap_plot::y#3
Coalesced [245] bitmap_line_ydxd::x#12 ← bitmap_line_ydxd::x#2
Coalesced [246] bitmap_line_ydxd::e#9 ← bitmap_line_ydxd::e#2
Coalesced [251] bitmap_line_ydxd::x#11 ← bitmap_line_ydxd::x#6
Coalesced [252] bitmap_line_ydxd::y#12 ← bitmap_line_ydxd::y#3
Coalesced [253] bitmap_line_ydxd::e#8 ← bitmap_line_ydxd::e#6
Coalesced (already) [254] bitmap_line_ydxd::x#13 ← bitmap_line_ydxd::x#3
Coalesced [255] bitmap_line_ydxd::e#10 ← bitmap_line_ydxd::e#1
Coalesced [262] init_screen::c#4 ← init_screen::c#1
Coalesced [266] bitmap_clear::bitmap#7 ← bitmap_clear::bitmap#3
Coalesced [275] bitmap_clear::bitmap#6 ← bitmap_clear::bitmap#1
Coalesced [276] bitmap_clear::y#5 ← bitmap_clear::y#1
Coalesced (already) [277] bitmap_clear::bitmap#8 ← bitmap_clear::bitmap#1
Coalesced [278] bitmap_clear::x#3 ← bitmap_clear::x#1
Coalesced [301] bitmap_init::yoffs#7 ← bitmap_init::yoffs#1
Coalesced [306] bitmap_init::y#5 ← bitmap_init::y#1
Coalesced [307] bitmap_init::yoffs#5 ← bitmap_init::yoffs#4
Coalesced (already) [308] bitmap_init::yoffs#6 ← bitmap_init::yoffs#2
Coalesced [309] bitmap_init::x#5 ← bitmap_init::x#1
Coalesced [310] bitmap_init::bits#5 ← bitmap_init::bits#4
Coalesced [311] bitmap_init::bits#6 ← bitmap_init::bits#1
Coalesced [29] lines::l#5 ← lines::l#1
Coalesced [40] bitmap_line_ydxi::xd#8 ← bitmap_line_ydxi::xd#0
Coalesced [41] bitmap_line_ydxi::x#9 ← bitmap_line_ydxi::x#0
Coalesced [42] bitmap_line_ydxi::y#9 ← bitmap_line_ydxi::y#0
Coalesced [43] bitmap_line_ydxi::yd#8 ← bitmap_line_ydxi::yd#0
Coalesced [44] bitmap_line_ydxi::y1#8 ← bitmap_line_ydxi::y1#0
Coalesced [53] bitmap_line_xdyi::yd#7 ← bitmap_line_xdyi::yd#0
Coalesced [54] bitmap_line_xdyi::x#8 ← bitmap_line_xdyi::x#0
Coalesced [55] bitmap_line_xdyi::y#8 ← bitmap_line_xdyi::y#0
Coalesced [56] bitmap_line_xdyi::xd#7 ← bitmap_line_xdyi::xd#0
Coalesced [57] bitmap_line_xdyi::x1#7 ← bitmap_line_xdyi::x1#0
Coalesced [67] bitmap_line_ydxd::xd#7 ← bitmap_line_ydxd::xd#0
Coalesced [68] bitmap_line_ydxd::x#8 ← bitmap_line_ydxd::x#0
Coalesced [69] bitmap_line_ydxd::y#9 ← bitmap_line_ydxd::y#0
Coalesced [70] bitmap_line_ydxd::yd#7 ← bitmap_line_ydxd::yd#0
Coalesced [71] bitmap_line_ydxd::y1#7 ← bitmap_line_ydxd::y1#0
Coalesced [79] bitmap_line_xdyd::yd#7 ← bitmap_line_xdyd::yd#0
Coalesced [80] bitmap_line_xdyd::x#8 ← bitmap_line_xdyd::x#0
Coalesced [81] bitmap_line_xdyd::y#8 ← bitmap_line_xdyd::y#0
Coalesced [82] bitmap_line_xdyd::xd#7 ← bitmap_line_xdyd::xd#0
Coalesced [83] bitmap_line_xdyd::x1#7 ← bitmap_line_xdyd::x1#0
Coalesced [95] bitmap_line_ydxd::xd#8 ← bitmap_line_ydxd::xd#1
Coalesced [96] bitmap_line_ydxd::x#9 ← bitmap_line_ydxd::x#1
Coalesced [97] bitmap_line_ydxd::y#10 ← bitmap_line_ydxd::y#1
Coalesced [98] bitmap_line_ydxd::yd#8 ← bitmap_line_ydxd::yd#1
Coalesced [99] bitmap_line_ydxd::y1#8 ← bitmap_line_ydxd::y1#1
Coalesced [107] bitmap_line_xdyd::yd#8 ← bitmap_line_xdyd::yd#1
Coalesced [108] bitmap_line_xdyd::x#9 ← bitmap_line_xdyd::x#1
Coalesced [109] bitmap_line_xdyd::y#9 ← bitmap_line_xdyd::y#1
Coalesced [110] bitmap_line_xdyd::xd#8 ← bitmap_line_xdyd::xd#1
Coalesced [111] bitmap_line_xdyd::x1#8 ← bitmap_line_xdyd::x1#1
Coalesced [121] bitmap_line_ydxi::xd#7 ← bitmap_line_ydxi::xd#1
Coalesced [122] bitmap_line_ydxi::x#8 ← bitmap_line_ydxi::x#1
Coalesced [123] bitmap_line_ydxi::y#8 ← bitmap_line_ydxi::y#1
Coalesced [124] bitmap_line_ydxi::yd#7 ← bitmap_line_ydxi::yd#1
Coalesced [125] bitmap_line_ydxi::y1#7 ← bitmap_line_ydxi::y1#1
Coalesced [133] bitmap_line_xdyi::yd#8 ← bitmap_line_xdyi::yd#1
Coalesced [134] bitmap_line_xdyi::x#9 ← bitmap_line_xdyi::x#1
Coalesced [135] bitmap_line_xdyi::y#9 ← bitmap_line_xdyi::y#1
Coalesced [136] bitmap_line_xdyi::xd#8 ← bitmap_line_xdyi::xd#1
Coalesced [137] bitmap_line_xdyi::x1#8 ← bitmap_line_xdyi::x1#1
Coalesced [142] bitmap_line_xdyi::x#10 ← bitmap_line_xdyi::x#6
Coalesced [143] bitmap_line_xdyi::y#10 ← bitmap_line_xdyi::y#5
Coalesced [144] bitmap_line_xdyi::e#7 ← bitmap_line_xdyi::e#0
Coalesced [148] bitmap_plot::x#6 ← bitmap_plot::x#0
Coalesced [149] bitmap_plot::y#6 ← bitmap_plot::y#0
Coalesced [156] bitmap_line_xdyi::y#12 ← bitmap_line_xdyi::y#2
Coalesced [157] bitmap_line_xdyi::e#9 ← bitmap_line_xdyi::e#2
Coalesced [162] bitmap_line_xdyi::x#11 ← bitmap_line_xdyi::x#2
Coalesced [163] bitmap_line_xdyi::y#11 ← bitmap_line_xdyi::y#6
Coalesced [164] bitmap_line_xdyi::e#8 ← bitmap_line_xdyi::e#6
Coalesced (already) [165] bitmap_line_xdyi::y#13 ← bitmap_line_xdyi::y#3
Coalesced [166] bitmap_line_xdyi::e#10 ← bitmap_line_xdyi::e#1
Coalesced [176] bitmap_line_ydxi::x#10 ← bitmap_line_ydxi::x#5
Coalesced [177] bitmap_line_ydxi::y#10 ← bitmap_line_ydxi::y#6
Coalesced [178] bitmap_line_ydxi::e#7 ← bitmap_line_ydxi::e#0
Coalesced [182] bitmap_plot::x#8 ← bitmap_plot::x#2
Coalesced [183] bitmap_plot::y#8 ← bitmap_plot::y#2
Coalesced [190] bitmap_line_ydxi::x#12 ← bitmap_line_ydxi::x#2
Coalesced [191] bitmap_line_ydxi::e#9 ← bitmap_line_ydxi::e#2
Coalesced [196] bitmap_line_ydxi::x#11 ← bitmap_line_ydxi::x#6
Coalesced [197] bitmap_line_ydxi::y#11 ← bitmap_line_ydxi::y#2
Coalesced [198] bitmap_line_ydxi::e#8 ← bitmap_line_ydxi::e#6
Coalesced (already) [199] bitmap_line_ydxi::x#13 ← bitmap_line_ydxi::x#3
Coalesced [200] bitmap_line_ydxi::e#10 ← bitmap_line_ydxi::e#1
Coalesced [203] bitmap_line_xdyd::x#10 ← bitmap_line_xdyd::x#6
Coalesced [204] bitmap_line_xdyd::y#10 ← bitmap_line_xdyd::y#5
Coalesced [205] bitmap_line_xdyd::e#7 ← bitmap_line_xdyd::e#0
Coalesced [209] bitmap_plot::x#5 ← bitmap_plot::x#1
Coalesced [210] bitmap_plot::y#5 ← bitmap_plot::y#1
Coalesced [217] bitmap_line_xdyd::y#12 ← bitmap_line_xdyd::y#2
Coalesced [218] bitmap_line_xdyd::e#9 ← bitmap_line_xdyd::e#2
Coalesced [223] bitmap_line_xdyd::x#11 ← bitmap_line_xdyd::x#2
Coalesced [224] bitmap_line_xdyd::y#11 ← bitmap_line_xdyd::y#6
Coalesced [225] bitmap_line_xdyd::e#8 ← bitmap_line_xdyd::e#6
Coalesced (already) [226] bitmap_line_xdyd::y#13 ← bitmap_line_xdyd::y#3
Coalesced [227] bitmap_line_xdyd::e#10 ← bitmap_line_xdyd::e#1
Coalesced [230] bitmap_line_ydxd::x#10 ← bitmap_line_ydxd::x#5
Coalesced [231] bitmap_line_ydxd::y#11 ← bitmap_line_ydxd::y#7
Coalesced [232] bitmap_line_ydxd::e#7 ← bitmap_line_ydxd::e#0
Coalesced [236] bitmap_plot::x#7 ← bitmap_plot::x#3
Coalesced [237] bitmap_plot::y#7 ← bitmap_plot::y#3
Coalesced [244] bitmap_line_ydxd::x#12 ← bitmap_line_ydxd::x#2
Coalesced [245] bitmap_line_ydxd::e#9 ← bitmap_line_ydxd::e#2
Coalesced [250] bitmap_line_ydxd::x#11 ← bitmap_line_ydxd::x#6
Coalesced [251] bitmap_line_ydxd::y#12 ← bitmap_line_ydxd::y#3
Coalesced [252] bitmap_line_ydxd::e#8 ← bitmap_line_ydxd::e#6
Coalesced (already) [253] bitmap_line_ydxd::x#13 ← bitmap_line_ydxd::x#3
Coalesced [254] bitmap_line_ydxd::e#10 ← bitmap_line_ydxd::e#1
Coalesced [261] init_screen::c#4 ← init_screen::c#1
Coalesced [265] bitmap_clear::bitmap#7 ← bitmap_clear::bitmap#3
Coalesced [274] bitmap_clear::bitmap#6 ← bitmap_clear::bitmap#1
Coalesced [275] bitmap_clear::y#5 ← bitmap_clear::y#1
Coalesced (already) [276] bitmap_clear::bitmap#8 ← bitmap_clear::bitmap#1
Coalesced [277] bitmap_clear::x#3 ← bitmap_clear::x#1
Coalesced [300] bitmap_init::yoffs#7 ← bitmap_init::yoffs#1
Coalesced [305] bitmap_init::y#5 ← bitmap_init::y#1
Coalesced [306] bitmap_init::yoffs#5 ← bitmap_init::yoffs#4
Coalesced (already) [307] bitmap_init::yoffs#6 ← bitmap_init::yoffs#2
Coalesced [308] bitmap_init::x#5 ← bitmap_init::x#1
Coalesced [309] bitmap_init::bits#5 ← bitmap_init::bits#4
Coalesced [310] bitmap_init::bits#6 ← bitmap_init::bits#1
Coalesced down to 35 phi equivalence classes
Culled Empty Block (label) @4
Culled Empty Block (label) @12
Culled Empty Block (label) @16
Culled Empty Block (label) main::@5
Culled Empty Block (label) main::@6
@ -3772,14 +3758,14 @@ bitmap_init: {
rts
}
// File Data
lines_x: .byte $3c, $50, $6e, $50, $3c, $28, $a, $28, $3c
lines_y: .byte $a, $28, $3c, $50, $6e, $50, $3c, $28, $a
// Tables for the plotter - initialized by calling bitmap_draw_init();
bitmap_plot_xlo: .fill $100, 0
bitmap_plot_xhi: .fill $100, 0
bitmap_plot_ylo: .fill $100, 0
bitmap_plot_yhi: .fill $100, 0
bitmap_plot_bit: .fill $100, 0
lines_x: .byte $3c, $50, $6e, $50, $3c, $28, $a, $28, $3c
lines_y: .byte $a, $28, $3c, $50, $6e, $50, $3c, $28, $a
REGISTER UPLIFT POTENTIAL REGISTERS
Equivalence Class zp[1]:65 [ bitmap_init::$7 ] has ALU potential.
@ -5077,14 +5063,14 @@ bitmap_init: {
rts
}
// File Data
lines_x: .byte $3c, $50, $6e, $50, $3c, $28, $a, $28, $3c
lines_y: .byte $a, $28, $3c, $50, $6e, $50, $3c, $28, $a
// Tables for the plotter - initialized by calling bitmap_draw_init();
bitmap_plot_xlo: .fill $100, 0
bitmap_plot_xhi: .fill $100, 0
bitmap_plot_ylo: .fill $100, 0
bitmap_plot_yhi: .fill $100, 0
bitmap_plot_bit: .fill $100, 0
lines_x: .byte $3c, $50, $6e, $50, $3c, $28, $a, $28, $3c
lines_y: .byte $a, $28, $3c, $50, $6e, $50, $3c, $28, $a
ASSEMBLER OPTIMIZATIONS
Removing instruction jmp __b1
@ -6502,12 +6488,12 @@ bitmap_init: {
rts
}
// File Data
lines_x: .byte $3c, $50, $6e, $50, $3c, $28, $a, $28, $3c
lines_y: .byte $a, $28, $3c, $50, $6e, $50, $3c, $28, $a
// Tables for the plotter - initialized by calling bitmap_draw_init();
bitmap_plot_xlo: .fill $100, 0
bitmap_plot_xhi: .fill $100, 0
bitmap_plot_ylo: .fill $100, 0
bitmap_plot_yhi: .fill $100, 0
bitmap_plot_bit: .fill $100, 0
lines_x: .byte $3c, $50, $6e, $50, $3c, $28, $a, $28, $3c
lines_y: .byte $a, $28, $3c, $50, $6e, $50, $3c, $28, $a

View File

@ -13,6 +13,7 @@ Culled Empty Block (label) @5
Culled Empty Block (label) @6
Culled Empty Block (label) @7
Culled Empty Block (label) @8
Culled Empty Block (label) @9
Culled Empty Block (label) @10
Culled Empty Block (label) keyboard_matrix_read::@1
Culled Empty Block (label) @11
@ -37,7 +38,7 @@ Culled Empty Block (label) @18
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
to:@9
to:@19
(word()) mul8u((byte) mul8u::a , (byte) mul8u::b)
mul8u: scope:[mul8u] from plot_chargen::@1
@ -87,16 +88,11 @@ mul8u::@return: scope:[mul8u] from mul8u::@3
(word) mul8u::return#1 ← (word) mul8u::return#3
return
to:@return
@9: scope:[] from @begin
(byte[]) keyboard_char_keycodes ← { (const byte) KEY_AT, (const byte) KEY_A, (const byte) KEY_B, (const byte) KEY_C, (const byte) KEY_D, (const byte) KEY_E, (const byte) KEY_F, (const byte) KEY_G, (const byte) KEY_H, (const byte) KEY_I, (const byte) KEY_J, (const byte) KEY_K, (const byte) KEY_L, (const byte) KEY_M, (const byte) KEY_N, (const byte) KEY_O, (const byte) KEY_P, (const byte) KEY_Q, (const byte) KEY_R, (const byte) KEY_S, (const byte) KEY_T, (const byte) KEY_U, (const byte) KEY_V, (const byte) KEY_W, (const byte) KEY_X, (const byte) KEY_Y, (const byte) KEY_Z, (number) $3f, (const byte) KEY_POUND, (number) $3f, (const byte) KEY_ARROW_UP, (const byte) KEY_ARROW_LEFT, (const byte) KEY_SPACE, (number) $3f, (number) $3f, (number) $3f, (number) $3f, (number) $3f, (number) $3f, (number) $3f, (number) $3f, (number) $3f, (const byte) KEY_ASTERISK, (const byte) KEY_PLUS, (const byte) KEY_COMMA, (const byte) KEY_MINUS, (const byte) KEY_DOT, (const byte) KEY_SLASH, (const byte) KEY_0, (const byte) KEY_1, (const byte) KEY_2, (const byte) KEY_3, (const byte) KEY_4, (const byte) KEY_5, (const byte) KEY_6, (const byte) KEY_7, (const byte) KEY_8, (const byte) KEY_9, (const byte) KEY_COLON, (const byte) KEY_SEMICOLON, (number) $3f, (const byte) KEY_EQUALS, (number) $3f, (number) $3f }
(byte[8]) keyboard_matrix_row_bitmask ← { (number) $fe, (number) $fd, (number) $fb, (number) $f7, (number) $ef, (number) $df, (number) $bf, (number) $7f }
(byte[8]) keyboard_matrix_col_bitmask ← { (number) 1, (number) 2, (number) 4, (number) 8, (number) $10, (number) $20, (number) $40, (number) $80 }
to:@19
(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid)
keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_key_pressed
(byte) keyboard_matrix_read::rowid#1 ← phi( keyboard_key_pressed/(byte) keyboard_matrix_read::rowid#0 )
*((const byte*) CIA1_PORT_A) ← *((byte[8]) keyboard_matrix_row_bitmask + (byte) keyboard_matrix_read::rowid#1)
*((const byte*) CIA1_PORT_A) ← *((const byte[8]) keyboard_matrix_row_bitmask + (byte) keyboard_matrix_read::rowid#1)
(byte~) keyboard_matrix_read::$0 ← ~ *((const byte*) CIA1_PORT_B)
(byte) keyboard_matrix_read::row_pressed_bits#0 ← (byte~) keyboard_matrix_read::$0
(byte) keyboard_matrix_read::return#0 ← (byte) keyboard_matrix_read::row_pressed_bits#0
@ -122,7 +118,7 @@ keyboard_key_pressed::@2: scope:[keyboard_key_pressed] from keyboard_key_presse
(byte) keyboard_key_pressed::colidx#1 ← phi( keyboard_key_pressed/(byte) keyboard_key_pressed::colidx#0 )
(byte) keyboard_matrix_read::return#4 ← phi( keyboard_key_pressed/(byte) keyboard_matrix_read::return#2 )
(byte~) keyboard_key_pressed::$2 ← (byte) keyboard_matrix_read::return#4
(byte~) keyboard_key_pressed::$3 ← (byte~) keyboard_key_pressed::$2 & *((byte[8]) keyboard_matrix_col_bitmask + (byte) keyboard_key_pressed::colidx#1)
(byte~) keyboard_key_pressed::$3 ← (byte~) keyboard_key_pressed::$2 & *((const byte[8]) keyboard_matrix_col_bitmask + (byte) keyboard_key_pressed::colidx#1)
(byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$3
to:keyboard_key_pressed::@return
keyboard_key_pressed::@return: scope:[keyboard_key_pressed] from keyboard_key_pressed::@2
@ -134,7 +130,7 @@ keyboard_key_pressed::@return: scope:[keyboard_key_pressed] from keyboard_key_p
(byte()) keyboard_get_keycode((byte) keyboard_get_keycode::ch)
keyboard_get_keycode: scope:[keyboard_get_keycode] from main::@16
(byte) keyboard_get_keycode::ch#1 ← phi( main::@16/(byte) keyboard_get_keycode::ch#0 )
(byte) keyboard_get_keycode::return#0 ← *((byte[]) keyboard_char_keycodes + (byte) keyboard_get_keycode::ch#1)
(byte) keyboard_get_keycode::return#0 ← *((const byte[]) keyboard_char_keycodes + (byte) keyboard_get_keycode::ch#1)
to:keyboard_get_keycode::@return
keyboard_get_keycode::@return: scope:[keyboard_get_keycode] from keyboard_get_keycode
(byte) keyboard_get_keycode::return#3 ← phi( keyboard_get_keycode/(byte) keyboard_get_keycode::return#0 )
@ -495,7 +491,7 @@ plot_chargen::@8: scope:[plot_chargen] from plot_chargen::@7
plot_chargen::@return: scope:[plot_chargen] from plot_chargen::@8
return
to:@return
@19: scope:[] from @9
@19: scope:[] from @begin
call main
to:@20
@20: scope:[] from @19
@ -505,7 +501,6 @@ plot_chargen::@return: scope:[plot_chargen] from plot_chargen::@8
SYMBOL TABLE SSA
(label) @19
(label) @20
(label) @9
(label) @begin
(label) @end
(const byte*) CHARGEN = (byte*)(number) $d000
@ -568,7 +563,7 @@ SYMBOL TABLE SSA
(const byte) KEY_Z = (number) $c
(const byte*) PROCPORT = (byte*)(number) 1
(const byte*) SCREEN = (byte*)(number) $400
(byte[]) keyboard_char_keycodes
(const byte[]) keyboard_char_keycodes = { (const byte) KEY_AT, (const byte) KEY_A, (const byte) KEY_B, (const byte) KEY_C, (const byte) KEY_D, (const byte) KEY_E, (const byte) KEY_F, (const byte) KEY_G, (const byte) KEY_H, (const byte) KEY_I, (const byte) KEY_J, (const byte) KEY_K, (const byte) KEY_L, (const byte) KEY_M, (const byte) KEY_N, (const byte) KEY_O, (const byte) KEY_P, (const byte) KEY_Q, (const byte) KEY_R, (const byte) KEY_S, (const byte) KEY_T, (const byte) KEY_U, (const byte) KEY_V, (const byte) KEY_W, (const byte) KEY_X, (const byte) KEY_Y, (const byte) KEY_Z, (byte)(number) $3f, (const byte) KEY_POUND, (byte)(number) $3f, (const byte) KEY_ARROW_UP, (const byte) KEY_ARROW_LEFT, (const byte) KEY_SPACE, (byte)(number) $3f, (byte)(number) $3f, (byte)(number) $3f, (byte)(number) $3f, (byte)(number) $3f, (byte)(number) $3f, (byte)(number) $3f, (byte)(number) $3f, (byte)(number) $3f, (const byte) KEY_ASTERISK, (const byte) KEY_PLUS, (const byte) KEY_COMMA, (const byte) KEY_MINUS, (const byte) KEY_DOT, (const byte) KEY_SLASH, (const byte) KEY_0, (const byte) KEY_1, (const byte) KEY_2, (const byte) KEY_3, (const byte) KEY_4, (const byte) KEY_5, (const byte) KEY_6, (const byte) KEY_7, (const byte) KEY_8, (const byte) KEY_9, (const byte) KEY_COLON, (const byte) KEY_SEMICOLON, (byte)(number) $3f, (const byte) KEY_EQUALS, (byte)(number) $3f, (byte)(number) $3f }
(byte()) keyboard_get_keycode((byte) keyboard_get_keycode::ch)
(label) keyboard_get_keycode::@return
(byte) keyboard_get_keycode::ch
@ -616,7 +611,7 @@ SYMBOL TABLE SSA
(byte) keyboard_key_pressed::return#9
(byte) keyboard_key_pressed::rowidx
(byte) keyboard_key_pressed::rowidx#0
(byte[8]) keyboard_matrix_col_bitmask
(const byte[8]) keyboard_matrix_col_bitmask = { (byte)(number) 1, (byte)(number) 2, (byte)(number) 4, (byte)(number) 8, (byte)(number) $10, (byte)(number) $20, (byte)(number) $40, (byte)(number) $80 }
(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid)
(byte~) keyboard_matrix_read::$0
(label) keyboard_matrix_read::@return
@ -631,7 +626,7 @@ SYMBOL TABLE SSA
(byte) keyboard_matrix_read::rowid
(byte) keyboard_matrix_read::rowid#0
(byte) keyboard_matrix_read::rowid#1
(byte[8]) keyboard_matrix_row_bitmask
(const byte[8]) keyboard_matrix_row_bitmask = { (byte)(number) $fe, (byte)(number) $fd, (byte)(number) $fb, (byte)(number) $f7, (byte)(number) $ef, (byte)(number) $df, (byte)(number) $bf, (byte)(number) $7f }
(void()) main()
(byte*~) main::$0
(byte*~) main::$11
@ -984,10 +979,6 @@ Adding number conversion cast (unumber) plot_chargen::$13 in (number~) plot_char
Adding number conversion cast (unumber) $20 in (byte*~) plot_chargen::$15 ← (byte*) plot_chargen::sc#4 + (number) $20
Adding number conversion cast (unumber) $37 in *((const byte*) PROCPORT) ← (number) $37
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (byte[]) keyboard_char_keycodes ← (byte[]){ (const byte) KEY_AT, (const byte) KEY_A, (const byte) KEY_B, (const byte) KEY_C, (const byte) KEY_D, (const byte) KEY_E, (const byte) KEY_F, (const byte) KEY_G, (const byte) KEY_H, (const byte) KEY_I, (const byte) KEY_J, (const byte) KEY_K, (const byte) KEY_L, (const byte) KEY_M, (const byte) KEY_N, (const byte) KEY_O, (const byte) KEY_P, (const byte) KEY_Q, (const byte) KEY_R, (const byte) KEY_S, (const byte) KEY_T, (const byte) KEY_U, (const byte) KEY_V, (const byte) KEY_W, (const byte) KEY_X, (const byte) KEY_Y, (const byte) KEY_Z, (byte)(number) $3f, (const byte) KEY_POUND, (byte)(number) $3f, (const byte) KEY_ARROW_UP, (const byte) KEY_ARROW_LEFT, (const byte) KEY_SPACE, (byte)(number) $3f, (byte)(number) $3f, (byte)(number) $3f, (byte)(number) $3f, (byte)(number) $3f, (byte)(number) $3f, (byte)(number) $3f, (byte)(number) $3f, (byte)(number) $3f, (const byte) KEY_ASTERISK, (const byte) KEY_PLUS, (const byte) KEY_COMMA, (const byte) KEY_MINUS, (const byte) KEY_DOT, (const byte) KEY_SLASH, (const byte) KEY_0, (const byte) KEY_1, (const byte) KEY_2, (const byte) KEY_3, (const byte) KEY_4, (const byte) KEY_5, (const byte) KEY_6, (const byte) KEY_7, (const byte) KEY_8, (const byte) KEY_9, (const byte) KEY_COLON, (const byte) KEY_SEMICOLON, (byte)(number) $3f, (const byte) KEY_EQUALS, (byte)(number) $3f, (byte)(number) $3f }
Added casts to value list in (byte[8]) keyboard_matrix_row_bitmask ← (byte[8]){ (byte)(number) $fe, (byte)(number) $fd, (byte)(number) $fb, (byte)(number) $f7, (byte)(number) $ef, (byte)(number) $df, (byte)(number) $bf, (byte)(number) $7f }
Added casts to value list in (byte[8]) keyboard_matrix_col_bitmask ← (byte[8]){ (byte)(number) 1, (byte)(number) 2, (byte)(number) 4, (byte)(number) 8, (byte)(number) $10, (byte)(number) $20, (byte)(number) $40, (byte)(number) $80 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (word) mul8u::res#0 ← (unumber)(number) 0
Inlining cast (byte) plot_chargen::ch#0 ← (unumber)(number) $20
Inlining cast (byte) plot_chargen::shift#0 ← (unumber)(number) 0
@ -1009,13 +1000,6 @@ Simplifying constant pointer cast (byte*) 1
Simplifying constant pointer cast (byte*) 53248
Simplifying constant pointer cast (byte*) 56320
Simplifying constant pointer cast (byte*) 56321
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast $3f
Simplifying constant integer cast $3f
Simplifying constant integer cast $3f
@ -1046,6 +1030,13 @@ Simplifying constant integer cast $10
Simplifying constant integer cast $20
Simplifying constant integer cast $40
Simplifying constant integer cast $80
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 7
Simplifying constant integer cast 3
Simplifying constant integer cast $3e8
@ -1142,14 +1133,14 @@ Inferred type updated to word in (unumber~) plot_chargen::$1 ← (word~) plot_ch
Inferred type updated to byte in (unumber~) plot_chargen::$10 ← (byte) plot_chargen::bits#2 & (byte) $80
Inferred type updated to byte in (unumber~) plot_chargen::$13 ← (byte) plot_chargen::bits#3 * (byte) 2
Inversing boolean not [9] (bool~) mul8u::$3 ← (byte~) mul8u::$1 == (byte) 0 from [8] (bool~) mul8u::$2 ← (byte~) mul8u::$1 != (byte) 0
Inversing boolean not [101] (bool~) main::$17 ← (byte~) main::$15 == (byte) 0 from [100] (bool~) main::$16 ← (byte~) main::$15 != (byte) 0
Inversing boolean not [110] (bool~) main::$20 ← (byte~) main::$18 == (byte) 0 from [109] (bool~) main::$19 ← (byte~) main::$18 != (byte) 0
Inversing boolean not [120] (bool~) main::$23 ← (byte~) main::$21 == (byte) 0 from [119] (bool~) main::$22 ← (byte~) main::$21 != (byte) 0
Inversing boolean not [130] (bool~) main::$26 ← (byte~) main::$24 == (byte) 0 from [129] (bool~) main::$25 ← (byte~) main::$24 != (byte) 0
Inversing boolean not [157] (bool~) main::$31 ← (byte) main::key#0 == (byte) $3f from [156] (bool~) main::$30 ← (byte) main::key#0 != (byte) $3f
Inversing boolean not [161] (bool~) main::$34 ← (byte) main::pressed#2 == (byte) 0 from [160] (bool~) main::$33 ← (byte) main::pressed#2 != (byte) 0
Inversing boolean not [199] (bool~) plot_chargen::$4 ← (byte) plot_chargen::shift#2 == (byte) 0 from [198] (bool~) plot_chargen::$3 ← (byte) plot_chargen::shift#2 != (byte) 0
Inversing boolean not [224] (bool~) plot_chargen::$12 ← (byte~) plot_chargen::$10 == (byte) 0 from [223] (bool~) plot_chargen::$11 ← (byte~) plot_chargen::$10 != (byte) 0
Inversing boolean not [98] (bool~) main::$17 ← (byte~) main::$15 == (byte) 0 from [97] (bool~) main::$16 ← (byte~) main::$15 != (byte) 0
Inversing boolean not [107] (bool~) main::$20 ← (byte~) main::$18 == (byte) 0 from [106] (bool~) main::$19 ← (byte~) main::$18 != (byte) 0
Inversing boolean not [117] (bool~) main::$23 ← (byte~) main::$21 == (byte) 0 from [116] (bool~) main::$22 ← (byte~) main::$21 != (byte) 0
Inversing boolean not [127] (bool~) main::$26 ← (byte~) main::$24 == (byte) 0 from [126] (bool~) main::$25 ← (byte~) main::$24 != (byte) 0
Inversing boolean not [154] (bool~) main::$31 ← (byte) main::key#0 == (byte) $3f from [153] (bool~) main::$30 ← (byte) main::key#0 != (byte) $3f
Inversing boolean not [158] (bool~) main::$34 ← (byte) main::pressed#2 == (byte) 0 from [157] (bool~) main::$33 ← (byte) main::pressed#2 != (byte) 0
Inversing boolean not [196] (bool~) plot_chargen::$4 ← (byte) plot_chargen::shift#2 == (byte) 0 from [195] (bool~) plot_chargen::$3 ← (byte) plot_chargen::shift#2 != (byte) 0
Inversing boolean not [221] (bool~) plot_chargen::$12 ← (byte~) plot_chargen::$10 == (byte) 0 from [220] (bool~) plot_chargen::$11 ← (byte~) plot_chargen::$10 != (byte) 0
Successful SSA optimization Pass2UnaryNotSimplification
Alias (word) mul8u::mb#0 = (byte) mul8u::b#1
Alias (byte) mul8u::a#2 = (byte) mul8u::a#3 (byte) mul8u::a#6
@ -1237,37 +1228,30 @@ Identical Phi Values (byte*) plot_chargen::chargen#3 (byte*) plot_chargen::charg
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) mul8u::$0 [5] if((byte) mul8u::a#2!=(byte) 0) goto mul8u::@2
Simple Condition (bool~) mul8u::$3 [10] if((byte~) mul8u::$1==(byte) 0) goto mul8u::@4
Simple Condition (bool~) main::$12 [59] if((byte*) main::sc#2<(byte*~) main::$11) goto main::@2
Simple Condition (bool~) main::$14 [91] if((byte) main::i#1!=rangelast(0,3)) goto main::@7
Simple Condition (bool~) main::$17 [102] if((byte~) main::$15==(byte) 0) goto main::@10
Simple Condition (bool~) main::$20 [111] if((byte~) main::$18==(byte) 0) goto main::@11
Simple Condition (bool~) main::$23 [121] if((byte~) main::$21==(byte) 0) goto main::@12
Simple Condition (bool~) main::$26 [131] if((byte~) main::$24==(byte) 0) goto main::@13
Simple Condition (bool~) main::$28 [140] if((byte~) main::$27!=(byte) 0) goto main::@14
Simple Condition (bool~) main::$31 [158] if((byte) main::key#0==(byte) $3f) goto main::@17
Simple Condition (bool~) main::$34 [162] if((byte) main::pressed#2==(byte) 0) goto main::@18
Simple Condition (bool~) main::$36 [173] if((byte) main::ch#1!=rangelast(0,$3f)) goto main::@16
Simple Condition (bool~) print_str_at::$0 [186] if((byte) 0!=*((byte*) print_str_at::str#5)) goto print_str_at::@2
Simple Condition (bool~) plot_chargen::$4 [200] if((byte) plot_chargen::shift#2==(byte) 0) goto plot_chargen::@1
Simple Condition (bool~) plot_chargen::$12 [225] if((byte~) plot_chargen::$10==(byte) 0) goto plot_chargen::@5
Simple Condition (bool~) plot_chargen::$14 [233] if((byte) plot_chargen::x#1!=rangelast(0,7)) goto plot_chargen::@4
Simple Condition (bool~) plot_chargen::$16 [241] if((byte) plot_chargen::y#1!=rangelast(0,7)) goto plot_chargen::@3
Simple Condition (bool~) main::$12 [56] if((byte*) main::sc#2<(byte*~) main::$11) goto main::@2
Simple Condition (bool~) main::$14 [88] if((byte) main::i#1!=rangelast(0,3)) goto main::@7
Simple Condition (bool~) main::$17 [99] if((byte~) main::$15==(byte) 0) goto main::@10
Simple Condition (bool~) main::$20 [108] if((byte~) main::$18==(byte) 0) goto main::@11
Simple Condition (bool~) main::$23 [118] if((byte~) main::$21==(byte) 0) goto main::@12
Simple Condition (bool~) main::$26 [128] if((byte~) main::$24==(byte) 0) goto main::@13
Simple Condition (bool~) main::$28 [137] if((byte~) main::$27!=(byte) 0) goto main::@14
Simple Condition (bool~) main::$31 [155] if((byte) main::key#0==(byte) $3f) goto main::@17
Simple Condition (bool~) main::$34 [159] if((byte) main::pressed#2==(byte) 0) goto main::@18
Simple Condition (bool~) main::$36 [170] if((byte) main::ch#1!=rangelast(0,$3f)) goto main::@16
Simple Condition (bool~) print_str_at::$0 [183] if((byte) 0!=*((byte*) print_str_at::str#5)) goto print_str_at::@2
Simple Condition (bool~) plot_chargen::$4 [197] if((byte) plot_chargen::shift#2==(byte) 0) goto plot_chargen::@1
Simple Condition (bool~) plot_chargen::$12 [222] if((byte~) plot_chargen::$10==(byte) 0) goto plot_chargen::@5
Simple Condition (bool~) plot_chargen::$14 [230] if((byte) plot_chargen::x#1!=rangelast(0,7)) goto plot_chargen::@4
Simple Condition (bool~) plot_chargen::$16 [238] if((byte) plot_chargen::y#1!=rangelast(0,7)) goto plot_chargen::@3
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant right-side identified [57] (byte*~) main::$11 ← (const byte*) SCREEN + (word) $3e8
Constant right-side identified [63] (byte*) print_str_at::at#0 ← (const byte*) SCREEN + (byte) 1
Constant right-side identified [67] (byte*~) main::$2 ← (const byte*) SCREEN + (byte) 1
Constant right-side identified [72] (byte*~) main::$5 ← (const byte*) SCREEN + (byte) 1
Constant right-side identified [77] (byte*~) main::$8 ← (const byte*) SCREEN + (byte) 1
Constant right-side identified [203] (byte*~) plot_chargen::$5 ← (const byte*) SCREEN + (byte) $28
Constant right-side identified [54] (byte*~) main::$11 ← (const byte*) SCREEN + (word) $3e8
Constant right-side identified [60] (byte*) print_str_at::at#0 ← (const byte*) SCREEN + (byte) 1
Constant right-side identified [64] (byte*~) main::$2 ← (const byte*) SCREEN + (byte) 1
Constant right-side identified [69] (byte*~) main::$5 ← (const byte*) SCREEN + (byte) 1
Constant right-side identified [74] (byte*~) main::$8 ← (const byte*) SCREEN + (byte) 1
Constant right-side identified [200] (byte*~) plot_chargen::$5 ← (const byte*) SCREEN + (byte) $28
Successful SSA optimization Pass2ConstantRValueConsolidation
Identified constant from value list (byte[]) { (const byte) KEY_AT, (const byte) KEY_A, (const byte) KEY_B, (const byte) KEY_C, (const byte) KEY_D, (const byte) KEY_E, (const byte) KEY_F, (const byte) KEY_G, (const byte) KEY_H, (const byte) KEY_I, (const byte) KEY_J, (const byte) KEY_K, (const byte) KEY_L, (const byte) KEY_M, (const byte) KEY_N, (const byte) KEY_O, (const byte) KEY_P, (const byte) KEY_Q, (const byte) KEY_R, (const byte) KEY_S, (const byte) KEY_T, (const byte) KEY_U, (const byte) KEY_V, (const byte) KEY_W, (const byte) KEY_X, (const byte) KEY_Y, (const byte) KEY_Z, (byte) $3f, (const byte) KEY_POUND, (byte) $3f, (const byte) KEY_ARROW_UP, (const byte) KEY_ARROW_LEFT, (const byte) KEY_SPACE, (byte) $3f, (byte) $3f, (byte) $3f, (byte) $3f, (byte) $3f, (byte) $3f, (byte) $3f, (byte) $3f, (byte) $3f, (const byte) KEY_ASTERISK, (const byte) KEY_PLUS, (const byte) KEY_COMMA, (const byte) KEY_MINUS, (const byte) KEY_DOT, (const byte) KEY_SLASH, (const byte) KEY_0, (const byte) KEY_1, (const byte) KEY_2, (const byte) KEY_3, (const byte) KEY_4, (const byte) KEY_5, (const byte) KEY_6, (const byte) KEY_7, (const byte) KEY_8, (const byte) KEY_9, (const byte) KEY_COLON, (const byte) KEY_SEMICOLON, (byte) $3f, (const byte) KEY_EQUALS, (byte) $3f, (byte) $3f }
Identified constant from value list (byte[8]) { (byte) $fe, (byte) $fd, (byte) $fb, (byte) $f7, (byte) $ef, (byte) $df, (byte) $bf, (byte) $7f }
Identified constant from value list (byte[8]) { (byte) 1, (byte) 2, (byte) 4, (byte) 8, (byte) $10, (byte) $20, (byte) $40, (byte) $80 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const word) mul8u::res#0 = 0
Constant (const byte[]) keyboard_char_keycodes = { KEY_AT, KEY_A, KEY_B, KEY_C, KEY_D, KEY_E, KEY_F, KEY_G, KEY_H, KEY_I, KEY_J, KEY_K, KEY_L, KEY_M, KEY_N, KEY_O, KEY_P, KEY_Q, KEY_R, KEY_S, KEY_T, KEY_U, KEY_V, KEY_W, KEY_X, KEY_Y, KEY_Z, $3f, KEY_POUND, $3f, KEY_ARROW_UP, KEY_ARROW_LEFT, KEY_SPACE, $3f, $3f, $3f, $3f, $3f, $3f, $3f, $3f, $3f, KEY_ASTERISK, KEY_PLUS, KEY_COMMA, KEY_MINUS, KEY_DOT, KEY_SLASH, KEY_0, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, KEY_7, KEY_8, KEY_9, KEY_COLON, KEY_SEMICOLON, $3f, KEY_EQUALS, $3f, $3f }
Constant (const byte[8]) keyboard_matrix_row_bitmask = { $fe, $fd, $fb, $f7, $ef, $df, $bf, $7f }
Constant (const byte[8]) keyboard_matrix_col_bitmask = { 1, 2, 4, 8, $10, $20, $40, $80 }
Constant (const byte*) main::sc#0 = SCREEN
Constant (const byte*) main::$11 = SCREEN+$3e8
Constant (const byte*) print_str_at::at#0 = SCREEN+1
@ -1303,16 +1287,16 @@ Constant (const byte) plot_chargen::x#0 = 0
Constant (const byte) plot_chargen::c#0 = '.'
Constant (const byte) plot_chargen::c#1 = '*'
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [181] if(true) goto main::@9
if() condition always true - replacing block destination [178] if(true) goto main::@9
Successful SSA optimization Pass2ConstantIfs
Resolved ranged next value [89] main::i#1 ← ++ main::i#2 to ++
Resolved ranged comparison value [91] if(main::i#1!=rangelast(0,3)) goto main::@7 to (number) 4
Resolved ranged next value [171] main::ch#1 ← ++ main::ch#2 to ++
Resolved ranged comparison value [173] if(main::ch#1!=rangelast(0,$3f)) goto main::@16 to (number) $40
Resolved ranged next value [231] plot_chargen::x#1 ← ++ plot_chargen::x#2 to ++
Resolved ranged comparison value [233] if(plot_chargen::x#1!=rangelast(0,7)) goto plot_chargen::@4 to (number) 8
Resolved ranged next value [239] plot_chargen::y#1 ← ++ plot_chargen::y#2 to ++
Resolved ranged comparison value [241] if(plot_chargen::y#1!=rangelast(0,7)) goto plot_chargen::@3 to (number) 8
Resolved ranged next value [86] main::i#1 ← ++ main::i#2 to ++
Resolved ranged comparison value [88] if(main::i#1!=rangelast(0,3)) goto main::@7 to (number) 4
Resolved ranged next value [168] main::ch#1 ← ++ main::ch#2 to ++
Resolved ranged comparison value [170] if(main::ch#1!=rangelast(0,$3f)) goto main::@16 to (number) $40
Resolved ranged next value [228] plot_chargen::x#1 ← ++ plot_chargen::x#2 to ++
Resolved ranged comparison value [230] if(plot_chargen::x#1!=rangelast(0,7)) goto plot_chargen::@4 to (number) 8
Resolved ranged next value [236] plot_chargen::y#1 ← ++ plot_chargen::y#2 to ++
Resolved ranged comparison value [238] if(plot_chargen::y#1!=rangelast(0,7)) goto plot_chargen::@3 to (number) 8
Eliminating unused constant (const byte) main::shift#0
Successful SSA optimization PassNEliminateUnusedVars
Removing unused block main::@return
@ -1425,7 +1409,6 @@ Added new block during phi lifting plot_chargen::@10(between plot_chargen and pl
Added new block during phi lifting plot_chargen::@11(between plot_chargen::@7 and plot_chargen::@3)
Added new block during phi lifting plot_chargen::@12(between plot_chargen::@5 and plot_chargen::@4)
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @9
Adding NOP phi() at start of @19
Adding NOP phi() at start of @20
Adding NOP phi() at start of @end
@ -1446,48 +1429,47 @@ Adding NOP phi() at start of main::@14
Adding NOP phi() at start of plot_chargen::@6
Adding NOP phi() at start of mul8u::@3
CALL GRAPH
Calls in [] to main:3
Calls in [main] to print_str_at:10 print_str_at:12 print_str_at:14 print_str_at:16 plot_chargen:21 keyboard_key_pressed:26 keyboard_key_pressed:32 keyboard_key_pressed:38 keyboard_key_pressed:44 keyboard_key_pressed:50 keyboard_get_keycode:58 keyboard_key_pressed:64 plot_chargen:76
Calls in [plot_chargen] to mul8u:102
Calls in [keyboard_key_pressed] to keyboard_matrix_read:153
Calls in [] to main:2
Calls in [main] to print_str_at:9 print_str_at:11 print_str_at:13 print_str_at:15 plot_chargen:20 keyboard_key_pressed:25 keyboard_key_pressed:31 keyboard_key_pressed:37 keyboard_key_pressed:43 keyboard_key_pressed:49 keyboard_get_keycode:57 keyboard_key_pressed:63 plot_chargen:75
Calls in [plot_chargen] to mul8u:101
Calls in [keyboard_key_pressed] to keyboard_matrix_read:152
Created 29 initial phi equivalence classes
Coalesced [20] plot_chargen::pos#6 ← plot_chargen::pos#0
Coalesced [63] keyboard_key_pressed::key#7 ← keyboard_key_pressed::key#5
Coalesced [67] main::pressed#4 ← main::pressed#1
Coalesced [73] plot_chargen::ch#3 ← plot_chargen::ch#1
Coalesced [74] plot_chargen::shift#3 ← plot_chargen::shift#1
Coalesced [75] plot_chargen::pos#5 ← plot_chargen::pos#1
Coalesced [80] main::cur_pos#27 ← main::cur_pos#11
Coalesced [81] main::ch#10 ← main::ch#1
Coalesced [83] main::cur_pos#31 ← main::cur_pos#18
Coalesced [84] main::cur_pos#30 ← main::cur_pos#20
Coalesced [85] main::cur_pos#29 ← main::cur_pos#22
Coalesced (already) [86] main::cur_pos#28 ← main::cur_pos#24
Coalesced [87] main::i#4 ← main::i#1
Coalesced [90] main::sc#4 ← main::sc#1
Coalesced [98] plot_chargen::chargen#11 ← plot_chargen::chargen#1
Coalesced [106] plot_chargen::sc#9 ← plot_chargen::sc#0
Coalesced [109] plot_chargen::bits#5 ← plot_chargen::bits#0
Coalesced [110] plot_chargen::sc#10 ← plot_chargen::sc#7
Coalesced [127] plot_chargen::y#7 ← plot_chargen::y#1
Coalesced [128] plot_chargen::sc#8 ← plot_chargen::sc#2
Coalesced [129] plot_chargen::bits#6 ← plot_chargen::bits#1
Coalesced [130] plot_chargen::sc#11 ← plot_chargen::sc#1
Coalesced [131] plot_chargen::x#5 ← plot_chargen::x#1
Coalesced [132] plot_chargen::chargen#10 ← plot_chargen::chargen#0
Coalesced [133] mul8u::a#7 ← mul8u::a#1
Coalesced [141] mul8u::res#9 ← mul8u::res#1
Coalesced [145] mul8u::a#8 ← mul8u::a#0
Coalesced [146] mul8u::res#7 ← mul8u::res#6
Coalesced [147] mul8u::mb#6 ← mul8u::mb#1
Coalesced (already) [148] mul8u::res#8 ← mul8u::res#2
Coalesced [164] print_str_at::str#8 ← print_str_at::str#7
Coalesced [165] print_str_at::at#8 ← print_str_at::at#7
Coalesced [172] print_str_at::str#9 ← print_str_at::str#4
Coalesced [173] print_str_at::at#9 ← print_str_at::at#4
Coalesced [19] plot_chargen::pos#6 ← plot_chargen::pos#0
Coalesced [62] keyboard_key_pressed::key#7 ← keyboard_key_pressed::key#5
Coalesced [66] main::pressed#4 ← main::pressed#1
Coalesced [72] plot_chargen::ch#3 ← plot_chargen::ch#1
Coalesced [73] plot_chargen::shift#3 ← plot_chargen::shift#1
Coalesced [74] plot_chargen::pos#5 ← plot_chargen::pos#1
Coalesced [79] main::cur_pos#27 ← main::cur_pos#11
Coalesced [80] main::ch#10 ← main::ch#1
Coalesced [82] main::cur_pos#31 ← main::cur_pos#18
Coalesced [83] main::cur_pos#30 ← main::cur_pos#20
Coalesced [84] main::cur_pos#29 ← main::cur_pos#22
Coalesced (already) [85] main::cur_pos#28 ← main::cur_pos#24
Coalesced [86] main::i#4 ← main::i#1
Coalesced [89] main::sc#4 ← main::sc#1
Coalesced [97] plot_chargen::chargen#11 ← plot_chargen::chargen#1
Coalesced [105] plot_chargen::sc#9 ← plot_chargen::sc#0
Coalesced [108] plot_chargen::bits#5 ← plot_chargen::bits#0
Coalesced [109] plot_chargen::sc#10 ← plot_chargen::sc#7
Coalesced [126] plot_chargen::y#7 ← plot_chargen::y#1
Coalesced [127] plot_chargen::sc#8 ← plot_chargen::sc#2
Coalesced [128] plot_chargen::bits#6 ← plot_chargen::bits#1
Coalesced [129] plot_chargen::sc#11 ← plot_chargen::sc#1
Coalesced [130] plot_chargen::x#5 ← plot_chargen::x#1
Coalesced [131] plot_chargen::chargen#10 ← plot_chargen::chargen#0
Coalesced [132] mul8u::a#7 ← mul8u::a#1
Coalesced [140] mul8u::res#9 ← mul8u::res#1
Coalesced [144] mul8u::a#8 ← mul8u::a#0
Coalesced [145] mul8u::res#7 ← mul8u::res#6
Coalesced [146] mul8u::mb#6 ← mul8u::mb#1
Coalesced (already) [147] mul8u::res#8 ← mul8u::res#2
Coalesced [163] print_str_at::str#8 ← print_str_at::str#7
Coalesced [164] print_str_at::at#8 ← print_str_at::at#7
Coalesced [171] print_str_at::str#9 ← print_str_at::str#4
Coalesced [172] print_str_at::at#9 ← print_str_at::at#4
Coalesced down to 21 phi equivalence classes
Culled Empty Block (label) @9
Culled Empty Block (label) @20
Culled Empty Block (label) main::@32
Culled Empty Block (label) main::@8

View File

@ -56,6 +56,7 @@ Culled Empty Block (label) @32
Culled Empty Block (label) @33
Culled Empty Block (label) @34
Culled Empty Block (label) @35
Culled Empty Block (label) @36
Culled Empty Block (label) main::@6
Culled Empty Block (label) @37
Culled Empty Block (label) init_screen::@4
@ -111,7 +112,7 @@ memset::@return: scope:[memset] from memset::@1
to:@return
@12: scope:[] from @begin
(byte*) print_screen#0 ← ((byte*)) (number) $400
to:@36
to:@39
(void()) print_sbyte_at((signed byte) print_sbyte_at::b , (byte*) print_sbyte_at::at)
print_sbyte_at: scope:[print_sbyte_at] from main::@1 main::@10 main::@3
@ -207,10 +208,6 @@ print_cls::@1: scope:[print_cls] from print_cls
print_cls::@return: scope:[print_cls] from print_cls::@1
return
to:@return
@36: scope:[] from @12
(byte*) print_screen#5 ← phi( @12/(byte*) print_screen#0 )
(signed byte[]) vals ← { (number) -$5f, (number) -$40, (number) -$20, (number) -$10, (number) 0, (number) $10, (number) $20, (number) $40, (number) $5f }
to:@39
(void()) main()
main: scope:[main] from @39
@ -227,7 +224,7 @@ main::@1: scope:[main] from main::@7 main::@8
(byte*) main::at_line#7 ← phi( main::@7/(byte*) main::at_line#0 main::@8/(byte*) main::at_line#5 )
(byte*) main::at#4 ← phi( main::@7/(byte*) main::at#0 main::@8/(byte*) main::at#1 )
(byte) main::k#2 ← phi( main::@7/(byte) main::k#0 main::@8/(byte) main::k#1 )
(signed byte) print_sbyte_at::b#1 ← *((signed byte[]) vals + (byte) main::k#2)
(signed byte) print_sbyte_at::b#1 ← *((const signed byte[]) vals + (byte) main::k#2)
(byte*) print_sbyte_at::at#0 ← (byte*) main::at#4
call print_sbyte_at
to:main::@8
@ -249,7 +246,7 @@ main::@3: scope:[main] from main::@2 main::@5
(byte*) main::at_line#2 ← phi( main::@2/(byte*) main::at_line#3 main::@5/(byte*) main::at_line#4 )
(byte*) main::at_line#1 ← (byte*) main::at_line#2 + (number) $28
(byte*) main::at#2 ← (byte*) main::at_line#1
(signed byte) print_sbyte_at::b#2 ← *((signed byte[]) vals + (byte) main::i#2)
(signed byte) print_sbyte_at::b#2 ← *((const signed byte[]) vals + (byte) main::i#2)
(byte*) print_sbyte_at::at#1 ← (byte*) main::at#2
call print_sbyte_at
to:main::@9
@ -265,8 +262,8 @@ main::@4: scope:[main] from main::@11 main::@9
(byte) main::i#3 ← phi( main::@11/(byte) main::i#5 main::@9/(byte) main::i#6 )
(byte*) main::at#6 ← phi( main::@11/(byte*) main::at#8 main::@9/(byte*) main::at#9 )
(byte*) main::at#3 ← (byte*) main::at#6 + (number) 4
(signed byte) fmul8::a#0 ← *((signed byte[]) vals + (byte) main::i#3)
(signed byte) fmul8::b#0 ← *((signed byte[]) vals + (byte) main::j#2)
(signed byte) fmul8::a#0 ← *((const signed byte[]) vals + (byte) main::i#3)
(signed byte) fmul8::b#0 ← *((const signed byte[]) vals + (byte) main::j#2)
call fmul8
(signed byte) fmul8::return#0 ← (signed byte) fmul8::return#2
to:main::@10
@ -353,8 +350,8 @@ fmul8::@return: scope:[fmul8] from fmul8
(signed byte) fmul8::return#2 ← (signed byte) fmul8::return#4
return
to:@return
@39: scope:[] from @36
(byte*) print_screen#4 ← phi( @36/(byte*) print_screen#5 )
@39: scope:[] from @12
(byte*) print_screen#4 ← phi( @12/(byte*) print_screen#0 )
(byte[$200]) mulf_sqr1 ← kickasm {{ .for(var i=0;i<$200;i++) {
.if(i<=159) { .byte round((i*i)/256) }
.if(i>159 && i<=351 ) { .byte round(((i-256)*(i-256))/256) }
@ -375,7 +372,6 @@ fmul8::@return: scope:[fmul8] from fmul8
SYMBOL TABLE SSA
(label) @12
(label) @36
(label) @39
(label) @40
(label) @begin
@ -602,8 +598,7 @@ SYMBOL TABLE SSA
(byte*) print_screen#2
(byte*) print_screen#3
(byte*) print_screen#4
(byte*) print_screen#5
(signed byte[]) vals
(const signed byte[]) vals = { (signed byte)(number) -$5f, (signed byte)(number) -$40, (signed byte)(number) -$20, (signed byte)(number) -$10, (signed byte)(number) 0, (signed byte)(number) $10, (signed byte)(number) $20, (signed byte)(number) $40, (signed byte)(number) $5f }
Adding number conversion cast (unumber) 0 in (bool~) memset::$0 ← (word) memset::num#1 > (number) 0
Adding number conversion cast (snumber) 0 in (bool~) print_sbyte_at::$0 ← (signed byte) print_sbyte_at::b#4 < (number) 0
@ -623,8 +618,6 @@ Adding number conversion cast (unumber) 2 in *((byte*) init_screen::COLS#3 + (nu
Adding number conversion cast (unumber) 3 in *((byte*) init_screen::COLS#3 + (number) 3) ← (const byte) init_screen::WHITE
Adding number conversion cast (unumber) $28 in (byte*) init_screen::COLS#1 ← (byte*) init_screen::COLS#3 + (number) $28
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (signed byte[]) vals ← (signed byte[]){ (signed byte)(number) -$5f, (signed byte)(number) -$40, (signed byte)(number) -$20, (signed byte)(number) -$10, (signed byte)(number) 0, (signed byte)(number) $10, (signed byte)(number) $20, (signed byte)(number) $40, (signed byte)(number) $5f }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (byte*~) memset::$2 ← (byte*)(void*) memset::str#2
Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#2
Inlining cast (byte*) print_screen#0 ← (byte*)(number) $400
@ -633,6 +626,15 @@ Inlining cast (word) memset::num#0 ← (unumber)(number) $3e8
Inlining cast (byte*) main::at_line#0 ← (byte*)(number) $400
Inlining cast (byte*) init_screen::COLS#0 ← (byte*)(number) $d800
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast -$5f
Simplifying constant integer cast -$40
Simplifying constant integer cast -$20
Simplifying constant integer cast -$10
Simplifying constant integer cast 0
Simplifying constant integer cast $10
Simplifying constant integer cast $20
Simplifying constant integer cast $40
Simplifying constant integer cast $5f
Simplifying constant pointer cast (signed byte*) 253
Simplifying constant pointer cast (signed byte*) 254
Simplifying constant pointer cast (signed byte*) 255
@ -644,15 +646,6 @@ Simplifying constant integer cast 4
Simplifying constant integer cast $f
Simplifying constant integer cast 1
Simplifying constant integer cast $3e8
Simplifying constant integer cast -$5f
Simplifying constant integer cast -$40
Simplifying constant integer cast -$20
Simplifying constant integer cast -$10
Simplifying constant integer cast 0
Simplifying constant integer cast $10
Simplifying constant integer cast $20
Simplifying constant integer cast $40
Simplifying constant integer cast $5f
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 4
Simplifying constant integer cast 4
@ -702,7 +695,6 @@ Alias (byte*) print_byte_at::at#0 = (byte*~) print_sbyte_at::$2
Alias (byte) print_byte_at::b#1 = (byte) print_byte_at::b#2
Alias (byte*) print_byte_at::at#1 = (byte*) print_byte_at::at#2
Alias (byte*) print_char_at::at#3 = (byte*~) print_byte_at::$3
Alias (byte*) print_screen#0 = (byte*) print_screen#5 (byte*) print_screen#4
Alias (byte*) main::at#0 = (byte*~) main::$1
Alias (byte*) main::at#4 = (byte*) main::at#5
Alias (byte) main::k#2 = (byte) main::k#3
@ -717,6 +709,7 @@ Alias (byte*) main::at_line#4 = (byte*) main::at_line#8 (byte*) main::at_line#9
Alias (signed byte) main::r#0 = (signed byte~) main::$5
Alias (byte*) init_screen::COLS#2 = (byte*) init_screen::COLS#4
Alias (signed byte) fmul8::return#1 = (signed byte) fmul8::return#4 (signed byte) fmul8::return#2
Alias (byte*) print_screen#0 = (byte*) print_screen#4
Successful SSA optimization Pass2AliasElimination
Alias (byte*) print_sbyte_at::at#3 = (byte*) print_sbyte_at::at#5
Successful SSA optimization Pass2AliasElimination
@ -743,20 +736,17 @@ Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) memset::$1 [3] if((word) memset::num#0<=(byte) 0) goto memset::@1
Simple Condition (bool~) memset::$4 [13] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5
Simple Condition (bool~) print_sbyte_at::$0 [23] if((signed byte) print_sbyte_at::b#4<(signed byte) 0) goto print_sbyte_at::@1
Simple Condition (bool~) main::$3 [81] if((byte) main::k#1!=rangelast(0,8)) goto main::@1
Simple Condition (bool~) main::$7 [107] if((byte) main::j#1!=rangelast(0,8)) goto main::@4
Simple Condition (bool~) main::$8 [111] if((byte) main::i#1!=rangelast(0,8)) goto main::@3
Simple Condition (bool~) init_screen::$1 [121] if((byte) init_screen::l#1!=rangelast(0,$27)) goto init_screen::@1
Simple Condition (bool~) init_screen::$2 [132] if((byte) init_screen::m#1!=rangelast(0,$18)) goto init_screen::@3
Simple Condition (bool~) main::$3 [79] if((byte) main::k#1!=rangelast(0,8)) goto main::@1
Simple Condition (bool~) main::$7 [105] if((byte) main::j#1!=rangelast(0,8)) goto main::@4
Simple Condition (bool~) main::$8 [109] if((byte) main::i#1!=rangelast(0,8)) goto main::@3
Simple Condition (bool~) init_screen::$1 [119] if((byte) init_screen::l#1!=rangelast(0,$27)) goto init_screen::@1
Simple Condition (bool~) init_screen::$2 [130] if((byte) init_screen::m#1!=rangelast(0,$18)) goto init_screen::@3
Successful SSA optimization Pass2ConditionalJumpSimplification
Identified constant from value list (signed byte[]) { (signed byte) -$5f, (signed byte) -$40, (signed byte) -$20, (signed byte) -$10, (signed byte) 0, (signed byte) $10, (signed byte) $20, (signed byte) $40, (signed byte) $5f }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const byte*) print_screen#0 = (byte*) 1024
Constant (const byte) print_char_at::ch#0 = '-'
Constant (const byte) print_char_at::ch#1 = ' '
Constant (const byte) memset::c#0 = ' '
Constant (const word) memset::num#0 = $3e8
Constant (const signed byte[]) vals = { -$5f, -$40, -$20, -$10, 0, $10, $20, $40, $5f }
Constant (const byte*) main::at_line#0 = (byte*) 1024
Constant (const byte) main::k#0 = 0
Constant (const byte) main::i#0 = 0
@ -785,17 +775,17 @@ Constant (const void*) memset::return#2 = memset::str#0
Successful SSA optimization Pass2ConstantIdentification
if() condition always false - eliminating [3] if((const word) memset::num#0<=(byte) 0) goto memset::@1
Successful SSA optimization Pass2ConstantIfs
Resolved ranged next value [79] main::k#1 ← ++ main::k#2 to ++
Resolved ranged comparison value [81] if(main::k#1!=rangelast(0,8)) goto main::@1 to (number) 9
Resolved ranged next value [105] main::j#1 ← ++ main::j#2 to ++
Resolved ranged comparison value [107] if(main::j#1!=rangelast(0,8)) goto main::@4 to (number) 9
Resolved ranged next value [109] main::i#1 ← ++ main::i#2 to ++
Resolved ranged comparison value [111] if(main::i#1!=rangelast(0,8)) goto main::@3 to (number) 9
Resolved ranged next value [119] init_screen::l#1 ← ++ init_screen::l#2 to ++
Resolved ranged comparison value [121] if(init_screen::l#1!=rangelast(0,$27)) goto init_screen::@1 to (number) $28
Resolved ranged next value [130] init_screen::m#1 ← ++ init_screen::m#2 to ++
Resolved ranged comparison value [132] if(init_screen::m#1!=rangelast(0,$18)) goto init_screen::@3 to (number) $19
Simplifying expression containing zero init_screen::COLS#3 in [125] *((byte*) init_screen::COLS#3 + (byte) 0) ← (const byte) init_screen::WHITE
Resolved ranged next value [77] main::k#1 ← ++ main::k#2 to ++
Resolved ranged comparison value [79] if(main::k#1!=rangelast(0,8)) goto main::@1 to (number) 9
Resolved ranged next value [103] main::j#1 ← ++ main::j#2 to ++
Resolved ranged comparison value [105] if(main::j#1!=rangelast(0,8)) goto main::@4 to (number) 9
Resolved ranged next value [107] main::i#1 ← ++ main::i#2 to ++
Resolved ranged comparison value [109] if(main::i#1!=rangelast(0,8)) goto main::@3 to (number) 9
Resolved ranged next value [117] init_screen::l#1 ← ++ init_screen::l#2 to ++
Resolved ranged comparison value [119] if(init_screen::l#1!=rangelast(0,$27)) goto init_screen::@1 to (number) $28
Resolved ranged next value [128] init_screen::m#1 ← ++ init_screen::m#2 to ++
Resolved ranged comparison value [130] if(init_screen::m#1!=rangelast(0,$18)) goto init_screen::@3 to (number) $19
Simplifying expression containing zero init_screen::COLS#3 in [123] *((byte*) init_screen::COLS#3 + (byte) 0) ← (const byte) init_screen::WHITE
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused constant (const void*) memset::return#2
Successful SSA optimization PassNEliminateUnusedVars
@ -854,7 +844,6 @@ Added new block during phi lifting init_screen::@6(between init_screen::@1 and i
Added new block during phi lifting init_screen::@7(between init_screen::@3 and init_screen::@3)
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @12
Adding NOP phi() at start of @36
Adding NOP phi() at start of @39
Adding NOP phi() at start of @40
Adding NOP phi() at start of @end
@ -872,42 +861,41 @@ Adding NOP phi() at start of memset
Adding NOP phi() at start of memset::@2
Adding NOP phi() at start of memset::@1
CALL GRAPH
Calls in [] to main:4
Calls in [main] to init_screen:8 print_sbyte_at:15 print_sbyte_at:26 fmul8:32 print_sbyte_at:39
Calls in [print_sbyte_at] to print_char_at:55 print_byte_at:60 print_char_at:65
Calls in [print_byte_at] to print_char_at:76 print_char_at:82
Calls in [init_screen] to print_cls:91
Calls in [print_cls] to memset:111
Calls in [] to main:3
Calls in [main] to init_screen:7 print_sbyte_at:14 print_sbyte_at:25 fmul8:31 print_sbyte_at:38
Calls in [print_sbyte_at] to print_char_at:54 print_byte_at:59 print_char_at:64
Calls in [print_byte_at] to print_char_at:75 print_char_at:81
Calls in [init_screen] to print_cls:90
Calls in [print_cls] to memset:110
Created 15 initial phi equivalence classes
Coalesced [13] print_sbyte_at::b#10 ← print_sbyte_at::b#1
Coalesced [14] print_sbyte_at::at#9 ← print_sbyte_at::at#0
Coalesced [24] print_sbyte_at::b#12 ← print_sbyte_at::b#2
Coalesced [25] print_sbyte_at::at#11 ← print_sbyte_at::at#1
Not coalescing [27] main::at#12 ← main::at#2
Coalesced [37] print_sbyte_at::b#11 ← print_sbyte_at::b#3
Coalesced [38] print_sbyte_at::at#10 ← print_sbyte_at::at#2
Coalesced [45] main::at_line#11 ← main::at#2
Coalesced [46] main::i#8 ← main::i#1
Coalesced [47] main::at#11 ← main::at#3
Coalesced [48] main::j#5 ← main::j#1
Coalesced [49] main::k#4 ← main::k#1
Coalesced [50] main::at#10 ← main::at#1
Coalesced [54] print_char_at::at#8 ← print_char_at::at#1
Coalesced [56] print_sbyte_at::b#14 ← print_sbyte_at::b#4
Coalesced [64] print_char_at::at#7 ← print_char_at::at#0
Coalesced [67] print_sbyte_at::b#13 ← print_sbyte_at::b#0
Coalesced [74] print_char_at::ch#5 ← print_char_at::ch#2
Coalesced [75] print_char_at::at#5 ← print_char_at::at#2
Coalesced [80] print_char_at::ch#6 ← print_char_at::ch#3
Coalesced [81] print_char_at::at#6 ← print_char_at::at#3
Coalesced [107] init_screen::COLS#5 ← init_screen::COLS#1
Coalesced [108] init_screen::m#3 ← init_screen::m#1
Coalesced [109] init_screen::l#3 ← init_screen::l#1
Coalesced [122] memset::dst#4 ← memset::dst#1
Coalesced [12] print_sbyte_at::b#10 ← print_sbyte_at::b#1
Coalesced [13] print_sbyte_at::at#9 ← print_sbyte_at::at#0
Coalesced [23] print_sbyte_at::b#12 ← print_sbyte_at::b#2
Coalesced [24] print_sbyte_at::at#11 ← print_sbyte_at::at#1
Not coalescing [26] main::at#12 ← main::at#2
Coalesced [36] print_sbyte_at::b#11 ← print_sbyte_at::b#3
Coalesced [37] print_sbyte_at::at#10 ← print_sbyte_at::at#2
Coalesced [44] main::at_line#11 ← main::at#2
Coalesced [45] main::i#8 ← main::i#1
Coalesced [46] main::at#11 ← main::at#3
Coalesced [47] main::j#5 ← main::j#1
Coalesced [48] main::k#4 ← main::k#1
Coalesced [49] main::at#10 ← main::at#1
Coalesced [53] print_char_at::at#8 ← print_char_at::at#1
Coalesced [55] print_sbyte_at::b#14 ← print_sbyte_at::b#4
Coalesced [63] print_char_at::at#7 ← print_char_at::at#0
Coalesced [66] print_sbyte_at::b#13 ← print_sbyte_at::b#0
Coalesced [73] print_char_at::ch#5 ← print_char_at::ch#2
Coalesced [74] print_char_at::at#5 ← print_char_at::at#2
Coalesced [79] print_char_at::ch#6 ← print_char_at::ch#3
Coalesced [80] print_char_at::at#6 ← print_char_at::at#3
Coalesced [106] init_screen::COLS#5 ← init_screen::COLS#1
Coalesced [107] init_screen::m#3 ← init_screen::m#1
Coalesced [108] init_screen::l#3 ← init_screen::l#1
Coalesced [121] memset::dst#4 ← memset::dst#1
Coalesced down to 14 phi equivalence classes
Culled Empty Block (label) @12
Culled Empty Block (label) @36
Culled Empty Block (label) @40
Culled Empty Block (label) main::@7
Culled Empty Block (label) main::@2

View File

@ -252,7 +252,6 @@ fire::@return: scope:[fire] from fire::@9
(void()) makecharset((byte*) makecharset::charset)
makecharset: scope:[makecharset] from main::@13
(byte*) makecharset::charset#1 ← phi( main::@13/(byte*) makecharset::charset#0 )
(byte[8]) makecharset::bittab ← { (number) 1, (number) 2, (number) 4, (number) 8, (number) $10, (number) $20, (number) $40, (number) $80 }
(byte*) makecharset::font#0 ← (byte*) makecharset::charset#1
to:makecharset::@1
makecharset::@1: scope:[makecharset] from makecharset makecharset::@2
@ -379,7 +378,7 @@ makecharset::@25: scope:[makecharset] from makecharset::@20
(number~) makecharset::$11 ← (byte) makecharset::i#4 & (number) 1
(number~) makecharset::$12 ← (byte) makecharset::ii#4 + (number~) makecharset::$11
(number~) makecharset::$13 ← (number~) makecharset::$12 & (number) 7
(byte) makecharset::b#1 ← (byte) makecharset::b#3 + *((byte[8]) makecharset::bittab + (number~) makecharset::$13)
(byte) makecharset::b#1 ← (byte) makecharset::b#3 + *((const byte[8]) makecharset::bittab + (number~) makecharset::$13)
to:makecharset::@22
makecharset::@return: scope:[makecharset] from makecharset::@13
return
@ -631,7 +630,7 @@ SYMBOL TABLE SSA
(byte) makecharset::bc#7
(byte) makecharset::bc#8
(byte) makecharset::bc#9
(byte[8]) makecharset::bittab
(const byte[8]) makecharset::bittab = { (byte)(number) 1, (byte)(number) 2, (byte)(number) 4, (byte)(number) 8, (byte)(number) $10, (byte)(number) $20, (byte)(number) $40, (byte)(number) $80 }
(byte) makecharset::c
(byte) makecharset::c#0
(byte) makecharset::c#1
@ -766,8 +765,6 @@ Adding number conversion cast (unumber) makecharset::$12 in (number~) makecharse
Adding number conversion cast (unumber) 7 in (number~) makecharset::$13 ← (unumber~) makecharset::$12 & (number) 7
Adding number conversion cast (unumber) makecharset::$13 in (number~) makecharset::$13 ← (unumber~) makecharset::$12 & (unumber)(number) 7
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (byte[8]) makecharset::bittab ← (byte[8]){ (byte)(number) 1, (byte)(number) 2, (byte)(number) 4, (byte)(number) 8, (byte)(number) $10, (byte)(number) $20, (byte)(number) $40, (byte)(number) $80 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast *((const word*) SID_VOICE3_FREQ) ← (unumber)(number) $ffff
Inlining cast (byte) fillscreen::fill#0 ← (unumber)(number) 0
Inlining cast (byte) fillscreen::fill#1 ← (unumber)(number) 0
@ -792,6 +789,14 @@ Simplifying constant pointer cast (byte*) 55296
Simplifying constant pointer cast (word*) 54286
Simplifying constant pointer cast (byte*) 54290
Simplifying constant pointer cast (byte*) 54299
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 4
Simplifying constant integer cast 8
Simplifying constant integer cast $10
Simplifying constant integer cast $20
Simplifying constant integer cast $40
Simplifying constant integer cast $80
Simplifying constant pointer cast (byte*) 14336
Simplifying constant pointer cast (byte*) 15360
Simplifying constant pointer cast (byte*) 16384
@ -815,14 +820,6 @@ Simplifying constant integer cast 2
Simplifying constant integer cast 3
Simplifying constant integer cast $10
Simplifying constant integer cast $30
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 4
Simplifying constant integer cast 8
Simplifying constant integer cast $10
Simplifying constant integer cast $20
Simplifying constant integer cast $40
Simplifying constant integer cast $80
Simplifying constant integer cast 0
Simplifying constant integer cast $ff
Simplifying constant integer cast 0
@ -894,7 +891,7 @@ Inferred type updated to byte in (unumber~) makecharset::$11 ← (byte) makechar
Inferred type updated to byte in (unumber~) makecharset::$12 ← (byte) makecharset::ii#4 + (byte~) makecharset::$11
Inferred type updated to byte in (unumber~) makecharset::$13 ← (byte~) makecharset::$12 & (byte) 7
Inversing boolean not [81] (bool~) fire::$9 ← (byte) fire::c#0 <= (byte) 2 from [80] (bool~) fire::$8 ← (byte) fire::c#0 > (byte) 2
Inversing boolean not [153] (bool~) makecharset::$9 ← (byte) makecharset::bc#1 <= (byte) $3f from [152] (bool~) makecharset::$8 ← (byte) makecharset::bc#1 > (byte) $3f
Inversing boolean not [152] (bool~) makecharset::$9 ← (byte) makecharset::bc#1 <= (byte) $3f from [151] (bool~) makecharset::$8 ← (byte) makecharset::bc#1 > (byte) $3f
Successful SSA optimization Pass2UnaryNotSimplification
Alias (byte) sid_rnd::return#0 = (byte) sid_rnd::return#3 (byte) sid_rnd::return#1
Alias (byte*) main::toD0181_screen#0 = (byte*) main::toD0181_screen#1
@ -959,20 +956,18 @@ Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) fire::$3 [73] if((byte*) fire::buffer#4!=(byte*~) fire::$2) goto fire::@2
Simple Condition (bool~) fire::$9 [82] if((byte) fire::c#0<=(byte) 2) goto fire::@4
Simple Condition (bool~) fire::$11 [98] if((byte*) fire::buffer#10!=(byte*~) fire::$10) goto fire::@10
Simple Condition (bool~) makecharset::$1 [117] if((byte*) makecharset::font#2!=(byte*~) makecharset::$0) goto makecharset::@2
Simple Condition (bool~) makecharset::$4 [127] if((byte*) makecharset::font1#2!=(byte*~) makecharset::$3) goto makecharset::@8
Simple Condition (bool~) makecharset::$5 [135] if((byte) makecharset::c#2<(byte) $40) goto makecharset::@14
Simple Condition (bool~) makecharset::$6 [141] if((byte) makecharset::i#2<(byte) 8) goto makecharset::@17
Simple Condition (bool~) makecharset::$7 [149] if((byte) makecharset::ii#2<(byte) 8) goto makecharset::@20
Simple Condition (bool~) makecharset::$9 [154] if((byte) makecharset::bc#1<=(byte) $3f) goto makecharset::@22
Simple Condition (bool~) fillscreen::$0 [179] if((word) fillscreen::i#1!=rangelast(0,$3e7)) goto fillscreen::@1
Simple Condition (bool~) makecharset::$1 [116] if((byte*) makecharset::font#2!=(byte*~) makecharset::$0) goto makecharset::@2
Simple Condition (bool~) makecharset::$4 [126] if((byte*) makecharset::font1#2!=(byte*~) makecharset::$3) goto makecharset::@8
Simple Condition (bool~) makecharset::$5 [134] if((byte) makecharset::c#2<(byte) $40) goto makecharset::@14
Simple Condition (bool~) makecharset::$6 [140] if((byte) makecharset::i#2<(byte) 8) goto makecharset::@17
Simple Condition (bool~) makecharset::$7 [148] if((byte) makecharset::ii#2<(byte) 8) goto makecharset::@20
Simple Condition (bool~) makecharset::$9 [153] if((byte) makecharset::bc#1<=(byte) $3f) goto makecharset::@22
Simple Condition (bool~) fillscreen::$0 [178] if((word) fillscreen::i#1!=rangelast(0,$3e7)) goto fillscreen::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant right-side identified [71] (byte*~) fire::$2 ← (const byte*) BUFFER + (word)(number) $18*(number) $28
Constant right-side identified [86] (byte*) fire::buffer#1 ← (const byte*) BUFFER + (word)(number) $18*(number) $28
Constant right-side identified [96] (byte*~) fire::$10 ← (const byte*) BUFFER + (word)(number) $19*(number) $28
Successful SSA optimization Pass2ConstantRValueConsolidation
Identified constant from value list (byte[8]) { (byte) 1, (byte) 2, (byte) 4, (byte) 8, (byte) $10, (byte) $20, (byte) $40, (byte) $80 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const byte*) fillscreen::screen#0 = BUFFER
Constant (const byte) fillscreen::fill#0 = 0
Constant (const byte*) fillscreen::screen#1 = SCREEN1
@ -992,7 +987,6 @@ Constant (const byte*) fire::buffer#0 = BUFFER
Constant (const byte*) fire::$2 = BUFFER+(word)$18*$28
Constant (const byte*) fire::buffer#1 = BUFFER+(word)$18*$28
Constant (const byte*) fire::$10 = BUFFER+(word)$19*$28
Constant (const byte[8]) makecharset::bittab = { 1, 2, 4, 8, $10, $20, $40, $80 }
Constant (const byte) makecharset::c#0 = 0
Constant (const byte) makecharset::bc#0 = 0
Constant (const byte) makecharset::i#0 = 0
@ -1007,11 +1001,11 @@ Constant (const word) main::toD0182_$4 = (word)main::toD0182_gfx#0
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [25] if(true) goto main::@2
Successful SSA optimization Pass2ConstantIfs
Resolved ranged next value [177] fillscreen::i#1 ← ++ fillscreen::i#2 to ++
Resolved ranged comparison value [179] if(fillscreen::i#1!=rangelast(0,$3e7)) goto fillscreen::@1 to (number) $3e8
Resolved ranged next value [176] fillscreen::i#1 ← ++ fillscreen::i#2 to ++
Resolved ranged comparison value [178] if(fillscreen::i#1!=rangelast(0,$3e7)) goto fillscreen::@1 to (number) $3e8
Rewriting conditional comparison [82] if((byte) fire::c#0<=(byte) 2) goto fire::@4
Rewriting conditional comparison [154] if((byte) makecharset::bc#1<=(byte) $3f) goto makecharset::@22
De-inlining pointer[w] to *(pointer+w) [160] *((byte*~) makecharset::$14 + (word~) makecharset::$17) ← (byte) makecharset::b#2
Rewriting conditional comparison [153] if((byte) makecharset::bc#1<=(byte) $3f) goto makecharset::@22
De-inlining pointer[w] to *(pointer+w) [159] *((byte*~) makecharset::$14 + (word~) makecharset::$17) ← (byte) makecharset::b#2
Successful SSA optimization Pass2DeInlineWordDerefIdx
Removing unused block main::@return
Successful SSA optimization Pass2EliminateUnusedBlocks

View File

@ -520,7 +520,6 @@ makecharset: scope:[makecharset] from main::@2
(byte*) print_char_cursor#29 ← phi( main::@2/(byte*) print_char_cursor#21 )
(byte*) print_line_cursor#22 ← phi( main::@2/(byte*) print_line_cursor#14 )
(byte*) print_screen#4 ← phi( main::@2/(byte*) print_screen#5 )
(byte[8]) makecharset::bittab ← { (number) 1, (number) 2, (number) 4, (number) 8, (number) $10, (number) $20, (number) $40, (number) $80 }
call sid_rnd_init
to:makecharset::@23
makecharset::@23: scope:[makecharset] from makecharset
@ -658,7 +657,7 @@ makecharset::@13: scope:[makecharset] from makecharset::@25
(word) makecharset::c#13 ← phi( makecharset::@25/(word) makecharset::c#14 )
(byte) makecharset::ii#4 ← phi( makecharset::@25/(byte) makecharset::ii#5 )
(byte) makecharset::b#3 ← phi( makecharset::@25/(byte) makecharset::b#5 )
(byte) makecharset::b#1 ← (byte) makecharset::b#3 | *((byte[8]) makecharset::bittab + (byte) makecharset::ii#4)
(byte) makecharset::b#1 ← (byte) makecharset::b#3 | *((const byte[8]) makecharset::bittab + (byte) makecharset::ii#4)
to:makecharset::@10
makecharset::@19: scope:[makecharset] from makecharset::@26 makecharset::@6
(byte*) makecharset::charset#11 ← phi( makecharset::@26/(byte*) makecharset::charset#14 makecharset::@6/(byte*) makecharset::charset#15 )
@ -1042,7 +1041,7 @@ SYMBOL TABLE SSA
(byte) makecharset::b#5
(byte) makecharset::b#6
(byte) makecharset::b#7
(byte[8]) makecharset::bittab
(const byte[8]) makecharset::bittab = { (byte)(number) 1, (byte)(number) 2, (byte)(number) 4, (byte)(number) 8, (byte)(number) $10, (byte)(number) $20, (byte)(number) $40, (byte)(number) $80 }
(word) makecharset::c
(word) makecharset::c#0
(word) makecharset::c#1
@ -1325,8 +1324,6 @@ Adding number conversion cast (unumber) 8 in (number~) makecharset::$10 ← (wor
Adding number conversion cast (unumber) makecharset::$10 in (number~) makecharset::$10 ← (word) makecharset::c#5 * (unumber)(number) 8
Adding number conversion cast (unumber) makecharset::$11 in (number~) makecharset::$11 ← (unumber~) makecharset::$10 + (byte) makecharset::i#3
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (byte[8]) makecharset::bittab ← (byte[8]){ (byte)(number) 1, (byte)(number) 2, (byte)(number) 4, (byte)(number) 8, (byte)(number) $10, (byte)(number) $20, (byte)(number) $40, (byte)(number) $80 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (byte*~) memset::$2 ← (byte*)(void*) memset::str#2
Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#2
Inlining cast (byte*) print_screen#0 ← (byte*)(number) $400
@ -1357,6 +1354,14 @@ Simplifying constant pointer cast (byte*) 54290
Simplifying constant pointer cast (byte*) 54299
Simplifying constant pointer cast (byte*) 10240
Simplifying constant pointer cast (byte*) 8192
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 4
Simplifying constant integer cast 8
Simplifying constant integer cast $10
Simplifying constant integer cast $20
Simplifying constant integer cast $40
Simplifying constant integer cast $80
Simplifying constant integer cast 0
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast $3e8
@ -1388,14 +1393,6 @@ Simplifying constant integer cast $28
Simplifying constant integer cast 0
Simplifying constant integer cast $19
Simplifying constant integer cast $28
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 4
Simplifying constant integer cast 8
Simplifying constant integer cast $10
Simplifying constant integer cast $20
Simplifying constant integer cast $40
Simplifying constant integer cast $80
Simplifying constant integer cast 0
Simplifying constant integer cast $100
Simplifying constant integer cast 0
@ -1462,8 +1459,8 @@ Inferred type updated to byte in (unumber~) makecharset::$7 ← (byte~) makechar
Inferred type updated to word in (unumber~) makecharset::$10 ← (word) makecharset::c#5 * (byte) 8
Inferred type updated to word in (unumber~) makecharset::$11 ← (word~) makecharset::$10 + (byte) makecharset::i#3
Inversing boolean not [2] (bool~) memset::$1 ← (word) memset::num#1 <= (byte) 0 from [1] (bool~) memset::$0 ← (word) memset::num#1 > (byte) 0
Inversing boolean not [194] (bool~) makecharset::$14 ← (byte~) makecharset::$12 != (byte) 0 from [193] (bool~) makecharset::$13 ← (byte~) makecharset::$12 == (byte) 0
Inversing boolean not [206] (bool~) makecharset::$9 ← (byte~) makecharset::$7 <= (byte) makecharset::s#1 from [205] (bool~) makecharset::$8 ← (byte~) makecharset::$7 > (byte) makecharset::s#1
Inversing boolean not [193] (bool~) makecharset::$14 ← (byte~) makecharset::$12 != (byte) 0 from [192] (bool~) makecharset::$13 ← (byte~) makecharset::$12 == (byte) 0
Inversing boolean not [205] (bool~) makecharset::$9 ← (byte~) makecharset::$7 <= (byte) makecharset::s#1 from [204] (bool~) makecharset::$8 ← (byte~) makecharset::$7 > (byte) makecharset::s#1
Successful SSA optimization Pass2UnaryNotSimplification
Alias (void*) memset::return#0 = (void*) memset::str#1 (void*) memset::return#3 (void*) memset::return#1
Alias (void*) memset::str#2 = (void*) memset::str#3
@ -1674,17 +1671,15 @@ Simple Condition (bool~) doplasma::$0 [117] if((byte) doplasma::i#2<(byte) $19)
Simple Condition (bool~) doplasma::$3 [135] if((byte) doplasma::i1#2<(byte) $28) goto doplasma::@8
Simple Condition (bool~) doplasma::$5 [148] if((byte) doplasma::i2#2<(byte) $28) goto doplasma::@14
Simple Condition (bool~) doplasma::$6 [154] unroll if((byte) doplasma::ii#2<(byte) $19) goto doplasma::@17
Simple Condition (bool~) makecharset::$2 [180] if((word) makecharset::c#2<(word) $100) goto makecharset::@2
Simple Condition (bool~) makecharset::$4 [187] if((byte) makecharset::i#2<(byte) 8) goto makecharset::@5
Simple Condition (bool~) makecharset::$14 [195] if((byte~) makecharset::$12!=(byte) 0) goto makecharset::@19
Simple Condition (bool~) makecharset::$5 [198] if((byte) makecharset::ii#2<(byte) 8) goto makecharset::@8
Simple Condition (bool~) makecharset::$9 [207] if((byte~) makecharset::$7<=(byte) makecharset::s#0) goto makecharset::@10
Simple Condition (bool~) makecharset::$2 [179] if((word) makecharset::c#2<(word) $100) goto makecharset::@2
Simple Condition (bool~) makecharset::$4 [186] if((byte) makecharset::i#2<(byte) 8) goto makecharset::@5
Simple Condition (bool~) makecharset::$14 [194] if((byte~) makecharset::$12!=(byte) 0) goto makecharset::@19
Simple Condition (bool~) makecharset::$5 [197] if((byte) makecharset::ii#2<(byte) 8) goto makecharset::@8
Simple Condition (bool~) makecharset::$9 [206] if((byte~) makecharset::$7<=(byte) makecharset::s#0) goto makecharset::@10
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant right-side identified [109] (byte[$28]) doplasma::xbuf ← { fill( $28, 0) }
Constant right-side identified [110] (byte[$19]) doplasma::ybuf ← { fill( $19, 0) }
Successful SSA optimization Pass2ConstantRValueConsolidation
Identified constant from value list (byte[8]) { (byte) 1, (byte) 2, (byte) 4, (byte) 8, (byte) $10, (byte) $20, (byte) $40, (byte) $80 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const byte*) print_line_cursor#0 = (byte*) 1024
Constant (const byte) memset::c#0 = ' '
Constant (const word) memset::num#0 = $3e8
@ -1707,7 +1702,6 @@ Constant (const byte) doplasma::i#0 = 0
Constant (const byte) doplasma::i1#0 = 0
Constant (const byte) doplasma::i2#0 = 0
Constant (const byte) doplasma::ii#0 = 0
Constant (const byte[8]) makecharset::bittab = { 1, 2, 4, 8, $10, $20, $40, $80 }
Constant (const word) makecharset::c#0 = 0
Constant (const byte) makecharset::i#0 = 0
Constant (const byte) makecharset::b#0 = 0
@ -1727,7 +1721,7 @@ if() condition always true - replacing block destination [86] if(true) goto main
Successful SSA optimization Pass2ConstantIfs
Resolved ranged next value [58] main::col#1 ← ++ main::col#2 to ++
Resolved ranged comparison value [60] if(main::col#1!=rangelast(COLS,COLS+$3e8)) goto main::@1 to (byte*)(const byte*) COLS+(word) $3e8+(number) 1
De-inlining pointer[w] to *(pointer+w) [211] *((const byte*) makecharset::charset#0 + (word~) makecharset::$11) ← (byte) makecharset::b#2
De-inlining pointer[w] to *(pointer+w) [210] *((const byte*) makecharset::charset#0 + (word~) makecharset::$11) ← (byte) makecharset::b#2
Successful SSA optimization Pass2DeInlineWordDerefIdx
Eliminating unused constant (const void*) memset::return#2
Successful SSA optimization PassNEliminateUnusedVars

View File

@ -569,7 +569,6 @@ makecharset: scope:[makecharset] from main::@2
(byte*) print_char_cursor#28 ← phi( main::@2/(byte*) print_char_cursor#21 )
(byte*) print_line_cursor#21 ← phi( main::@2/(byte*) print_line_cursor#14 )
(byte*) print_screen#4 ← phi( main::@2/(byte*) print_screen#5 )
(byte[8]) makecharset::bittab ← { (number) 1, (number) 2, (number) 4, (number) 8, (number) $10, (number) $20, (number) $40, (number) $80 }
call sid_rnd_init
to:makecharset::@23
makecharset::@23: scope:[makecharset] from makecharset
@ -707,7 +706,7 @@ makecharset::@13: scope:[makecharset] from makecharset::@25
(word) makecharset::c#13 ← phi( makecharset::@25/(word) makecharset::c#14 )
(byte) makecharset::ii#4 ← phi( makecharset::@25/(byte) makecharset::ii#5 )
(byte) makecharset::b#3 ← phi( makecharset::@25/(byte) makecharset::b#5 )
(byte) makecharset::b#1 ← (byte) makecharset::b#3 | *((byte[8]) makecharset::bittab + (byte) makecharset::ii#4)
(byte) makecharset::b#1 ← (byte) makecharset::b#3 | *((const byte[8]) makecharset::bittab + (byte) makecharset::ii#4)
to:makecharset::@10
makecharset::@19: scope:[makecharset] from makecharset::@26 makecharset::@6
(byte*) makecharset::charset#11 ← phi( makecharset::@26/(byte*) makecharset::charset#14 makecharset::@6/(byte*) makecharset::charset#15 )
@ -1125,7 +1124,7 @@ SYMBOL TABLE SSA
(byte) makecharset::b#5
(byte) makecharset::b#6
(byte) makecharset::b#7
(byte[8]) makecharset::bittab
(const byte[8]) makecharset::bittab = { (byte)(number) 1, (byte)(number) 2, (byte)(number) 4, (byte)(number) 8, (byte)(number) $10, (byte)(number) $20, (byte)(number) $40, (byte)(number) $80 }
(word) makecharset::c
(word) makecharset::c#0
(word) makecharset::c#1
@ -1424,8 +1423,6 @@ Adding number conversion cast (unumber) 8 in (number~) makecharset::$10 ← (wor
Adding number conversion cast (unumber) makecharset::$10 in (number~) makecharset::$10 ← (word) makecharset::c#5 * (unumber)(number) 8
Adding number conversion cast (unumber) makecharset::$11 in (number~) makecharset::$11 ← (unumber~) makecharset::$10 + (byte) makecharset::i#3
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (byte[8]) makecharset::bittab ← (byte[8]){ (byte)(number) 1, (byte)(number) 2, (byte)(number) 4, (byte)(number) 8, (byte)(number) $10, (byte)(number) $20, (byte)(number) $40, (byte)(number) $80 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (byte*~) memset::$2 ← (byte*)(void*) memset::str#2
Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#2
Inlining cast (byte*) print_screen#0 ← (byte*)(number) $400
@ -1458,6 +1455,14 @@ Simplifying constant pointer cast (byte*) 54299
Simplifying constant pointer cast (byte*) 10240
Simplifying constant pointer cast (byte*) 11264
Simplifying constant pointer cast (byte*) 8192
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 4
Simplifying constant integer cast 8
Simplifying constant integer cast $10
Simplifying constant integer cast $20
Simplifying constant integer cast $40
Simplifying constant integer cast $80
Simplifying constant integer cast 0
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast $3e8
@ -1492,14 +1497,6 @@ Simplifying constant integer cast $19
Simplifying constant integer cast 0
Simplifying constant integer cast $28
Simplifying constant integer cast $28
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 4
Simplifying constant integer cast 8
Simplifying constant integer cast $10
Simplifying constant integer cast $20
Simplifying constant integer cast $40
Simplifying constant integer cast $80
Simplifying constant integer cast 0
Simplifying constant integer cast $100
Simplifying constant integer cast 0
@ -1574,8 +1571,8 @@ Inferred type updated to byte in (unumber~) makecharset::$7 ← (byte~) makechar
Inferred type updated to word in (unumber~) makecharset::$10 ← (word) makecharset::c#5 * (byte) 8
Inferred type updated to word in (unumber~) makecharset::$11 ← (word~) makecharset::$10 + (byte) makecharset::i#3
Inversing boolean not [2] (bool~) memset::$1 ← (word) memset::num#1 <= (byte) 0 from [1] (bool~) memset::$0 ← (word) memset::num#1 > (byte) 0
Inversing boolean not [213] (bool~) makecharset::$14 ← (byte~) makecharset::$12 != (byte) 0 from [212] (bool~) makecharset::$13 ← (byte~) makecharset::$12 == (byte) 0
Inversing boolean not [225] (bool~) makecharset::$9 ← (byte~) makecharset::$7 <= (byte) makecharset::s#1 from [224] (bool~) makecharset::$8 ← (byte~) makecharset::$7 > (byte) makecharset::s#1
Inversing boolean not [212] (bool~) makecharset::$14 ← (byte~) makecharset::$12 != (byte) 0 from [211] (bool~) makecharset::$13 ← (byte~) makecharset::$12 == (byte) 0
Inversing boolean not [224] (bool~) makecharset::$9 ← (byte~) makecharset::$7 <= (byte) makecharset::s#1 from [223] (bool~) makecharset::$8 ← (byte~) makecharset::$7 > (byte) makecharset::s#1
Successful SSA optimization Pass2UnaryNotSimplification
Alias (void*) memset::return#0 = (void*) memset::str#1 (void*) memset::return#3 (void*) memset::return#1
Alias (void*) memset::str#2 = (void*) memset::str#3
@ -1788,17 +1785,15 @@ Simple Condition (bool~) doplasma::$0 [141] if((byte) doplasma::i#2<(byte) $19)
Simple Condition (bool~) doplasma::$2 [156] if((byte) doplasma::i1#2<(byte) $28) goto doplasma::@8
Simple Condition (bool~) doplasma::$4 [169] if((byte) doplasma::ii#2<(byte) $19) goto doplasma::@14
Simple Condition (bool~) doplasma::$5 [174] if((byte) doplasma::i2#2<(byte) $28) goto doplasma::@17
Simple Condition (bool~) makecharset::$2 [199] if((word) makecharset::c#2<(word) $100) goto makecharset::@2
Simple Condition (bool~) makecharset::$4 [206] if((byte) makecharset::i#2<(byte) 8) goto makecharset::@5
Simple Condition (bool~) makecharset::$14 [214] if((byte~) makecharset::$12!=(byte) 0) goto makecharset::@19
Simple Condition (bool~) makecharset::$5 [217] if((byte) makecharset::ii#2<(byte) 8) goto makecharset::@8
Simple Condition (bool~) makecharset::$9 [226] if((byte~) makecharset::$7<=(byte) makecharset::s#0) goto makecharset::@10
Simple Condition (bool~) makecharset::$2 [198] if((word) makecharset::c#2<(word) $100) goto makecharset::@2
Simple Condition (bool~) makecharset::$4 [205] if((byte) makecharset::i#2<(byte) 8) goto makecharset::@5
Simple Condition (bool~) makecharset::$14 [213] if((byte~) makecharset::$12!=(byte) 0) goto makecharset::@19
Simple Condition (bool~) makecharset::$5 [216] if((byte) makecharset::ii#2<(byte) 8) goto makecharset::@8
Simple Condition (bool~) makecharset::$9 [225] if((byte~) makecharset::$7<=(byte) makecharset::s#0) goto makecharset::@10
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant right-side identified [134] (byte[$28]) doplasma::xbuf ← { fill( $28, 0) }
Constant right-side identified [135] (byte[$19]) doplasma::ybuf ← { fill( $19, 0) }
Successful SSA optimization Pass2ConstantRValueConsolidation
Identified constant from value list (byte[8]) { (byte) 1, (byte) 2, (byte) 4, (byte) 8, (byte) $10, (byte) $20, (byte) $40, (byte) $80 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const byte*) print_line_cursor#0 = (byte*) 1024
Constant (const byte) memset::c#0 = ' '
Constant (const word) memset::num#0 = $3e8
@ -1823,7 +1818,6 @@ Constant (const byte) doplasma::i#0 = 0
Constant (const byte) doplasma::i1#0 = 0
Constant (const byte) doplasma::ii#0 = 0
Constant (const byte) doplasma::i2#0 = 0
Constant (const byte[8]) makecharset::bittab = { 1, 2, 4, 8, $10, $20, $40, $80 }
Constant (const word) makecharset::c#0 = 0
Constant (const byte) makecharset::i#0 = 0
Constant (const byte) makecharset::b#0 = 0
@ -1845,7 +1839,7 @@ if() condition always true - replacing block destination [68] if(true) goto main
Successful SSA optimization Pass2ConstantIfs
Resolved ranged next value [58] main::col#1 ← ++ main::col#2 to ++
Resolved ranged comparison value [60] if(main::col#1!=rangelast(COLS,COLS+$3e8)) goto main::@1 to (byte*)(const byte*) COLS+(word) $3e8+(number) 1
De-inlining pointer[w] to *(pointer+w) [230] *((const byte*) makecharset::charset#0 + (word~) makecharset::$11) ← (byte) makecharset::b#2
De-inlining pointer[w] to *(pointer+w) [229] *((const byte*) makecharset::charset#0 + (word~) makecharset::$11) ← (byte) makecharset::b#2
Successful SSA optimization Pass2DeInlineWordDerefIdx
Eliminating unused constant (const void*) memset::return#2
Successful SSA optimization PassNEliminateUnusedVars

View File

@ -6,11 +6,12 @@ Culled Empty Block (label) @4
Culled Empty Block (label) main::@1
Culled Empty Block (label) main::@3
Culled Empty Block (label) main::@6
Culled Empty Block (label) @5
Culled Empty Block (label) raster::@2
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
to:@5
to:@6
(void()) main()
main: scope:[main] from @6
@ -33,15 +34,12 @@ main::@7: scope:[main] from main::@5
main::@return: scope:[main] from main::@7
return
to:@return
@5: scope:[] from @begin
(byte[]) rastercols ← { (number) $b, (number) 0, (number) $b, (number) $b, (number) $c, (number) $b, (number) $c, (number) $c, (number) $f, (number) $c, (number) $f, (number) $f, (number) 1, (number) $f, (number) 1, (number) 1, (number) $f, (number) 1, (number) $f, (number) $f, (number) $c, (number) $f, (number) $c, (number) $c, (number) $b, (number) $c, (number) $b, (number) $b, (number) 0, (number) $b, (number) 0, (number) $ff }
to:@6
(void()) raster()
raster: scope:[raster] from main::@5
asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop }
(byte) raster::i#0 ← (number) 0
(byte) raster::col#0 ← *((byte[]) rastercols + (byte) raster::i#0)
(byte) raster::col#0 ← *((const byte[]) rastercols + (byte) raster::i#0)
to:raster::@1
raster::@1: scope:[raster] from raster raster::@1
(byte) raster::i#2 ← phi( raster/(byte) raster::i#0 raster::@1/(byte) raster::i#1 )
@ -49,7 +47,7 @@ raster::@1: scope:[raster] from raster raster::@1
*((const byte*) BGCOL) ← (byte) raster::col#2
*((const byte*) BORDERCOL) ← (byte) raster::col#2
(byte) raster::i#1 ← ++ (byte) raster::i#2
(byte) raster::col#1 ← *((byte[]) rastercols + (byte) raster::i#1)
(byte) raster::col#1 ← *((const byte[]) rastercols + (byte) raster::i#1)
asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop }
(bool~) raster::$0 ← (byte) raster::col#1 != (number) $ff
if((bool~) raster::$0) goto raster::@1
@ -57,7 +55,7 @@ raster::@1: scope:[raster] from raster raster::@1
raster::@return: scope:[raster] from raster::@1
return
to:@return
@6: scope:[] from @5
@6: scope:[] from @begin
call main
to:@7
@7: scope:[] from @6
@ -65,7 +63,6 @@ raster::@return: scope:[raster] from raster::@1
@end: scope:[] from @7
SYMBOL TABLE SSA
(label) @5
(label) @6
(label) @7
(label) @begin
@ -93,22 +90,18 @@ SYMBOL TABLE SSA
(byte) raster::i#0
(byte) raster::i#1
(byte) raster::i#2
(byte[]) rastercols
(const byte[]) rastercols = { (byte)(number) $b, (byte)(number) 0, (byte)(number) $b, (byte)(number) $b, (byte)(number) $c, (byte)(number) $b, (byte)(number) $c, (byte)(number) $c, (byte)(number) $f, (byte)(number) $c, (byte)(number) $f, (byte)(number) $f, (byte)(number) 1, (byte)(number) $f, (byte)(number) 1, (byte)(number) 1, (byte)(number) $f, (byte)(number) 1, (byte)(number) $f, (byte)(number) $f, (byte)(number) $c, (byte)(number) $f, (byte)(number) $c, (byte)(number) $c, (byte)(number) $b, (byte)(number) $c, (byte)(number) $b, (byte)(number) $b, (byte)(number) 0, (byte)(number) $b, (byte)(number) 0, (byte)(number) $ff }
Adding number conversion cast (unumber) $a in (bool~) main::$0 ← *((const byte*) RASTER) != (number) $a
Adding number conversion cast (unumber) $b in (bool~) main::$1 ← *((const byte*) RASTER) != (number) $b
Adding number conversion cast (unumber) 0 in (byte) raster::i#0 ← (number) 0
Adding number conversion cast (unumber) $ff in (bool~) raster::$0 ← (byte) raster::col#1 != (number) $ff
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (byte[]) rastercols ← (byte[]){ (byte)(number) $b, (byte)(number) 0, (byte)(number) $b, (byte)(number) $b, (byte)(number) $c, (byte)(number) $b, (byte)(number) $c, (byte)(number) $c, (byte)(number) $f, (byte)(number) $c, (byte)(number) $f, (byte)(number) $f, (byte)(number) 1, (byte)(number) $f, (byte)(number) 1, (byte)(number) 1, (byte)(number) $f, (byte)(number) 1, (byte)(number) $f, (byte)(number) $f, (byte)(number) $c, (byte)(number) $f, (byte)(number) $c, (byte)(number) $c, (byte)(number) $b, (byte)(number) $c, (byte)(number) $b, (byte)(number) $b, (byte)(number) 0, (byte)(number) $b, (byte)(number) 0, (byte)(number) $ff }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (byte) raster::i#0 ← (unumber)(number) 0
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 53266
Simplifying constant pointer cast (byte*) 53280
Simplifying constant pointer cast (byte*) 53281
Simplifying constant integer cast $a
Simplifying constant integer cast $b
Simplifying constant integer cast $b
Simplifying constant integer cast 0
Simplifying constant integer cast $b
@ -141,6 +134,8 @@ Simplifying constant integer cast 0
Simplifying constant integer cast $b
Simplifying constant integer cast 0
Simplifying constant integer cast $ff
Simplifying constant integer cast $a
Simplifying constant integer cast $b
Simplifying constant integer cast 0
Simplifying constant integer cast $ff
Successful SSA optimization PassNCastSimplification
@ -151,16 +146,13 @@ Finalized unsigned number type (byte) $ff
Successful SSA optimization PassNFinalizeNumberTypeConversions
Simple Condition (bool~) main::$0 [2] if(*((const byte*) RASTER)!=(byte) $a) goto main::@2
Simple Condition (bool~) main::$1 [4] if(*((const byte*) RASTER)!=(byte) $b) goto main::@4
Simple Condition (bool~) raster::$0 [19] if((byte) raster::col#1!=(byte) $ff) goto raster::@1
Simple Condition (bool~) raster::$0 [18] if((byte) raster::col#1!=(byte) $ff) goto raster::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Identified constant from value list (byte[]) { (byte) $b, (byte) 0, (byte) $b, (byte) $b, (byte) $c, (byte) $b, (byte) $c, (byte) $c, (byte) $f, (byte) $c, (byte) $f, (byte) $f, (byte) 1, (byte) $f, (byte) 1, (byte) 1, (byte) $f, (byte) 1, (byte) $f, (byte) $f, (byte) $c, (byte) $f, (byte) $c, (byte) $c, (byte) $b, (byte) $c, (byte) $b, (byte) $b, (byte) 0, (byte) $b, (byte) 0, (byte) $ff }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const byte[]) rastercols = { $b, 0, $b, $b, $c, $b, $c, $c, $f, $c, $f, $f, 1, $f, 1, 1, $f, 1, $f, $f, $c, $f, $c, $c, $b, $c, $b, $b, 0, $b, 0, $ff }
Constant (const byte) raster::i#0 = 0
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [6] if(true) goto main::@2
Successful SSA optimization Pass2ConstantIfs
Simplifying expression containing zero rastercols in [11] (byte) raster::col#0 ← *((const byte[]) rastercols + (const byte) raster::i#0)
Simplifying expression containing zero rastercols in [10] (byte) raster::col#0 ← *((const byte[]) rastercols + (const byte) raster::i#0)
Successful SSA optimization PassNSimplifyExpressionWithZero
Removing unused block main::@return
Successful SSA optimization Pass2EliminateUnusedBlocks
@ -169,22 +161,20 @@ Constant inlined raster::i#0 = (byte) 0
Successful SSA optimization Pass2ConstantInlining
Added new block during phi lifting raster::@3(between raster::@1 and raster::@1)
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @5
Adding NOP phi() at start of @6
Adding NOP phi() at start of @7
Adding NOP phi() at start of @end
Adding NOP phi() at start of main::@5
Adding NOP phi() at start of main::@7
CALL GRAPH
Calls in [] to main:3
Calls in [main] to raster:10
Calls in [] to main:2
Calls in [main] to raster:9
Created 2 initial phi equivalence classes
Coalesced [14] raster::col#3 ← raster::col#0
Coalesced [23] raster::col#4 ← raster::col#1
Coalesced [24] raster::i#3 ← raster::i#1
Coalesced [13] raster::col#3 ← raster::col#0
Coalesced [22] raster::col#4 ← raster::col#1
Coalesced [23] raster::i#3 ← raster::i#1
Coalesced down to 2 phi equivalence classes
Culled Empty Block (label) @5
Culled Empty Block (label) @7
Culled Empty Block (label) main::@7
Culled Empty Block (label) raster::@3

View File

@ -490,6 +490,9 @@ mulf_init: {
jmp __b1
}
print_hextab: .text "0123456789abcdef"
// Positions to rotate
xs: .byte -$46, -$46, -$46, 0, 0, $46, $46, $46
ys: .byte -$46, 0, $46, -$46, $46, -$46, 0, $46
// mulf_sqr tables will contain f(x)=int(x*x/4) and g(x) = f(x-255).
// <f(x) = <(( x * x )/4)
.align $100
@ -511,9 +514,6 @@ SIN:
.for(var i=0;i<$140;i++)
.byte >round($7fff*sin(i*2*PI/256))
// Positions to rotate
xs: .byte -$46, -$46, -$46, 0, 0, $46, $46, $46
ys: .byte -$46, 0, $46, -$46, $46, -$46, 0, $46
.pc = SPRITE "SPRITE"
.var pic = LoadPicture("balloon.png", List().add($000000, $ffffff))
.for (var y=0; y<21; y++)

View File

@ -77,6 +77,7 @@ Culled Empty Block (label) @49
Culled Empty Block (label) @50
Culled Empty Block (label) @52
Culled Empty Block (label) init::@2
Culled Empty Block (label) @53
Culled Empty Block (label) anim::@2
Culled Empty Block (label) anim::@15
Culled Empty Block (label) anim::@3
@ -395,7 +396,7 @@ print_char_at::@return: scope:[print_char_at] from print_char_at
}}
(byte*~) $0 ← (byte[$140]) SIN + (number) $40
(byte*) COS#0 ← (byte*~) $0
to:@53
to:@54
(void()) main()
main: scope:[main] from @54
@ -437,11 +438,6 @@ init::@1: scope:[init] from init::@1 init::@3
init::@return: scope:[init] from init::@1
return
to:@return
@53: scope:[] from @51
(byte*) COS#15 ← phi( @51/(byte*) COS#0 )
(signed byte[8]) xs ← { (number) -$46, (number) -$46, (number) -$46, (number) 0, (number) 0, (number) $46, (number) $46, (number) $46 }
(signed byte[8]) ys ← { (number) -$46, (number) 0, (number) $46, (number) -$46, (number) $46, (number) -$46, (number) 0, (number) $46 }
to:@54
(void()) anim()
anim: scope:[anim] from main::@1
@ -476,18 +472,18 @@ anim::@19: scope:[anim] from anim::@6
(byte) anim::i#0 ← (byte) 0
to:anim::@10
anim::@10: scope:[anim] from anim::@11 anim::@19
(byte*) COS#25 ← phi( anim::@11/(byte*) COS#12 anim::@19/(byte*) COS#1 )
(byte*) COS#24 ← phi( anim::@11/(byte*) COS#12 anim::@19/(byte*) COS#1 )
(byte) anim::angle#21 ← phi( anim::@11/(byte) anim::angle#5 anim::@19/(byte) anim::angle#2 )
(byte) anim::sprite_msb#16 ← phi( anim::@11/(byte) anim::sprite_msb#7 anim::@19/(byte) anim::sprite_msb#0 )
(signed byte) anim::sin_a#6 ← phi( anim::@11/(signed byte) anim::sin_a#7 anim::@19/(signed byte) anim::sin_a#0 )
(signed byte) anim::cos_a#1 ← phi( anim::@11/(signed byte) anim::cos_a#2 anim::@19/(signed byte) anim::cos_a#0 )
(byte) anim::i#2 ← phi( anim::@11/(byte) anim::i#1 anim::@19/(byte) anim::i#0 )
(signed byte) anim::x#0 ← *((signed byte[8]) xs + (byte) anim::i#2)
(signed byte) anim::y#0 ← *((signed byte[8]) ys + (byte) anim::i#2)
(signed byte) anim::x#0 ← *((const signed byte[8]) xs + (byte) anim::i#2)
(signed byte) anim::y#0 ← *((const signed byte[8]) ys + (byte) anim::i#2)
(signed byte) anim::mulf8s_prepare1_a#0 ← (signed byte) anim::cos_a#1
to:anim::mulf8s_prepare1
anim::mulf8s_prepare1: scope:[anim] from anim::@10
(byte*) COS#24 ← phi( anim::@10/(byte*) COS#25 )
(byte*) COS#23 ← phi( anim::@10/(byte*) COS#24 )
(byte) anim::angle#20 ← phi( anim::@10/(byte) anim::angle#21 )
(signed byte) anim::cos_a#13 ← phi( anim::@10/(signed byte) anim::cos_a#1 )
(byte) anim::i#14 ← phi( anim::@10/(byte) anim::i#2 )
@ -501,7 +497,7 @@ anim::mulf8s_prepare1: scope:[anim] from anim::@10
call mulf8u_prepare
to:anim::@20
anim::@20: scope:[anim] from anim::mulf8s_prepare1
(byte*) COS#23 ← phi( anim::mulf8s_prepare1/(byte*) COS#24 )
(byte*) COS#22 ← phi( anim::mulf8s_prepare1/(byte*) COS#23 )
(byte) anim::angle#19 ← phi( anim::mulf8s_prepare1/(byte) anim::angle#20 )
(signed byte) anim::cos_a#12 ← phi( anim::mulf8s_prepare1/(signed byte) anim::cos_a#13 )
(byte) anim::i#13 ← phi( anim::mulf8s_prepare1/(byte) anim::i#14 )
@ -511,7 +507,7 @@ anim::@20: scope:[anim] from anim::mulf8s_prepare1
(signed byte) anim::x#3 ← phi( anim::mulf8s_prepare1/(signed byte) anim::x#5 )
to:anim::@17
anim::@17: scope:[anim] from anim::@20
(byte*) COS#22 ← phi( anim::@20/(byte*) COS#23 )
(byte*) COS#21 ← phi( anim::@20/(byte*) COS#22 )
(byte) anim::angle#18 ← phi( anim::@20/(byte) anim::angle#19 )
(signed byte) anim::cos_a#11 ← phi( anim::@20/(signed byte) anim::cos_a#12 )
(byte) anim::i#12 ← phi( anim::@20/(byte) anim::i#13 )
@ -524,7 +520,7 @@ anim::@17: scope:[anim] from anim::@20
(signed word) mulf8s_prepared::return#2 ← (signed word) mulf8s_prepared::return#1
to:anim::@21
anim::@21: scope:[anim] from anim::@17
(byte*) COS#21 ← phi( anim::@17/(byte*) COS#22 )
(byte*) COS#20 ← phi( anim::@17/(byte*) COS#21 )
(byte) anim::angle#17 ← phi( anim::@17/(byte) anim::angle#18 )
(signed byte) anim::cos_a#10 ← phi( anim::@17/(signed byte) anim::cos_a#11 )
(byte) anim::i#11 ← phi( anim::@17/(byte) anim::i#12 )
@ -541,7 +537,7 @@ anim::@21: scope:[anim] from anim::@17
(signed word) mulf8s_prepared::return#3 ← (signed word) mulf8s_prepared::return#1
to:anim::@22
anim::@22: scope:[anim] from anim::@21
(byte*) COS#20 ← phi( anim::@21/(byte*) COS#21 )
(byte*) COS#19 ← phi( anim::@21/(byte*) COS#20 )
(byte) anim::angle#16 ← phi( anim::@21/(byte) anim::angle#17 )
(signed byte) anim::cos_a#9 ← phi( anim::@21/(signed byte) anim::cos_a#10 )
(byte) anim::i#10 ← phi( anim::@21/(byte) anim::i#11 )
@ -557,7 +553,7 @@ anim::@22: scope:[anim] from anim::@21
(signed byte) anim::mulf8s_prepare2_a#0 ← (signed byte) anim::sin_a#1
to:anim::mulf8s_prepare2
anim::mulf8s_prepare2: scope:[anim] from anim::@22
(byte*) COS#19 ← phi( anim::@22/(byte*) COS#20 )
(byte*) COS#18 ← phi( anim::@22/(byte*) COS#19 )
(signed byte) anim::sin_a#13 ← phi( anim::@22/(signed byte) anim::sin_a#1 )
(byte) anim::angle#15 ← phi( anim::@22/(byte) anim::angle#16 )
(signed byte) anim::cos_a#8 ← phi( anim::@22/(signed byte) anim::cos_a#9 )
@ -573,7 +569,7 @@ anim::mulf8s_prepare2: scope:[anim] from anim::@22
call mulf8u_prepare
to:anim::@23
anim::@23: scope:[anim] from anim::mulf8s_prepare2
(byte*) COS#18 ← phi( anim::mulf8s_prepare2/(byte*) COS#19 )
(byte*) COS#17 ← phi( anim::mulf8s_prepare2/(byte*) COS#18 )
(signed byte) anim::sin_a#12 ← phi( anim::mulf8s_prepare2/(signed byte) anim::sin_a#13 )
(byte) anim::angle#13 ← phi( anim::mulf8s_prepare2/(byte) anim::angle#15 )
(signed byte) anim::cos_a#7 ← phi( anim::mulf8s_prepare2/(signed byte) anim::cos_a#8 )
@ -585,7 +581,7 @@ anim::@23: scope:[anim] from anim::mulf8s_prepare2
(signed byte) anim::y#4 ← phi( anim::mulf8s_prepare2/(signed byte) anim::y#6 )
to:anim::@18
anim::@18: scope:[anim] from anim::@23
(byte*) COS#17 ← phi( anim::@23/(byte*) COS#18 )
(byte*) COS#16 ← phi( anim::@23/(byte*) COS#17 )
(signed byte) anim::sin_a#11 ← phi( anim::@23/(signed byte) anim::sin_a#12 )
(byte) anim::angle#12 ← phi( anim::@23/(byte) anim::angle#13 )
(signed byte) anim::cos_a#6 ← phi( anim::@23/(signed byte) anim::cos_a#7 )
@ -600,7 +596,7 @@ anim::@18: scope:[anim] from anim::@23
(signed word) mulf8s_prepared::return#4 ← (signed word) mulf8s_prepared::return#1
to:anim::@24
anim::@24: scope:[anim] from anim::@18
(byte*) COS#16 ← phi( anim::@18/(byte*) COS#17 )
(byte*) COS#15 ← phi( anim::@18/(byte*) COS#16 )
(signed byte) anim::sin_a#10 ← phi( anim::@18/(signed byte) anim::sin_a#11 )
(byte) anim::angle#10 ← phi( anim::@18/(byte) anim::angle#12 )
(signed byte) anim::cos_a#5 ← phi( anim::@18/(signed byte) anim::cos_a#6 )
@ -618,7 +614,7 @@ anim::@24: scope:[anim] from anim::@18
(signed word) mulf8s_prepared::return#5 ← (signed word) mulf8s_prepared::return#1
to:anim::@25
anim::@25: scope:[anim] from anim::@24
(byte*) COS#14 ← phi( anim::@24/(byte*) COS#16 )
(byte*) COS#14 ← phi( anim::@24/(byte*) COS#15 )
(signed byte) anim::sin_a#9 ← phi( anim::@24/(signed byte) anim::sin_a#10 )
(byte) anim::angle#8 ← phi( anim::@24/(byte) anim::angle#10 )
(signed byte) anim::cos_a#4 ← phi( anim::@24/(signed byte) anim::cos_a#5 )
@ -703,8 +699,8 @@ anim::@27: scope:[anim] from anim::@26
anim::@return: scope:[anim] from anim::@1
return
to:@return
@54: scope:[] from @53
(byte*) COS#11 ← phi( @53/(byte*) COS#15 )
@54: scope:[] from @51
(byte*) COS#11 ← phi( @51/(byte*) COS#0 )
kickasm(location (const byte*) SPRITE) {{ .var pic = LoadPicture("balloon.png", List().add($000000, $ffffff))
.for (var y=0; y<21; y++)
.for (var x=0;x<3; x++)
@ -720,7 +716,6 @@ SYMBOL TABLE SSA
(byte*~) $0
(label) @4
(label) @51
(label) @53
(label) @54
(label) @55
(label) @begin
@ -754,7 +749,6 @@ SYMBOL TABLE SSA
(byte*) COS#22
(byte*) COS#23
(byte*) COS#24
(byte*) COS#25
(byte*) COS#3
(byte*) COS#4
(byte*) COS#5
@ -1232,8 +1226,8 @@ SYMBOL TABLE SSA
(word) print_word_at::w#1
(word) print_word_at::w#2
(word) print_word_at::w#3
(signed byte[8]) xs
(signed byte[8]) ys
(const signed byte[8]) xs = { (signed byte)(number) -$46, (signed byte)(number) -$46, (signed byte)(number) -$46, (signed byte)(number) 0, (signed byte)(number) 0, (signed byte)(number) $46, (signed byte)(number) $46, (signed byte)(number) $46 }
(const signed byte[8]) ys = { (signed byte)(number) -$46, (signed byte)(number) 0, (signed byte)(number) $46, (signed byte)(number) -$46, (signed byte)(number) $46, (signed byte)(number) -$46, (signed byte)(number) 0, (signed byte)(number) $46 }
Fixing inline constructor with mulf8u_prepared::$0 ← (byte)*(mulf8u_prepared::memB) w= (byte)*(mulf8u_prepared::resL)
Successful SSA optimization Pass2FixInlineConstructors
@ -1295,9 +1289,6 @@ Adding number conversion cast (unumber) 2 in (number~) anim::$26 ← (byte) anim
Adding number conversion cast (unumber) anim::$26 in (number~) anim::$26 ← (byte) anim::i#3 * (unumber)(number) 2
Adding number conversion cast (unumber) $80 in (byte) anim::sprite_msb#2 ← (byte) anim::sprite_msb#4 | (number) $80
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (signed byte[8]) xs ← (signed byte[8]){ (signed byte)(number) -$46, (signed byte)(number) -$46, (signed byte)(number) -$46, (signed byte)(number) 0, (signed byte)(number) 0, (signed byte)(number) $46, (signed byte)(number) $46, (signed byte)(number) $46 }
Added casts to value list in (signed byte[8]) ys ← (signed byte[8]){ (signed byte)(number) -$46, (signed byte)(number) 0, (signed byte)(number) $46, (signed byte)(number) -$46, (signed byte)(number) $46, (signed byte)(number) -$46, (signed byte)(number) 0, (signed byte)(number) $46 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (word) mulf_init::sqr#0 ← (unumber)(number) 0
Inlining cast (byte) mulf_init::x_2#0 ← (unumber)(number) 0
Inlining cast (byte) mulf_init::c#0 ← (unumber)(number) 0
@ -1333,6 +1324,22 @@ Simplifying constant pointer cast (byte*) 253
Simplifying constant pointer cast (byte*) 254
Simplifying constant pointer cast (byte*) 255
Simplifying constant pointer cast (signed byte*) 253
Simplifying constant integer cast -$46
Simplifying constant integer cast -$46
Simplifying constant integer cast -$46
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $46
Simplifying constant integer cast $46
Simplifying constant integer cast $46
Simplifying constant integer cast -$46
Simplifying constant integer cast 0
Simplifying constant integer cast $46
Simplifying constant integer cast -$46
Simplifying constant integer cast $46
Simplifying constant integer cast -$46
Simplifying constant integer cast 0
Simplifying constant integer cast $46
Simplifying constant pointer cast (byte*) 1024
Simplifying constant pointer cast (byte*) 12288
Simplifying constant integer cast 0
@ -1367,22 +1374,6 @@ Simplifying constant integer cast $40
Simplifying constant integer cast $ff
Simplifying constant integer cast $3f8
Simplifying constant integer cast $40
Simplifying constant integer cast -$46
Simplifying constant integer cast -$46
Simplifying constant integer cast -$46
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $46
Simplifying constant integer cast $46
Simplifying constant integer cast $46
Simplifying constant integer cast -$46
Simplifying constant integer cast 0
Simplifying constant integer cast $46
Simplifying constant integer cast -$46
Simplifying constant integer cast $46
Simplifying constant integer cast -$46
Simplifying constant integer cast 0
Simplifying constant integer cast $46
Simplifying constant integer cast 0
Simplifying constant integer cast $ff
Simplifying constant integer cast 0
@ -1461,7 +1452,7 @@ Inversing boolean not [19] (bool~) mulf_init::$11 ← (byte~) mulf_init::$9 != (
Inversing boolean not [49] (bool~) mulf_init::$19 ← (byte) mulf_init::x_255#1 != (byte) 0 from [48] (bool~) mulf_init::$18 ← (byte) mulf_init::x_255#1 == (byte) 0
Inversing boolean not [83] (bool~) mulf8s_prepared::$3 ← *((const signed byte*) mulf8s_prepared::memA) >= (signed byte) 0 from [82] (bool~) mulf8s_prepared::$2 ← *((const signed byte*) mulf8s_prepared::memA) < (signed byte) 0
Inversing boolean not [87] (bool~) mulf8s_prepared::$5 ← (signed byte) mulf8s_prepared::b#5 >= (signed byte) 0 from [86] (bool~) mulf8s_prepared::$4 ← (signed byte) mulf8s_prepared::b#5 < (signed byte) 0
Inversing boolean not [254] (bool~) anim::$22 ← (byte~) anim::$20 == (byte) 0 from [253] (bool~) anim::$21 ← (byte~) anim::$20 != (byte) 0
Inversing boolean not [251] (bool~) anim::$22 ← (byte~) anim::$20 == (byte) 0 from [250] (bool~) anim::$21 ← (byte~) anim::$20 != (byte) 0
Successful SSA optimization Pass2UnaryNotSimplification
Alias (byte*) mulf_init::sqr1_hi#0 = (byte*~) mulf_init::$0
Alias (byte*) mulf_init::sqr1_lo#0 = (byte*~) mulf_init::$6
@ -1502,7 +1493,7 @@ Alias (byte*) print_word_at::at#1 = (byte*~) print_dword_at::$3
Alias (byte) print_byte_at::b#2 = (byte) print_byte_at::b#3
Alias (byte*) print_byte_at::at#2 = (byte*) print_byte_at::at#3
Alias (byte*) print_char_at::at#1 = (byte*~) print_byte_at::$3
Alias (byte*) COS#0 = (byte*~) $0 (byte*) COS#15 (byte*) COS#11
Alias (byte*) COS#0 = (byte*~) $0 (byte*) COS#11
Alias (byte*) COS#7 = (byte*) COS#9
Alias (byte*) init::sprites_ptr#0 = (byte*~) init::$1
Alias (byte*) COS#1 = (byte*) COS#2 (byte*) COS#3
@ -1516,7 +1507,7 @@ Alias (signed byte) anim::sin_a#1 = (signed byte) anim::sin_a#5 (signed byte) an
Alias (byte) anim::sprite_msb#10 = (byte) anim::sprite_msb#15 (byte) anim::sprite_msb#16 (byte) anim::sprite_msb#14 (byte) anim::sprite_msb#13 (byte) anim::sprite_msb#12 (byte) anim::sprite_msb#11 (byte) anim::sprite_msb#9 (byte) anim::sprite_msb#8 (byte) anim::sprite_msb#6 (byte) anim::sprite_msb#3
Alias (byte) anim::i#10 = (byte) anim::i#14 (byte) anim::i#2 (byte) anim::i#13 (byte) anim::i#12 (byte) anim::i#11 (byte) anim::i#9 (byte) anim::i#8 (byte) anim::i#7 (byte) anim::i#6 (byte) anim::i#5 (byte) anim::i#4
Alias (byte) anim::angle#10 = (byte) anim::angle#20 (byte) anim::angle#21 (byte) anim::angle#19 (byte) anim::angle#18 (byte) anim::angle#17 (byte) anim::angle#16 (byte) anim::angle#15 (byte) anim::angle#13 (byte) anim::angle#12 (byte) anim::angle#8 (byte) anim::angle#7
Alias (byte*) COS#13 = (byte*) COS#24 (byte*) COS#25 (byte*) COS#23 (byte*) COS#22 (byte*) COS#21 (byte*) COS#20 (byte*) COS#19 (byte*) COS#18 (byte*) COS#17 (byte*) COS#16 (byte*) COS#14
Alias (byte*) COS#13 = (byte*) COS#23 (byte*) COS#24 (byte*) COS#22 (byte*) COS#21 (byte*) COS#20 (byte*) COS#19 (byte*) COS#18 (byte*) COS#17 (byte*) COS#16 (byte*) COS#15 (byte*) COS#14
Alias (byte) mulf8u_prepare::a#0 = (byte~) anim::mulf8s_prepare1_$0
Alias (signed word) mulf8s_prepared::return#2 = (signed word) mulf8s_prepared::return#7
Alias (signed word) anim::xr#0 = (signed word~) anim::$7 (signed word) anim::xr#7 (signed word) anim::xr#6 (signed word) anim::xr#5 (signed word) anim::xr#4 (signed word) anim::xr#2
@ -1575,9 +1566,9 @@ Simple Condition (bool~) mulf_init::$19 [50] if((byte) mulf_init::x_255#1!=(byte
Simple Condition (bool~) mulf8s_prepared::$3 [84] if(*((const signed byte*) mulf8s_prepared::memA)>=(signed byte) 0) goto mulf8s_prepared::@1
Simple Condition (bool~) mulf8s_prepared::$5 [88] if((signed byte) mulf8s_prepared::b#4>=(signed byte) 0) goto mulf8s_prepared::@2
Simple Condition (bool~) init::$4 [178] if((byte) init::i#1!=rangelast(0,7)) goto init::@1
Simple Condition (bool~) anim::$0 [189] if(*((const byte*) RASTER)!=(byte) $ff) goto anim::@4
Simple Condition (bool~) anim::$22 [255] if((byte~) anim::$20==(byte) 0) goto anim::@11
Simple Condition (bool~) anim::$28 [268] if((byte) anim::i#1!=rangelast(0,7)) goto anim::@10
Simple Condition (bool~) anim::$0 [186] if(*((const byte*) RASTER)!=(byte) $ff) goto anim::@4
Simple Condition (bool~) anim::$22 [252] if((byte~) anim::$20==(byte) 0) goto anim::@11
Simple Condition (bool~) anim::$28 [265] if((byte) anim::i#1!=rangelast(0,7)) goto anim::@10
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant right-side identified [0] (byte[$200]) mulf_sqr1_lo ← { fill( $200, 0) }
Constant right-side identified [1] (byte[$200]) mulf_sqr1_hi ← { fill( $200, 0) }
@ -1586,9 +1577,6 @@ Constant right-side identified [3] (byte[$200]) mulf_sqr2_hi ← { fill( $200, 0
Constant right-side identified [168] (byte*) init::sprites_ptr#0 ← (const byte*) SCREEN + (word) $3f8
Constant right-side identified [172] (byte*~) init::$2 ← (const byte*) SPRITE / (byte) $40
Successful SSA optimization Pass2ConstantRValueConsolidation
Identified constant from value list (signed byte[8]) { (signed byte) -$46, (signed byte) -$46, (signed byte) -$46, (signed byte) 0, (signed byte) 0, (signed byte) $46, (signed byte) $46, (signed byte) $46 }
Identified constant from value list (signed byte[8]) { (signed byte) -$46, (signed byte) 0, (signed byte) $46, (signed byte) -$46, (signed byte) $46, (signed byte) -$46, (signed byte) 0, (signed byte) $46 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const byte[$200]) mulf_sqr1_lo = { fill( $200, 0) }
Constant (const byte[$200]) mulf_sqr1_hi = { fill( $200, 0) }
Constant (const byte[$200]) mulf_sqr2_lo = { fill( $200, 0) }
@ -1605,8 +1593,6 @@ Constant (const byte[$140]) SIN = kickasm {{ .for(var i=0;i<$140;i++)
Constant (const byte*) init::sprites_ptr#0 = SCREEN+$3f8
Constant (const byte) init::i#0 = 0
Constant (const byte*) init::$2 = SPRITE/$40
Constant (const signed byte[8]) xs = { -$46, -$46, -$46, 0, 0, $46, $46, $46 }
Constant (const signed byte[8]) ys = { -$46, 0, $46, -$46, $46, -$46, 0, $46 }
Constant (const byte) anim::angle#0 = 0
Constant (const byte) anim::sprite_msb#0 = 0
Constant (const byte) anim::i#0 = 0
@ -1617,12 +1603,12 @@ Constant (const byte*) mulf_init::sqr2_lo#0 = mulf_sqr2_lo
Constant (const byte*) print_word_at::at#0 = print_dword_at::at#0
Constant (const byte) init::$3 = (byte)init::$2
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [186] if(true) goto anim::@4
if() condition always true - replacing block destination [183] if(true) goto anim::@4
Successful SSA optimization Pass2ConstantIfs
Resolved ranged next value [176] init::i#1 ← ++ init::i#2 to ++
Resolved ranged comparison value [178] if(init::i#1!=rangelast(0,7)) goto init::@1 to (number) 8
Resolved ranged next value [266] anim::i#1 ← ++ anim::i#10 to ++
Resolved ranged comparison value [268] if(anim::i#1!=rangelast(0,7)) goto anim::@10 to (number) 8
Resolved ranged next value [263] anim::i#1 ← ++ anim::i#10 to ++
Resolved ranged comparison value [265] if(anim::i#1!=rangelast(0,7)) goto anim::@10 to (number) 8
Simplifying constant evaluating to zero (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES in [112] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES
Simplifying constant evaluating to zero (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS in [113] *((const byte*) CIA2_TIMER_B_CONTROL) ← (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A
Successful SSA optimization PassNSimplifyConstantZero
@ -1750,7 +1736,6 @@ Added new block during phi lifting anim::@29(between anim::@25 and anim::@11)
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @4
Adding NOP phi() at start of @51
Adding NOP phi() at start of @53
Adding NOP phi() at start of @55
Adding NOP phi() at start of @end
Adding NOP phi() at start of main::@1
@ -1767,58 +1752,57 @@ Adding NOP phi() at start of mulf_init
Adding NOP phi() at start of mulf_init::@3
Adding NOP phi() at start of mulf_init::@15
CALL GRAPH
Calls in [] to main:5
Calls in [main] to init:9 anim:11
Calls in [anim] to clock_start:18 mulf8u_prepare:24 mulf8s_prepared:28 mulf8s_prepared:33 mulf8u_prepare:37 mulf8s_prepared:41 mulf8s_prepared:47 clock:69 print_dword_at:74
Calls in [print_dword_at] to print_word_at:82 print_word_at:85
Calls in [print_word_at] to print_byte_at:93 print_byte_at:98
Calls in [print_byte_at] to print_char_at:107 print_char_at:113
Calls in [mulf8s_prepared] to mulf8u_prepared:123
Calls in [init] to mulf_init:156
Calls in [] to main:4
Calls in [main] to init:8 anim:10
Calls in [anim] to clock_start:17 mulf8u_prepare:23 mulf8s_prepared:27 mulf8s_prepared:32 mulf8u_prepare:36 mulf8s_prepared:40 mulf8s_prepared:46 clock:68 print_dword_at:73
Calls in [print_dword_at] to print_word_at:81 print_word_at:84
Calls in [print_word_at] to print_byte_at:92 print_byte_at:97
Calls in [print_byte_at] to print_char_at:106 print_char_at:112
Calls in [mulf8s_prepared] to mulf8u_prepared:122
Calls in [init] to mulf_init:155
Created 27 initial phi equivalence classes
Coalesced [27] mulf8s_prepared::b#8 ← mulf8s_prepared::b#0
Coalesced [32] mulf8s_prepared::b#10 ← mulf8s_prepared::b#1
Coalesced [40] mulf8s_prepared::b#9 ← mulf8s_prepared::b#2
Coalesced [46] mulf8s_prepared::b#11 ← mulf8s_prepared::b#3
Coalesced [57] anim::sprite_msb#18 ← anim::sprite_msb#2
Coalesced [76] anim::angle#22 ← anim::angle#1
Coalesced [77] anim::i#15 ← anim::i#1
Coalesced [78] anim::sprite_msb#17 ← anim::sprite_msb#5
Coalesced [79] anim::sprite_msb#19 ← anim::sprite_msb#1
Coalesced [81] print_word_at::w#4 ← print_word_at::w#0
Coalesced [84] print_word_at::w#5 ← print_word_at::w#1
Coalesced [91] print_byte_at::b#4 ← print_byte_at::b#0
Coalesced [92] print_byte_at::at#4 ← print_byte_at::at#0
Coalesced [96] print_byte_at::b#5 ← print_byte_at::b#1
Coalesced [97] print_byte_at::at#5 ← print_byte_at::at#1
Coalesced [105] print_char_at::ch#3 ← print_char_at::ch#0
Coalesced [106] print_char_at::at#3 ← print_char_at::at#0
Coalesced [111] print_char_at::ch#4 ← print_char_at::ch#1
Coalesced [112] print_char_at::at#4 ← print_char_at::at#1
Coalesced [130] mulf8s_prepared::m#7 ← mulf8s_prepared::m#1
Coalesced [136] mulf8s_prepared::m#10 ← mulf8s_prepared::m#2
Coalesced [139] mulf8s_prepared::m#9 ← mulf8s_prepared::m#5
Coalesced [140] mulf8s_prepared::m#8 ← mulf8s_prepared::m#0
Coalesced [164] init::i#3 ← init::i#1
Coalesced [182] mulf_init::sqr2_lo#6 ← mulf_init::sqr2_lo#1
Coalesced [183] mulf_init::x_255#6 ← mulf_init::x_255#1
Coalesced [184] mulf_init::sqr2_hi#6 ← mulf_init::sqr2_hi#1
Coalesced [185] mulf_init::dir#5 ← mulf_init::dir#4
Coalesced (already) [186] mulf_init::dir#6 ← mulf_init::dir#2
Coalesced [192] mulf_init::sqr#9 ← mulf_init::sqr#2
Coalesced [193] mulf_init::x_2#8 ← mulf_init::x_2#1
Coalesced [202] mulf_init::sqr1_lo#6 ← mulf_init::sqr1_lo#1
Coalesced [203] mulf_init::c#6 ← mulf_init::c#1
Coalesced [204] mulf_init::sqr#7 ← mulf_init::sqr#1
Coalesced [205] mulf_init::sqr1_hi#6 ← mulf_init::sqr1_hi#1
Coalesced [206] mulf_init::x_2#6 ← mulf_init::x_2#2
Coalesced [207] mulf_init::sqr#8 ← mulf_init::sqr#4
Coalesced (already) [208] mulf_init::x_2#7 ← mulf_init::x_2#3
Coalesced [26] mulf8s_prepared::b#8 ← mulf8s_prepared::b#0
Coalesced [31] mulf8s_prepared::b#10 ← mulf8s_prepared::b#1
Coalesced [39] mulf8s_prepared::b#9 ← mulf8s_prepared::b#2
Coalesced [45] mulf8s_prepared::b#11 ← mulf8s_prepared::b#3
Coalesced [56] anim::sprite_msb#18 ← anim::sprite_msb#2
Coalesced [75] anim::angle#22 ← anim::angle#1
Coalesced [76] anim::i#15 ← anim::i#1
Coalesced [77] anim::sprite_msb#17 ← anim::sprite_msb#5
Coalesced [78] anim::sprite_msb#19 ← anim::sprite_msb#1
Coalesced [80] print_word_at::w#4 ← print_word_at::w#0
Coalesced [83] print_word_at::w#5 ← print_word_at::w#1
Coalesced [90] print_byte_at::b#4 ← print_byte_at::b#0
Coalesced [91] print_byte_at::at#4 ← print_byte_at::at#0
Coalesced [95] print_byte_at::b#5 ← print_byte_at::b#1
Coalesced [96] print_byte_at::at#5 ← print_byte_at::at#1
Coalesced [104] print_char_at::ch#3 ← print_char_at::ch#0
Coalesced [105] print_char_at::at#3 ← print_char_at::at#0
Coalesced [110] print_char_at::ch#4 ← print_char_at::ch#1
Coalesced [111] print_char_at::at#4 ← print_char_at::at#1
Coalesced [129] mulf8s_prepared::m#7 ← mulf8s_prepared::m#1
Coalesced [135] mulf8s_prepared::m#10 ← mulf8s_prepared::m#2
Coalesced [138] mulf8s_prepared::m#9 ← mulf8s_prepared::m#5
Coalesced [139] mulf8s_prepared::m#8 ← mulf8s_prepared::m#0
Coalesced [163] init::i#3 ← init::i#1
Coalesced [181] mulf_init::sqr2_lo#6 ← mulf_init::sqr2_lo#1
Coalesced [182] mulf_init::x_255#6 ← mulf_init::x_255#1
Coalesced [183] mulf_init::sqr2_hi#6 ← mulf_init::sqr2_hi#1
Coalesced [184] mulf_init::dir#5 ← mulf_init::dir#4
Coalesced (already) [185] mulf_init::dir#6 ← mulf_init::dir#2
Coalesced [191] mulf_init::sqr#9 ← mulf_init::sqr#2
Coalesced [192] mulf_init::x_2#8 ← mulf_init::x_2#1
Coalesced [201] mulf_init::sqr1_lo#6 ← mulf_init::sqr1_lo#1
Coalesced [202] mulf_init::c#6 ← mulf_init::c#1
Coalesced [203] mulf_init::sqr#7 ← mulf_init::sqr#1
Coalesced [204] mulf_init::sqr1_hi#6 ← mulf_init::sqr1_hi#1
Coalesced [205] mulf_init::x_2#6 ← mulf_init::x_2#2
Coalesced [206] mulf_init::sqr#8 ← mulf_init::sqr#4
Coalesced (already) [207] mulf_init::x_2#7 ← mulf_init::x_2#3
Coalesced down to 22 phi equivalence classes
Culled Empty Block (label) @4
Culled Empty Block (label) @51
Culled Empty Block (label) @53
Culled Empty Block (label) @55
Culled Empty Block (label) main::@2
Culled Empty Block (label) anim::@19
@ -3583,6 +3567,9 @@ mulf_init: {
}
// File Data
print_hextab: .text "0123456789abcdef"
// Positions to rotate
xs: .byte -$46, -$46, -$46, 0, 0, $46, $46, $46
ys: .byte -$46, 0, $46, -$46, $46, -$46, 0, $46
// mulf_sqr tables will contain f(x)=int(x*x/4) and g(x) = f(x-255).
// <f(x) = <(( x * x )/4)
.align $100
@ -3604,9 +3591,6 @@ SIN:
.for(var i=0;i<$140;i++)
.byte >round($7fff*sin(i*2*PI/256))
// Positions to rotate
xs: .byte -$46, -$46, -$46, 0, 0, $46, $46, $46
ys: .byte -$46, 0, $46, -$46, $46, -$46, 0, $46
.pc = SPRITE "SPRITE"
.var pic = LoadPicture("balloon.png", List().add($000000, $ffffff))
.for (var y=0; y<21; y++)
@ -4934,6 +4918,9 @@ mulf_init: {
}
// File Data
print_hextab: .text "0123456789abcdef"
// Positions to rotate
xs: .byte -$46, -$46, -$46, 0, 0, $46, $46, $46
ys: .byte -$46, 0, $46, -$46, $46, -$46, 0, $46
// mulf_sqr tables will contain f(x)=int(x*x/4) and g(x) = f(x-255).
// <f(x) = <(( x * x )/4)
.align $100
@ -4955,9 +4942,6 @@ SIN:
.for(var i=0;i<$140;i++)
.byte >round($7fff*sin(i*2*PI/256))
// Positions to rotate
xs: .byte -$46, -$46, -$46, 0, 0, $46, $46, $46
ys: .byte -$46, 0, $46, -$46, $46, -$46, 0, $46
.pc = SPRITE "SPRITE"
.var pic = LoadPicture("balloon.png", List().add($000000, $ffffff))
.for (var y=0; y<21; y++)
@ -6301,6 +6285,9 @@ mulf_init: {
}
// File Data
print_hextab: .text "0123456789abcdef"
// Positions to rotate
xs: .byte -$46, -$46, -$46, 0, 0, $46, $46, $46
ys: .byte -$46, 0, $46, -$46, $46, -$46, 0, $46
// mulf_sqr tables will contain f(x)=int(x*x/4) and g(x) = f(x-255).
// <f(x) = <(( x * x )/4)
.align $100
@ -6322,9 +6309,6 @@ SIN:
.for(var i=0;i<$140;i++)
.byte >round($7fff*sin(i*2*PI/256))
// Positions to rotate
xs: .byte -$46, -$46, -$46, 0, 0, $46, $46, $46
ys: .byte -$46, 0, $46, -$46, $46, -$46, 0, $46
.pc = SPRITE "SPRITE"
.var pic = LoadPicture("balloon.png", List().add($000000, $ffffff))
.for (var y=0; y<21; y++)

View File

@ -436,7 +436,6 @@ progress_init::@return: scope:[progress_init] from progress_init
progress_inc: scope:[progress_inc] from gen_sintab::@26
(byte*) progress_cursor#33 ← phi( gen_sintab::@26/(byte*) progress_cursor#34 )
(byte) progress_idx#24 ← phi( gen_sintab::@26/(byte) progress_idx#34 )
(byte[]) progress_inc::progress_chars ← { (number) $20, (number) $65, (number) $74, (number) $75, (number) $61, (number) $f6, (number) $e7, (number) $ea, (number) $e0 }
(byte) progress_idx#10 ← ++ (byte) progress_idx#24
(bool~) progress_inc::$0 ← (byte) progress_idx#10 == (number) 8
(bool~) progress_inc::$1 ← ! (bool~) progress_inc::$0
@ -445,11 +444,11 @@ progress_inc: scope:[progress_inc] from gen_sintab::@26
progress_inc::@1: scope:[progress_inc] from progress_inc progress_inc::@2
(byte*) progress_cursor#23 ← phi( progress_inc/(byte*) progress_cursor#33 progress_inc::@2/(byte*) progress_cursor#10 )
(byte) progress_idx#25 ← phi( progress_inc/(byte) progress_idx#10 progress_inc::@2/(byte) progress_idx#11 )
*((byte*) progress_cursor#23) ← *((byte[]) progress_inc::progress_chars + (byte) progress_idx#25)
*((byte*) progress_cursor#23) ← *((const byte[]) progress_inc::progress_chars + (byte) progress_idx#25)
to:progress_inc::@return
progress_inc::@2: scope:[progress_inc] from progress_inc
(byte*) progress_cursor#24 ← phi( progress_inc/(byte*) progress_cursor#33 )
*((byte*) progress_cursor#24) ← *((byte[]) progress_inc::progress_chars + (number) 8)
*((byte*) progress_cursor#24) ← *((const byte[]) progress_inc::progress_chars + (number) 8)
(byte*) progress_cursor#10 ← ++ (byte*) progress_cursor#24
(byte) progress_idx#11 ← (number) 0
to:progress_inc::@1
@ -799,9 +798,6 @@ gen_sintab: scope:[gen_sintab] from init::@6 init::@8
(byte) gen_sintab::length#25 ← phi( init::@6/(byte) gen_sintab::length#0 init::@8/(byte) gen_sintab::length#1 )
(byte) gen_sintab::min#4 ← phi( init::@6/(byte) gen_sintab::min#0 init::@8/(byte) gen_sintab::min#1 )
(byte) gen_sintab::max#2 ← phi( init::@6/(byte) gen_sintab::max#0 init::@8/(byte) gen_sintab::max#1 )
(byte[]) gen_sintab::f_i ← { (number) 0, (number) 0, (number) 0, (number) 0, (number) 0 }
(byte[]) gen_sintab::f_min ← { (number) 0, (number) 0, (number) 0, (number) 0, (number) 0 }
(byte[]) gen_sintab::f_amp ← { (number) 0, (number) 0, (number) 0, (number) 0, (number) 0 }
(word~) gen_sintab::$0 ← ((word)) (byte) gen_sintab::max#2
(word) setFAC::w#0 ← (word~) gen_sintab::$0
call setFAC
@ -829,7 +825,7 @@ gen_sintab::@9: scope:[gen_sintab] from gen_sintab::@8
(byte*) progress_cursor#61 ← phi( gen_sintab::@8/(byte*) progress_cursor#63 )
(byte) progress_idx#61 ← phi( gen_sintab::@8/(byte) progress_idx#63 )
(byte) gen_sintab::length#22 ← phi( gen_sintab::@8/(byte) gen_sintab::length#23 )
(byte*) setMEMtoFAC::mem#0 ← (byte[]) gen_sintab::f_min
(byte*) setMEMtoFAC::mem#0 ← (const byte[]) gen_sintab::f_min
call setMEMtoFAC
to:gen_sintab::@10
gen_sintab::@10: scope:[gen_sintab] from gen_sintab::@9
@ -844,7 +840,7 @@ gen_sintab::@11: scope:[gen_sintab] from gen_sintab::@10
(byte*) progress_cursor#57 ← phi( gen_sintab::@10/(byte*) progress_cursor#59 )
(byte) progress_idx#57 ← phi( gen_sintab::@10/(byte) progress_idx#59 )
(byte) gen_sintab::length#19 ← phi( gen_sintab::@10/(byte) gen_sintab::length#21 )
(byte*) setMEMtoFAC::mem#1 ← (byte[]) gen_sintab::f_amp
(byte*) setMEMtoFAC::mem#1 ← (const byte[]) gen_sintab::f_amp
call setMEMtoFAC
to:gen_sintab::@12
gen_sintab::@12: scope:[gen_sintab] from gen_sintab::@11
@ -860,7 +856,7 @@ gen_sintab::@13: scope:[gen_sintab] from gen_sintab::@12
(byte*) progress_cursor#53 ← phi( gen_sintab::@12/(byte*) progress_cursor#55 )
(byte) progress_idx#53 ← phi( gen_sintab::@12/(byte) progress_idx#55 )
(byte) gen_sintab::length#15 ← phi( gen_sintab::@12/(byte) gen_sintab::length#17 )
(byte*) divMEMbyFAC::mem#0 ← (byte[]) gen_sintab::f_amp
(byte*) divMEMbyFAC::mem#0 ← (const byte[]) gen_sintab::f_amp
call divMEMbyFAC
to:gen_sintab::@14
gen_sintab::@14: scope:[gen_sintab] from gen_sintab::@13
@ -868,7 +864,7 @@ gen_sintab::@14: scope:[gen_sintab] from gen_sintab::@13
(byte*) progress_cursor#50 ← phi( gen_sintab::@13/(byte*) progress_cursor#53 )
(byte) progress_idx#50 ← phi( gen_sintab::@13/(byte) progress_idx#53 )
(byte) gen_sintab::length#13 ← phi( gen_sintab::@13/(byte) gen_sintab::length#15 )
(byte*) setMEMtoFAC::mem#2 ← (byte[]) gen_sintab::f_amp
(byte*) setMEMtoFAC::mem#2 ← (const byte[]) gen_sintab::f_amp
call setMEMtoFAC
to:gen_sintab::@15
gen_sintab::@15: scope:[gen_sintab] from gen_sintab::@14
@ -876,7 +872,7 @@ gen_sintab::@15: scope:[gen_sintab] from gen_sintab::@14
(byte*) progress_cursor#47 ← phi( gen_sintab::@14/(byte*) progress_cursor#50 )
(byte) progress_idx#47 ← phi( gen_sintab::@14/(byte) progress_idx#50 )
(byte) gen_sintab::length#10 ← phi( gen_sintab::@14/(byte) gen_sintab::length#13 )
(byte*) addMEMtoFAC::mem#0 ← (byte[]) gen_sintab::f_min
(byte*) addMEMtoFAC::mem#0 ← (const byte[]) gen_sintab::f_min
call addMEMtoFAC
to:gen_sintab::@16
gen_sintab::@16: scope:[gen_sintab] from gen_sintab::@15
@ -884,7 +880,7 @@ gen_sintab::@16: scope:[gen_sintab] from gen_sintab::@15
(byte*) progress_cursor#44 ← phi( gen_sintab::@15/(byte*) progress_cursor#47 )
(byte) progress_idx#44 ← phi( gen_sintab::@15/(byte) progress_idx#47 )
(byte) gen_sintab::length#7 ← phi( gen_sintab::@15/(byte) gen_sintab::length#10 )
(byte*) setMEMtoFAC::mem#3 ← (byte[]) gen_sintab::f_min
(byte*) setMEMtoFAC::mem#3 ← (const byte[]) gen_sintab::f_min
call setMEMtoFAC
to:gen_sintab::@17
gen_sintab::@17: scope:[gen_sintab] from gen_sintab::@16
@ -928,7 +924,7 @@ gen_sintab::@19: scope:[gen_sintab] from gen_sintab::@18
(byte) gen_sintab::i#12 ← phi( gen_sintab::@18/(byte) gen_sintab::i#13 )
(byte*) gen_sintab::sintab#9 ← phi( gen_sintab::@18/(byte*) gen_sintab::sintab#10 )
(byte) gen_sintab::length#6 ← phi( gen_sintab::@18/(byte) gen_sintab::length#8 )
(byte*) setMEMtoFAC::mem#4 ← (byte[]) gen_sintab::f_i
(byte*) setMEMtoFAC::mem#4 ← (const byte[]) gen_sintab::f_i
call setMEMtoFAC
to:gen_sintab::@20
gen_sintab::@20: scope:[gen_sintab] from gen_sintab::@19
@ -947,7 +943,7 @@ gen_sintab::@21: scope:[gen_sintab] from gen_sintab::@20
(byte) progress_idx#54 ← phi( gen_sintab::@20/(byte) progress_idx#56 )
(byte) gen_sintab::i#10 ← phi( gen_sintab::@20/(byte) gen_sintab::i#11 )
(byte*) gen_sintab::sintab#7 ← phi( gen_sintab::@20/(byte*) gen_sintab::sintab#8 )
(byte*) divMEMbyFAC::mem#1 ← (byte[]) gen_sintab::f_i
(byte*) divMEMbyFAC::mem#1 ← (const byte[]) gen_sintab::f_i
call divMEMbyFAC
to:gen_sintab::@22
gen_sintab::@22: scope:[gen_sintab] from gen_sintab::@21
@ -964,7 +960,7 @@ gen_sintab::@23: scope:[gen_sintab] from gen_sintab::@22
(byte) progress_idx#48 ← phi( gen_sintab::@22/(byte) progress_idx#51 )
(byte) gen_sintab::i#8 ← phi( gen_sintab::@22/(byte) gen_sintab::i#9 )
(byte*) gen_sintab::sintab#5 ← phi( gen_sintab::@22/(byte*) gen_sintab::sintab#6 )
(byte*) mulFACbyMEM::mem#1 ← (byte[]) gen_sintab::f_amp
(byte*) mulFACbyMEM::mem#1 ← (const byte[]) gen_sintab::f_amp
call mulFACbyMEM
to:gen_sintab::@24
gen_sintab::@24: scope:[gen_sintab] from gen_sintab::@23
@ -973,7 +969,7 @@ gen_sintab::@24: scope:[gen_sintab] from gen_sintab::@23
(byte) progress_idx#45 ← phi( gen_sintab::@23/(byte) progress_idx#48 )
(byte) gen_sintab::i#7 ← phi( gen_sintab::@23/(byte) gen_sintab::i#8 )
(byte*) gen_sintab::sintab#4 ← phi( gen_sintab::@23/(byte*) gen_sintab::sintab#5 )
(byte*) addMEMtoFAC::mem#1 ← (byte[]) gen_sintab::f_min
(byte*) addMEMtoFAC::mem#1 ← (const byte[]) gen_sintab::f_min
call addMEMtoFAC
to:gen_sintab::@25
gen_sintab::@25: scope:[gen_sintab] from gen_sintab::@24
@ -1327,9 +1323,9 @@ SYMBOL TABLE SSA
(label) gen_sintab::@9
(label) gen_sintab::@return
(const byte*) gen_sintab::f_2pi = (byte*)(number) $e2e5
(byte[]) gen_sintab::f_amp
(byte[]) gen_sintab::f_i
(byte[]) gen_sintab::f_min
(const byte[]) gen_sintab::f_amp = { (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0 }
(const byte[]) gen_sintab::f_i = { (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0 }
(const byte[]) gen_sintab::f_min = { (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0 }
(byte) gen_sintab::i
(byte) gen_sintab::i#0
(byte) gen_sintab::i#1
@ -1648,7 +1644,7 @@ SYMBOL TABLE SSA
(label) progress_inc::@1
(label) progress_inc::@2
(label) progress_inc::@return
(byte[]) progress_inc::progress_chars
(const byte[]) progress_inc::progress_chars = { (byte)(number) $20, (byte)(number) $65, (byte)(number) $74, (byte)(number) $75, (byte)(number) $61, (byte)(number) $f6, (byte)(number) $e7, (byte)(number) $ea, (byte)(number) $e0 }
(void()) progress_init((byte*) progress_init::line)
(label) progress_init::@return
(byte*) progress_init::line
@ -1771,7 +1767,7 @@ Adding number conversion cast (unumber) $3e8 in (bool~) clear_screen::$0 ← (by
Adding number conversion cast (unumber) 0 in (byte) progress_idx#7 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) progress_idx#8 ← (number) 0
Adding number conversion cast (unumber) 8 in (bool~) progress_inc::$0 ← (byte) progress_idx#10 == (number) 8
Adding number conversion cast (unumber) 8 in *((byte*) progress_cursor#24) ← *((byte[]) progress_inc::progress_chars + (number) 8)
Adding number conversion cast (unumber) 8 in *((byte*) progress_cursor#24) ← *((const byte[]) progress_inc::progress_chars + (number) 8)
Adding number conversion cast (unumber) 0 in (byte) progress_idx#11 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) sin_idx_x#2 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) sin_idx_y#2 ← (number) 0
@ -1828,11 +1824,6 @@ Adding number conversion cast (unumber) $37 in *((const byte*) PROCPORT) ← (nu
Adding number conversion cast (unumber) 2 in (word) setFAC::w#2 ← (number) 2
Adding number conversion cast (unumber) 0 in (byte) gen_sintab::i#0 ← (number) 0
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (byte[]) progress_inc::progress_chars ← (byte[]){ (byte)(number) $20, (byte)(number) $65, (byte)(number) $74, (byte)(number) $75, (byte)(number) $61, (byte)(number) $f6, (byte)(number) $e7, (byte)(number) $ea, (byte)(number) $e0 }
Added casts to value list in (byte[]) gen_sintab::f_i ← (byte[]){ (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0 }
Added casts to value list in (byte[]) gen_sintab::f_min ← (byte[]){ (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0 }
Added casts to value list in (byte[]) gen_sintab::f_amp ← (byte[]){ (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (word~) setMEMtoFAC::$0 ← (word)(byte*) setMEMtoFAC::mem#5
Inlining cast (word~) addMEMtoFAC::$0 ← (word)(byte*) addMEMtoFAC::mem#2
Inlining cast (word~) divMEMbyFAC::$0 ← (word)(byte*) divMEMbyFAC::mem#2
@ -1895,7 +1886,31 @@ Simplifying constant pointer cast (byte*) 254
Simplifying constant pointer cast (byte*) 255
Simplifying constant pointer cast (byte*) 8192
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast $20
Simplifying constant integer cast $65
Simplifying constant integer cast $74
Simplifying constant integer cast $75
Simplifying constant integer cast $61
Simplifying constant integer cast $f6
Simplifying constant integer cast $e7
Simplifying constant integer cast $ea
Simplifying constant integer cast $e0
Simplifying constant integer cast $3f8
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant pointer cast (byte*) 58085
Simplifying constant integer cast *((const byte*) memHi)
Simplifying constant integer cast *((const byte*) memLo)
@ -1911,15 +1926,6 @@ Simplifying constant integer cast $d0
Simplifying constant integer cast $3e8
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $20
Simplifying constant integer cast $65
Simplifying constant integer cast $74
Simplifying constant integer cast $75
Simplifying constant integer cast $61
Simplifying constant integer cast $f6
Simplifying constant integer cast $e7
Simplifying constant integer cast $ea
Simplifying constant integer cast $e0
Simplifying constant integer cast 8
Simplifying constant integer cast 8
Simplifying constant integer cast 0
@ -1962,21 +1968,6 @@ Simplifying constant integer cast 0
Simplifying constant integer cast 2
Simplifying constant integer cast 6
Simplifying constant integer cast $37
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 2
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
@ -2051,13 +2042,13 @@ Inferred type updated to byte in (unumber~) gen_chargen_sprite::$3 ← (byte) ge
Inferred type updated to byte in (unumber~) gen_chargen_sprite::$6 ← (byte) gen_chargen_sprite::s_gen#3 * (byte) 2
Inferred type updated to byte in (unumber~) gen_chargen_sprite::$7 ← (byte~) gen_chargen_sprite::$6 | (byte) gen_chargen_sprite::c#2
Inferred type updated to byte in (unumber~) gen_chargen_sprite::$11 ← (byte) gen_chargen_sprite::bits#3 * (byte) 2
Inversing boolean not [153] (bool~) progress_inc::$1 ← (byte) progress_idx#10 != (byte) 8 from [152] (bool~) progress_inc::$0 ← (byte) progress_idx#10 == (byte) 8
Inversing boolean not [189] (bool~) anim::$14 ← (byte) anim::xidx#1 < (const byte) sinlen_x from [188] (bool~) anim::$13 ← (byte) anim::xidx#1 >= (const byte) sinlen_x
Inversing boolean not [195] (bool~) anim::$18 ← (byte) anim::yidx#1 < (const byte) sinlen_y from [194] (bool~) anim::$17 ← (byte) anim::yidx#1 >= (const byte) sinlen_y
Inversing boolean not [213] (bool~) anim::$2 ← (byte) sin_idx_x#3 < (const byte) sinlen_x from [212] (bool~) anim::$1 ← (byte) sin_idx_x#3 >= (const byte) sinlen_x
Inversing boolean not [218] (bool~) anim::$4 ← (byte) sin_idx_y#3 < (const byte) sinlen_y from [217] (bool~) anim::$3 ← (byte) sin_idx_y#3 >= (const byte) sinlen_y
Inversing boolean not [287] (bool~) gen_chargen_sprite::$5 ← (byte~) gen_chargen_sprite::$3 == (byte) 0 from [286] (bool~) gen_chargen_sprite::$4 ← (byte~) gen_chargen_sprite::$3 != (byte) 0
Inversing boolean not [299] (bool~) gen_chargen_sprite::$9 ← (byte) gen_chargen_sprite::s_gen_cnt#1 != (byte) 8 from [298] (bool~) gen_chargen_sprite::$8 ← (byte) gen_chargen_sprite::s_gen_cnt#1 == (byte) 8
Inversing boolean not [152] (bool~) progress_inc::$1 ← (byte) progress_idx#10 != (byte) 8 from [151] (bool~) progress_inc::$0 ← (byte) progress_idx#10 == (byte) 8
Inversing boolean not [188] (bool~) anim::$14 ← (byte) anim::xidx#1 < (const byte) sinlen_x from [187] (bool~) anim::$13 ← (byte) anim::xidx#1 >= (const byte) sinlen_x
Inversing boolean not [194] (bool~) anim::$18 ← (byte) anim::yidx#1 < (const byte) sinlen_y from [193] (bool~) anim::$17 ← (byte) anim::yidx#1 >= (const byte) sinlen_y
Inversing boolean not [212] (bool~) anim::$2 ← (byte) sin_idx_x#3 < (const byte) sinlen_x from [211] (bool~) anim::$1 ← (byte) sin_idx_x#3 >= (const byte) sinlen_x
Inversing boolean not [217] (bool~) anim::$4 ← (byte) sin_idx_y#3 < (const byte) sinlen_y from [216] (bool~) anim::$3 ← (byte) sin_idx_y#3 >= (const byte) sinlen_y
Inversing boolean not [286] (bool~) gen_chargen_sprite::$5 ← (byte~) gen_chargen_sprite::$3 == (byte) 0 from [285] (bool~) gen_chargen_sprite::$4 ← (byte~) gen_chargen_sprite::$3 != (byte) 0
Inversing boolean not [298] (bool~) gen_chargen_sprite::$9 ← (byte) gen_chargen_sprite::s_gen_cnt#1 != (byte) 8 from [297] (bool~) gen_chargen_sprite::$8 ← (byte) gen_chargen_sprite::s_gen_cnt#1 == (byte) 8
Successful SSA optimization Pass2UnaryNotSimplification
Alias (word) setFAC::prepareMEM1_mem#0 = (word) setFAC::w#5 (word) setFAC::prepareMEM1_mem#1
Alias (word) getFAC::return#0 = (word) getFAC::w#0 (word~) getFAC::$0 (word) getFAC::return#3 (word) getFAC::return#1
@ -2250,30 +2241,25 @@ Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) main::$1 [71] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@2
Simple Condition (bool~) init::$9 [94] if((byte) init::i#1!=rangelast(0,$27)) goto init::@1
Simple Condition (bool~) clear_screen::$0 [135] if((byte*) clear_screen::sc#2<(const byte*) SCREEN+(word) $3e8) goto clear_screen::@2
Simple Condition (bool~) progress_inc::$1 [154] if((byte) progress_idx#10!=(byte) 8) goto progress_inc::@1
Simple Condition (bool~) anim::$14 [190] if((byte) anim::xidx#1<(const byte) sinlen_x) goto anim::@5
Simple Condition (bool~) anim::$18 [196] if((byte) anim::yidx#1<(const byte) sinlen_y) goto anim::@6
Simple Condition (bool~) anim::$21 [205] if((byte) anim::j#1!=rangelast(0,6)) goto anim::@4
Simple Condition (bool~) anim::$2 [214] if((byte) sin_idx_x#3<(const byte) sinlen_x) goto anim::@1
Simple Condition (bool~) anim::$4 [219] if((byte) sin_idx_y#3<(const byte) sinlen_y) goto anim::@2
Simple Condition (bool~) place_sprites::$5 [255] if((byte) place_sprites::j#1!=rangelast(0,6)) goto place_sprites::@1
Simple Condition (bool~) gen_sprites::$2 [268] if((byte) gen_sprites::i#1!=rangelast(0,6)) goto gen_sprites::@1
Simple Condition (bool~) gen_chargen_sprite::$5 [288] if((byte~) gen_chargen_sprite::$3==(byte) 0) goto gen_chargen_sprite::@3
Simple Condition (bool~) gen_chargen_sprite::$9 [300] if((byte) gen_chargen_sprite::s_gen_cnt#1!=(byte) 8) goto gen_chargen_sprite::@5
Simple Condition (bool~) gen_chargen_sprite::$10 [304] if((byte) gen_chargen_sprite::b#1!=rangelast(0,2)) goto gen_chargen_sprite::@4
Simple Condition (bool~) gen_chargen_sprite::$12 [317] if((byte) gen_chargen_sprite::x#1!=rangelast(0,7)) goto gen_chargen_sprite::@2
Simple Condition (bool~) gen_chargen_sprite::$14 [323] if((byte) gen_chargen_sprite::y#1!=rangelast(0,7)) goto gen_chargen_sprite::@1
Simple Condition (bool~) gen_sintab::$13 [367] if((byte) gen_sintab::i#10<(byte) gen_sintab::length#10) goto gen_sintab::@2
Simple Condition (bool~) progress_inc::$1 [153] if((byte) progress_idx#10!=(byte) 8) goto progress_inc::@1
Simple Condition (bool~) anim::$14 [189] if((byte) anim::xidx#1<(const byte) sinlen_x) goto anim::@5
Simple Condition (bool~) anim::$18 [195] if((byte) anim::yidx#1<(const byte) sinlen_y) goto anim::@6
Simple Condition (bool~) anim::$21 [204] if((byte) anim::j#1!=rangelast(0,6)) goto anim::@4
Simple Condition (bool~) anim::$2 [213] if((byte) sin_idx_x#3<(const byte) sinlen_x) goto anim::@1
Simple Condition (bool~) anim::$4 [218] if((byte) sin_idx_y#3<(const byte) sinlen_y) goto anim::@2
Simple Condition (bool~) place_sprites::$5 [254] if((byte) place_sprites::j#1!=rangelast(0,6)) goto place_sprites::@1
Simple Condition (bool~) gen_sprites::$2 [267] if((byte) gen_sprites::i#1!=rangelast(0,6)) goto gen_sprites::@1
Simple Condition (bool~) gen_chargen_sprite::$5 [287] if((byte~) gen_chargen_sprite::$3==(byte) 0) goto gen_chargen_sprite::@3
Simple Condition (bool~) gen_chargen_sprite::$9 [299] if((byte) gen_chargen_sprite::s_gen_cnt#1!=(byte) 8) goto gen_chargen_sprite::@5
Simple Condition (bool~) gen_chargen_sprite::$10 [303] if((byte) gen_chargen_sprite::b#1!=rangelast(0,2)) goto gen_chargen_sprite::@4
Simple Condition (bool~) gen_chargen_sprite::$12 [316] if((byte) gen_chargen_sprite::x#1!=rangelast(0,7)) goto gen_chargen_sprite::@2
Simple Condition (bool~) gen_chargen_sprite::$14 [322] if((byte) gen_chargen_sprite::y#1!=rangelast(0,7)) goto gen_chargen_sprite::@1
Simple Condition (bool~) gen_sintab::$13 [363] if((byte) gen_sintab::i#10<(byte) gen_sintab::length#10) goto gen_sintab::@2
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant right-side identified [62] (byte[$dd]) sintab_x ← { fill( $dd, 0) }
Constant right-side identified [63] (byte[$c5]) sintab_y ← { fill( $c5, 0) }
Constant right-side identified [233] (word~) place_sprites::$0 ← (word)(const byte*) sprites
Constant right-side identified [232] (word~) place_sprites::$0 ← (word)(const byte*) sprites
Successful SSA optimization Pass2ConstantRValueConsolidation
Identified constant from value list (byte[]) { (byte) $20, (byte) $65, (byte) $74, (byte) $75, (byte) $61, (byte) $f6, (byte) $e7, (byte) $ea, (byte) $e0 }
Identified constant from value list (byte[]) { (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0 }
Identified constant from value list (byte[]) { (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0 }
Identified constant from value list (byte[]) { (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const byte[$dd]) sintab_x = { fill( $dd, 0) }
Constant (const byte[$c5]) sintab_y = { fill( $c5, 0) }
Constant (const byte) init::i#0 = 0
@ -2289,7 +2275,6 @@ Constant (const byte*) clear_screen::sc#0 = SCREEN
Constant (const byte*) progress_cursor#36 = SCREEN
Constant (const byte) progress_idx#36 = 0
Constant (const byte) progress_idx#23 = 0
Constant (const byte[]) progress_inc::progress_chars = { $20, $65, $74, $75, $61, $f6, $e7, $ea, $e0 }
Constant (const byte) progress_idx#11 = 0
Constant (const byte) sin_idx_x#16 = 0
Constant (const byte) sin_idx_y#17 = 0
@ -2315,43 +2300,40 @@ Constant (const byte) gen_chargen_sprite::b#0 = 0
Constant (const byte) gen_chargen_sprite::c#1 = 1
Constant (const byte) gen_chargen_sprite::s_gen#2 = 0
Constant (const byte) gen_chargen_sprite::s_gen_cnt#2 = 0
Constant (const byte[]) gen_sintab::f_i = { 0, 0, 0, 0, 0 }
Constant (const byte[]) gen_sintab::f_min = { 0, 0, 0, 0, 0 }
Constant (const byte[]) gen_sintab::f_amp = { 0, 0, 0, 0, 0 }
Constant (const word) setFAC::w#2 = 2
Constant (const byte) gen_sintab::i#0 = 0
Constant (const byte*) mulFACbyMEM::mem#0 = gen_sintab::f_2pi
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte*) gen_sintab::sintab#0 = sintab_x
Constant (const byte*) gen_sintab::sintab#1 = sintab_y
Constant (const byte*) setMEMtoFAC::mem#0 = gen_sintab::f_min
Constant (const byte*) setMEMtoFAC::mem#1 = gen_sintab::f_amp
Constant (const word) setFAC::w#2 = 2
Constant (const byte*) divMEMbyFAC::mem#0 = gen_sintab::f_amp
Constant (const byte*) setMEMtoFAC::mem#2 = gen_sintab::f_amp
Constant (const byte*) addMEMtoFAC::mem#0 = gen_sintab::f_min
Constant (const byte*) setMEMtoFAC::mem#3 = gen_sintab::f_min
Constant (const byte) gen_sintab::i#0 = 0
Constant (const byte*) mulFACbyMEM::mem#0 = gen_sintab::f_2pi
Constant (const byte*) setMEMtoFAC::mem#4 = gen_sintab::f_i
Constant (const byte*) divMEMbyFAC::mem#1 = gen_sintab::f_i
Constant (const byte*) mulFACbyMEM::mem#1 = gen_sintab::f_amp
Constant (const byte*) addMEMtoFAC::mem#1 = gen_sintab::f_min
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte*) gen_sintab::sintab#0 = sintab_x
Constant (const byte*) gen_sintab::sintab#1 = sintab_y
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [77] if(true) goto main::@2
Successful SSA optimization Pass2ConstantIfs
Resolved ranged next value [92] init::i#1 ← ++ init::i#2 to ++
Resolved ranged comparison value [94] if(init::i#1!=rangelast(0,$27)) goto init::@1 to (number) $28
Resolved ranged next value [203] anim::j#1 ← ++ anim::j#2 to ++
Resolved ranged comparison value [205] if(anim::j#1!=rangelast(0,6)) goto anim::@4 to (number) 7
Resolved ranged next value [253] place_sprites::j#1 ← ++ place_sprites::j#2 to ++
Resolved ranged comparison value [255] if(place_sprites::j#1!=rangelast(0,6)) goto place_sprites::@1 to (number) 7
Resolved ranged next value [266] gen_sprites::i#1 ← ++ gen_sprites::i#2 to ++
Resolved ranged comparison value [268] if(gen_sprites::i#1!=rangelast(0,6)) goto gen_sprites::@1 to (number) 7
Resolved ranged next value [302] gen_chargen_sprite::b#1 ← ++ gen_chargen_sprite::b#2 to ++
Resolved ranged comparison value [304] if(gen_chargen_sprite::b#1!=rangelast(0,2)) goto gen_chargen_sprite::@4 to (number) 3
Resolved ranged next value [315] gen_chargen_sprite::x#1 ← ++ gen_chargen_sprite::x#6 to ++
Resolved ranged comparison value [317] if(gen_chargen_sprite::x#1!=rangelast(0,7)) goto gen_chargen_sprite::@2 to (number) 8
Resolved ranged next value [321] gen_chargen_sprite::y#1 ← ++ gen_chargen_sprite::y#2 to ++
Resolved ranged comparison value [323] if(gen_chargen_sprite::y#1!=rangelast(0,7)) goto gen_chargen_sprite::@1 to (number) 8
Simplifying expression containing zero gen_chargen_sprite::sprite#3 in [306] *((byte*) gen_chargen_sprite::sprite#3 + (byte) 0) ← (byte) gen_chargen_sprite::s_gen#1
Resolved ranged next value [202] anim::j#1 ← ++ anim::j#2 to ++
Resolved ranged comparison value [204] if(anim::j#1!=rangelast(0,6)) goto anim::@4 to (number) 7
Resolved ranged next value [252] place_sprites::j#1 ← ++ place_sprites::j#2 to ++
Resolved ranged comparison value [254] if(place_sprites::j#1!=rangelast(0,6)) goto place_sprites::@1 to (number) 7
Resolved ranged next value [265] gen_sprites::i#1 ← ++ gen_sprites::i#2 to ++
Resolved ranged comparison value [267] if(gen_sprites::i#1!=rangelast(0,6)) goto gen_sprites::@1 to (number) 7
Resolved ranged next value [301] gen_chargen_sprite::b#1 ← ++ gen_chargen_sprite::b#2 to ++
Resolved ranged comparison value [303] if(gen_chargen_sprite::b#1!=rangelast(0,2)) goto gen_chargen_sprite::@4 to (number) 3
Resolved ranged next value [314] gen_chargen_sprite::x#1 ← ++ gen_chargen_sprite::x#6 to ++
Resolved ranged comparison value [316] if(gen_chargen_sprite::x#1!=rangelast(0,7)) goto gen_chargen_sprite::@2 to (number) 8
Resolved ranged next value [320] gen_chargen_sprite::y#1 ← ++ gen_chargen_sprite::y#2 to ++
Resolved ranged comparison value [322] if(gen_chargen_sprite::y#1!=rangelast(0,7)) goto gen_chargen_sprite::@1 to (number) 8
Simplifying expression containing zero gen_chargen_sprite::sprite#3 in [305] *((byte*) gen_chargen_sprite::sprite#3 + (byte) 0) ← (byte) gen_chargen_sprite::s_gen#1
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused constant (const byte*) progress_cursor#36
Eliminating unused constant (const byte) progress_idx#36

View File

@ -1,5 +1,5 @@
Resolved forward reference FONT_HEX_PROTO to (byte[]) FONT_HEX_PROTO
Resolved forward reference FONT_HEX_PROTO to (byte[]) FONT_HEX_PROTO
Resolved forward reference FONT_HEX_PROTO to (const byte[]) FONT_HEX_PROTO
Resolved forward reference FONT_HEX_PROTO to (const byte[]) FONT_HEX_PROTO
Warning! Adding boolean cast to non-boolean condition *((byte*) strcpy::src)
Identified constant variable (byte*) SCREEN
Identified constant variable (byte*) CHARSET
@ -14,24 +14,25 @@ Culled Empty Block (label) @6
Culled Empty Block (label) @7
Culled Empty Block (label) @8
Culled Empty Block (label) init_font_hex::@6
Culled Empty Block (label) @9
Culled Empty Block (label) main::toD0181_@1
Culled Empty Block (label) main::@2
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
to:@9
to:@10
(void()) init_font_hex((byte*) init_font_hex::charset)
init_font_hex: scope:[init_font_hex] from main::@3
(byte*) init_font_hex::charset#6 ← phi( main::@3/(byte*) init_font_hex::charset#1 )
(byte*) init_font_hex::proto_hi#0 ← (byte[]) FONT_HEX_PROTO
(byte*) init_font_hex::proto_hi#0 ← (const byte[]) FONT_HEX_PROTO
(byte) init_font_hex::c#0 ← (byte) 0
to:init_font_hex::@1
init_font_hex::@1: scope:[init_font_hex] from init_font_hex init_font_hex::@5
(byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) init_font_hex::c#0 init_font_hex::@5/(byte) init_font_hex::c#1 )
(byte*) init_font_hex::proto_hi#6 ← phi( init_font_hex/(byte*) init_font_hex::proto_hi#0 init_font_hex::@5/(byte*) init_font_hex::proto_hi#1 )
(byte*) init_font_hex::charset#5 ← phi( init_font_hex/(byte*) init_font_hex::charset#6 init_font_hex::@5/(byte*) init_font_hex::charset#7 )
(byte*) init_font_hex::proto_lo#0 ← (byte[]) FONT_HEX_PROTO
(byte*) init_font_hex::proto_lo#0 ← (const byte[]) FONT_HEX_PROTO
(byte) init_font_hex::c1#0 ← (byte) 0
to:init_font_hex::@2
init_font_hex::@2: scope:[init_font_hex] from init_font_hex::@1 init_font_hex::@4
@ -91,9 +92,6 @@ init_font_hex::@5: scope:[init_font_hex] from init_font_hex::@4
init_font_hex::@return: scope:[init_font_hex] from init_font_hex::@5
return
to:@return
@9: scope:[] from @begin
(byte[]) FONT_HEX_PROTO ← { (number) 2, (number) 5, (number) 5, (number) 5, (number) 2, (number) 6, (number) 2, (number) 2, (number) 2, (number) 7, (number) 6, (number) 1, (number) 2, (number) 4, (number) 7, (number) 6, (number) 1, (number) 2, (number) 1, (number) 6, (number) 5, (number) 5, (number) 7, (number) 1, (number) 1, (number) 7, (number) 4, (number) 6, (number) 1, (number) 6, (number) 3, (number) 4, (number) 6, (number) 5, (number) 2, (number) 7, (number) 1, (number) 1, (number) 1, (number) 1, (number) 2, (number) 5, (number) 2, (number) 5, (number) 2, (number) 2, (number) 5, (number) 3, (number) 1, (number) 1, (number) 2, (number) 5, (number) 7, (number) 5, (number) 5, (number) 6, (number) 5, (number) 6, (number) 5, (number) 6, (number) 2, (number) 5, (number) 4, (number) 5, (number) 2, (number) 6, (number) 5, (number) 5, (number) 5, (number) 6, (number) 7, (number) 4, (number) 6, (number) 4, (number) 7, (number) 7, (number) 4, (number) 6, (number) 4, (number) 4 }
to:@10
(void()) main()
main: scope:[main] from @10
@ -138,7 +136,7 @@ main::@1: scope:[main] from main::@1 main::@4
main::@return: scope:[main] from main::@1
return
to:@return
@10: scope:[] from @9
@10: scope:[] from @begin
call main
to:@11
@11: scope:[] from @10
@ -148,12 +146,11 @@ main::@return: scope:[main] from main::@1
SYMBOL TABLE SSA
(label) @10
(label) @11
(label) @9
(label) @begin
(label) @end
(const byte*) CHARSET = (byte*)(number) $2000
(const byte*) D018 = (byte*)(number) $d018
(byte[]) FONT_HEX_PROTO
(const byte[]) FONT_HEX_PROTO = { (byte)(number) 2, (byte)(number) 5, (byte)(number) 5, (byte)(number) 5, (byte)(number) 2, (byte)(number) 6, (byte)(number) 2, (byte)(number) 2, (byte)(number) 2, (byte)(number) 7, (byte)(number) 6, (byte)(number) 1, (byte)(number) 2, (byte)(number) 4, (byte)(number) 7, (byte)(number) 6, (byte)(number) 1, (byte)(number) 2, (byte)(number) 1, (byte)(number) 6, (byte)(number) 5, (byte)(number) 5, (byte)(number) 7, (byte)(number) 1, (byte)(number) 1, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 1, (byte)(number) 6, (byte)(number) 3, (byte)(number) 4, (byte)(number) 6, (byte)(number) 5, (byte)(number) 2, (byte)(number) 7, (byte)(number) 1, (byte)(number) 1, (byte)(number) 1, (byte)(number) 1, (byte)(number) 2, (byte)(number) 5, (byte)(number) 2, (byte)(number) 5, (byte)(number) 2, (byte)(number) 2, (byte)(number) 5, (byte)(number) 3, (byte)(number) 1, (byte)(number) 1, (byte)(number) 2, (byte)(number) 5, (byte)(number) 7, (byte)(number) 5, (byte)(number) 5, (byte)(number) 6, (byte)(number) 5, (byte)(number) 6, (byte)(number) 5, (byte)(number) 6, (byte)(number) 2, (byte)(number) 5, (byte)(number) 4, (byte)(number) 5, (byte)(number) 2, (byte)(number) 6, (byte)(number) 5, (byte)(number) 5, (byte)(number) 5, (byte)(number) 6, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 4, (byte)(number) 7, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 4, (byte)(number) 4 }
(const byte*) SCREEN = (byte*)(number) $400
(void()) init_font_hex((byte*) init_font_hex::charset)
(byte~) init_font_hex::$0
@ -271,8 +268,6 @@ Adding number conversion cast (unumber) $f in (number~) main::toD0181_$7 ← (un
Adding number conversion cast (unumber) main::toD0181_$7 in (number~) main::toD0181_$7 ← (unumber~) main::toD0181_$6 & (unumber)(number) $f
Adding number conversion cast (unumber) main::toD0181_$8 in (number~) main::toD0181_$8 ← (unumber~) main::toD0181_$3 | (unumber~) main::toD0181_$7
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (byte[]) FONT_HEX_PROTO ← (byte[]){ (byte)(number) 2, (byte)(number) 5, (byte)(number) 5, (byte)(number) 5, (byte)(number) 2, (byte)(number) 6, (byte)(number) 2, (byte)(number) 2, (byte)(number) 2, (byte)(number) 7, (byte)(number) 6, (byte)(number) 1, (byte)(number) 2, (byte)(number) 4, (byte)(number) 7, (byte)(number) 6, (byte)(number) 1, (byte)(number) 2, (byte)(number) 1, (byte)(number) 6, (byte)(number) 5, (byte)(number) 5, (byte)(number) 7, (byte)(number) 1, (byte)(number) 1, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 1, (byte)(number) 6, (byte)(number) 3, (byte)(number) 4, (byte)(number) 6, (byte)(number) 5, (byte)(number) 2, (byte)(number) 7, (byte)(number) 1, (byte)(number) 1, (byte)(number) 1, (byte)(number) 1, (byte)(number) 2, (byte)(number) 5, (byte)(number) 2, (byte)(number) 5, (byte)(number) 2, (byte)(number) 2, (byte)(number) 5, (byte)(number) 3, (byte)(number) 1, (byte)(number) 1, (byte)(number) 2, (byte)(number) 5, (byte)(number) 7, (byte)(number) 5, (byte)(number) 5, (byte)(number) 6, (byte)(number) 5, (byte)(number) 6, (byte)(number) 5, (byte)(number) 6, (byte)(number) 2, (byte)(number) 5, (byte)(number) 4, (byte)(number) 5, (byte)(number) 2, (byte)(number) 6, (byte)(number) 5, (byte)(number) 5, (byte)(number) 5, (byte)(number) 6, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 4, (byte)(number) 7, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 4, (byte)(number) 4 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (byte) init_font_hex::idx#0 ← (unumber)(number) 0
Inlining cast *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#0) ← (unumber)(number) 0
Inlining cast *((byte*) init_font_hex::charset#4 + (byte) init_font_hex::idx#6) ← (unumber)(number) 0
@ -281,6 +276,86 @@ Inlining cast (word~) main::toD0181_$0 ← (word)(byte*) main::toD0181_screen#1
Inlining cast (word~) main::toD0181_$4 ← (word)(byte*) main::toD0181_gfx#1
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 53272
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 6
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 7
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 4
Simplifying constant integer cast 7
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 1
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 7
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 7
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 6
Simplifying constant integer cast 3
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 7
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 3
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 7
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 4
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 7
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 4
Simplifying constant integer cast 7
Simplifying constant integer cast 7
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 4
Simplifying constant integer cast 4
Simplifying constant pointer cast (byte*) 1024
Simplifying constant pointer cast (byte*) 8192
Simplifying constant integer cast 0
@ -292,86 +367,6 @@ Simplifying constant integer cast 0
Simplifying constant integer cast 5
Simplifying constant integer cast 8
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 6
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 7
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 4
Simplifying constant integer cast 7
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 1
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 7
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 7
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 6
Simplifying constant integer cast 3
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 7
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 3
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 7
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 4
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 7
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 4
Simplifying constant integer cast 7
Simplifying constant integer cast 7
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 4
Simplifying constant integer cast 4
Simplifying constant integer cast $3fff
Simplifying constant integer cast 4
Simplifying constant integer cast 4
@ -421,22 +416,19 @@ Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) init_font_hex::$3 [19] if((byte) init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3
Simple Condition (bool~) init_font_hex::$4 [29] if((byte) init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2
Simple Condition (bool~) init_font_hex::$5 [34] if((byte) init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1
Simple Condition (bool~) main::$2 [62] if((byte) main::c#1!=rangelast(0,$ff)) goto main::@1
Simple Condition (bool~) main::$2 [61] if((byte) main::c#1!=rangelast(0,$ff)) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Identified constant from value list (byte[]) { (byte) 2, (byte) 5, (byte) 5, (byte) 5, (byte) 2, (byte) 6, (byte) 2, (byte) 2, (byte) 2, (byte) 7, (byte) 6, (byte) 1, (byte) 2, (byte) 4, (byte) 7, (byte) 6, (byte) 1, (byte) 2, (byte) 1, (byte) 6, (byte) 5, (byte) 5, (byte) 7, (byte) 1, (byte) 1, (byte) 7, (byte) 4, (byte) 6, (byte) 1, (byte) 6, (byte) 3, (byte) 4, (byte) 6, (byte) 5, (byte) 2, (byte) 7, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 2, (byte) 5, (byte) 2, (byte) 5, (byte) 2, (byte) 2, (byte) 5, (byte) 3, (byte) 1, (byte) 1, (byte) 2, (byte) 5, (byte) 7, (byte) 5, (byte) 5, (byte) 6, (byte) 5, (byte) 6, (byte) 5, (byte) 6, (byte) 2, (byte) 5, (byte) 4, (byte) 5, (byte) 2, (byte) 6, (byte) 5, (byte) 5, (byte) 5, (byte) 6, (byte) 7, (byte) 4, (byte) 6, (byte) 4, (byte) 7, (byte) 7, (byte) 4, (byte) 6, (byte) 4, (byte) 4 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const byte*) init_font_hex::proto_hi#0 = FONT_HEX_PROTO
Constant (const byte) init_font_hex::c#0 = 0
Constant (const byte*) init_font_hex::proto_lo#0 = FONT_HEX_PROTO
Constant (const byte) init_font_hex::c1#0 = 0
Constant (const byte) init_font_hex::idx#0 = 0
Constant (const byte) init_font_hex::i#0 = 0
Constant (const byte[]) FONT_HEX_PROTO = { 2, 5, 5, 5, 2, 6, 2, 2, 2, 7, 6, 1, 2, 4, 7, 6, 1, 2, 1, 6, 5, 5, 7, 1, 1, 7, 4, 6, 1, 6, 3, 4, 6, 5, 2, 7, 1, 1, 1, 1, 2, 5, 2, 5, 2, 2, 5, 3, 1, 1, 2, 5, 7, 5, 5, 6, 5, 6, 5, 6, 2, 5, 4, 5, 2, 6, 5, 5, 5, 6, 7, 4, 6, 4, 7, 7, 4, 6, 4, 4 }
Constant (const byte*) main::toD0181_screen#0 = SCREEN
Constant (const byte*) main::toD0181_gfx#0 = CHARSET
Constant (const byte*) init_font_hex::charset#1 = CHARSET
Constant (const byte) main::c#0 = 0
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte*) init_font_hex::proto_hi#0 = FONT_HEX_PROTO
Constant (const byte*) init_font_hex::proto_lo#0 = FONT_HEX_PROTO
Constant (const word) main::toD0181_$0 = (word)main::toD0181_screen#0
Constant (const word) main::toD0181_$4 = (word)main::toD0181_gfx#0
Successful SSA optimization Pass2ConstantIdentification
@ -446,8 +438,8 @@ Resolved ranged next value [27] init_font_hex::c1#1 ← ++ init_font_hex::c1#4 t
Resolved ranged comparison value [29] if(init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 to (number) $10
Resolved ranged next value [32] init_font_hex::c#1 ← ++ init_font_hex::c#6 to ++
Resolved ranged comparison value [34] if(init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 to (number) $10
Resolved ranged next value [60] main::c#1 ← ++ main::c#2 to ++
Resolved ranged comparison value [62] if(main::c#1!=rangelast(0,$ff)) goto main::@1 to (number) 0
Resolved ranged next value [59] main::c#1 ← ++ main::c#2 to ++
Resolved ranged comparison value [61] if(main::c#1!=rangelast(0,$ff)) goto main::@1 to (number) 0
Simplifying expression containing zero init_font_hex::charset#2 in [8] *((byte*) init_font_hex::charset#2 + (const byte) init_font_hex::idx#0) ← (byte) 0
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused variable (byte) init_font_hex::idx#4 and assignment [15] (byte) init_font_hex::idx#4 ← ++ (byte) init_font_hex::idx#3
@ -491,13 +483,13 @@ Constant right-side identified [22] (byte) main::toD0181_return#0 ← (const byt
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::toD0181_return#0 = main::toD0181_$3|main::toD0181_$7
Successful SSA optimization Pass2ConstantIdentification
Inlining constant with var siblings (const byte*) init_font_hex::proto_hi#0
Inlining constant with var siblings (const byte) init_font_hex::c#0
Inlining constant with var siblings (const byte*) init_font_hex::proto_lo#0
Inlining constant with var siblings (const byte) init_font_hex::c1#0
Inlining constant with var siblings (const byte) init_font_hex::idx#0
Inlining constant with var siblings (const byte) init_font_hex::i#0
Inlining constant with var siblings (const byte*) init_font_hex::charset#1
Inlining constant with var siblings (const byte*) init_font_hex::proto_hi#0
Inlining constant with var siblings (const byte*) init_font_hex::proto_lo#0
Inlining constant with var siblings (const byte) init_font_hex::idx#1
Inlining constant with var siblings (const byte) main::c#0
Constant inlined main::toD0181_screen#0 = (const byte*) SCREEN
@ -527,7 +519,6 @@ Added new block during phi lifting init_font_hex::@8(between init_font_hex::@4 a
Added new block during phi lifting init_font_hex::@9(between init_font_hex::@3 and init_font_hex::@3)
Added new block during phi lifting main::@5(between main::@1 and main::@1)
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @9
Adding NOP phi() at start of @10
Adding NOP phi() at start of @11
Adding NOP phi() at start of @end
@ -537,22 +528,21 @@ Adding NOP phi() at start of main::toD0181_@return
Adding NOP phi() at start of main::@4
Adding NOP phi() at start of init_font_hex
CALL GRAPH
Calls in [] to main:3
Calls in [main] to init_font_hex:10
Calls in [] to main:2
Calls in [main] to init_font_hex:9
Created 9 initial phi equivalence classes
Coalesced [17] main::c#3 ← main::c#1
Coalesced [20] init_font_hex::charset#9 ← init_font_hex::charset#5
Coalesced [42] init_font_hex::charset#8 ← init_font_hex::charset#0
Coalesced [43] init_font_hex::proto_hi#7 ← init_font_hex::proto_hi#1
Coalesced [44] init_font_hex::c#7 ← init_font_hex::c#1
Coalesced (already) [45] init_font_hex::charset#10 ← init_font_hex::charset#0
Coalesced [46] init_font_hex::proto_lo#5 ← init_font_hex::proto_lo#1
Coalesced [47] init_font_hex::c1#5 ← init_font_hex::c1#1
Coalesced [48] init_font_hex::i#3 ← init_font_hex::i#1
Coalesced [49] init_font_hex::idx#7 ← init_font_hex::idx#2
Coalesced [16] main::c#3 ← main::c#1
Coalesced [19] init_font_hex::charset#9 ← init_font_hex::charset#5
Coalesced [41] init_font_hex::charset#8 ← init_font_hex::charset#0
Coalesced [42] init_font_hex::proto_hi#7 ← init_font_hex::proto_hi#1
Coalesced [43] init_font_hex::c#7 ← init_font_hex::c#1
Coalesced (already) [44] init_font_hex::charset#10 ← init_font_hex::charset#0
Coalesced [45] init_font_hex::proto_lo#5 ← init_font_hex::proto_lo#1
Coalesced [46] init_font_hex::c1#5 ← init_font_hex::c1#1
Coalesced [47] init_font_hex::i#3 ← init_font_hex::i#1
Coalesced [48] init_font_hex::idx#7 ← init_font_hex::idx#2
Coalesced down to 8 phi equivalence classes
Culled Empty Block (label) @9
Culled Empty Block (label) @11
Culled Empty Block (label) main::toD0181_@return
Culled Empty Block (label) main::@4

View File

@ -12,7 +12,7 @@ CONTROL FLOW GRAPH SSA
@begin: scope:[] from
(void()*~) $0 ← & (void()) fn1()
(void()*~) $1 ← & (void()) fn2()
(void()*[2]) fns ← { (void()*~) $0, (void()*~) $1 }
(void()*[2]) fns ← { (void()*)(void()*~) $0, (void()*)(void()*~) $1 }
to:@3
(void()) main()
@ -95,6 +95,8 @@ Inlining cast (byte) main::i#0 ← (unumber)(number) 0
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 53280
Simplifying constant pointer cast (byte*) 53281
Simplifying constant integer cast (void()*~) $0
Simplifying constant integer cast (void()*~) $1
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Successful SSA optimization PassNCastSimplification

View File

@ -7,7 +7,6 @@ Identified constant variable (byte*) CHARSET4
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
(byte[]) bits_count ← { (number) 0, (number) 1, (number) 1, (number) 2, (number) 1, (number) 2, (number) 2, (number) 3, (number) 1, (number) 2, (number) 2, (number) 3, (number) 2, (number) 3, (number) 3, (number) 4 }
to:@1
(void()) main()
@ -29,7 +28,7 @@ main::@1: scope:[main] from main main::@5
(number~) main::$4 ← (number~) main::$1 | (number~) main::$3
(number~) main::$5 ← (number~) main::$4 / (number) 2
(number~) main::$6 ← (number~) main::$5 / (number) 4
(byte) main::bits#0 ← *((byte[]) bits_count + (number~) main::$6)
(byte) main::bits#0 ← *((const byte[]) bits_count + (number~) main::$6)
(bool~) main::$7 ← (byte) main::bits#0 >= (number) 2
(bool~) main::$8 ← ! (bool~) main::$7
if((bool~) main::$8) goto main::@2
@ -46,7 +45,7 @@ main::@2: scope:[main] from main::@1 main::@6
(number~) main::$13 ← (number~) main::$12 / (number) 4
(number~) main::$14 ← (number~) main::$11 | (number~) main::$13
(number~) main::$15 ← (number~) main::$14 / (number) 2
(byte) main::bits#1 ← *((byte[]) bits_count + (number~) main::$15)
(byte) main::bits#1 ← *((const byte[]) bits_count + (number~) main::$15)
(bool~) main::$16 ← (byte) main::bits#1 >= (number) 2
(bool~) main::$17 ← ! (bool~) main::$16
if((bool~) main::$17) goto main::@3
@ -71,7 +70,7 @@ main::@3: scope:[main] from main::@2 main::@7
(number~) main::$22 ← *((byte*) main::chargen1#2) & (number) 6
(number~) main::$23 ← (number~) main::$22 / (number) 2
(number~) main::$24 ← (number~) main::$21 | (number~) main::$23
(byte) main::bits#2 ← *((byte[]) bits_count + (number~) main::$24)
(byte) main::bits#2 ← *((const byte[]) bits_count + (number~) main::$24)
(bool~) main::$25 ← (byte) main::bits#2 >= (number) 2
(bool~) main::$26 ← ! (bool~) main::$25
if((bool~) main::$26) goto main::@4
@ -95,7 +94,7 @@ main::@4: scope:[main] from main::@3 main::@8
(number~) main::$30 ← (number~) main::$29 * (number) 4
(number~) main::$31 ← *((byte*) main::chargen1#3) & (number) 1
(number~) main::$32 ← (number~) main::$30 | (number~) main::$31
(byte) main::bits#3 ← *((byte[]) bits_count + (number~) main::$32)
(byte) main::bits#3 ← *((const byte[]) bits_count + (number~) main::$32)
(bool~) main::$33 ← (byte) main::bits#3 >= (number) 2
(bool~) main::$34 ← ! (bool~) main::$33
if((bool~) main::$34) goto main::@5
@ -164,7 +163,7 @@ SYMBOL TABLE SSA
(const byte*) D018 = (byte*)(number) $d018
(const byte*) PROCPORT = (byte*)(number) 1
(const byte*) SCREEN = (byte*)(number) $400
(byte[]) bits_count
(const byte[]) bits_count = { (byte)(number) 0, (byte)(number) 1, (byte)(number) 1, (byte)(number) 2, (byte)(number) 1, (byte)(number) 2, (byte)(number) 2, (byte)(number) 3, (byte)(number) 1, (byte)(number) 2, (byte)(number) 2, (byte)(number) 3, (byte)(number) 2, (byte)(number) 3, (byte)(number) 3, (byte)(number) 4 }
(void()) main()
(byte*~) main::$0
(number~) main::$1
@ -344,18 +343,11 @@ Adding number conversion cast (unumber) main::$35 in (number~) main::$35 ← (by
Adding number conversion cast (unumber) $37 in *((const byte*) PROCPORT) ← (number) $37
Adding number conversion cast (unumber) $19 in *((const byte*) D018) ← (number) $19
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (byte[]) bits_count ← (byte[]){ (byte)(number) 0, (byte)(number) 1, (byte)(number) 1, (byte)(number) 2, (byte)(number) 1, (byte)(number) 2, (byte)(number) 2, (byte)(number) 3, (byte)(number) 1, (byte)(number) 2, (byte)(number) 2, (byte)(number) 3, (byte)(number) 2, (byte)(number) 3, (byte)(number) 3, (byte)(number) 4 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast *((const byte*) PROCPORT) ← (unumber)(number) $32
Inlining cast (byte) main::bits_gen#0 ← (unumber)(number) 0
Inlining cast *((const byte*) PROCPORT) ← (unumber)(number) $37
Inlining cast *((const byte*) D018) ← (unumber)(number) $19
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Simplifying constant pointer cast (byte*) 53248
Simplifying constant pointer cast (byte*) 1
Simplifying constant pointer cast (byte*) 53272
Simplifying constant pointer cast (byte*) 10240
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 1
@ -372,6 +364,11 @@ Simplifying constant integer cast 2
Simplifying constant integer cast 3
Simplifying constant integer cast 3
Simplifying constant integer cast 4
Simplifying constant pointer cast (byte*) 1024
Simplifying constant pointer cast (byte*) 53248
Simplifying constant pointer cast (byte*) 1
Simplifying constant pointer cast (byte*) 53272
Simplifying constant pointer cast (byte*) 10240
Simplifying constant integer cast $32
Simplifying constant integer cast 0
Simplifying constant integer cast 1
@ -472,10 +469,10 @@ Inferred type updated to byte in (unumber~) main::$32 ← (byte~) main::$30 | (b
Inferred type updated to byte in (unumber~) main::$27 ← (byte) main::bits_gen#14 + (byte) 1
Inferred type updated to byte in (unumber~) main::$36 ← (byte) main::bits_gen#15 * (byte) 2
Inferred type updated to byte in (unumber~) main::$35 ← (byte) main::bits_gen#16 + (byte) 1
Inversing boolean not [17] (bool~) main::$8 ← (byte) main::bits#0 < (byte) 2 from [16] (bool~) main::$7 ← (byte) main::bits#0 >= (byte) 2
Inversing boolean not [29] (bool~) main::$17 ← (byte) main::bits#1 < (byte) 2 from [28] (bool~) main::$16 ← (byte) main::bits#1 >= (byte) 2
Inversing boolean not [44] (bool~) main::$26 ← (byte) main::bits#2 < (byte) 2 from [43] (bool~) main::$25 ← (byte) main::bits#2 >= (byte) 2
Inversing boolean not [58] (bool~) main::$34 ← (byte) main::bits#3 < (byte) 2 from [57] (bool~) main::$33 ← (byte) main::bits#3 >= (byte) 2
Inversing boolean not [16] (bool~) main::$8 ← (byte) main::bits#0 < (byte) 2 from [15] (bool~) main::$7 ← (byte) main::bits#0 >= (byte) 2
Inversing boolean not [28] (bool~) main::$17 ← (byte) main::bits#1 < (byte) 2 from [27] (bool~) main::$16 ← (byte) main::bits#1 >= (byte) 2
Inversing boolean not [43] (bool~) main::$26 ← (byte) main::bits#2 < (byte) 2 from [42] (bool~) main::$25 ← (byte) main::bits#2 >= (byte) 2
Inversing boolean not [57] (bool~) main::$34 ← (byte) main::bits#3 < (byte) 2 from [56] (bool~) main::$33 ← (byte) main::bits#3 >= (byte) 2
Successful SSA optimization Pass2UnaryNotSimplification
Alias (byte*) main::chargen1#0 = (byte*~) main::$0 (byte*) main::chargen1#4
Alias (byte) main::bits_gen#1 = (byte~) main::$10 (byte) main::bits_gen#12
@ -503,27 +500,24 @@ Alias (byte*) main::chargen#10 = (byte*) main::chargen#3 (byte*) main::chargen#2
Alias (byte*) main::chargen1#0 = (byte*) main::chargen1#1 (byte*) main::chargen1#2 (byte*) main::chargen1#3
Alias (byte*) main::charset4#10 = (byte*) main::charset4#7 (byte*) main::charset4#5 (byte*) main::charset4#3 (byte*) main::charset4#2
Successful SSA optimization Pass2AliasElimination
Simple Condition (bool~) main::$8 [18] if((byte) main::bits#0<(byte) 2) goto main::@2
Simple Condition (bool~) main::$17 [30] if((byte) main::bits#1<(byte) 2) goto main::@3
Simple Condition (bool~) main::$26 [45] if((byte) main::bits#2<(byte) 2) goto main::@4
Simple Condition (bool~) main::$34 [59] if((byte) main::bits#3<(byte) 2) goto main::@5
Simple Condition (bool~) main::$39 [72] if((byte*) main::chargen#1<(byte*~) main::$38) goto main::@1
Simple Condition (bool~) main::$40 [83] if((byte) main::i#1!=rangelast(0,$ff)) goto main::@11
Simple Condition (bool~) main::$8 [17] if((byte) main::bits#0<(byte) 2) goto main::@2
Simple Condition (bool~) main::$17 [29] if((byte) main::bits#1<(byte) 2) goto main::@3
Simple Condition (bool~) main::$26 [44] if((byte) main::bits#2<(byte) 2) goto main::@4
Simple Condition (bool~) main::$34 [58] if((byte) main::bits#3<(byte) 2) goto main::@5
Simple Condition (bool~) main::$39 [71] if((byte*) main::chargen#1<(byte*~) main::$38) goto main::@1
Simple Condition (bool~) main::$40 [82] if((byte) main::i#1!=rangelast(0,$ff)) goto main::@11
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant right-side identified [70] (byte*~) main::$38 ← (const byte*) CHARGEN + (word) $800
Constant right-side identified [69] (byte*~) main::$38 ← (const byte*) CHARGEN + (word) $800
Successful SSA optimization Pass2ConstantRValueConsolidation
Identified constant from value list (byte[]) { (byte) 0, (byte) 1, (byte) 1, (byte) 2, (byte) 1, (byte) 2, (byte) 2, (byte) 3, (byte) 1, (byte) 2, (byte) 2, (byte) 3, (byte) 2, (byte) 3, (byte) 3, (byte) 4 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const byte[]) bits_count = { 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4 }
Constant (const byte*) main::chargen#0 = CHARGEN
Constant (const byte*) main::charset4#0 = CHARSET4
Constant (const byte) main::bits_gen#0 = 0
Constant (const byte*) main::$38 = CHARGEN+$800
Constant (const byte) main::i#0 = 0
Successful SSA optimization Pass2ConstantIdentification
Resolved ranged next value [81] main::i#1 ← ++ main::i#2 to ++
Resolved ranged comparison value [83] if(main::i#1!=rangelast(0,$ff)) goto main::@11 to (number) 0
Simplifying expression containing zero 1 in [32] (byte) main::bits_gen#2 ← (const byte) main::bits_gen#0 + (byte) 1
Resolved ranged next value [80] main::i#1 ← ++ main::i#2 to ++
Resolved ranged comparison value [82] if(main::i#1!=rangelast(0,$ff)) goto main::@11 to (number) 0
Simplifying expression containing zero 1 in [31] (byte) main::bits_gen#2 ← (const byte) main::bits_gen#0 + (byte) 1
Successful SSA optimization PassNSimplifyExpressionWithZero
Adding number conversion cast (unumber) 0 in if((byte) main::i#1!=(number) 0) goto main::@11
Successful SSA optimization PassNAddNumberTypeConversions

View File

@ -2,8 +2,8 @@ Setting inferred volatile on symbol affected by address-of (byte**~) utoa16w::$2
Setting inferred volatile on symbol affected by address-of (byte**~) utoa16w::$6 ← & (byte*) utoa16w::dst
Setting inferred volatile on symbol affected by address-of (byte**~) utoa16w::$10 ← & (byte*) utoa16w::dst
Setting inferred volatile on symbol affected by address-of (byte**~) utoa16w::$14 ← & (byte*) utoa16w::dst
Fixing pointer array-indexing *((word[]) UTOA10_SUB + (byte) utoa10w::i)
Fixing pointer array-indexing *((word[]) UTOA10_SUB + (byte) utoa10w::i)
Fixing pointer array-indexing *((const word[]) UTOA10_SUB + (byte) utoa10w::i)
Fixing pointer array-indexing *((const word[]) UTOA10_SUB + (byte) utoa10w::i)
Identified constant variable (byte*) cls::screen
Culled Empty Block (label) main::@2
Culled Empty Block (label) main::@13
@ -16,6 +16,7 @@ Culled Empty Block (label) main::@11
Culled Empty Block (label) main::@12
Culled Empty Block (label) @1
Culled Empty Block (label) cls::@2
Culled Empty Block (label) @2
Culled Empty Block (label) utoa10w::@1
Culled Empty Block (label) utoa10w::@5
Culled Empty Block (label) utoa10w::@6
@ -26,7 +27,7 @@ Culled Empty Block (label) utoa16n::@5
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
to:@2
to:@5
(void()) main()
main: scope:[main] from @5
@ -140,10 +141,6 @@ cls::@1: scope:[cls] from cls cls::@1
cls::@return: scope:[cls] from cls::@1
return
to:@return
@2: scope:[] from @begin
(word[]) UTOA10_SUB ← { (number) $7530, (number) $2710, (number) $bb8, (number) $3e8, (number) $12c, (number) $64, (number) $1e, (number) $a }
(byte[]) UTOA10_VAL ← { (number) 3, (number) 1, (number) 3, (number) 1, (number) 3, (number) 1, (number) 3, (number) 1 }
to:@5
(void()) utoa10w((word) utoa10w::value , (byte*) utoa10w::dst)
utoa10w: scope:[utoa10w] from main::@20
@ -160,7 +157,7 @@ utoa10w::@2: scope:[utoa10w] from utoa10w utoa10w::@10 utoa10w::@3
(word) utoa10w::value#2 ← phi( utoa10w/(word) utoa10w::value#5 utoa10w::@10/(word) utoa10w::value#6 utoa10w::@3/(word) utoa10w::value#1 )
(byte) utoa10w::i#2 ← phi( utoa10w/(byte) utoa10w::i#0 utoa10w::@10/(byte) utoa10w::i#1 utoa10w::@3/(byte) utoa10w::i#3 )
(byte~) utoa10w::$8 ← (byte) utoa10w::i#2 * (const byte) SIZEOF_WORD
(bool~) utoa10w::$1 ← (word) utoa10w::value#2 >= *((word[]) UTOA10_SUB + (byte~) utoa10w::$8)
(bool~) utoa10w::$1 ← (word) utoa10w::value#2 >= *((const word[]) UTOA10_SUB + (byte~) utoa10w::$8)
if((bool~) utoa10w::$1) goto utoa10w::@3
to:utoa10w::@4
utoa10w::@3: scope:[utoa10w] from utoa10w::@2
@ -168,9 +165,9 @@ utoa10w::@3: scope:[utoa10w] from utoa10w::@2
(word) utoa10w::value#3 ← phi( utoa10w::@2/(word) utoa10w::value#2 )
(byte) utoa10w::i#3 ← phi( utoa10w::@2/(byte) utoa10w::i#2 )
(byte) utoa10w::digit#3 ← phi( utoa10w::@2/(byte) utoa10w::digit#5 )
(byte) utoa10w::digit#1 ← (byte) utoa10w::digit#3 + *((byte[]) UTOA10_VAL + (byte) utoa10w::i#3)
(byte) utoa10w::digit#1 ← (byte) utoa10w::digit#3 + *((const byte[]) UTOA10_VAL + (byte) utoa10w::i#3)
(byte~) utoa10w::$9 ← (byte) utoa10w::i#3 * (const byte) SIZEOF_WORD
(word) utoa10w::value#1 ← (word) utoa10w::value#3 - *((word[]) UTOA10_SUB + (byte~) utoa10w::$9)
(word) utoa10w::value#1 ← (word) utoa10w::value#3 - *((const word[]) UTOA10_SUB + (byte~) utoa10w::$9)
(byte) utoa10w::bStarted#1 ← (number) 1
to:utoa10w::@2
utoa10w::@4: scope:[utoa10w] from utoa10w::@2
@ -337,7 +334,7 @@ utoa16n::@return: scope:[utoa16n] from utoa16n::@2
(byte) utoa16n::return#5 ← (byte) utoa16n::return#9
return
to:@return
@5: scope:[] from @2
@5: scope:[] from @begin
call main
to:@6
@6: scope:[] from @5
@ -345,15 +342,14 @@ utoa16n::@return: scope:[utoa16n] from utoa16n::@2
@end: scope:[] from @6
SYMBOL TABLE SSA
(label) @2
(label) @5
(label) @6
(label) @begin
(label) @end
(const byte[]) DIGITS = (string) "0123456789abcdef"
(const byte) SIZEOF_WORD = (byte) 2
(word[]) UTOA10_SUB
(byte[]) UTOA10_VAL
(const word[]) UTOA10_SUB = { (word)(number) $7530, (word)(number) $2710, (word)(number) $bb8, (word)(number) $3e8, (word)(number) $12c, (word)(number) $64, (word)(number) $1e, (word)(number) $a }
(const byte[]) UTOA10_VAL = { (byte)(number) 3, (byte)(number) 1, (byte)(number) 3, (byte)(number) 1, (byte)(number) 3, (byte)(number) 1, (byte)(number) 3, (byte)(number) 1 }
(const byte*) bordercol = (byte*)(number) $d020
(void()) cls()
(byte*~) cls::$0
@ -639,9 +635,6 @@ Adding number conversion cast (unumber) 0 in (bool~) utoa16n::$0 ← (byte) utoa
Adding number conversion cast (unumber) 0 in (bool~) utoa16n::$2 ← (byte) utoa16n::started#5 != (number) 0
Adding number conversion cast (unumber) 1 in (byte) utoa16n::started#4 ← (number) 1
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (word[]) UTOA10_SUB ← (word[]){ (word)(number) $7530, (word)(number) $2710, (word)(number) $bb8, (word)(number) $3e8, (word)(number) $12c, (word)(number) $64, (word)(number) $1e, (word)(number) $a }
Added casts to value list in (byte[]) UTOA10_VAL ← (byte[]){ (byte)(number) 3, (byte)(number) 1, (byte)(number) 3, (byte)(number) 1, (byte)(number) 3, (byte)(number) 1, (byte)(number) 3, (byte)(number) 1 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (byte*) main::screen#0 ← (byte*)(number) $400
Inlining cast *((const byte*) bordercol) ← (unumber)(number) 1
Inlining cast (word) utoa16w::value#0 ← (unumber)(number) 0
@ -667,6 +660,22 @@ Simplifying constant pointer cast (byte*) 53265
Simplifying constant pointer cast (byte*) 53266
Simplifying constant pointer cast (byte*) 53280
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast $7530
Simplifying constant integer cast $2710
Simplifying constant integer cast $bb8
Simplifying constant integer cast $3e8
Simplifying constant integer cast $12c
Simplifying constant integer cast $64
Simplifying constant integer cast $1e
Simplifying constant integer cast $a
Simplifying constant integer cast 3
Simplifying constant integer cast 1
Simplifying constant integer cast 3
Simplifying constant integer cast 1
Simplifying constant integer cast 3
Simplifying constant integer cast 1
Simplifying constant integer cast 3
Simplifying constant integer cast 1
Simplifying constant integer cast $80
Simplifying constant integer cast 1
Simplifying constant integer cast $30
@ -688,22 +697,6 @@ Simplifying constant integer cast 0
Simplifying constant integer cast $50
Simplifying constant integer cast 3
Simplifying constant integer cast $3e7
Simplifying constant integer cast $7530
Simplifying constant integer cast $2710
Simplifying constant integer cast $bb8
Simplifying constant integer cast $3e8
Simplifying constant integer cast $12c
Simplifying constant integer cast $64
Simplifying constant integer cast $1e
Simplifying constant integer cast $a
Simplifying constant integer cast 3
Simplifying constant integer cast 1
Simplifying constant integer cast 3
Simplifying constant integer cast 1
Simplifying constant integer cast 3
Simplifying constant integer cast 1
Simplifying constant integer cast 3
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 1
@ -767,10 +760,10 @@ Inferred type updated to byte in (unumber~) main::$3 ← (byte~) main::$1 | (byt
Inferred type updated to byte in (unumber~) utoa10w::$2 ← (byte) utoa10w::i#4 & (byte) 1
Inferred type updated to byte in (unumber~) utoa16w::$5 ← (byte~) utoa16w::$4 & (byte) $f
Inferred type updated to byte in (unumber~) utoa16w::$13 ← (byte~) utoa16w::$12 & (byte) $f
Inversing boolean not [86] (bool~) utoa10w::$4 ← (byte~) utoa10w::$2 == (byte) 0 from [85] (bool~) utoa10w::$3 ← (byte~) utoa10w::$2 != (byte) 0
Inversing boolean not [94] (bool~) utoa10w::$6 ← (byte) utoa10w::bStarted#2 == (byte) 0 from [93] (bool~) utoa10w::$5 ← (byte) utoa10w::bStarted#2 != (byte) 0
Inversing boolean not [155] (bool~) utoa16n::$1 ← (byte) utoa16n::nybble#4 == (byte) 0 from [154] (bool~) utoa16n::$0 ← (byte) utoa16n::nybble#4 != (byte) 0
Inversing boolean not [159] (bool~) utoa16n::$3 ← (byte) utoa16n::started#5 == (byte) 0 from [158] (bool~) utoa16n::$2 ← (byte) utoa16n::started#5 != (byte) 0
Inversing boolean not [84] (bool~) utoa10w::$4 ← (byte~) utoa10w::$2 == (byte) 0 from [83] (bool~) utoa10w::$3 ← (byte~) utoa10w::$2 != (byte) 0
Inversing boolean not [92] (bool~) utoa10w::$6 ← (byte) utoa10w::bStarted#2 == (byte) 0 from [91] (bool~) utoa10w::$5 ← (byte) utoa10w::bStarted#2 != (byte) 0
Inversing boolean not [153] (bool~) utoa16n::$1 ← (byte) utoa16n::nybble#4 == (byte) 0 from [152] (bool~) utoa16n::$0 ← (byte) utoa16n::nybble#4 != (byte) 0
Inversing boolean not [157] (bool~) utoa16n::$3 ← (byte) utoa16n::started#5 == (byte) 0 from [156] (bool~) utoa16n::$2 ← (byte) utoa16n::started#5 != (byte) 0
Successful SSA optimization Pass2UnaryNotSimplification
Alias (byte) main::rst#0 = (byte~) main::$3
Alias (byte*) main::screen#0 = (byte*) main::screen#5
@ -832,22 +825,19 @@ Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) main::$4 [8] if((byte) main::rst#0!=(byte) $30) goto main::@4
Simple Condition (bool~) main::$18 [53] if(*((const byte[]) main::msg + (byte) main::i#2)!=(byte) 0) goto main::@7
Simple Condition (bool~) cls::$1 [66] if((byte*) cls::sc#1!=rangelast(cls::screen,cls::$0)) goto cls::@1
Simple Condition (bool~) utoa10w::$1 [77] if((word) utoa10w::value#10>=*((word[]) UTOA10_SUB + (byte~) utoa10w::$8)) goto utoa10w::@3
Simple Condition (bool~) utoa10w::$4 [87] if((byte~) utoa10w::$2==(byte) 0) goto utoa10w::@10
Simple Condition (bool~) utoa10w::$7 [91] if((byte) utoa10w::i#1!=rangelast(0,7)) goto utoa10w::@2
Simple Condition (bool~) utoa10w::$6 [95] if((byte) utoa10w::bStarted#2==(byte) 0) goto utoa10w::@11
Simple Condition (bool~) utoa16n::$1 [156] if((byte) utoa16n::nybble#4==(byte) 0) goto utoa16n::@1
Simple Condition (bool~) utoa16n::$3 [160] if((byte) utoa16n::return#4==(byte) 0) goto utoa16n::@2
Simple Condition (bool~) utoa10w::$1 [75] if((word) utoa10w::value#10>=*((const word[]) UTOA10_SUB + (byte~) utoa10w::$8)) goto utoa10w::@3
Simple Condition (bool~) utoa10w::$4 [85] if((byte~) utoa10w::$2==(byte) 0) goto utoa10w::@10
Simple Condition (bool~) utoa10w::$7 [89] if((byte) utoa10w::i#1!=rangelast(0,7)) goto utoa10w::@2
Simple Condition (bool~) utoa10w::$6 [93] if((byte) utoa10w::bStarted#2==(byte) 0) goto utoa10w::@11
Simple Condition (bool~) utoa16n::$1 [154] if((byte) utoa16n::nybble#4==(byte) 0) goto utoa16n::@1
Simple Condition (bool~) utoa16n::$3 [158] if((byte) utoa16n::return#4==(byte) 0) goto utoa16n::@2
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant right-side identified [60] (byte*~) cls::$0 ← (const byte*) cls::screen + (word) $3e7
Constant right-side identified [111] (word**) utoa16n::dst#0 ← & (byte*) utoa16w::dst#5
Constant right-side identified [122] (word**) utoa16n::dst#1 ← & (byte*) utoa16w::dst#5
Constant right-side identified [133] (word**) utoa16n::dst#2 ← & (byte*) utoa16w::dst#5
Constant right-side identified [144] (word**) utoa16n::dst#3 ← & (byte*) utoa16w::dst#5
Constant right-side identified [109] (word**) utoa16n::dst#0 ← & (byte*) utoa16w::dst#5
Constant right-side identified [120] (word**) utoa16n::dst#1 ← & (byte*) utoa16w::dst#5
Constant right-side identified [131] (word**) utoa16n::dst#2 ← & (byte*) utoa16w::dst#5
Constant right-side identified [142] (word**) utoa16n::dst#3 ← & (byte*) utoa16w::dst#5
Successful SSA optimization Pass2ConstantRValueConsolidation
Identified constant from value list (word[]) { (word) $7530, (word) $2710, (word) $bb8, (word) $3e8, (word) $12c, (word) $64, (word) $1e, (word) $a }
Identified constant from value list (byte[]) { (byte) 3, (byte) 1, (byte) 3, (byte) 1, (byte) 3, (byte) 1, (byte) 3, (byte) 1 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const byte*) main::screen#0 = (byte*) 1024
Constant (const word) utoa16w::value#0 = 0
Constant (const word) utoa16w::value#1 = $4d2
@ -857,8 +847,6 @@ Constant (const word) utoa16w::value#4 = $e608
Constant (const byte) main::i#0 = 0
Constant (const byte*) cls::$0 = cls::screen+$3e7
Constant (const byte*) cls::sc#0 = cls::screen
Constant (const word[]) UTOA10_SUB = { $7530, $2710, $bb8, $3e8, $12c, $64, $1e, $a }
Constant (const byte[]) UTOA10_VAL = { 3, 1, 3, 1, 3, 1, 3, 1 }
Constant (const byte) utoa10w::bStarted#0 = 0
Constant (const byte) utoa10w::digit#0 = 0
Constant (const byte) utoa10w::i#0 = 0
@ -878,8 +866,8 @@ if() condition always true - replacing block destination [2] if(true) goto main:
Successful SSA optimization Pass2ConstantIfs
Resolved ranged next value [64] cls::sc#1 ← ++ cls::sc#2 to ++
Resolved ranged comparison value [66] if(cls::sc#1!=rangelast(cls::screen,cls::$0)) goto cls::@1 to (byte*)(const byte*) cls::$0+(number) 1
Resolved ranged next value [89] utoa10w::i#1 ← ++ utoa10w::i#2 to ++
Resolved ranged comparison value [91] if(utoa10w::i#1!=rangelast(0,7)) goto utoa10w::@2 to (number) 8
Resolved ranged next value [87] utoa10w::i#1 ← ++ utoa10w::i#2 to ++
Resolved ranged comparison value [89] if(utoa10w::i#1!=rangelast(0,7)) goto utoa10w::@2 to (number) 8
Eliminating unused variable (byte) utoa16w::started#3 and assignment [81] (byte) utoa16w::started#3 ← (byte) utoa16n::return#2
Eliminating unused variable (byte) utoa16n::return#3 and assignment [85] (byte) utoa16n::return#3 ← (byte) utoa16n::return#4
Successful SSA optimization PassNEliminateUnusedVars
@ -992,7 +980,6 @@ Added new block during phi lifting utoa10w::@14(between utoa10w::@4 and utoa10w:
Added new block during phi lifting utoa10w::@15(between utoa10w::@8 and utoa10w::@11)
Added new block during phi lifting utoa16n::@6(between utoa16n and utoa16n::@1)
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @2
Adding NOP phi() at start of @5
Adding NOP phi() at start of @6
Adding NOP phi() at start of @end
@ -1003,42 +990,41 @@ Adding NOP phi() at start of utoa16n::@3
Adding NOP phi() at start of utoa16n::@2
Adding NOP phi() at start of cls
CALL GRAPH
Calls in [] to main:3
Calls in [main] to cls:7 utoa16w:18 utoa16w:22 utoa16w:26 utoa16w:30 utoa16w:34 utoa10w:39
Calls in [utoa16w] to utoa16n:85 utoa16n:93 utoa16n:101 utoa16n:105
Calls in [] to main:2
Calls in [main] to cls:6 utoa16w:17 utoa16w:21 utoa16w:25 utoa16w:29 utoa16w:33 utoa10w:38
Calls in [utoa16w] to utoa16n:84 utoa16n:92 utoa16n:100 utoa16n:104
Created 15 initial phi equivalence classes
Coalesced [17] utoa16w::dst#14 ← utoa16w::dst#0
Coalesced [21] utoa16w::dst#10 ← utoa16w::dst#1
Coalesced [25] utoa16w::dst#11 ← utoa16w::dst#2
Coalesced [29] utoa16w::dst#12 ← utoa16w::dst#3
Coalesced [33] utoa16w::dst#13 ← utoa16w::dst#4
Coalesced [45] main::i#4 ← main::i#1
Coalesced [46] utoa10w::value#11 ← utoa10w::value#0
Coalesced [55] utoa10w::dst#17 ← utoa10w::dst#1
Coalesced [57] utoa10w::dst#14 ← utoa10w::dst#7
Coalesced [66] utoa10w::i#9 ← utoa10w::i#1
Coalesced (already) [67] utoa10w::value#12 ← utoa10w::value#10
Coalesced [68] utoa10w::digit#9 ← utoa10w::digit#7
Coalesced (already) [69] utoa10w::bStarted#8 ← utoa10w::bStarted#2
Coalesced [70] utoa10w::dst#12 ← utoa10w::dst#4
Coalesced (already) [71] utoa10w::dst#16 ← utoa10w::dst#11
Coalesced (already) [72] utoa10w::dst#15 ← utoa10w::dst#11
Coalesced (already) [73] utoa10w::digit#11 ← utoa10w::digit#3
Coalesced (already) [77] utoa10w::i#10 ← utoa10w::i#2
Coalesced [78] utoa10w::value#13 ← utoa10w::value#1
Coalesced [79] utoa10w::digit#10 ← utoa10w::digit#1
Coalesced (already) [80] utoa10w::dst#13 ← utoa10w::dst#11
Coalesced [84] utoa16n::nybble#8 ← utoa16n::nybble#0
Coalesced [91] utoa16n::nybble#9 ← utoa16n::nybble#1
Coalesced [92] utoa16n::started#9 ← utoa16n::started#1
Coalesced [99] utoa16n::nybble#10 ← utoa16n::nybble#2
Coalesced [100] utoa16n::started#10 ← utoa16n::started#2
Coalesced [104] utoa16n::nybble#11 ← utoa16n::nybble#3
Coalesced [117] utoa16n::return#10 ← utoa16n::started#7
Coalesced [124] cls::sc#3 ← cls::sc#1
Coalesced [16] utoa16w::dst#14 ← utoa16w::dst#0
Coalesced [20] utoa16w::dst#10 ← utoa16w::dst#1
Coalesced [24] utoa16w::dst#11 ← utoa16w::dst#2
Coalesced [28] utoa16w::dst#12 ← utoa16w::dst#3
Coalesced [32] utoa16w::dst#13 ← utoa16w::dst#4
Coalesced [44] main::i#4 ← main::i#1
Coalesced [45] utoa10w::value#11 ← utoa10w::value#0
Coalesced [54] utoa10w::dst#17 ← utoa10w::dst#1
Coalesced [56] utoa10w::dst#14 ← utoa10w::dst#7
Coalesced [65] utoa10w::i#9 ← utoa10w::i#1
Coalesced (already) [66] utoa10w::value#12 ← utoa10w::value#10
Coalesced [67] utoa10w::digit#9 ← utoa10w::digit#7
Coalesced (already) [68] utoa10w::bStarted#8 ← utoa10w::bStarted#2
Coalesced [69] utoa10w::dst#12 ← utoa10w::dst#4
Coalesced (already) [70] utoa10w::dst#16 ← utoa10w::dst#11
Coalesced (already) [71] utoa10w::dst#15 ← utoa10w::dst#11
Coalesced (already) [72] utoa10w::digit#11 ← utoa10w::digit#3
Coalesced (already) [76] utoa10w::i#10 ← utoa10w::i#2
Coalesced [77] utoa10w::value#13 ← utoa10w::value#1
Coalesced [78] utoa10w::digit#10 ← utoa10w::digit#1
Coalesced (already) [79] utoa10w::dst#13 ← utoa10w::dst#11
Coalesced [83] utoa16n::nybble#8 ← utoa16n::nybble#0
Coalesced [90] utoa16n::nybble#9 ← utoa16n::nybble#1
Coalesced [91] utoa16n::started#9 ← utoa16n::started#1
Coalesced [98] utoa16n::nybble#10 ← utoa16n::nybble#2
Coalesced [99] utoa16n::started#10 ← utoa16n::started#2
Coalesced [103] utoa16n::nybble#11 ← utoa16n::nybble#3
Coalesced [116] utoa16n::return#10 ← utoa16n::started#7
Coalesced [123] cls::sc#3 ← cls::sc#1
Coalesced down to 11 phi equivalence classes
Culled Empty Block (label) @2
Culled Empty Block (label) @6
Culled Empty Block (label) main::@15
Culled Empty Block (label) main::@1

View File

@ -2,7 +2,6 @@ Culled Empty Block (label) main::@2
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
(byte[]) chars ← { (number) 1, (number) 2, (number) 3 }
to:@1
(void()) main()
@ -13,7 +12,7 @@ main: scope:[main] from @1
main::@1: scope:[main] from main main::@1
(byte) main::idx#2 ← phi( main/(byte) main::idx#0 main::@1/(byte) main::idx#1 )
(byte) main::i#2 ← phi( main/(byte) main::i#0 main::@1/(byte) main::i#1 )
*((const byte*) main::SCREEN + (byte) main::idx#2) ← *((byte[]) chars + (byte) main::i#2)
*((const byte*) main::SCREEN + (byte) main::idx#2) ← *((const byte[]) chars + (byte) main::i#2)
(byte) main::idx#1 ← ++ (byte) main::idx#2
(byte) main::i#1 ← (byte) main::i#2 + rangenext(0,2)
(bool~) main::$0 ← (byte) main::i#1 != rangelast(0,2)
@ -34,7 +33,7 @@ SYMBOL TABLE SSA
(label) @2
(label) @begin
(label) @end
(byte[]) chars
(const byte[]) chars = { (byte)(number) 1, (byte)(number) 2, (byte)(number) 3 }
(void()) main()
(bool~) main::$0
(label) main::@1
@ -51,28 +50,23 @@ SYMBOL TABLE SSA
Adding number conversion cast (unumber) 0 in (byte) main::idx#0 ← (number) 0
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (byte[]) chars ← (byte[]){ (byte)(number) 1, (byte)(number) 2, (byte)(number) 3 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (byte) main::idx#0 ← (unumber)(number) 0
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 3
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Simple Condition (bool~) main::$0 [8] if((byte) main::i#1!=rangelast(0,2)) goto main::@1
Simple Condition (bool~) main::$0 [7] if((byte) main::i#1!=rangelast(0,2)) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Identified constant from value list (byte[]) { (byte) 1, (byte) 2, (byte) 3 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const byte[]) chars = { 1, 2, 3 }
Constant (const byte) main::idx#0 = 0
Constant (const byte) main::i#0 = 0
Successful SSA optimization Pass2ConstantIdentification
Resolved ranged next value [6] main::i#1 ← ++ main::i#2 to ++
Resolved ranged comparison value [8] if(main::i#1!=rangelast(0,2)) goto main::@1 to (number) 3
Resolved ranged next value [5] main::i#1 ← ++ main::i#2 to ++
Resolved ranged comparison value [7] if(main::i#1!=rangelast(0,2)) goto main::@1 to (number) 3
Adding number conversion cast (unumber) 3 in if((byte) main::i#1!=(number) 3) goto main::@1
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant integer cast 3

View File

@ -1,10 +1,9 @@
Fixing pointer array-indexing *((word[]) words + (byte) main::i)
Fixing pointer array-indexing *((word[]) words + (byte) main::i)
Fixing pointer array-indexing *((const word[]) words + (byte) main::i)
Fixing pointer array-indexing *((const word[]) words + (byte) main::i)
Culled Empty Block (label) main::@2
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
(word[]) words ← { (number) 1, (number) 2, (number) 3 }
to:@1
(void()) main()
@ -16,11 +15,11 @@ main::@1: scope:[main] from main main::@1
(byte) main::idx#3 ← phi( main/(byte) main::idx#0 main::@1/(byte) main::idx#2 )
(byte) main::i#2 ← phi( main/(byte) main::i#0 main::@1/(byte) main::i#1 )
(byte~) main::$3 ← (byte) main::i#2 * (const byte) SIZEOF_WORD
(byte~) main::$0 ← < *((word[]) words + (byte~) main::$3)
(byte~) main::$0 ← < *((const word[]) words + (byte~) main::$3)
*((const byte*) main::SCREEN + (byte) main::idx#3) ← (byte~) main::$0
(byte) main::idx#1 ← ++ (byte) main::idx#3
(byte~) main::$4 ← (byte) main::i#2 * (const byte) SIZEOF_WORD
(byte~) main::$1 ← > *((word[]) words + (byte~) main::$4)
(byte~) main::$1 ← > *((const word[]) words + (byte~) main::$4)
*((const byte*) main::SCREEN + (byte) main::idx#1) ← (byte~) main::$1
(byte) main::idx#2 ← ++ (byte) main::idx#1
(byte) main::i#1 ← (byte) main::i#2 + rangenext(0,2)
@ -61,34 +60,29 @@ SYMBOL TABLE SSA
(byte) main::idx#1
(byte) main::idx#2
(byte) main::idx#3
(word[]) words
(const word[]) words = { (word)(number) 1, (word)(number) 2, (word)(number) 3 }
Adding number conversion cast (unumber) 0 in (byte) main::idx#0 ← (number) 0
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (word[]) words ← (word[]){ (word)(number) 1, (word)(number) 2, (word)(number) 3 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (byte) main::idx#0 ← (unumber)(number) 0
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 3
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Identified duplicate assignment right side [8] (byte~) main::$4 ← (byte) main::i#2 * (const byte) SIZEOF_WORD
Identified duplicate assignment right side [7] (byte~) main::$4 ← (byte) main::i#2 * (const byte) SIZEOF_WORD
Successful SSA optimization Pass2DuplicateRValueIdentification
Simple Condition (bool~) main::$2 [14] if((byte) main::i#1!=rangelast(0,2)) goto main::@1
Simple Condition (bool~) main::$2 [13] if((byte) main::i#1!=rangelast(0,2)) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Identified constant from value list (word[]) { (word) 1, (word) 2, (word) 3 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const word[]) words = { 1, 2, 3 }
Constant (const byte) main::idx#0 = 0
Constant (const byte) main::i#0 = 0
Successful SSA optimization Pass2ConstantIdentification
Resolved ranged next value [12] main::i#1 ← ++ main::i#2 to ++
Resolved ranged comparison value [14] if(main::i#1!=rangelast(0,2)) goto main::@1 to (number) 3
Resolved ranged next value [11] main::i#1 ← ++ main::i#2 to ++
Resolved ranged comparison value [13] if(main::i#1!=rangelast(0,2)) goto main::@1 to (number) 3
Adding number conversion cast (unumber) 3 in if((byte) main::i#1!=(number) 3) goto main::@1
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant integer cast 3

View File

@ -6,7 +6,7 @@ Culled Empty Block (label) main::@2
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
(struct Point[]) points ← { { (number) 1, (number) 2 }, { (number) 3, (number) 4 }, { (number) 5, (number) 6 } }
(struct Point[]) points ← { (struct Point){ (byte)(number) 1, (byte)(number) 2 }, (struct Point){ (byte)(number) 3, (byte)(number) 4 }, (struct Point){ (byte)(number) 5, (byte)(number) 6 } }
to:@1
(void()) main()
@ -71,8 +71,6 @@ SYMBOL TABLE SSA
Adding number conversion cast (unumber) 0 in (byte) main::idx#0 ← (number) 0
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (struct Point[]) points ← (struct Point[]){ (struct Point){ (byte)(number) 1, (byte)(number) 2 }, (struct Point){ (byte)(number) 3, (byte)(number) 4 }, (struct Point){ (byte)(number) 5, (byte)(number) 6 } }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (byte) main::idx#0 ← (unumber)(number) 0
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024

View File

@ -8,7 +8,7 @@ Culled Empty Block (label) main::@2
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
(struct Point[]) points ← { { (number) 1, (number) 2 }, { (number) 3, (number) 4 }, { (number) 5, (number) 6 } }
(struct Point[]) points ← { (struct Point){ (byte)(number) 1, (signed word)(number) 2 }, (struct Point){ (byte)(number) 3, (signed word)(number) 4 }, (struct Point){ (byte)(number) 5, (signed word)(number) 6 } }
to:@1
(void()) main()
@ -84,8 +84,6 @@ SYMBOL TABLE SSA
Adding number conversion cast (unumber) 0 in (byte) main::idx#0 ← (number) 0
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (struct Point[]) points ← (struct Point[]){ (struct Point){ (byte)(number) 1, (signed word)(number) 2 }, (struct Point){ (byte)(number) 3, (signed word)(number) 4 }, (struct Point){ (byte)(number) 5, (signed word)(number) 6 } }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (byte) main::idx#0 ← (unumber)(number) 0
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024

View File

@ -8,13 +8,12 @@ CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from @1
(byte[]) main::data ← { (number) 1, (number) 2, (number) 3 }
(byte) main::i#0 ← (byte) 0
to:main::@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 )
*((const byte*) SCREEN + (byte) main::i#2) ← *((const byte[]) main::txt + (byte) main::i#2)
*((const byte*) SCREEN2 + (byte) main::i#2) ← *((byte[]) main::data + (byte) main::i#2)
*((const byte*) SCREEN2 + (byte) main::i#2) ← *((const byte[]) main::data + (byte) main::i#2)
(byte) main::i#1 ← (byte) main::i#2 + rangenext(0,3)
(bool~) main::$0 ← (byte) main::i#1 != rangelast(0,3)
if((bool~) main::$0) goto main::@1
@ -40,29 +39,24 @@ SYMBOL TABLE SSA
(bool~) main::$0
(label) main::@1
(label) main::@return
(byte[]) main::data
(const byte[]) main::data = { (byte)(number) 1, (byte)(number) 2, (byte)(number) 3 }
(byte) main::i
(byte) main::i#0
(byte) main::i#1
(byte) main::i#2
(const byte[]) main::txt = (string) "qwe"z
Added casts to value list in (byte[]) main::data ← (byte[]){ (byte)(number) 1, (byte)(number) 2, (byte)(number) 3 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 3
Simplifying constant pointer cast (byte*) 1024
Successful SSA optimization PassNCastSimplification
Simple Condition (bool~) main::$0 [7] if((byte) main::i#1!=rangelast(0,3)) goto main::@1
Simple Condition (bool~) main::$0 [6] if((byte) main::i#1!=rangelast(0,3)) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Identified constant from value list (byte[]) { (byte) 1, (byte) 2, (byte) 3 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const byte[]) main::data = { 1, 2, 3 }
Constant (const byte) main::i#0 = 0
Successful SSA optimization Pass2ConstantIdentification
Resolved ranged next value [5] main::i#1 ← ++ main::i#2 to ++
Resolved ranged comparison value [7] if(main::i#1!=rangelast(0,3)) goto main::@1 to (number) 4
Resolved ranged next value [4] main::i#1 ← ++ main::i#2 to ++
Resolved ranged comparison value [6] if(main::i#1!=rangelast(0,3)) goto main::@1 to (number) 4
Adding number conversion cast (unumber) 4 in if((byte) main::i#1!=(number) 4) goto main::@1
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant integer cast 4

View File

@ -3,7 +3,6 @@ Culled Empty Block (label) main::@4
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
(byte[]) TXT ← { (number) 3, (number) 1, (number) $d, (number) 5, (number) $c, (number) $f, (number) $14, (number) $20 }
to:@1
(void()) main()
@ -14,7 +13,7 @@ main: scope:[main] from @1
main::@1: scope:[main] from main main::@2
(byte) main::i#2 ← phi( main/(byte) main::i#0 main::@2/(byte) main::i#1 )
(byte) main::j#3 ← phi( main/(byte) main::j#0 main::@2/(byte) main::j#4 )
*((const byte*) SCREEN + (byte) main::i#2) ← *((byte[]) TXT + (byte) main::j#3)
*((const byte*) SCREEN + (byte) main::i#2) ← *((const byte[]) TXT + (byte) main::j#3)
(byte) main::j#1 ← ++ (byte) main::j#3
(bool~) main::$0 ← (byte) main::j#1 == (number) 8
(bool~) main::$1 ← ! (bool~) main::$0
@ -47,7 +46,7 @@ SYMBOL TABLE SSA
(label) @begin
(label) @end
(const byte*) SCREEN = (byte*)(number) $400
(byte[]) TXT
(const byte[]) TXT = { (byte)(number) 3, (byte)(number) 1, (byte)(number) $d, (byte)(number) 5, (byte)(number) $c, (byte)(number) $f, (byte)(number) $14, (byte)(number) $20 }
(void()) main()
(bool~) main::$0
(bool~) main::$1
@ -73,12 +72,9 @@ Adding number conversion cast (unumber) 0 in (byte) main::j#0 ← (number) 0
Adding number conversion cast (unumber) 8 in (bool~) main::$0 ← (byte) main::j#1 == (number) 8
Adding number conversion cast (unumber) 0 in (byte) main::j#2 ← (number) 0
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (byte[]) TXT ← (byte[]){ (byte)(number) 3, (byte)(number) 1, (byte)(number) $d, (byte)(number) 5, (byte)(number) $c, (byte)(number) $f, (byte)(number) $14, (byte)(number) $20 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (byte) main::j#0 ← (unumber)(number) 0
Inlining cast (byte) main::j#2 ← (unumber)(number) 0
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 3
Simplifying constant integer cast 1
Simplifying constant integer cast $d
@ -87,6 +83,7 @@ Simplifying constant integer cast $c
Simplifying constant integer cast $f
Simplifying constant integer cast $14
Simplifying constant integer cast $20
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 0
Simplifying constant integer cast 8
Simplifying constant integer cast 0
@ -95,24 +92,21 @@ Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 8
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inversing boolean not [7] (bool~) main::$1 ← (byte) main::j#1 != (byte) 8 from [6] (bool~) main::$0 ← (byte) main::j#1 == (byte) 8
Inversing boolean not [6] (bool~) main::$1 ← (byte) main::j#1 != (byte) 8 from [5] (bool~) main::$0 ← (byte) main::j#1 == (byte) 8
Successful SSA optimization Pass2UnaryNotSimplification
Alias (byte) main::i#2 = (byte) main::i#4
Successful SSA optimization Pass2AliasElimination
Alias (byte) main::i#2 = (byte) main::i#3
Successful SSA optimization Pass2AliasElimination
Simple Condition (bool~) main::$1 [8] if((byte) main::j#1!=(byte) 8) goto main::@2
Simple Condition (bool~) main::$2 [12] if((byte) main::i#1!=rangelast(0,$64)) goto main::@1
Simple Condition (bool~) main::$1 [7] if((byte) main::j#1!=(byte) 8) goto main::@2
Simple Condition (bool~) main::$2 [11] if((byte) main::i#1!=rangelast(0,$64)) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Identified constant from value list (byte[]) { (byte) 3, (byte) 1, (byte) $d, (byte) 5, (byte) $c, (byte) $f, (byte) $14, (byte) $20 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const byte[]) TXT = { 3, 1, $d, 5, $c, $f, $14, $20 }
Constant (const byte) main::j#0 = 0
Constant (const byte) main::i#0 = 0
Constant (const byte) main::j#2 = 0
Successful SSA optimization Pass2ConstantIdentification
Resolved ranged next value [10] main::i#1 ← ++ main::i#2 to ++
Resolved ranged comparison value [12] if(main::i#1!=rangelast(0,$64)) goto main::@1 to (number) $65
Resolved ranged next value [9] main::i#1 ← ++ main::i#2 to ++
Resolved ranged comparison value [11] if(main::i#1!=rangelast(0,$64)) goto main::@1 to (number) $65
Adding number conversion cast (unumber) $65 in if((byte) main::i#1!=(number) $65) goto main::@1
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant integer cast $65

View File

@ -31,8 +31,6 @@ main::@return: scope:[main] from main
return
to:@return
@5: scope:[] from @begin
(byte[]) IRQ_CHANGE_IDX ← { (number) $20, (number) $21, (const byte) IRQ_CHANGE_NEXT, (number) $20, (number) $21, (const byte) IRQ_CHANGE_NEXT, (number) $20, (number) $21, (const byte) IRQ_CHANGE_NEXT, (number) $20, (number) $21, (const byte) IRQ_CHANGE_NEXT }
(byte[]) IRQ_CHANGE_VAL ← { (number) $b, (number) $b, (number) $63, (number) 0, (number) 0, (number) $80, (number) 7, (number) 7, (number) $83, (number) 0, (number) 0, (number) $60 }
(byte) irq_idx#0 ← (number) 0
to:@6
@ -42,8 +40,8 @@ table_driven_irq: scope:[table_driven_irq] from
to:table_driven_irq::@1
table_driven_irq::@1: scope:[table_driven_irq] from table_driven_irq table_driven_irq::@8
(byte) irq_idx#4 ← phi( table_driven_irq/(byte) irq_idx#6 table_driven_irq::@8/(byte) irq_idx#7 )
(byte) table_driven_irq::idx#0 ← *((byte[]) IRQ_CHANGE_IDX + (byte) irq_idx#4)
(byte) table_driven_irq::val#0 ← *((byte[]) IRQ_CHANGE_VAL + (byte) irq_idx#4)
(byte) table_driven_irq::idx#0 ← *((const byte[]) IRQ_CHANGE_IDX + (byte) irq_idx#4)
(byte) table_driven_irq::val#0 ← *((const byte[]) IRQ_CHANGE_VAL + (byte) irq_idx#4)
(byte) irq_idx#1 ← ++ (byte) irq_idx#4
(bool~) table_driven_irq::$0 ← (byte) table_driven_irq::idx#0 < (const byte) VIC_SIZE
if((bool~) table_driven_irq::$0) goto table_driven_irq::@2
@ -106,9 +104,9 @@ SYMBOL TABLE SSA
(label) @end
(const byte*) CIA1_INTERRUPT = (byte*)(number) $dc0d
(const byte) CIA_INTERRUPT_CLEAR = (number) $7f
(byte[]) IRQ_CHANGE_IDX
(const byte[]) IRQ_CHANGE_IDX = { (byte)(number) $20, (byte)(number) $21, (const byte) IRQ_CHANGE_NEXT, (byte)(number) $20, (byte)(number) $21, (const byte) IRQ_CHANGE_NEXT, (byte)(number) $20, (byte)(number) $21, (const byte) IRQ_CHANGE_NEXT, (byte)(number) $20, (byte)(number) $21, (const byte) IRQ_CHANGE_NEXT }
(const byte) IRQ_CHANGE_NEXT = (number) $7f
(byte[]) IRQ_CHANGE_VAL
(const byte[]) IRQ_CHANGE_VAL = { (byte)(number) $b, (byte)(number) $b, (byte)(number) $63, (byte)(number) 0, (byte)(number) 0, (byte)(number) $80, (byte)(number) 7, (byte)(number) 7, (byte)(number) $83, (byte)(number) 0, (byte)(number) 0, (byte)(number) $60 }
(const byte*) IRQ_ENABLE = (byte*)(number) $d01a
(const byte) IRQ_RASTER = (number) 1
(const byte*) IRQ_STATUS = (byte*)(number) $d019
@ -172,9 +170,6 @@ Adding number conversion cast (unumber) table_driven_irq::$4 in (number~) table_
Adding number conversion cast (unumber) table_driven_irq::$5 in (number~) table_driven_irq::$5 ← (unumber~) table_driven_irq::$4 - (const byte) VIC_SIZE
Adding number conversion cast (unumber) 0 in (byte) irq_idx#2 ← (number) 0
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (byte[]) IRQ_CHANGE_IDX ← (byte[]){ (byte)(number) $20, (byte)(number) $21, (const byte) IRQ_CHANGE_NEXT, (byte)(number) $20, (byte)(number) $21, (const byte) IRQ_CHANGE_NEXT, (byte)(number) $20, (byte)(number) $21, (const byte) IRQ_CHANGE_NEXT, (byte)(number) $20, (byte)(number) $21, (const byte) IRQ_CHANGE_NEXT }
Added casts to value list in (byte[]) IRQ_CHANGE_VAL ← (byte[]){ (byte)(number) $b, (byte)(number) $b, (byte)(number) $63, (byte)(number) 0, (byte)(number) 0, (byte)(number) $80, (byte)(number) 7, (byte)(number) 7, (byte)(number) $83, (byte)(number) 0, (byte)(number) 0, (byte)(number) $60 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast *((const byte*) RASTER) ← (unumber)(number) $60
Inlining cast (byte) irq_idx#0 ← (unumber)(number) 0
Inlining cast (byte) irq_idx#2 ← (unumber)(number) 0
@ -187,8 +182,6 @@ Simplifying constant pointer cast (byte*) 56333
Simplifying constant pointer cast (void()**) 788
Simplifying constant pointer cast (byte*) 1024
Simplifying constant pointer cast (byte*) 53248
Simplifying constant integer cast $7f
Simplifying constant integer cast $60
Simplifying constant integer cast $20
Simplifying constant integer cast $21
Simplifying constant integer cast $20
@ -209,6 +202,8 @@ Simplifying constant integer cast $83
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $60
Simplifying constant integer cast $7f
Simplifying constant integer cast $60
Simplifying constant integer cast 0
Simplifying constant integer cast (const byte) VIC_SIZE+(unumber)(number) 8
Simplifying constant integer cast 8
@ -224,7 +219,7 @@ Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to word in (unumber~) table_driven_irq::$4 ← (byte) table_driven_irq::idx#3 + (word) $3f8
Inferred type updated to word in (unumber~) table_driven_irq::$5 ← (word~) table_driven_irq::$4 - (const byte) VIC_SIZE
Inversing boolean not [33] (bool~) table_driven_irq::$3 ← (byte) table_driven_irq::val#3 >= *((const byte*) RASTER) from [32] (bool~) table_driven_irq::$2 ← (byte) table_driven_irq::val#3 < *((const byte*) RASTER)
Inversing boolean not [31] (bool~) table_driven_irq::$3 ← (byte) table_driven_irq::val#3 >= *((const byte*) RASTER) from [30] (bool~) table_driven_irq::$2 ← (byte) table_driven_irq::val#3 < *((const byte*) RASTER)
Successful SSA optimization Pass2UnaryNotSimplification
Alias (byte) table_driven_irq::val#0 = (byte) table_driven_irq::val#1 (byte) table_driven_irq::val#4 (byte) table_driven_irq::val#2 (byte) table_driven_irq::val#3
Alias (byte) table_driven_irq::idx#0 = (byte) table_driven_irq::idx#1 (byte) table_driven_irq::idx#2 (byte) table_driven_irq::idx#3
@ -236,23 +231,18 @@ Alias (byte) irq_idx#1 = (byte) irq_idx#7
Successful SSA optimization Pass2AliasElimination
Identical Phi Values (byte) irq_idx#6 (byte) irq_idx#0
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) table_driven_irq::$0 [19] if((byte) table_driven_irq::idx#0<(const byte) VIC_SIZE) goto table_driven_irq::@2
Simple Condition (bool~) table_driven_irq::$1 [24] if((byte) table_driven_irq::idx#0<(const byte) VIC_SIZE+(byte) 8) goto table_driven_irq::@3
Simple Condition (bool~) table_driven_irq::$3 [34] if((byte) table_driven_irq::val#0>=*((const byte*) RASTER)) goto table_driven_irq::@return
Simple Condition (bool~) table_driven_irq::$0 [17] if((byte) table_driven_irq::idx#0<(const byte) VIC_SIZE) goto table_driven_irq::@2
Simple Condition (bool~) table_driven_irq::$1 [22] if((byte) table_driven_irq::idx#0<(const byte) VIC_SIZE+(byte) 8) goto table_driven_irq::@3
Simple Condition (bool~) table_driven_irq::$3 [32] if((byte) table_driven_irq::val#0>=*((const byte*) RASTER)) goto table_driven_irq::@return
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant right-side identified [6] (void()*~) main::$0 ← & interrupt(KERNEL_MIN)(void()) table_driven_irq()
Successful SSA optimization Pass2ConstantRValueConsolidation
Identified constant from value list (byte[]) { (byte) $20, (byte) $21, (const byte) IRQ_CHANGE_NEXT, (byte) $20, (byte) $21, (const byte) IRQ_CHANGE_NEXT, (byte) $20, (byte) $21, (const byte) IRQ_CHANGE_NEXT, (byte) $20, (byte) $21, (const byte) IRQ_CHANGE_NEXT }
Identified constant from value list (byte[]) { (byte) $b, (byte) $b, (byte) $63, (byte) 0, (byte) 0, (byte) $80, (byte) 7, (byte) 7, (byte) $83, (byte) 0, (byte) 0, (byte) $60 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const void()*) main::$0 = &table_driven_irq
Constant (const byte[]) IRQ_CHANGE_IDX = { $20, $21, IRQ_CHANGE_NEXT, $20, $21, IRQ_CHANGE_NEXT, $20, $21, IRQ_CHANGE_NEXT, $20, $21, IRQ_CHANGE_NEXT }
Constant (const byte[]) IRQ_CHANGE_VAL = { $b, $b, $63, 0, 0, $80, 7, 7, $83, 0, 0, $60 }
Successful SSA optimization Pass2ConstantIdentification
Removing PHI-reference to removed block (table_driven_irq::@8) in block table_driven_irq::@return
if() condition always true - replacing block destination [40] if(true) goto table_driven_irq::@1
if() condition always true - replacing block destination [38] if(true) goto table_driven_irq::@1
Successful SSA optimization Pass2ConstantIfs
De-inlining pointer[w] to *(pointer+w) [28] *((const byte*) SCREEN + (word~) table_driven_irq::$5) ← (byte) table_driven_irq::val#0
De-inlining pointer[w] to *(pointer+w) [26] *((const byte*) SCREEN + (word~) table_driven_irq::$5) ← (byte) table_driven_irq::val#0
Successful SSA optimization Pass2DeInlineWordDerefIdx
Constant inlined main::$0 = &interrupt(KERNEL_MIN)(void()) table_driven_irq()
Successful SSA optimization Pass2ConstantInlining

View File

@ -3,6 +3,7 @@ Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBa
Culled Empty Block (label) @1
Culled Empty Block (label) @2
Culled Empty Block (label) @3
Culled Empty Block (label) @4
Culled Empty Block (label) @5
Culled Empty Block (label) keyboard_matrix_read::@1
Culled Empty Block (label) @6
@ -35,16 +36,12 @@ Culled Empty Block (label) pressed::@9
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
to:@4
@4: scope:[] from @begin
(byte[8]) keyboard_matrix_row_bitmask ← { (number) $fe, (number) $fd, (number) $fb, (number) $f7, (number) $ef, (number) $df, (number) $bf, (number) $7f }
(byte[8]) keyboard_matrix_col_bitmask ← { (number) 1, (number) 2, (number) 4, (number) 8, (number) $10, (number) $20, (number) $40, (number) $80 }
to:@14
(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid)
keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_key_pressed
(byte) keyboard_matrix_read::rowid#1 ← phi( keyboard_key_pressed/(byte) keyboard_matrix_read::rowid#0 )
*((const byte*) CIA1_PORT_A) ← *((byte[8]) keyboard_matrix_row_bitmask + (byte) keyboard_matrix_read::rowid#1)
*((const byte*) CIA1_PORT_A) ← *((const byte[8]) keyboard_matrix_row_bitmask + (byte) keyboard_matrix_read::rowid#1)
(byte~) keyboard_matrix_read::$0 ← ~ *((const byte*) CIA1_PORT_B)
(byte) keyboard_matrix_read::row_pressed_bits#0 ← (byte~) keyboard_matrix_read::$0
(byte) keyboard_matrix_read::return#0 ← (byte) keyboard_matrix_read::row_pressed_bits#0
@ -70,7 +67,7 @@ keyboard_key_pressed::@2: scope:[keyboard_key_pressed] from keyboard_key_presse
(byte) keyboard_key_pressed::colidx#1 ← phi( keyboard_key_pressed/(byte) keyboard_key_pressed::colidx#0 )
(byte) keyboard_matrix_read::return#4 ← phi( keyboard_key_pressed/(byte) keyboard_matrix_read::return#2 )
(byte~) keyboard_key_pressed::$2 ← (byte) keyboard_matrix_read::return#4
(byte~) keyboard_key_pressed::$3 ← (byte~) keyboard_key_pressed::$2 & *((byte[8]) keyboard_matrix_col_bitmask + (byte) keyboard_key_pressed::colidx#1)
(byte~) keyboard_key_pressed::$3 ← (byte~) keyboard_key_pressed::$2 & *((const byte[8]) keyboard_matrix_col_bitmask + (byte) keyboard_key_pressed::colidx#1)
(byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$3
to:keyboard_key_pressed::@return
keyboard_key_pressed::@return: scope:[keyboard_key_pressed] from keyboard_key_pressed::@2
@ -179,7 +176,7 @@ pressed::@10: scope:[pressed] from pressed::@2
pressed::@return: scope:[pressed] from pressed::@1 pressed::@10
return
to:@return
@14: scope:[] from @4
@14: scope:[] from @begin
call main
to:@15
@15: scope:[] from @14
@ -189,7 +186,6 @@ pressed::@return: scope:[pressed] from pressed::@1 pressed::@10
SYMBOL TABLE SSA
(label) @14
(label) @15
(label) @4
(label) @begin
(label) @end
(const byte*) BGCOL = (byte*)(number) $d021
@ -233,7 +229,7 @@ SYMBOL TABLE SSA
(byte) keyboard_key_pressed::return#9
(byte) keyboard_key_pressed::rowidx
(byte) keyboard_key_pressed::rowidx#0
(byte[8]) keyboard_matrix_col_bitmask
(const byte[8]) keyboard_matrix_col_bitmask = { (byte)(number) 1, (byte)(number) 2, (byte)(number) 4, (byte)(number) 8, (byte)(number) $10, (byte)(number) $20, (byte)(number) $40, (byte)(number) $80 }
(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid)
(byte~) keyboard_matrix_read::$0
(label) keyboard_matrix_read::@return
@ -248,7 +244,7 @@ SYMBOL TABLE SSA
(byte) keyboard_matrix_read::rowid
(byte) keyboard_matrix_read::rowid#0
(byte) keyboard_matrix_read::rowid#1
(byte[8]) keyboard_matrix_row_bitmask
(const byte[8]) keyboard_matrix_row_bitmask = { (byte)(number) $fe, (byte)(number) $fd, (byte)(number) $fb, (byte)(number) $f7, (byte)(number) $ef, (byte)(number) $df, (byte)(number) $bf, (byte)(number) $7f }
(void()) main()
(label) main::@1
(label) main::@2
@ -294,14 +290,10 @@ Adding number conversion cast (unumber) 0 in (bool~) menu::$5 ← (byte~) menu::
Adding number conversion cast (unumber) 0 in (bool~) menu::$8 ← (byte~) menu::$7 != (number) 0
Adding number conversion cast (unumber) 0 in (bool~) pressed::$2 ← (byte~) pressed::$1 != (number) 0
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (byte[8]) keyboard_matrix_row_bitmask ← (byte[8]){ (byte)(number) $fe, (byte)(number) $fd, (byte)(number) $fb, (byte)(number) $f7, (byte)(number) $ef, (byte)(number) $df, (byte)(number) $bf, (byte)(number) $7f }
Added casts to value list in (byte[8]) keyboard_matrix_col_bitmask ← (byte[8]){ (byte)(number) 1, (byte)(number) 2, (byte)(number) 4, (byte)(number) 8, (byte)(number) $10, (byte)(number) $20, (byte)(number) $40, (byte)(number) $80 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Simplifying constant pointer cast (byte*) 53280
Simplifying constant pointer cast (byte*) 53281
Simplifying constant pointer cast (byte*) 56320
Simplifying constant pointer cast (byte*) 56321
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast $fe
Simplifying constant integer cast $fd
Simplifying constant integer cast $fb
@ -318,6 +310,7 @@ Simplifying constant integer cast $10
Simplifying constant integer cast $20
Simplifying constant integer cast $40
Simplifying constant integer cast $80
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 7
Simplifying constant integer cast 3
Simplifying constant integer cast 0
@ -333,10 +326,10 @@ Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in (unumber~) keyboard_key_pressed::$0 ← (byte) keyboard_key_pressed::key#4 & (byte) 7
Inversing boolean not [36] (bool~) menu::$2 ← (byte~) menu::$0 == (byte) 0 from [35] (bool~) menu::$1 ← (byte~) menu::$0 != (byte) 0
Inversing boolean not [44] (bool~) menu::$6 ← (byte~) menu::$4 == (byte) 0 from [43] (bool~) menu::$5 ← (byte~) menu::$4 != (byte) 0
Inversing boolean not [54] (bool~) menu::$9 ← (byte~) menu::$7 == (byte) 0 from [53] (bool~) menu::$8 ← (byte~) menu::$7 != (byte) 0
Inversing boolean not [69] (bool~) pressed::$3 ← (byte~) pressed::$1 == (byte) 0 from [68] (bool~) pressed::$2 ← (byte~) pressed::$1 != (byte) 0
Inversing boolean not [34] (bool~) menu::$2 ← (byte~) menu::$0 == (byte) 0 from [33] (bool~) menu::$1 ← (byte~) menu::$0 != (byte) 0
Inversing boolean not [42] (bool~) menu::$6 ← (byte~) menu::$4 == (byte) 0 from [41] (bool~) menu::$5 ← (byte~) menu::$4 != (byte) 0
Inversing boolean not [52] (bool~) menu::$9 ← (byte~) menu::$7 == (byte) 0 from [51] (bool~) menu::$8 ← (byte~) menu::$7 != (byte) 0
Inversing boolean not [67] (bool~) pressed::$3 ← (byte~) pressed::$1 == (byte) 0 from [66] (bool~) pressed::$2 ← (byte~) pressed::$1 != (byte) 0
Successful SSA optimization Pass2UnaryNotSimplification
Alias (byte) keyboard_matrix_read::return#0 = (byte) keyboard_matrix_read::row_pressed_bits#0 (byte~) keyboard_matrix_read::$0 (byte) keyboard_matrix_read::return#3 (byte) keyboard_matrix_read::return#1
Alias (byte) keyboard_key_pressed::colidx#0 = (byte~) keyboard_key_pressed::$0 (byte) keyboard_key_pressed::colidx#1
@ -350,26 +343,21 @@ Alias (byte) keyboard_key_pressed::return#10 = (byte) keyboard_key_pressed::retu
Successful SSA optimization Pass2AliasElimination
Identical Phi Values (byte) keyboard_matrix_read::rowid#1 (byte) keyboard_matrix_read::rowid#0
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) menu::$2 [37] if((byte~) menu::$0==(byte) 0) goto menu::@4
Simple Condition (bool~) menu::$6 [45] if((byte~) menu::$4==(byte) 0) goto menu::@5
Simple Condition (bool~) menu::$9 [55] if((byte~) menu::$7==(byte) 0) goto menu::@6
Simple Condition (bool~) pressed::$3 [70] if((byte~) pressed::$1==(byte) 0) goto pressed::@1
Simple Condition (bool~) menu::$2 [35] if((byte~) menu::$0==(byte) 0) goto menu::@4
Simple Condition (bool~) menu::$6 [43] if((byte~) menu::$4==(byte) 0) goto menu::@5
Simple Condition (bool~) menu::$9 [53] if((byte~) menu::$7==(byte) 0) goto menu::@6
Simple Condition (bool~) pressed::$3 [68] if((byte~) pressed::$1==(byte) 0) goto pressed::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Negating conditional jump and destination [70] if((byte~) pressed::$1!=(byte) 0) goto pressed::@return
Negating conditional jump and destination [68] if((byte~) pressed::$1!=(byte) 0) goto pressed::@return
Successful SSA optimization Pass2ConditionalJumpSequenceImprovement
Identified constant from value list (byte[8]) { (byte) $fe, (byte) $fd, (byte) $fb, (byte) $f7, (byte) $ef, (byte) $df, (byte) $bf, (byte) $7f }
Identified constant from value list (byte[8]) { (byte) 1, (byte) 2, (byte) 4, (byte) 8, (byte) $10, (byte) $20, (byte) $40, (byte) $80 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const byte[8]) keyboard_matrix_row_bitmask = { $fe, $fd, $fb, $f7, $ef, $df, $bf, $7f }
Constant (const byte[8]) keyboard_matrix_col_bitmask = { 1, 2, 4, 8, $10, $20, $40, $80 }
Constant (const byte) keyboard_key_pressed::key#0 = KEY_C
Constant (const byte) keyboard_key_pressed::key#1 = KEY_I
Constant (const byte) keyboard_key_pressed::key#2 = KEY_E
Constant (const byte) keyboard_key_pressed::key#3 = KEY_SPACE
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [26] if(true) goto main::@2
if() condition always true - replacing block destination [29] if(true) goto menu::@2
if() condition always true - replacing block destination [62] if(true) goto pressed::@2
if() condition always true - replacing block destination [24] if(true) goto main::@2
if() condition always true - replacing block destination [27] if(true) goto menu::@2
if() condition always true - replacing block destination [60] if(true) goto pressed::@2
Successful SSA optimization Pass2ConstantIfs
Removing unused block main::@return
Successful SSA optimization Pass2EliminateUnusedBlocks
@ -383,7 +371,6 @@ Constant inlined keyboard_key_pressed::key#2 = (const byte) KEY_E
Constant inlined keyboard_key_pressed::key#3 = (const byte) KEY_SPACE
Successful SSA optimization Pass2ConstantInlining
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @4
Adding NOP phi() at start of @14
Adding NOP phi() at start of @15
Adding NOP phi() at start of @end
@ -400,15 +387,14 @@ Adding NOP phi() at start of menu::@5
Adding NOP phi() at start of pressed::@1
Adding NOP phi() at start of pressed::@2
CALL GRAPH
Calls in [] to main:3
Calls in [main] to menu:9
Calls in [menu] to keyboard_key_pressed:14 pressed:19 keyboard_key_pressed:23 keyboard_key_pressed:30
Calls in [keyboard_key_pressed] to keyboard_matrix_read:41
Calls in [pressed] to keyboard_key_pressed:52
Calls in [] to main:2
Calls in [main] to menu:8
Calls in [menu] to keyboard_key_pressed:13 pressed:18 keyboard_key_pressed:22 keyboard_key_pressed:29
Calls in [keyboard_key_pressed] to keyboard_matrix_read:40
Calls in [pressed] to keyboard_key_pressed:51
Created 1 initial phi equivalence classes
Coalesced down to 1 phi equivalence classes
Culled Empty Block (label) @4
Culled Empty Block (label) @15
Culled Empty Block (label) main::@1
Culled Empty Block (label) main::@7

View File

@ -1,7 +1,7 @@
Fixing pointer array-indexing *((word[SIZE]) x_start + (byte) main::i)
Fixing pointer array-indexing *((word[SIZE]) x_end + (byte) point_init::point_idx)
Fixing pointer array-indexing *((word[SIZE]) x_start + (byte) point_init::point_idx)
Fixing pointer array-indexing *((word[SIZE]) x_start + (byte) point_init::point_idx)
Fixing pointer array-indexing *((const word[SIZE]) x_start + (byte) main::i)
Fixing pointer array-indexing *((const word[SIZE]) x_end + (byte) point_init::point_idx)
Fixing pointer array-indexing *((const word[SIZE]) x_start + (byte) point_init::point_idx)
Fixing pointer array-indexing *((const word[SIZE]) x_start + (byte) point_init::point_idx)
Fixing pointer array-indexing *((word[SIZE]) x_cur + (byte) point_init::point_idx)
Fixing pointer array-indexing *((word[SIZE]) y_cur + (byte) point_init::point_idx)
Identified constant variable (byte*) BITMAP
@ -240,10 +240,6 @@ divr16s::@return: scope:[divr16s] from divr16s::@11 divr16s::@5
return
to:@return
@12: scope:[] from @begin
(word[SIZE]) x_start ← { (number) $a, (number) $14, (number) $1e, (number) $1e }
(byte[SIZE]) y_start ← { (number) $a, (number) $a, (number) $a, (number) $14 }
(word[SIZE]) x_end ← { (number) $14, (number) $a, (number) $14, (number) $14 }
(byte[SIZE]) y_end ← { (number) $14, (number) $14, (number) $a, (number) $14 }
(word[SIZE]) x_cur ← { fill( SIZE, 0) }
(word[SIZE]) y_cur ← { fill( SIZE, 0) }
(signed byte[SIZE]) x_add ← { fill( SIZE, 0) }
@ -329,8 +325,8 @@ main::@1: scope:[main] from main::@19 main::@21
main::@20: scope:[main] from main::@1
(byte) main::i#3 ← phi( main::@1/(byte) main::i#2 )
(byte~) main::$10 ← (byte) main::i#3 * (const byte) SIZEOF_WORD
(word) bitmap_plot::x#0 ← *((word[SIZE]) x_start + (byte~) main::$10)
(byte) bitmap_plot::y#0 ← *((byte[SIZE]) y_start + (byte) main::i#3)
(word) bitmap_plot::x#0 ← *((const word[SIZE]) x_start + (byte~) main::$10)
(byte) bitmap_plot::y#0 ← *((const byte[SIZE]) y_start + (byte) main::i#3)
call bitmap_plot
to:main::@21
main::@21: scope:[main] from main::@20
@ -357,13 +353,13 @@ main::@return: scope:[main] from main::@3
point_init: scope:[point_init] from main::@1
(byte) point_init::point_idx#1 ← phi( main::@1/(byte) point_init::point_idx#0 )
(byte~) point_init::$17 ← (byte) point_init::point_idx#1 * (const byte) SIZEOF_WORD
(signed word~) point_init::$0 ← ((signed word)) *((word[SIZE]) x_end + (byte~) point_init::$17)
(signed word~) point_init::$0 ← ((signed word)) *((const word[SIZE]) x_end + (byte~) point_init::$17)
(byte~) point_init::$18 ← (byte) point_init::point_idx#1 * (const byte) SIZEOF_WORD
(signed word~) point_init::$1 ← ((signed word)) *((word[SIZE]) x_start + (byte~) point_init::$18)
(signed word~) point_init::$1 ← ((signed word)) *((const word[SIZE]) x_start + (byte~) point_init::$18)
(signed word~) point_init::$2 ← (signed word~) point_init::$0 - (signed word~) point_init::$1
(signed word) point_init::x_diff#0 ← (signed word~) point_init::$2
(signed word~) point_init::$3 ← ((signed word)) *((byte[SIZE]) y_end + (byte) point_init::point_idx#1)
(signed word~) point_init::$4 ← ((signed word)) *((byte[SIZE]) y_start + (byte) point_init::point_idx#1)
(signed word~) point_init::$3 ← ((signed word)) *((const byte[SIZE]) y_end + (byte) point_init::point_idx#1)
(signed word~) point_init::$4 ← ((signed word)) *((const byte[SIZE]) y_start + (byte) point_init::point_idx#1)
(signed word~) point_init::$5 ← (signed word~) point_init::$3 - (signed word~) point_init::$4
(signed word) point_init::y_diff#0 ← (signed word~) point_init::$5
(signed word) point_init::abs16s1_w#0 ← (signed word) point_init::x_diff#0
@ -459,10 +455,10 @@ point_init::@1: scope:[point_init] from point_init::@10
point_init::@2: scope:[point_init] from point_init::@10 point_init::@11
(byte) point_init::point_idx#2 ← phi( point_init::@10/(byte) point_init::point_idx#6 point_init::@11/(byte) point_init::point_idx#5 )
(byte~) point_init::$19 ← (byte) point_init::point_idx#2 * (const byte) SIZEOF_WORD
(number~) point_init::$9 ← *((word[SIZE]) x_start + (byte~) point_init::$19) * (number) $10
(number~) point_init::$9 ← *((const word[SIZE]) x_start + (byte~) point_init::$19) * (number) $10
(byte~) point_init::$20 ← (byte) point_init::point_idx#2 * (const byte) SIZEOF_WORD
*((word[SIZE]) x_cur + (byte~) point_init::$20) ← (number~) point_init::$9
(word~) point_init::$10 ← ((word)) *((byte[SIZE]) y_start + (byte) point_init::point_idx#2)
(word~) point_init::$10 ← ((word)) *((const byte[SIZE]) y_start + (byte) point_init::point_idx#2)
(number~) point_init::$11 ← (word~) point_init::$10 * (number) $10
(byte~) point_init::$21 ← (byte) point_init::point_idx#2 * (const byte) SIZEOF_WORD
*((word[SIZE]) y_cur + (byte~) point_init::$21) ← (number~) point_init::$11
@ -1163,12 +1159,12 @@ SYMBOL TABLE SSA
(byte) screen_fill::y#4
(signed byte[SIZE]) x_add
(word[SIZE]) x_cur
(word[SIZE]) x_end
(word[SIZE]) x_start
(const word[SIZE]) x_end = { (word)(number) $14, (word)(number) $a, (word)(number) $14, (word)(number) $14 }
(const word[SIZE]) x_start = { (word)(number) $a, (word)(number) $14, (word)(number) $1e, (word)(number) $1e }
(signed byte[SIZE]) y_add
(word[SIZE]) y_cur
(byte[SIZE]) y_end
(byte[SIZE]) y_start
(const byte[SIZE]) y_end = { (byte)(number) $14, (byte)(number) $14, (byte)(number) $a, (byte)(number) $14 }
(const byte[SIZE]) y_start = { (byte)(number) $a, (byte)(number) $a, (byte)(number) $a, (byte)(number) $14 }
Fixing inline constructor with bitmap_clear::$3 ← (byte)*(bitmap_plot_yhi + 0) w= (byte)*(bitmap_plot_ylo + 0)
Fixing inline constructor with bitmap_plot::$3 ← (byte)*(bitmap_plot_yhi + bitmap_plot::y#1) w= (byte)*(bitmap_plot_ylo + bitmap_plot::y#1)
@ -1216,8 +1212,8 @@ Adding number conversion cast (unumber) $ff in (bool~) main::$8 ← *((const byt
Adding number conversion cast (snumber) 0 in (bool~) point_init::abs16s1_$0 ← (signed word) point_init::abs16s1_w#1 < (number) 0
Adding number conversion cast (snumber) 0 in (bool~) point_init::abs16s2_$0 ← (signed word) point_init::abs16s2_w#1 < (number) 0
Adding number conversion cast (snumber) 0 in (bool~) point_init::$12 ← (signed word) point_init::x_diff#1 < (number) 0
Adding number conversion cast (unumber) $10 in (number~) point_init::$9 ← *((word[SIZE]) x_start + (byte~) point_init::$19) * (number) $10
Adding number conversion cast (unumber) point_init::$9 in (number~) point_init::$9 ← *((word[SIZE]) x_start + (byte~) point_init::$19) * (unumber)(number) $10
Adding number conversion cast (unumber) $10 in (number~) point_init::$9 ← *((const word[SIZE]) x_start + (byte~) point_init::$19) * (number) $10
Adding number conversion cast (unumber) point_init::$9 in (number~) point_init::$9 ← *((const word[SIZE]) x_start + (byte~) point_init::$19) * (unumber)(number) $10
Adding number conversion cast (unumber) $10 in (number~) point_init::$11 ← (word~) point_init::$10 * (number) $10
Adding number conversion cast (unumber) point_init::$11 in (number~) point_init::$11 ← (word~) point_init::$10 * (unumber)(number) $10
Adding number conversion cast (snumber) -$10 in *((signed byte[SIZE]) x_add + (byte) point_init::point_idx#3) ← (number) -$10
@ -1242,11 +1238,6 @@ Adding number conversion cast (unumber) 0 in *((byte*) bitmap_clear::bitmap#2)
Adding number conversion cast (unumber) $fff8 in (number~) bitmap_plot::$1 ← (word) bitmap_plot::x#1 & (number) $fff8
Adding number conversion cast (unumber) bitmap_plot::$1 in (number~) bitmap_plot::$1 ← (word) bitmap_plot::x#1 & (unumber)(number) $fff8
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (word[SIZE]) x_start ← (word[SIZE]){ (word)(number) $a, (word)(number) $14, (word)(number) $1e, (word)(number) $1e }
Added casts to value list in (byte[SIZE]) y_start ← (byte[SIZE]){ (byte)(number) $a, (byte)(number) $a, (byte)(number) $a, (byte)(number) $14 }
Added casts to value list in (word[SIZE]) x_end ← (word[SIZE]){ (word)(number) $14, (word)(number) $a, (word)(number) $14, (word)(number) $14 }
Added casts to value list in (byte[SIZE]) y_end ← (byte[SIZE]){ (byte)(number) $14, (byte)(number) $14, (byte)(number) $a, (byte)(number) $14 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (word) divr16u::quotient#0 ← (unumber)(number) 0
Inlining cast (byte) divr16s::neg#0 ← (unumber)(number) 0
Inlining cast (word) divr16s::dividendu#0 ← (unumber)(number) 0
@ -1267,15 +1258,15 @@ Inlining cast (word~) main::vicSelectGfxBank1_toDd001_$0 ← (word)(byte*) main:
Inlining cast (word~) main::toD0181_$0 ← (word)(byte*) main::toD0181_screen#1
Inlining cast (word~) main::toD0181_$4 ← (word)(byte*) main::toD0181_gfx#1
Inlining cast (byte) screen_fill::ch#0 ← (unumber)(number) $10
Inlining cast (signed word~) point_init::$0 ← (signed word)*((word[SIZE]) x_end + (byte~) point_init::$17)
Inlining cast (signed word~) point_init::$1 ← (signed word)*((word[SIZE]) x_start + (byte~) point_init::$18)
Inlining cast (signed word~) point_init::$3 ← (signed word)*((byte[SIZE]) y_end + (byte) point_init::point_idx#1)
Inlining cast (signed word~) point_init::$4 ← (signed word)*((byte[SIZE]) y_start + (byte) point_init::point_idx#1)
Inlining cast (signed word~) point_init::$0 ← (signed word)*((const word[SIZE]) x_end + (byte~) point_init::$17)
Inlining cast (signed word~) point_init::$1 ← (signed word)*((const word[SIZE]) x_start + (byte~) point_init::$18)
Inlining cast (signed word~) point_init::$3 ← (signed word)*((const byte[SIZE]) y_end + (byte) point_init::point_idx#1)
Inlining cast (signed word~) point_init::$4 ← (signed word)*((const byte[SIZE]) y_start + (byte) point_init::point_idx#1)
Inlining cast (word~) point_init::abs16s1_$3 ← (word)(signed word~) point_init::abs16s1_$2
Inlining cast (word~) point_init::abs16s1_$1 ← (word)(signed word) point_init::abs16s1_w#3
Inlining cast (word~) point_init::abs16s2_$3 ← (word)(signed word~) point_init::abs16s2_$2
Inlining cast (word~) point_init::abs16s2_$1 ← (word)(signed word) point_init::abs16s2_w#3
Inlining cast (word~) point_init::$10 ← (word)*((byte[SIZE]) y_start + (byte) point_init::point_idx#2)
Inlining cast (word~) point_init::$10 ← (word)*((const byte[SIZE]) y_start + (byte) point_init::point_idx#2)
Inlining cast *((signed byte[SIZE]) x_add + (byte) point_init::point_idx#3) ← (snumber)(number) -$10
Inlining cast *((signed byte[SIZE]) x_add + (byte) point_init::point_idx#4) ← (snumber)(number) $10
Inlining cast (signed word) divr16s::dividend#0 ← (snumber)(number) 0
@ -1292,6 +1283,22 @@ Simplifying constant pointer cast (byte*) 53265
Simplifying constant pointer cast (byte*) 53272
Simplifying constant pointer cast (byte*) 56576
Simplifying constant pointer cast (byte*) 56578
Simplifying constant integer cast $a
Simplifying constant integer cast $14
Simplifying constant integer cast $1e
Simplifying constant integer cast $1e
Simplifying constant integer cast $a
Simplifying constant integer cast $a
Simplifying constant integer cast $a
Simplifying constant integer cast $14
Simplifying constant integer cast $14
Simplifying constant integer cast $a
Simplifying constant integer cast $14
Simplifying constant integer cast $14
Simplifying constant integer cast $14
Simplifying constant integer cast $14
Simplifying constant integer cast $a
Simplifying constant integer cast $14
Simplifying constant pointer cast (byte*) 40960
Simplifying constant pointer cast (byte*) 34816
Simplifying constant integer cast 0
@ -1311,22 +1318,6 @@ Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast $a
Simplifying constant integer cast $14
Simplifying constant integer cast $1e
Simplifying constant integer cast $1e
Simplifying constant integer cast $a
Simplifying constant integer cast $a
Simplifying constant integer cast $a
Simplifying constant integer cast $14
Simplifying constant integer cast $14
Simplifying constant integer cast $a
Simplifying constant integer cast $14
Simplifying constant integer cast $14
Simplifying constant integer cast $14
Simplifying constant integer cast $14
Simplifying constant integer cast $a
Simplifying constant integer cast $14
Simplifying constant integer cast (const byte) VIC_BMM|(const byte) VIC_DEN|(const byte) VIC_RSEL|(unumber)(number) 3
Simplifying constant integer cast 3
Simplifying constant integer cast 3
@ -1424,7 +1415,7 @@ Inferred type updated to byte in (unumber~) main::toD0181_$3 ← > (word~) main:
Inferred type updated to byte in (unumber~) main::toD0181_$6 ← (byte~) main::toD0181_$5 / (byte) 4
Inferred type updated to byte in (unumber~) main::toD0181_$7 ← (byte~) main::toD0181_$6 & (byte) $f
Inferred type updated to byte in (unumber~) main::toD0181_$8 ← (byte~) main::toD0181_$3 | (byte~) main::toD0181_$7
Inferred type updated to word in (unumber~) point_init::$9 ← *((word[SIZE]) x_start + (byte~) point_init::$19) * (byte) $10
Inferred type updated to word in (unumber~) point_init::$9 ← *((const word[SIZE]) x_start + (byte~) point_init::$19) * (byte) $10
Inferred type updated to word in (unumber~) point_init::$11 ← (word~) point_init::$10 * (byte) $10
Inferred type updated to byte in (unumber~) point_init::$15 ← (byte~) point_init::$14 / (byte) $10
Inferred type updated to byte in (unumber~) bitmap_init::$3 ← (byte) bitmap_init::y#2 & (byte) 7
@ -1436,8 +1427,8 @@ Adding pointer type conversion cast (byte*) bitmap_plot::$0 in (byte*~) bitmap_p
Successful SSA optimization PassNAddTypeConversionAssignment
Inversing boolean not [9] (bool~) divr16u::$4 ← (byte~) divr16u::$2 == (byte) 0 from [8] (bool~) divr16u::$3 ← (byte~) divr16u::$2 != (byte) 0
Inversing boolean not [17] (bool~) divr16u::$9 ← (word) divr16u::rem#5 < (word) divr16u::divisor#1 from [16] (bool~) divr16u::$8 ← (word) divr16u::rem#5 >= (word) divr16u::divisor#1
Inversing boolean not [259] (bool~) bitmap_init::$1 ← (byte) bitmap_init::bits#1 != (byte) 0 from [258] (bool~) bitmap_init::$0 ← (byte) bitmap_init::bits#1 == (byte) 0
Inversing boolean not [279] (bool~) bitmap_init::$9 ← (byte~) bitmap_init::$7 != (byte) 7 from [278] (bool~) bitmap_init::$8 ← (byte~) bitmap_init::$7 == (byte) 7
Inversing boolean not [255] (bool~) bitmap_init::$1 ← (byte) bitmap_init::bits#1 != (byte) 0 from [254] (bool~) bitmap_init::$0 ← (byte) bitmap_init::bits#1 == (byte) 0
Inversing boolean not [275] (bool~) bitmap_init::$9 ← (byte~) bitmap_init::$7 != (byte) 7 from [274] (bool~) bitmap_init::$8 ← (byte~) bitmap_init::$7 == (byte) 7
Successful SSA optimization Pass2UnaryNotSimplification
Alias (word) divr16u::rem#0 = (word~) divr16u::$0 (word) divr16u::rem#6
Alias (word) divr16u::dividend#0 = (word~) divr16u::$6 (word) divr16u::dividend#7
@ -1548,47 +1539,42 @@ Identical Phi Values (word) bitmap_plot::x#1 (word) bitmap_plot::x#0
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values (byte) screen_fill::ch#2 (byte) screen_fill::ch#0
Successful SSA optimization Pass2IdenticalPhiElimination
Identified duplicate assignment right side [163] (byte~) point_init::$18 ← (byte) point_init::point_idx#0 * (const byte) SIZEOF_WORD
Identified duplicate assignment right side [209] (byte~) point_init::$20 ← (byte) point_init::point_idx#0 * (const byte) SIZEOF_WORD
Identified duplicate assignment right side [213] (byte~) point_init::$21 ← (byte) point_init::point_idx#0 * (const byte) SIZEOF_WORD
Identified duplicate assignment right side [277] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7
Identified duplicate assignment right side [159] (byte~) point_init::$18 ← (byte) point_init::point_idx#0 * (const byte) SIZEOF_WORD
Identified duplicate assignment right side [205] (byte~) point_init::$20 ← (byte) point_init::point_idx#0 * (const byte) SIZEOF_WORD
Identified duplicate assignment right side [209] (byte~) point_init::$21 ← (byte) point_init::point_idx#0 * (const byte) SIZEOF_WORD
Identified duplicate assignment right side [273] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7
Successful SSA optimization Pass2DuplicateRValueIdentification
Simple Condition (bool~) divr16u::$4 [10] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2
Simple Condition (bool~) divr16u::$9 [18] if((word) divr16u::rem#5<(word) divr16u::divisor#0) goto divr16u::@3
Simple Condition (bool~) divr16u::$11 [25] if((byte) divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1
Simple Condition (bool~) divr16s::$3 [59] if((signed word) divr16s::divisor#0<(signed byte) 0) goto divr16s::@3
Simple Condition (bool~) divr16s::$5 [79] if((byte) divr16s::neg#4==(byte) 0) goto divr16s::@5
Simple Condition (bool~) main::$7 [154] if((byte) main::i#1!=rangelast(0,SIZE-1)) goto main::@1
Simple Condition (bool~) main::$8 [157] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@6
Simple Condition (bool~) point_init::abs16s1_$0 [174] if((signed word) point_init::x_diff#1<(signed byte) 0) goto point_init::abs16s1_@1
Simple Condition (bool~) point_init::abs16s2_$0 [189] if((signed word) point_init::y_diff#0<(signed byte) 0) goto point_init::abs16s2_@1
Simple Condition (bool~) point_init::$8 [202] if((word) point_init::abs16s1_return#2>(word) point_init::abs16s2_return#2) goto point_init::@1
Simple Condition (bool~) point_init::$12 [205] if((signed word) point_init::x_diff#1<(signed byte) 0) goto point_init::@7
Simple Condition (bool~) screen_fill::$0 [243] if((byte) screen_fill::x#1!=rangelast(0,$27)) goto screen_fill::@2
Simple Condition (bool~) screen_fill::$1 [247] if((byte) screen_fill::y#1!=rangelast(0,$18)) goto screen_fill::@1
Simple Condition (bool~) bitmap_init::$1 [260] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@2
Simple Condition (bool~) bitmap_init::$2 [264] if((byte) bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1
Simple Condition (bool~) bitmap_init::$9 [280] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@6
Simple Condition (bool~) bitmap_init::$11 [284] if((byte) bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5
Simple Condition (bool~) bitmap_clear::$1 [300] if((byte) bitmap_clear::x#1!=rangelast(0,$c7)) goto bitmap_clear::@2
Simple Condition (bool~) bitmap_clear::$2 [304] if((byte) bitmap_clear::y#1!=rangelast(0,$27)) goto bitmap_clear::@1
Simple Condition (bool~) main::$7 [150] if((byte) main::i#1!=rangelast(0,SIZE-1)) goto main::@1
Simple Condition (bool~) main::$8 [153] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@6
Simple Condition (bool~) point_init::abs16s1_$0 [170] if((signed word) point_init::x_diff#1<(signed byte) 0) goto point_init::abs16s1_@1
Simple Condition (bool~) point_init::abs16s2_$0 [185] if((signed word) point_init::y_diff#0<(signed byte) 0) goto point_init::abs16s2_@1
Simple Condition (bool~) point_init::$8 [198] if((word) point_init::abs16s1_return#2>(word) point_init::abs16s2_return#2) goto point_init::@1
Simple Condition (bool~) point_init::$12 [201] if((signed word) point_init::x_diff#1<(signed byte) 0) goto point_init::@7
Simple Condition (bool~) screen_fill::$0 [239] if((byte) screen_fill::x#1!=rangelast(0,$27)) goto screen_fill::@2
Simple Condition (bool~) screen_fill::$1 [243] if((byte) screen_fill::y#1!=rangelast(0,$18)) goto screen_fill::@1
Simple Condition (bool~) bitmap_init::$1 [256] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@2
Simple Condition (bool~) bitmap_init::$2 [260] if((byte) bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1
Simple Condition (bool~) bitmap_init::$9 [276] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@6
Simple Condition (bool~) bitmap_init::$11 [280] if((byte) bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5
Simple Condition (bool~) bitmap_clear::$1 [296] if((byte) bitmap_clear::x#1!=rangelast(0,$c7)) goto bitmap_clear::@2
Simple Condition (bool~) bitmap_clear::$2 [300] if((byte) bitmap_clear::y#1!=rangelast(0,$27)) goto bitmap_clear::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Rewriting || if()-condition to two if()s [41] (bool~) divr16s::$2 ← (bool~) divr16s::$0 || (bool~) divr16s::$1
Successful SSA optimization Pass2ConditionalAndOrRewriting
Constant right-side identified [94] (word[SIZE]) x_cur ← { fill( SIZE, 0) }
Constant right-side identified [95] (word[SIZE]) y_cur ← { fill( SIZE, 0) }
Constant right-side identified [96] (signed byte[SIZE]) x_add ← { fill( SIZE, 0) }
Constant right-side identified [97] (signed byte[SIZE]) y_add ← { fill( SIZE, 0) }
Constant right-side identified [98] (byte[SIZE]) delay ← { fill( SIZE, 0) }
Constant right-side identified [249] (byte[$100]) bitmap_plot_ylo ← { fill( $100, 0) }
Constant right-side identified [250] (byte[$100]) bitmap_plot_yhi ← { fill( $100, 0) }
Constant right-side identified [251] (byte[$100]) bitmap_plot_bit ← { fill( $100, 0) }
Constant right-side identified [90] (word[SIZE]) x_cur ← { fill( SIZE, 0) }
Constant right-side identified [91] (word[SIZE]) y_cur ← { fill( SIZE, 0) }
Constant right-side identified [92] (signed byte[SIZE]) x_add ← { fill( SIZE, 0) }
Constant right-side identified [93] (signed byte[SIZE]) y_add ← { fill( SIZE, 0) }
Constant right-side identified [94] (byte[SIZE]) delay ← { fill( SIZE, 0) }
Constant right-side identified [245] (byte[$100]) bitmap_plot_ylo ← { fill( $100, 0) }
Constant right-side identified [246] (byte[$100]) bitmap_plot_yhi ← { fill( $100, 0) }
Constant right-side identified [247] (byte[$100]) bitmap_plot_bit ← { fill( $100, 0) }
Successful SSA optimization Pass2ConstantRValueConsolidation
Identified constant from value list (word[SIZE]) { (word) $a, (word) $14, (word) $1e, (word) $1e }
Identified constant from value list (byte[SIZE]) { (byte) $a, (byte) $a, (byte) $a, (byte) $14 }
Identified constant from value list (word[SIZE]) { (word) $14, (word) $a, (word) $14, (word) $14 }
Identified constant from value list (byte[SIZE]) { (byte) $14, (byte) $14, (byte) $a, (byte) $14 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const word) divr16u::quotient#0 = 0
Constant (const byte) divr16u::i#0 = 0
Constant (const byte) divr16s::neg#0 = 0
@ -1596,10 +1582,6 @@ Constant (const word) divr16s::dividendu#0 = 0
Constant (const word) divr16s::remu#0 = 0
Constant (const byte) divr16s::neg#1 = 1
Constant (const word) divr16s::divisoru#0 = 0
Constant (const word[SIZE]) x_start = { $a, $14, $1e, $1e }
Constant (const byte[SIZE]) y_start = { $a, $a, $a, $14 }
Constant (const word[SIZE]) x_end = { $14, $a, $14, $14 }
Constant (const byte[SIZE]) y_end = { $14, $14, $a, $14 }
Constant (const word[SIZE]) x_cur = { fill( SIZE, 0) }
Constant (const word[SIZE]) y_cur = { fill( SIZE, 0) }
Constant (const signed byte[SIZE]) x_add = { fill( SIZE, 0) }
@ -1630,28 +1612,28 @@ Constant (const word) main::vicSelectGfxBank1_toDd001_$0 = (word)main::vicSelect
Constant (const word) main::toD0181_$0 = (word)main::toD0181_screen#0
Constant (const word) main::toD0181_$4 = (word)main::toD0181_gfx#0
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [155] if(true) goto main::@6
if() condition always true - replacing block destination [151] if(true) goto main::@6
Successful SSA optimization Pass2ConstantIfs
Resolved ranged next value [23] divr16u::i#1 ← ++ divr16u::i#2 to ++
Resolved ranged comparison value [25] if(divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 to (number) $10
Resolved ranged next value [152] main::i#1 ← ++ main::i#2 to ++
Resolved ranged comparison value [154] if(main::i#1!=rangelast(0,SIZE-1)) goto main::@1 to (const byte) SIZE-(byte) 1+(number) 1
Resolved ranged next value [241] screen_fill::x#1 ← ++ screen_fill::x#2 to ++
Resolved ranged comparison value [243] if(screen_fill::x#1!=rangelast(0,$27)) goto screen_fill::@2 to (number) $28
Resolved ranged next value [245] screen_fill::y#1 ← ++ screen_fill::y#4 to ++
Resolved ranged comparison value [247] if(screen_fill::y#1!=rangelast(0,$18)) goto screen_fill::@1 to (number) $19
Resolved ranged next value [262] bitmap_init::x#1 ← ++ bitmap_init::x#2 to ++
Resolved ranged comparison value [264] if(bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 to (number) 0
Resolved ranged next value [282] bitmap_init::y#1 ← ++ bitmap_init::y#2 to ++
Resolved ranged comparison value [284] if(bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 to (number) 0
Resolved ranged next value [298] bitmap_clear::x#1 ← ++ bitmap_clear::x#2 to ++
Resolved ranged comparison value [300] if(bitmap_clear::x#1!=rangelast(0,$c7)) goto bitmap_clear::@2 to (number) $c8
Resolved ranged next value [302] bitmap_clear::y#1 ← ++ bitmap_clear::y#4 to ++
Resolved ranged comparison value [304] if(bitmap_clear::y#1!=rangelast(0,$27)) goto bitmap_clear::@1 to (number) $28
Resolved ranged next value [148] main::i#1 ← ++ main::i#2 to ++
Resolved ranged comparison value [150] if(main::i#1!=rangelast(0,SIZE-1)) goto main::@1 to (const byte) SIZE-(byte) 1+(number) 1
Resolved ranged next value [237] screen_fill::x#1 ← ++ screen_fill::x#2 to ++
Resolved ranged comparison value [239] if(screen_fill::x#1!=rangelast(0,$27)) goto screen_fill::@2 to (number) $28
Resolved ranged next value [241] screen_fill::y#1 ← ++ screen_fill::y#4 to ++
Resolved ranged comparison value [243] if(screen_fill::y#1!=rangelast(0,$18)) goto screen_fill::@1 to (number) $19
Resolved ranged next value [258] bitmap_init::x#1 ← ++ bitmap_init::x#2 to ++
Resolved ranged comparison value [260] if(bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 to (number) 0
Resolved ranged next value [278] bitmap_init::y#1 ← ++ bitmap_init::y#2 to ++
Resolved ranged comparison value [280] if(bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 to (number) 0
Resolved ranged next value [294] bitmap_clear::x#1 ← ++ bitmap_clear::x#2 to ++
Resolved ranged comparison value [296] if(bitmap_clear::x#1!=rangelast(0,$c7)) goto bitmap_clear::@2 to (number) $c8
Resolved ranged next value [298] bitmap_clear::y#1 ← ++ bitmap_clear::y#4 to ++
Resolved ranged comparison value [300] if(bitmap_clear::y#1!=rangelast(0,$27)) goto bitmap_clear::@1 to (number) $28
Simplifying constant evaluating to zero (word)(const signed word) divr16s::dividend#0 in
Successful SSA optimization PassNSimplifyConstantZero
Simplifying expression containing zero bitmap_plot_yhi in [289] (word~) bitmap_clear::$3 ← *((const byte[$100]) bitmap_plot_yhi + (byte) 0) w= *((const byte[$100]) bitmap_plot_ylo + (byte) 0)
Simplifying expression containing zero bitmap_plot_ylo in [289] (word~) bitmap_clear::$3 ← *((const byte[$100]) bitmap_plot_yhi) w= *((const byte[$100]) bitmap_plot_ylo + (byte) 0)
Simplifying expression containing zero bitmap_plot_yhi in [285] (word~) bitmap_clear::$3 ← *((const byte[$100]) bitmap_plot_yhi + (byte) 0) w= *((const byte[$100]) bitmap_plot_ylo + (byte) 0)
Simplifying expression containing zero bitmap_plot_ylo in [285] (word~) bitmap_clear::$3 ← *((const byte[$100]) bitmap_plot_yhi) w= *((const byte[$100]) bitmap_plot_ylo + (byte) 0)
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused constant (const word) divr16s::dividendu#0
Eliminating unused constant (const word) divr16s::remu#0

View File

@ -5,7 +5,6 @@ Culled Empty Block (label) main::@2
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
(byte[]) nums ← { (number) 2, (number) 3, (number) 4, (number) 5 }
to:@1
(void()) main()
@ -19,7 +18,7 @@ main::@1: scope:[main] from main main::@1
(number~) main::$0 ← (number) 4 + (byte) main::i#2
*((const byte*) SCREEN + (number~) main::$0) ← *((const byte[]) str + (byte) main::i#2)
(number~) main::$1 ← (number) 9 + (byte) main::i#2
*((const byte*) SCREEN + (number~) main::$1) ← *((byte[]) nums + (byte) main::i#2)
*((const byte*) SCREEN + (number~) main::$1) ← *((const byte[]) nums + (byte) main::i#2)
(byte) main::i#1 ← (byte) main::i#2 + rangenext(0,3)
(bool~) main::$2 ← (byte) main::i#1 != rangelast(0,3)
if((bool~) main::$2) goto main::@1
@ -52,7 +51,7 @@ SYMBOL TABLE SSA
(byte) main::i#1
(byte) main::i#2
(const byte) num = (byte) 1
(byte[]) nums
(const byte[]) nums = { (byte)(number) 2, (byte)(number) 3, (byte)(number) 4, (byte)(number) 5 }
(const byte[]) str = (string) "bcde"
Adding number conversion cast (unumber) 0 in *((const byte*) SCREEN + (number) 0) ← (const byte) ch
@ -62,13 +61,11 @@ Adding number conversion cast (unumber) main::$0 in (number~) main::$0 ← (unum
Adding number conversion cast (unumber) 9 in (number~) main::$1 ← (number) 9 + (byte) main::i#2
Adding number conversion cast (unumber) main::$1 in (number~) main::$1 ← (unumber)(number) 9 + (byte) main::i#2
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (byte[]) nums ← (byte[]){ (byte)(number) 2, (byte)(number) 3, (byte)(number) 4, (byte)(number) 5 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 2
Simplifying constant integer cast 3
Simplifying constant integer cast 4
Simplifying constant integer cast 5
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 0
Simplifying constant integer cast 2
Simplifying constant integer cast 4
@ -81,16 +78,13 @@ Finalized unsigned number type (byte) 9
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in (unumber~) main::$0 ← (byte) 4 + (byte) main::i#2
Inferred type updated to byte in (unumber~) main::$1 ← (byte) 9 + (byte) main::i#2
Simple Condition (bool~) main::$2 [11] if((byte) main::i#1!=rangelast(0,3)) goto main::@1
Simple Condition (bool~) main::$2 [10] if((byte) main::i#1!=rangelast(0,3)) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Identified constant from value list (byte[]) { (byte) 2, (byte) 3, (byte) 4, (byte) 5 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const byte[]) nums = { 2, 3, 4, 5 }
Constant (const byte) main::i#0 = 0
Successful SSA optimization Pass2ConstantIdentification
Resolved ranged next value [9] main::i#1 ← ++ main::i#2 to ++
Resolved ranged comparison value [11] if(main::i#1!=rangelast(0,3)) goto main::@1 to (number) 4
Simplifying expression containing zero SCREEN in [1] *((const byte*) SCREEN + (byte) 0) ← (const byte) ch
Resolved ranged next value [8] main::i#1 ← ++ main::i#2 to ++
Resolved ranged comparison value [10] if(main::i#1!=rangelast(0,3)) goto main::@1 to (number) 4
Simplifying expression containing zero SCREEN in [0] *((const byte*) SCREEN + (byte) 0) ← (const byte) ch
Successful SSA optimization PassNSimplifyExpressionWithZero
Adding number conversion cast (unumber) 4 in if((byte) main::i#1!=(number) 4) goto main::@1
Successful SSA optimization PassNAddNumberTypeConversions

View File

@ -1,7 +1,7 @@
Fixing pointer array-indexing *((signed word[8]) ball_y + (byte) main::hit_check)
Fixing pointer array-indexing *((signed word[8]) ball_y + (byte) main::hit_check)
Fixing pointer array-indexing *((signed word[8]) ball_y + (byte) scan_for_lowest::i)
Fixing pointer array-indexing *((signed word[8]) ball_y + (byte) scan_for_lowest::i)
Fixing pointer array-indexing *((const signed word[8]) ball_y + (byte) main::hit_check)
Fixing pointer array-indexing *((const signed word[8]) ball_y + (byte) main::hit_check)
Fixing pointer array-indexing *((const signed word[8]) ball_y + (byte) scan_for_lowest::i)
Fixing pointer array-indexing *((const signed word[8]) ball_y + (byte) scan_for_lowest::i)
Culled Empty Block (label) @1
Culled Empty Block (label) scan_for_lowest::@5
Culled Empty Block (label) scan_for_lowest::@6
@ -10,7 +10,6 @@ Culled Empty Block (label) scan_for_lowest::@9
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
(signed word[8]) ball_y ← { (number) $32, (number) $64, (number) -$c8, (number) $c, (number) -$64, (number) $4b, (number) 0, (number) -$79 }
to:@2
(void()) main()
@ -24,10 +23,10 @@ main::@1: scope:[main] from main
(byte) main::hit_check#0 ← (byte~) main::$0
*((const byte*) main::screen + (number) 0) ← (byte) main::hit_check#0
(byte~) main::$3 ← (byte) main::hit_check#0 * (const byte) SIZEOF_SIGNED_WORD
(byte~) main::$1 ← < *((signed word[8]) ball_y + (byte~) main::$3)
(byte~) main::$1 ← < *((const signed word[8]) ball_y + (byte~) main::$3)
*((const byte*) main::screen + (number) 2) ← (byte~) main::$1
(byte~) main::$4 ← (byte) main::hit_check#0 * (const byte) SIZEOF_SIGNED_WORD
(byte~) main::$2 ← > *((signed word[8]) ball_y + (byte~) main::$4)
(byte~) main::$2 ← > *((const signed word[8]) ball_y + (byte~) main::$4)
*((const byte*) main::screen + (number) 3) ← (byte~) main::$2
to:main::@return
main::@return: scope:[main] from main::@1
@ -52,7 +51,7 @@ scan_for_lowest::@2: scope:[scan_for_lowest] from scan_for_lowest::@1
(signed word) scan_for_lowest::height#2 ← phi( scan_for_lowest::@1/(signed word) scan_for_lowest::height#3 )
(byte) scan_for_lowest::i#3 ← phi( scan_for_lowest::@1/(byte) scan_for_lowest::i#2 )
(byte~) scan_for_lowest::$3 ← (byte) scan_for_lowest::i#3 * (const byte) SIZEOF_SIGNED_WORD
(bool~) scan_for_lowest::$1 ← *((signed word[8]) ball_y + (byte~) scan_for_lowest::$3) < (signed word) scan_for_lowest::height#2
(bool~) scan_for_lowest::$1 ← *((const signed word[8]) ball_y + (byte~) scan_for_lowest::$3) < (signed word) scan_for_lowest::height#2
(bool~) scan_for_lowest::$2 ← ! (bool~) scan_for_lowest::$1
if((bool~) scan_for_lowest::$2) goto scan_for_lowest::@4
to:scan_for_lowest::@7
@ -69,7 +68,7 @@ scan_for_lowest::@4: scope:[scan_for_lowest] from scan_for_lowest::@2 scan_for_
scan_for_lowest::@7: scope:[scan_for_lowest] from scan_for_lowest::@2
(byte) scan_for_lowest::i#5 ← phi( scan_for_lowest::@2/(byte) scan_for_lowest::i#3 )
(byte~) scan_for_lowest::$4 ← (byte) scan_for_lowest::i#5 * (const byte) SIZEOF_SIGNED_WORD
(signed word) scan_for_lowest::height#1 ← *((signed word[8]) ball_y + (byte~) scan_for_lowest::$4)
(signed word) scan_for_lowest::height#1 ← *((const signed word[8]) ball_y + (byte~) scan_for_lowest::$4)
(byte) scan_for_lowest::lowest#1 ← (byte) scan_for_lowest::i#5
to:scan_for_lowest::@4
scan_for_lowest::@return: scope:[scan_for_lowest] from scan_for_lowest::@3
@ -90,7 +89,7 @@ SYMBOL TABLE SSA
(label) @begin
(label) @end
(const byte) SIZEOF_SIGNED_WORD = (byte) 2
(signed word[8]) ball_y
(const signed word[8]) ball_y = { (signed word)(number) $32, (signed word)(number) $64, (signed word)(number) -$c8, (signed word)(number) $c, (signed word)(number) -$64, (signed word)(number) $4b, (signed word)(number) 0, (signed word)(number) -$79 }
(void()) main()
(byte~) main::$0
(byte~) main::$1
@ -149,13 +148,10 @@ Adding number conversion cast (snumber) $258 in (signed word) scan_for_lowest::h
Adding number conversion cast (unumber) 0 in (byte) scan_for_lowest::i#0 ← (number) 0
Adding number conversion cast (unumber) 8 in (bool~) scan_for_lowest::$0 ← (byte) scan_for_lowest::i#2 < (number) 8
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (signed word[8]) ball_y ← (signed word[8]){ (signed word)(number) $32, (signed word)(number) $64, (signed word)(number) -$c8, (signed word)(number) $c, (signed word)(number) -$64, (signed word)(number) $4b, (signed word)(number) 0, (signed word)(number) -$79 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (byte) scan_for_lowest::lowest#0 ← (unumber)(number) $ff
Inlining cast (signed word) scan_for_lowest::height#0 ← (snumber)(number) $258
Inlining cast (byte) scan_for_lowest::i#0 ← (unumber)(number) 0
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast $32
Simplifying constant integer cast $64
Simplifying constant integer cast -$c8
@ -164,6 +160,7 @@ Simplifying constant integer cast -$64
Simplifying constant integer cast $4b
Simplifying constant integer cast 0
Simplifying constant integer cast -$79
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 0
Simplifying constant integer cast 2
Simplifying constant integer cast 3
@ -180,7 +177,7 @@ Finalized signed number type (signed word) $258
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 8
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inversing boolean not [23] (bool~) scan_for_lowest::$2 ← *((signed word[8]) ball_y + (byte~) scan_for_lowest::$3) >= (signed word) scan_for_lowest::height#2 from [22] (bool~) scan_for_lowest::$1 ← *((signed word[8]) ball_y + (byte~) scan_for_lowest::$3) < (signed word) scan_for_lowest::height#2
Inversing boolean not [22] (bool~) scan_for_lowest::$2 ← *((const signed word[8]) ball_y + (byte~) scan_for_lowest::$3) >= (signed word) scan_for_lowest::height#2 from [21] (bool~) scan_for_lowest::$1 ← *((const signed word[8]) ball_y + (byte~) scan_for_lowest::$3) < (signed word) scan_for_lowest::height#2
Successful SSA optimization Pass2UnaryNotSimplification
Alias (byte) scan_for_lowest::return#0 = (byte) scan_for_lowest::return#3
Alias (byte) main::hit_check#0 = (byte~) main::$0
@ -191,19 +188,16 @@ Successful SSA optimization Pass2AliasElimination
Alias candidate removed (phi-usage) (byte) scan_for_lowest::i#2 = (byte) scan_for_lowest::i#4
Identical Phi Values (byte) scan_for_lowest::i#4 (byte) scan_for_lowest::i#2
Successful SSA optimization Pass2IdenticalPhiElimination
Identified duplicate assignment right side [10] (byte~) main::$4 ← (byte) main::hit_check#0 * (const byte) SIZEOF_SIGNED_WORD
Identified duplicate assignment right side [9] (byte~) main::$4 ← (byte) main::hit_check#0 * (const byte) SIZEOF_SIGNED_WORD
Successful SSA optimization Pass2DuplicateRValueIdentification
Simple Condition (bool~) scan_for_lowest::$0 [19] if((byte) scan_for_lowest::i#2<(byte) 8) goto scan_for_lowest::@2
Simple Condition (bool~) scan_for_lowest::$2 [24] if(*((signed word[8]) ball_y + (byte~) scan_for_lowest::$3)>=(signed word) scan_for_lowest::height#2) goto scan_for_lowest::@4
Simple Condition (bool~) scan_for_lowest::$0 [18] if((byte) scan_for_lowest::i#2<(byte) 8) goto scan_for_lowest::@2
Simple Condition (bool~) scan_for_lowest::$2 [23] if(*((const signed word[8]) ball_y + (byte~) scan_for_lowest::$3)>=(signed word) scan_for_lowest::height#2) goto scan_for_lowest::@4
Successful SSA optimization Pass2ConditionalJumpSimplification
Identified constant from value list (signed word[8]) { (signed word) $32, (signed word) $64, (signed word) -$c8, (signed word) $c, (signed word) -$64, (signed word) $4b, (signed word) 0, (signed word) -$79 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const signed word[8]) ball_y = { $32, $64, -$c8, $c, -$64, $4b, 0, -$79 }
Constant (const byte) scan_for_lowest::lowest#0 = $ff
Constant (const signed word) scan_for_lowest::height#0 = $258
Constant (const byte) scan_for_lowest::i#0 = 0
Successful SSA optimization Pass2ConstantIdentification
Simplifying expression containing zero main::screen in [6] *((const byte*) main::screen + (byte) 0) ← (byte) main::hit_check#0
Simplifying expression containing zero main::screen in [5] *((const byte*) main::screen + (byte) 0) ← (byte) main::hit_check#0
Successful SSA optimization PassNSimplifyExpressionWithZero
Alias (byte~) main::$4 = (byte~) main::$3
Successful SSA optimization Pass2AliasElimination

View File

@ -6,10 +6,9 @@ CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from @1
(byte[]) main::msg ← { (byte) 1, (number) 2, (number) 3 }
*((const byte*) main::SCREEN + (number) 0) ← *((byte[]) main::msg + (number) 0)
*((const byte*) main::SCREEN + (number) 1) ← *((byte[]) main::msg + (number) 1)
*((const byte*) main::SCREEN + (number) 2) ← *((byte[]) main::msg + (number) 2)
*((const byte*) main::SCREEN + (number) 0) ← *((const byte[]) main::msg + (number) 0)
*((const byte*) main::SCREEN + (number) 1) ← *((const byte[]) main::msg + (number) 1)
*((const byte*) main::SCREEN + (number) 2) ← *((const byte[]) main::msg + (number) 2)
to:main::@return
main::@return: scope:[main] from main
return
@ -29,20 +28,18 @@ SYMBOL TABLE SSA
(void()) main()
(label) main::@return
(const byte*) main::SCREEN = (byte*)(number) $400
(byte[]) main::msg
(const byte[]) main::msg = { (byte) 1, (byte)(number) 2, (byte)(number) 3 }
Adding number conversion cast (unumber) 0 in *((const byte*) main::SCREEN + (number) 0) ← *((byte[]) main::msg + (number) 0)
Adding number conversion cast (unumber) 0 in *((const byte*) main::SCREEN + (number) 0) ← *((byte[]) main::msg + (unumber)(number) 0)
Adding number conversion cast (unumber) 1 in *((const byte*) main::SCREEN + (number) 1) ← *((byte[]) main::msg + (number) 1)
Adding number conversion cast (unumber) 1 in *((const byte*) main::SCREEN + (number) 1) ← *((byte[]) main::msg + (unumber)(number) 1)
Adding number conversion cast (unumber) 2 in *((const byte*) main::SCREEN + (number) 2) ← *((byte[]) main::msg + (number) 2)
Adding number conversion cast (unumber) 2 in *((const byte*) main::SCREEN + (number) 2) ← *((byte[]) main::msg + (unumber)(number) 2)
Adding number conversion cast (unumber) 0 in *((const byte*) main::SCREEN + (number) 0) ← *((const byte[]) main::msg + (number) 0)
Adding number conversion cast (unumber) 0 in *((const byte*) main::SCREEN + (number) 0) ← *((const byte[]) main::msg + (unumber)(number) 0)
Adding number conversion cast (unumber) 1 in *((const byte*) main::SCREEN + (number) 1) ← *((const byte[]) main::msg + (number) 1)
Adding number conversion cast (unumber) 1 in *((const byte*) main::SCREEN + (number) 1) ← *((const byte[]) main::msg + (unumber)(number) 1)
Adding number conversion cast (unumber) 2 in *((const byte*) main::SCREEN + (number) 2) ← *((const byte[]) main::msg + (number) 2)
Adding number conversion cast (unumber) 2 in *((const byte*) main::SCREEN + (number) 2) ← *((const byte[]) main::msg + (unumber)(number) 2)
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (byte[]) main::msg ← (byte[]){ (byte) 1, (byte)(number) 2, (byte)(number) 3 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 2
Simplifying constant integer cast 3
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 1
@ -57,12 +54,8 @@ Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) 2
Successful SSA optimization PassNFinalizeNumberTypeConversions
Identified constant from value list (byte[]) { (byte) 1, (byte) 2, (byte) 3 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const byte[]) main::msg = { 1, 2, 3 }
Successful SSA optimization Pass2ConstantIdentification
Simplifying expression containing zero main::msg in [1] *((const byte*) main::SCREEN + (byte) 0) ← *((const byte[]) main::msg + (byte) 0)
Simplifying expression containing zero main::SCREEN in [1] *((const byte*) main::SCREEN + (byte) 0) ← *((const byte[]) main::msg)
Simplifying expression containing zero main::msg in [0] *((const byte*) main::SCREEN + (byte) 0) ← *((const byte[]) main::msg + (byte) 0)
Simplifying expression containing zero main::SCREEN in [0] *((const byte*) main::SCREEN + (byte) 0) ← *((const byte[]) main::msg)
Successful SSA optimization PassNSimplifyExpressionWithZero
Consolidated array index constant in *(main::msg+1)
Consolidated array index constant in *(main::SCREEN+1)

View File

@ -6,10 +6,9 @@ CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from @1
(signed byte[]) main::msg ← { (number) -1, (number) 0, (number) 1 }
*((const signed byte*) main::SCREEN + (number) 0) ← *((signed byte[]) main::msg + (number) 0)
*((const signed byte*) main::SCREEN + (number) 1) ← *((signed byte[]) main::msg + (number) 1)
*((const signed byte*) main::SCREEN + (number) 2) ← *((signed byte[]) main::msg + (number) 2)
*((const signed byte*) main::SCREEN + (number) 0) ← *((const signed byte[]) main::msg + (number) 0)
*((const signed byte*) main::SCREEN + (number) 1) ← *((const signed byte[]) main::msg + (number) 1)
*((const signed byte*) main::SCREEN + (number) 2) ← *((const signed byte[]) main::msg + (number) 2)
to:main::@return
main::@return: scope:[main] from main
return
@ -29,21 +28,19 @@ SYMBOL TABLE SSA
(void()) main()
(label) main::@return
(const signed byte*) main::SCREEN = (signed byte*)(number) $400
(signed byte[]) main::msg
(const signed byte[]) main::msg = { (signed byte)(number) -1, (signed byte)(number) 0, (signed byte)(number) 1 }
Adding number conversion cast (unumber) 0 in *((const signed byte*) main::SCREEN + (number) 0) ← *((signed byte[]) main::msg + (number) 0)
Adding number conversion cast (unumber) 0 in *((const signed byte*) main::SCREEN + (number) 0) ← *((signed byte[]) main::msg + (unumber)(number) 0)
Adding number conversion cast (unumber) 1 in *((const signed byte*) main::SCREEN + (number) 1) ← *((signed byte[]) main::msg + (number) 1)
Adding number conversion cast (unumber) 1 in *((const signed byte*) main::SCREEN + (number) 1) ← *((signed byte[]) main::msg + (unumber)(number) 1)
Adding number conversion cast (unumber) 2 in *((const signed byte*) main::SCREEN + (number) 2) ← *((signed byte[]) main::msg + (number) 2)
Adding number conversion cast (unumber) 2 in *((const signed byte*) main::SCREEN + (number) 2) ← *((signed byte[]) main::msg + (unumber)(number) 2)
Adding number conversion cast (unumber) 0 in *((const signed byte*) main::SCREEN + (number) 0) ← *((const signed byte[]) main::msg + (number) 0)
Adding number conversion cast (unumber) 0 in *((const signed byte*) main::SCREEN + (number) 0) ← *((const signed byte[]) main::msg + (unumber)(number) 0)
Adding number conversion cast (unumber) 1 in *((const signed byte*) main::SCREEN + (number) 1) ← *((const signed byte[]) main::msg + (number) 1)
Adding number conversion cast (unumber) 1 in *((const signed byte*) main::SCREEN + (number) 1) ← *((const signed byte[]) main::msg + (unumber)(number) 1)
Adding number conversion cast (unumber) 2 in *((const signed byte*) main::SCREEN + (number) 2) ← *((const signed byte[]) main::msg + (number) 2)
Adding number conversion cast (unumber) 2 in *((const signed byte*) main::SCREEN + (number) 2) ← *((const signed byte[]) main::msg + (unumber)(number) 2)
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (signed byte[]) main::msg ← (signed byte[]){ (signed byte)(number) -1, (signed byte)(number) 0, (signed byte)(number) 1 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Simplifying constant pointer cast (signed byte*) 1024
Simplifying constant integer cast -1
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant pointer cast (signed byte*) 1024
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 1
@ -58,12 +55,8 @@ Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) 2
Successful SSA optimization PassNFinalizeNumberTypeConversions
Identified constant from value list (signed byte[]) { (signed byte) -1, (signed byte) 0, (signed byte) 1 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const signed byte[]) main::msg = { -1, 0, 1 }
Successful SSA optimization Pass2ConstantIdentification
Simplifying expression containing zero main::msg in [1] *((const signed byte*) main::SCREEN + (byte) 0) ← *((const signed byte[]) main::msg + (byte) 0)
Simplifying expression containing zero main::SCREEN in [1] *((const signed byte*) main::SCREEN + (byte) 0) ← *((const signed byte[]) main::msg)
Simplifying expression containing zero main::msg in [0] *((const signed byte*) main::SCREEN + (byte) 0) ← *((const signed byte[]) main::msg + (byte) 0)
Simplifying expression containing zero main::SCREEN in [0] *((const signed byte*) main::SCREEN + (byte) 0) ← *((const signed byte[]) main::msg)
Successful SSA optimization PassNSimplifyExpressionWithZero
Consolidated array index constant in *(main::msg+1)
Consolidated array index constant in *(main::SCREEN+1)

View File

@ -2,13 +2,12 @@ Setting inferred volatile on symbol affected by address-of (signed word*~) main:
Setting inferred volatile on symbol affected by address-of (signed word*~) main::$2 ← & (signed word) main::y2
Fixing pointer increment (signed word*) main::SCREEN ← ++ (signed word*) main::SCREEN
Fixing pointer increment (signed word*) main::SCREEN ← ++ (signed word*) main::SCREEN
Fixing pointer array-indexing *((signed word[4]) wow + (byte) foo::x)
Fixing pointer array-indexing *((const signed word[4]) wow + (byte) foo::x)
Culled Empty Block (label) foo::@1
Culled Empty Block (label) @1
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
(signed word[4]) wow ← { (number) $cafe, (number) $babe, (number) $1234, (number) $5678 }
to:@2
(signed word()) foo((byte) foo::x , (signed word*) foo::y)
@ -16,7 +15,7 @@ foo: scope:[foo] from main main::@1
(signed word*) foo::y#2 ← phi( main/(signed word*) foo::y#0 main::@1/(signed word*) foo::y#1 )
(byte) foo::x#2 ← phi( main/(byte) foo::x#0 main::@1/(byte) foo::x#1 )
(byte~) foo::$1 ← (byte) foo::x#2 * (const byte) SIZEOF_SIGNED_WORD
(signed word~) foo::$0 ← *((signed word[4]) wow + (byte~) foo::$1) + *((signed word*) foo::y#2)
(signed word~) foo::$0 ← *((const signed word[4]) wow + (byte~) foo::$1) + *((signed word*) foo::y#2)
(signed word) foo::return#0 ← (signed word~) foo::$0
to:foo::@return
foo::@return: scope:[foo] from foo
@ -111,15 +110,13 @@ SYMBOL TABLE SSA
(signed word) main::y2
(signed word) main::y2#0
(signed word) main::y2#1
(signed word[4]) wow
(const signed word[4]) wow = { (signed word)(number) $cafe, (signed word)(number) $babe, (signed word)(number) $1234, (signed word)(number) $5678 }
Adding number conversion cast (snumber) $1234 in (signed word) main::y1#0 ← (number) $1234
Adding number conversion cast (snumber) $1234 in (signed word) main::y2#0 ← (number) $1234
Adding number conversion cast (unumber) 1 in (byte) foo::x#0 ← (number) 1
Adding number conversion cast (unumber) 2 in (byte) foo::x#1 ← (number) 2
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (signed word[4]) wow ← (signed word[4]){ (signed word)(number) $cafe, (signed word)(number) $babe, (signed word)(number) $1234, (signed word)(number) $5678 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (signed word*) main::SCREEN#0 ← (signed word*)(number) $400
Inlining cast (signed word) main::y1#0 ← (snumber)(number) $1234
Inlining cast (signed word) main::y2#0 ← (snumber)(number) $1234
@ -150,19 +147,16 @@ Alias (signed word*) foo::y#1 = (signed word*~) main::$2
Alias (signed word) foo::return#3 = (signed word) foo::return#6
Alias (signed word*) main::SCREEN#1 = (signed word*) main::SCREEN#4
Successful SSA optimization Pass2AliasElimination
Constant right-side identified [11] (signed word*) foo::y#0 ← & (signed word) main::y1#0
Constant right-side identified [20] (signed word*) foo::y#1 ← & (signed word) main::y2#0
Constant right-side identified [10] (signed word*) foo::y#0 ← & (signed word) main::y1#0
Constant right-side identified [19] (signed word*) foo::y#1 ← & (signed word) main::y2#0
Successful SSA optimization Pass2ConstantRValueConsolidation
Identified constant from value list (signed word[4]) { (signed word) $cafe, (signed word) $babe, (signed word) $1234, (signed word) $5678 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const signed word[4]) wow = { $cafe, $babe, $1234, $5678 }
Constant (const signed word*) main::SCREEN#0 = (signed word*) 1024
Constant (const signed word*) foo::y#0 = &main::y1#0
Constant (const byte) foo::x#0 = 1
Constant (const signed word*) foo::y#1 = &main::y2#0
Constant (const byte) foo::x#1 = 2
Successful SSA optimization Pass2ConstantIdentification
Converting *(pointer+n) to pointer[n] [27] *((signed word*) main::SCREEN#1) ← (signed word~) main::$3 -- *(main::SCREEN#0 + SIZEOF_SIGNED_WORD)
Converting *(pointer+n) to pointer[n] [26] *((signed word*) main::SCREEN#1) ← (signed word~) main::$3 -- *(main::SCREEN#0 + SIZEOF_SIGNED_WORD)
Successful SSA optimization Pass2InlineDerefIdx
Eliminating unused variable (signed word*) main::SCREEN#2 and assignment [15] (signed word*) main::SCREEN#2 ← (signed word*) main::SCREEN#1 + (const byte) SIZEOF_SIGNED_WORD
Successful SSA optimization PassNEliminateUnusedVars

View File

@ -1,4 +1,4 @@
Fixing pointer array-indexing *((word[]) charset_spec_row + (byte) main::c)
Fixing pointer array-indexing *((const word[]) charset_spec_row + (byte) main::c)
Identified constant variable (byte*) VIC_MEMORY
Identified constant variable (byte*) SCREEN
Identified constant variable (byte*) CHARSET
@ -10,7 +10,6 @@ Culled Empty Block (label) gen_char3::@6
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
(word[]) charset_spec_row ← { (number) $f7da, (number) $f7de, (number) $f24e, (number) $d6de }
to:@2
(void()) main()
@ -30,7 +29,7 @@ main::@2: scope:[main] from main::@1
(byte) main::c#3 ← phi( main::@1/(byte) main::c#2 )
(byte~) main::$10 ← (byte) main::c#3 * (const byte) SIZEOF_WORD
(byte*) gen_char3::dst#0 ← (byte*) main::charset#2
(word) gen_char3::spec#0 ← *((word[]) charset_spec_row + (byte~) main::$10)
(word) gen_char3::spec#0 ← *((const word[]) charset_spec_row + (byte~) main::$10)
call gen_char3
to:main::@7
main::@7: scope:[main] from main::@2
@ -130,7 +129,7 @@ SYMBOL TABLE SSA
(const byte*) SCREEN = (byte*)(number) $400
(const byte) SIZEOF_WORD = (byte) 2
(const byte*) VIC_MEMORY = (byte*)(number) $d018
(word[]) charset_spec_row
(const word[]) charset_spec_row = { (word)(number) $f7da, (word)(number) $f7de, (word)(number) $f24e, (word)(number) $d6de }
(void()) gen_char3((byte*) gen_char3::dst , (word) gen_char3::spec)
(byte~) gen_char3::$0
(number~) gen_char3::$1
@ -235,21 +234,19 @@ Adding number conversion cast (unumber) gen_char3::$6 in (number~) gen_char3::$6
Adding number conversion cast (unumber) 1 in (number~) gen_char3::$4 ← (byte) gen_char3::b#4 | (number) 1
Adding number conversion cast (unumber) gen_char3::$4 in (number~) gen_char3::$4 ← (byte) gen_char3::b#4 | (unumber)(number) 1
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (word[]) charset_spec_row ← (word[]){ (word)(number) $f7da, (word)(number) $f7de, (word)(number) $f24e, (word)(number) $d6de }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (byte) main::c#0 ← (unumber)(number) 0
Inlining cast (word~) main::$1 ← (word)(const byte*) SCREEN
Inlining cast (word~) main::$3 ← (word)(const byte*) CHARSET
Inlining cast (byte~) main::$6 ← (byte)(unumber~) main::$5
Inlining cast (byte) gen_char3::b#0 ← (unumber)(number) 0
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 53272
Simplifying constant pointer cast (byte*) 1024
Simplifying constant pointer cast (byte*) 12288
Simplifying constant integer cast $f7da
Simplifying constant integer cast $f7de
Simplifying constant integer cast $f24e
Simplifying constant integer cast $d6de
Simplifying constant pointer cast (byte*) 53272
Simplifying constant pointer cast (byte*) 1024
Simplifying constant pointer cast (byte*) 12288
Simplifying constant integer cast 8
Simplifying constant integer cast 0
Simplifying constant integer cast 4
@ -283,7 +280,7 @@ Inferred type updated to byte in (unumber~) gen_char3::$1 ← (byte~) gen_char3:
Inferred type updated to byte in (unumber~) gen_char3::$5 ← (byte) gen_char3::b#3 * (byte) 2
Inferred type updated to word in (unumber~) gen_char3::$6 ← (word) gen_char3::spec#3 * (byte) 2
Inferred type updated to byte in (unumber~) gen_char3::$4 ← (byte) gen_char3::b#4 | (byte) 1
Inversing boolean not [33] (bool~) gen_char3::$3 ← (byte~) gen_char3::$1 == (byte) 0 from [32] (bool~) gen_char3::$2 ← (byte~) gen_char3::$1 != (byte) 0
Inversing boolean not [32] (bool~) gen_char3::$3 ← (byte~) gen_char3::$1 == (byte) 0 from [31] (bool~) gen_char3::$2 ← (byte~) gen_char3::$1 != (byte) 0
Successful SSA optimization Pass2UnaryNotSimplification
Alias (byte*) main::charset#0 = (byte*~) main::$0
Alias (byte) main::c#2 = (byte) main::c#3 (byte) main::c#4
@ -312,18 +309,15 @@ Identical Phi Values (byte) gen_char3::r#2 (byte) gen_char3::r#6
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values (byte*) gen_char3::dst#5 (byte*) gen_char3::dst#0
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) main::$7 [6] if((byte) main::c#2!=(byte) 4) goto main::@2
Simple Condition (bool~) gen_char3::$3 [34] if((byte~) gen_char3::$1==(byte) 0) goto gen_char3::@3
Simple Condition (bool~) gen_char3::$7 [42] if((byte) gen_char3::c#1!=rangelast(0,2)) goto gen_char3::@2
Simple Condition (bool~) gen_char3::$8 [50] if((byte) gen_char3::r#1!=rangelast(0,4)) goto gen_char3::@1
Simple Condition (bool~) main::$7 [5] if((byte) main::c#2!=(byte) 4) goto main::@2
Simple Condition (bool~) gen_char3::$3 [33] if((byte~) gen_char3::$1==(byte) 0) goto gen_char3::@3
Simple Condition (bool~) gen_char3::$7 [41] if((byte) gen_char3::c#1!=rangelast(0,2)) goto gen_char3::@2
Simple Condition (bool~) gen_char3::$8 [49] if((byte) gen_char3::r#1!=rangelast(0,4)) goto gen_char3::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant right-side identified [1] (byte*) main::charset#0 ← (const byte*) CHARSET + (byte) 8
Constant right-side identified [16] (word~) main::$1 ← (word)(const byte*) SCREEN
Constant right-side identified [18] (word~) main::$3 ← (word)(const byte*) CHARSET
Constant right-side identified [0] (byte*) main::charset#0 ← (const byte*) CHARSET + (byte) 8
Constant right-side identified [15] (word~) main::$1 ← (word)(const byte*) SCREEN
Constant right-side identified [17] (word~) main::$3 ← (word)(const byte*) CHARSET
Successful SSA optimization Pass2ConstantRValueConsolidation
Identified constant from value list (word[]) { (word) $f7da, (word) $f7de, (word) $f24e, (word) $d6de }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const word[]) charset_spec_row = { $f7da, $f7de, $f24e, $d6de }
Constant (const byte*) main::charset#0 = CHARSET+8
Constant (const byte) main::c#0 = 0
Constant (const word) main::$1 = (word)SCREEN
@ -332,10 +326,10 @@ Constant (const byte) gen_char3::r#0 = 0
Constant (const byte) gen_char3::b#0 = 0
Constant (const byte) gen_char3::c#0 = 0
Successful SSA optimization Pass2ConstantIdentification
Resolved ranged next value [40] gen_char3::c#1 ← ++ gen_char3::c#2 to ++
Resolved ranged comparison value [42] if(gen_char3::c#1!=rangelast(0,2)) goto gen_char3::@2 to (number) 3
Resolved ranged next value [48] gen_char3::r#1 ← ++ gen_char3::r#6 to ++
Resolved ranged comparison value [50] if(gen_char3::r#1!=rangelast(0,4)) goto gen_char3::@1 to (number) 5
Resolved ranged next value [39] gen_char3::c#1 ← ++ gen_char3::c#2 to ++
Resolved ranged comparison value [41] if(gen_char3::c#1!=rangelast(0,2)) goto gen_char3::@2 to (number) 3
Resolved ranged next value [47] gen_char3::r#1 ← ++ gen_char3::r#6 to ++
Resolved ranged comparison value [49] if(gen_char3::r#1!=rangelast(0,4)) goto gen_char3::@1 to (number) 5
Adding number conversion cast (unumber) 3 in if((byte) gen_char3::c#1!=(number) 3) goto gen_char3::@2
Adding number conversion cast (unumber) 5 in if((byte) gen_char3::r#1!=(number) 5) goto gen_char3::@1
Successful SSA optimization PassNAddNumberTypeConversions

View File

@ -2,7 +2,6 @@ Culled Empty Block (label) main::@1
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
(byte[8]) ball_active ← { (number) 0, (number) 1, (number) 0, (number) 1, (number) 0, (number) 1, (number) 1, (number) 1 }
to:@1
(void()) main()
@ -12,13 +11,13 @@ main: scope:[main] from @1
to:main::@2
main::@2: scope:[main] from main main::@3
(byte) main::i#2 ← phi( main/(byte) main::i#0 main::@3/(byte) main::i#1 )
(bool~) main::$2 ← *((byte[8]) ball_active + (byte) main::i#2) < (number) 0
(bool~) main::$2 ← *((const byte[8]) ball_active + (byte) main::i#2) < (number) 0
(bool~) main::$3 ← ! (bool~) main::$2
if((bool~) main::$3) goto main::@3
to:main::@4
main::@3: scope:[main] from main::@2 main::@4
(byte) main::i#3 ← phi( main::@2/(byte) main::i#2 main::@4/(byte) main::i#4 )
(byte) main::temp#1 ← *((byte[8]) ball_active + (byte) main::i#3)
(byte) main::temp#1 ← *((const byte[8]) ball_active + (byte) main::i#3)
(byte) main::i#1 ← (byte) main::i#3 + rangenext(0,7)
(bool~) main::$4 ← (byte) main::i#1 != rangelast(0,7)
if((bool~) main::$4) goto main::@2
@ -52,7 +51,7 @@ SYMBOL TABLE SSA
(label) @2
(label) @begin
(label) @end
(byte[8]) ball_active
(const byte[8]) ball_active = { (byte)(number) 0, (byte)(number) 1, (byte)(number) 0, (byte)(number) 1, (byte)(number) 0, (byte)(number) 1, (byte)(number) 1, (byte)(number) 1 }
(void()) main()
(bool~) main::$0
(bool~) main::$1
@ -78,22 +77,20 @@ SYMBOL TABLE SSA
(byte) main::temp#2
(byte) main::temp#3
Adding number conversion cast (unumber) 0 in (bool~) main::$2 ← *((byte[8]) ball_active + (byte) main::i#2) < (number) 0
Adding number conversion cast (unumber) 0 in (bool~) main::$2 ← *((const byte[8]) ball_active + (byte) main::i#2) < (number) 0
Adding number conversion cast (unumber) 0 in (bool~) main::$0 ← (byte) main::temp#2 < (number) 0
Adding number conversion cast (unumber) $28 in *((const byte*) main::screen + (number) $28) ← (byte) main::temp#3
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (byte[8]) ball_active ← (byte[8]){ (byte)(number) 0, (byte)(number) 1, (byte)(number) 0, (byte)(number) 1, (byte)(number) 0, (byte)(number) 1, (byte)(number) 1, (byte)(number) 1 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $28
Successful SSA optimization PassNCastSimplification
@ -101,29 +98,26 @@ Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $28
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inversing boolean not [5] (bool~) main::$3 ← *((byte[8]) ball_active + (byte) main::i#2) >= (byte) 0 from [4] (bool~) main::$2 ← *((byte[8]) ball_active + (byte) main::i#2) < (byte) 0
Inversing boolean not [16] (bool~) main::$1 ← (byte) main::temp#2 >= (byte) 0 from [15] (bool~) main::$0 ← (byte) main::temp#2 < (byte) 0
Inversing boolean not [4] (bool~) main::$3 ← *((const byte[8]) ball_active + (byte) main::i#2) >= (byte) 0 from [3] (bool~) main::$2 ← *((const byte[8]) ball_active + (byte) main::i#2) < (byte) 0
Inversing boolean not [15] (bool~) main::$1 ← (byte) main::temp#2 >= (byte) 0 from [14] (bool~) main::$0 ← (byte) main::temp#2 < (byte) 0
Successful SSA optimization Pass2UnaryNotSimplification
Alias (byte) main::i#2 = (byte) main::i#4
Alias (byte) main::temp#1 = (byte) main::temp#2 (byte) main::temp#3
Successful SSA optimization Pass2AliasElimination
Alias (byte) main::i#2 = (byte) main::i#3
Successful SSA optimization Pass2AliasElimination
Simple Condition (bool~) main::$3 [6] if(*((byte[8]) ball_active + (byte) main::i#2)>=(byte) 0) goto main::@3
Simple Condition (bool~) main::$4 [11] if((byte) main::i#1!=rangelast(0,7)) goto main::@2
Simple Condition (bool~) main::$1 [17] if((byte) main::temp#1>=(byte) 0) goto main::@return
Simple Condition (bool~) main::$3 [5] if(*((const byte[8]) ball_active + (byte) main::i#2)>=(byte) 0) goto main::@3
Simple Condition (bool~) main::$4 [10] if((byte) main::i#1!=rangelast(0,7)) goto main::@2
Simple Condition (bool~) main::$1 [16] if((byte) main::temp#1>=(byte) 0) goto main::@return
Successful SSA optimization Pass2ConditionalJumpSimplification
Identified constant from value list (byte[8]) { (byte) 0, (byte) 1, (byte) 0, (byte) 1, (byte) 0, (byte) 1, (byte) 1, (byte) 1 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const byte[8]) ball_active = { 0, 1, 0, 1, 0, 1, 1, 1 }
Constant (const byte) main::temp#0 = 0
Constant (const byte) main::i#0 = 0
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [6] if(*((const byte[8]) ball_active + (byte) main::i#2)>=(byte) 0) goto main::@3
if() condition always true - replacing block destination [17] if((byte) main::temp#1>=(byte) 0) goto main::@return
if() condition always true - replacing block destination [5] if(*((const byte[8]) ball_active + (byte) main::i#2)>=(byte) 0) goto main::@3
if() condition always true - replacing block destination [16] if((byte) main::temp#1>=(byte) 0) goto main::@return
Successful SSA optimization Pass2ConstantIfs
Resolved ranged next value [9] main::i#1 ← ++ main::i#2 to ++
Resolved ranged comparison value [11] if(main::i#1!=rangelast(0,7)) goto main::@2 to (number) 8
Resolved ranged next value [8] main::i#1 ← ++ main::i#2 to ++
Resolved ranged comparison value [10] if(main::i#1!=rangelast(0,7)) goto main::@2 to (number) 8
Eliminating unused constant (const byte) main::temp#0
Successful SSA optimization PassNEliminateUnusedVars
Removing unused block main::@4

View File

@ -1287,7 +1287,6 @@ make_plasma_charset: scope:[make_plasma_charset] from main::@10
(byte*) print_char_cursor#29 ← phi( main::@10/(byte*) print_char_cursor#21 )
(byte*) print_line_cursor#22 ← phi( main::@10/(byte*) print_line_cursor#14 )
(byte*) print_screen#4 ← phi( main::@10/(byte*) print_screen#5 )
(byte[8]) make_plasma_charset::bittab ← { (number) 1, (number) 2, (number) 4, (number) 8, (number) $10, (number) $20, (number) $40, (number) $80 }
call sid_rnd_init
to:make_plasma_charset::@23
make_plasma_charset::@23: scope:[make_plasma_charset] from make_plasma_charset
@ -1425,7 +1424,7 @@ make_plasma_charset::@13: scope:[make_plasma_charset] from make_plasma_charset:
(word) make_plasma_charset::c#13 ← phi( make_plasma_charset::@25/(word) make_plasma_charset::c#14 )
(byte) make_plasma_charset::ii#4 ← phi( make_plasma_charset::@25/(byte) make_plasma_charset::ii#5 )
(byte) make_plasma_charset::b#3 ← phi( make_plasma_charset::@25/(byte) make_plasma_charset::b#5 )
(byte) make_plasma_charset::b#1 ← (byte) make_plasma_charset::b#3 | *((byte[8]) make_plasma_charset::bittab + (byte) make_plasma_charset::ii#4)
(byte) make_plasma_charset::b#1 ← (byte) make_plasma_charset::b#3 | *((const byte[8]) make_plasma_charset::bittab + (byte) make_plasma_charset::ii#4)
to:make_plasma_charset::@10
make_plasma_charset::@19: scope:[make_plasma_charset] from make_plasma_charset::@26 make_plasma_charset::@6
(byte*) make_plasma_charset::charset#11 ← phi( make_plasma_charset::@26/(byte*) make_plasma_charset::charset#14 make_plasma_charset::@6/(byte*) make_plasma_charset::charset#15 )
@ -2328,7 +2327,7 @@ SYMBOL TABLE SSA
(byte) make_plasma_charset::b#5
(byte) make_plasma_charset::b#6
(byte) make_plasma_charset::b#7
(byte[8]) make_plasma_charset::bittab
(const byte[8]) make_plasma_charset::bittab = { (byte)(number) 1, (byte)(number) 2, (byte)(number) 4, (byte)(number) 8, (byte)(number) $10, (byte)(number) $20, (byte)(number) $40, (byte)(number) $80 }
(word) make_plasma_charset::c
(word) make_plasma_charset::c#0
(word) make_plasma_charset::c#1
@ -2846,8 +2845,6 @@ Adding number conversion cast (unumber) 8 in (number~) make_plasma_charset::$10
Adding number conversion cast (unumber) make_plasma_charset::$10 in (number~) make_plasma_charset::$10 ← (word) make_plasma_charset::c#5 * (unumber)(number) 8
Adding number conversion cast (unumber) make_plasma_charset::$11 in (number~) make_plasma_charset::$11 ← (unumber~) make_plasma_charset::$10 + (byte) make_plasma_charset::i#3
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (byte[8]) make_plasma_charset::bittab ← (byte[8]){ (byte)(number) 1, (byte)(number) 2, (byte)(number) 4, (byte)(number) 8, (byte)(number) $10, (byte)(number) $20, (byte)(number) $40, (byte)(number) $80 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (byte*~) memset::$2 ← (byte*)(void*) memset::str#3
Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#3
Inlining cast (void*) malloc::return#0 ← (void*)(byte*) malloc::mem#0
@ -2892,6 +2889,14 @@ Simplifying constant pointer cast (byte*) 54299
Simplifying constant pointer cast (byte*) 8192
Simplifying constant pointer cast (byte*) 10240
Simplifying constant pointer cast (byte*) 11264
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 4
Simplifying constant integer cast 8
Simplifying constant integer cast $10
Simplifying constant integer cast $20
Simplifying constant integer cast $40
Simplifying constant integer cast $80
Simplifying constant pointer cast (byte*) 40960
Simplifying constant integer cast 0
Simplifying constant integer cast 0
@ -2971,14 +2976,6 @@ Simplifying constant integer cast $28
Simplifying constant integer cast $28
Simplifying constant integer cast $27
Simplifying constant integer cast $27
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 4
Simplifying constant integer cast 8
Simplifying constant integer cast $10
Simplifying constant integer cast $20
Simplifying constant integer cast $40
Simplifying constant integer cast $80
Simplifying constant integer cast 0
Simplifying constant integer cast $100
Simplifying constant integer cast 0
@ -3126,8 +3123,8 @@ Inversing boolean not [150] (bool~) atan2_16::$17 ← (signed word) atan2_16::yi
Inversing boolean not [159] (bool~) atan2_16::$11 ← (signed word) atan2_16::x#4 >= (signed byte) 0 from [158] (bool~) atan2_16::$10 ← (signed word) atan2_16::x#4 < (signed byte) 0
Inversing boolean not [170] (bool~) atan2_16::$19 ← (byte) 0 == (byte) atan2_16::shift#4 from [169] (bool~) atan2_16::$24 ← (byte) 0 != (byte) atan2_16::shift#4
Inversing boolean not [194] (bool~) atan2_16::$14 ← (signed word) atan2_16::y#4 >= (signed byte) 0 from [193] (bool~) atan2_16::$13 ← (signed word) atan2_16::y#4 < (signed byte) 0
Inversing boolean not [518] (bool~) make_plasma_charset::$14 ← (byte~) make_plasma_charset::$12 != (byte) 0 from [517] (bool~) make_plasma_charset::$13 ← (byte~) make_plasma_charset::$12 == (byte) 0
Inversing boolean not [530] (bool~) make_plasma_charset::$9 ← (byte~) make_plasma_charset::$7 <= (byte) make_plasma_charset::s#1 from [529] (bool~) make_plasma_charset::$8 ← (byte~) make_plasma_charset::$7 > (byte) make_plasma_charset::s#1
Inversing boolean not [517] (bool~) make_plasma_charset::$14 ← (byte~) make_plasma_charset::$12 != (byte) 0 from [516] (bool~) make_plasma_charset::$13 ← (byte~) make_plasma_charset::$12 == (byte) 0
Inversing boolean not [529] (bool~) make_plasma_charset::$9 ← (byte~) make_plasma_charset::$7 <= (byte) make_plasma_charset::s#1 from [528] (bool~) make_plasma_charset::$8 ← (byte~) make_plasma_charset::$7 > (byte) make_plasma_charset::s#1
Successful SSA optimization Pass2UnaryNotSimplification
Alias (void*) memset::return#0 = (void*) memset::str#2 (void*) memset::return#4 (void*) memset::return#1
Alias (void*) memset::str#3 = (void*) memset::str#4
@ -3526,19 +3523,17 @@ Simple Condition (bool~) init_dist_screen::$3 [429] if((byte) init_dist_screen::
Simple Condition (bool~) init_dist_screen::$10 [448] if((byte) init_dist_screen::x#2<=(byte) $13) goto init_dist_screen::@6
Simple Condition (bool~) init_dist_screen::$12 [453] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@8
Simple Condition (bool~) init_dist_screen::$21 [459] if((byte) init_dist_screen::y#1!=rangelast(0,$c)) goto init_dist_screen::@1
Simple Condition (bool~) make_plasma_charset::$2 [504] if((word) make_plasma_charset::c#2<(word) $100) goto make_plasma_charset::@2
Simple Condition (bool~) make_plasma_charset::$4 [511] if((byte) make_plasma_charset::i#2<(byte) 8) goto make_plasma_charset::@5
Simple Condition (bool~) make_plasma_charset::$14 [519] if((byte~) make_plasma_charset::$12!=(byte) 0) goto make_plasma_charset::@19
Simple Condition (bool~) make_plasma_charset::$5 [522] if((byte) make_plasma_charset::ii#2<(byte) 8) goto make_plasma_charset::@8
Simple Condition (bool~) make_plasma_charset::$9 [531] if((byte~) make_plasma_charset::$7<=(byte) make_plasma_charset::s#0) goto make_plasma_charset::@10
Simple Condition (bool~) make_plasma_charset::$2 [503] if((word) make_plasma_charset::c#2<(word) $100) goto make_plasma_charset::@2
Simple Condition (bool~) make_plasma_charset::$4 [510] if((byte) make_plasma_charset::i#2<(byte) 8) goto make_plasma_charset::@5
Simple Condition (bool~) make_plasma_charset::$14 [518] if((byte~) make_plasma_charset::$12!=(byte) 0) goto make_plasma_charset::@19
Simple Condition (bool~) make_plasma_charset::$5 [521] if((byte) make_plasma_charset::ii#2<(byte) 8) goto make_plasma_charset::@8
Simple Condition (bool~) make_plasma_charset::$9 [530] if((byte~) make_plasma_charset::$7<=(byte) make_plasma_charset::s#0) goto make_plasma_charset::@10
Successful SSA optimization Pass2ConditionalJumpSimplification
Negating conditional jump and destination [191] if((byte) atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@17
Successful SSA optimization Pass2ConditionalJumpSequenceImprovement
Constant right-side identified [61] (byte~) bsearch16u::$17 ← (byte) 1 * (const byte) SIZEOF_WORD
Constant right-side identified [68] (byte~) bsearch16u::$18 ← (byte) 1 * (const byte) SIZEOF_WORD
Successful SSA optimization Pass2ConstantRValueConsolidation
Identified constant from value list (byte[8]) { (byte) 1, (byte) 2, (byte) 4, (byte) 8, (byte) $10, (byte) $20, (byte) $40, (byte) $80 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const byte*) heap_head#0 = HEAP_TOP
Constant (const byte) bsearch16u::$17 = 1*SIZEOF_WORD
Constant (const byte) bsearch16u::$18 = 1*SIZEOF_WORD
@ -3580,7 +3575,6 @@ Constant (const byte) NUM_SQUARES#3 = $30
Constant (const byte) init_dist_screen::y#0 = 0
Constant (const byte) init_dist_screen::x#0 = 0
Constant (const byte) init_dist_screen::xb#0 = $27
Constant (const byte[8]) make_plasma_charset::bittab = { 1, 2, 4, 8, $10, $20, $40, $80 }
Constant (const word) make_plasma_charset::c#0 = 0
Constant (const byte) make_plasma_charset::i#0 = 0
Constant (const byte) make_plasma_charset::b#0 = 0
@ -3608,7 +3602,7 @@ Resolved ranged next value [457] init_dist_screen::y#1 ← ++ init_dist_screen::
Resolved ranged comparison value [459] if(init_dist_screen::y#1!=rangelast(0,$c)) goto init_dist_screen::@1 to (number) $d
Rewriting conditional comparison [376] if((byte) init_angle_screen::x#2<=(byte) $13) goto init_angle_screen::@3
Rewriting conditional comparison [448] if((byte) init_dist_screen::x#2<=(byte) $13) goto init_dist_screen::@6
De-inlining pointer[w] to *(pointer+w) [535] *((const byte*) make_plasma_charset::charset#0 + (word~) make_plasma_charset::$11) ← (byte) make_plasma_charset::b#2
De-inlining pointer[w] to *(pointer+w) [534] *((const byte*) make_plasma_charset::charset#0 + (word~) make_plasma_charset::$11) ← (byte) make_plasma_charset::b#2
Successful SSA optimization Pass2DeInlineWordDerefIdx
Eliminating unused variable (void*) memset::return#2 and assignment [105] (void*) memset::return#2 ← (void*) memset::str#3
Eliminating unused variable (void*) memset::return#3 and assignment [126] (void*) memset::return#3 ← (void*) memset::str#3

View File

@ -549,9 +549,9 @@ init_font_hex: {
bne __b1
rts
}
print_hextab: .text "0123456789abcdef"
// Bit patterns for symbols 0-f (3x5 pixels) used in font hex
FONT_HEX_PROTO: .byte 2, 5, 5, 5, 2, 6, 2, 2, 2, 7, 6, 1, 2, 4, 7, 6, 1, 2, 1, 6, 5, 5, 7, 1, 1, 7, 4, 6, 1, 6, 3, 4, 6, 5, 2, 7, 1, 1, 1, 1, 2, 5, 2, 5, 2, 2, 5, 3, 1, 1, 2, 5, 7, 5, 5, 6, 5, 6, 5, 6, 2, 5, 4, 5, 2, 6, 5, 5, 5, 6, 7, 4, 6, 4, 7, 7, 4, 6, 4, 4
print_hextab: .text "0123456789abcdef"
// Angles representing ATAN(0.5), ATAN(0.25), ATAN(0.125), ...
CORDIC_ATAN2_ANGLES_16:
.for (var i=0; i<CORDIC_ITERATIONS_16; i++)

View File

@ -1,5 +1,5 @@
Resolved forward reference FONT_HEX_PROTO to (byte[]) FONT_HEX_PROTO
Resolved forward reference FONT_HEX_PROTO to (byte[]) FONT_HEX_PROTO
Resolved forward reference FONT_HEX_PROTO to (const byte[]) FONT_HEX_PROTO
Resolved forward reference FONT_HEX_PROTO to (const byte[]) FONT_HEX_PROTO
Fixing pointer addition (word*~) bsearch16u::$7 ← (word*) bsearch16u::items + (byte~) bsearch16u::$6
Fixing pointer addition (word*~) bsearch16u::$15 ← (word*) bsearch16u::pivot + (number) 1
Fixing pointer addition (word*~) bsearch16u::$1 ← (word*) bsearch16u::items - (number) 1
@ -93,14 +93,14 @@ CONTROL FLOW GRAPH SSA
(void()) init_font_hex((byte*) init_font_hex::charset)
init_font_hex: scope:[init_font_hex] from main
(byte*) init_font_hex::charset#6 ← phi( main/(byte*) init_font_hex::charset#1 )
(byte*) init_font_hex::proto_hi#0 ← (byte[]) FONT_HEX_PROTO
(byte*) init_font_hex::proto_hi#0 ← (const byte[]) FONT_HEX_PROTO
(byte) init_font_hex::c#0 ← (byte) 0
to:init_font_hex::@1
init_font_hex::@1: scope:[init_font_hex] from init_font_hex init_font_hex::@5
(byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) init_font_hex::c#0 init_font_hex::@5/(byte) init_font_hex::c#1 )
(byte*) init_font_hex::proto_hi#6 ← phi( init_font_hex/(byte*) init_font_hex::proto_hi#0 init_font_hex::@5/(byte*) init_font_hex::proto_hi#1 )
(byte*) init_font_hex::charset#5 ← phi( init_font_hex/(byte*) init_font_hex::charset#6 init_font_hex::@5/(byte*) init_font_hex::charset#7 )
(byte*) init_font_hex::proto_lo#0 ← (byte[]) FONT_HEX_PROTO
(byte*) init_font_hex::proto_lo#0 ← (const byte[]) FONT_HEX_PROTO
(byte) init_font_hex::c1#0 ← (byte) 0
to:init_font_hex::@2
init_font_hex::@2: scope:[init_font_hex] from init_font_hex::@1 init_font_hex::@4
@ -161,7 +161,6 @@ init_font_hex::@return: scope:[init_font_hex] from init_font_hex::@5
return
to:@return
@17: scope:[] from @begin
(byte[]) FONT_HEX_PROTO ← { (number) 2, (number) 5, (number) 5, (number) 5, (number) 2, (number) 6, (number) 2, (number) 2, (number) 2, (number) 7, (number) 6, (number) 1, (number) 2, (number) 4, (number) 7, (number) 6, (number) 1, (number) 2, (number) 1, (number) 6, (number) 5, (number) 5, (number) 7, (number) 1, (number) 1, (number) 7, (number) 4, (number) 6, (number) 1, (number) 6, (number) 3, (number) 4, (number) 6, (number) 5, (number) 2, (number) 7, (number) 1, (number) 1, (number) 1, (number) 1, (number) 2, (number) 5, (number) 2, (number) 5, (number) 2, (number) 2, (number) 5, (number) 3, (number) 1, (number) 1, (number) 2, (number) 5, (number) 7, (number) 5, (number) 5, (number) 6, (number) 5, (number) 6, (number) 5, (number) 6, (number) 2, (number) 5, (number) 4, (number) 5, (number) 2, (number) 6, (number) 5, (number) 5, (number) 5, (number) 6, (number) 7, (number) 4, (number) 6, (number) 4, (number) 7, (number) 7, (number) 4, (number) 6, (number) 4, (number) 4 }
(word[CORDIC_ITERATIONS_16]) CORDIC_ATAN2_ANGLES_16 ← kickasm {{ .for (var i=0; i<CORDIC_ITERATIONS_16; i++)
.word 256*2*256*atan(1/pow(2,i))/PI/2
}}
@ -670,7 +669,7 @@ SYMBOL TABLE SSA
(word[CORDIC_ITERATIONS_16]) CORDIC_ATAN2_ANGLES_16
(const byte) CORDIC_ITERATIONS_16 = (number) $f
(const byte*) D018 = (byte*)(number) $d018
(byte[]) FONT_HEX_PROTO
(const byte[]) FONT_HEX_PROTO = { (byte)(number) 2, (byte)(number) 5, (byte)(number) 5, (byte)(number) 5, (byte)(number) 2, (byte)(number) 6, (byte)(number) 2, (byte)(number) 2, (byte)(number) 2, (byte)(number) 7, (byte)(number) 6, (byte)(number) 1, (byte)(number) 2, (byte)(number) 4, (byte)(number) 7, (byte)(number) 6, (byte)(number) 1, (byte)(number) 2, (byte)(number) 1, (byte)(number) 6, (byte)(number) 5, (byte)(number) 5, (byte)(number) 7, (byte)(number) 1, (byte)(number) 1, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 1, (byte)(number) 6, (byte)(number) 3, (byte)(number) 4, (byte)(number) 6, (byte)(number) 5, (byte)(number) 2, (byte)(number) 7, (byte)(number) 1, (byte)(number) 1, (byte)(number) 1, (byte)(number) 1, (byte)(number) 2, (byte)(number) 5, (byte)(number) 2, (byte)(number) 5, (byte)(number) 2, (byte)(number) 2, (byte)(number) 5, (byte)(number) 3, (byte)(number) 1, (byte)(number) 1, (byte)(number) 2, (byte)(number) 5, (byte)(number) 7, (byte)(number) 5, (byte)(number) 5, (byte)(number) 6, (byte)(number) 5, (byte)(number) 6, (byte)(number) 5, (byte)(number) 6, (byte)(number) 2, (byte)(number) 5, (byte)(number) 4, (byte)(number) 5, (byte)(number) 2, (byte)(number) 6, (byte)(number) 5, (byte)(number) 5, (byte)(number) 5, (byte)(number) 6, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 4, (byte)(number) 7, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 4, (byte)(number) 4 }
(const byte) RADIX::BINARY = (number) 2
(const byte) RADIX::DECIMAL = (number) $a
(const byte) RADIX::HEXADECIMAL = (number) $10
@ -1213,8 +1212,6 @@ Adding number conversion cast (unumber) init_angle_screen::$15 in (number~) init
Adding number conversion cast (unumber) $28 in (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#3 - (number) $28
Adding number conversion cast (unumber) $28 in (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#3 + (number) $28
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (byte[]) FONT_HEX_PROTO ← (byte[]){ (byte)(number) 2, (byte)(number) 5, (byte)(number) 5, (byte)(number) 5, (byte)(number) 2, (byte)(number) 6, (byte)(number) 2, (byte)(number) 2, (byte)(number) 2, (byte)(number) 7, (byte)(number) 6, (byte)(number) 1, (byte)(number) 2, (byte)(number) 4, (byte)(number) 7, (byte)(number) 6, (byte)(number) 1, (byte)(number) 2, (byte)(number) 1, (byte)(number) 6, (byte)(number) 5, (byte)(number) 5, (byte)(number) 7, (byte)(number) 1, (byte)(number) 1, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 1, (byte)(number) 6, (byte)(number) 3, (byte)(number) 4, (byte)(number) 6, (byte)(number) 5, (byte)(number) 2, (byte)(number) 7, (byte)(number) 1, (byte)(number) 1, (byte)(number) 1, (byte)(number) 1, (byte)(number) 2, (byte)(number) 5, (byte)(number) 2, (byte)(number) 5, (byte)(number) 2, (byte)(number) 2, (byte)(number) 5, (byte)(number) 3, (byte)(number) 1, (byte)(number) 1, (byte)(number) 2, (byte)(number) 5, (byte)(number) 7, (byte)(number) 5, (byte)(number) 5, (byte)(number) 6, (byte)(number) 5, (byte)(number) 6, (byte)(number) 5, (byte)(number) 6, (byte)(number) 2, (byte)(number) 5, (byte)(number) 4, (byte)(number) 5, (byte)(number) 2, (byte)(number) 6, (byte)(number) 5, (byte)(number) 5, (byte)(number) 5, (byte)(number) 6, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 4, (byte)(number) 7, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 4, (byte)(number) 4 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (byte) init_font_hex::idx#0 ← (unumber)(number) 0
Inlining cast *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#0) ← (unumber)(number) 0
Inlining cast *((byte*) init_font_hex::charset#4 + (byte) init_font_hex::idx#6) ← (unumber)(number) 0
@ -1234,6 +1231,86 @@ Simplifying constant pointer cast (byte*) 53272
Simplifying constant pointer cast (dword*) 56580
Simplifying constant pointer cast (byte*) 56590
Simplifying constant pointer cast (byte*) 56591
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 6
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 7
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 4
Simplifying constant integer cast 7
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 1
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 7
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 7
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 6
Simplifying constant integer cast 3
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 7
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 3
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 7
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 4
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 7
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 4
Simplifying constant integer cast 7
Simplifying constant integer cast 7
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 4
Simplifying constant integer cast 4
Simplifying constant pointer cast (byte*) 8192
Simplifying constant pointer cast (byte*) 10240
Simplifying constant pointer cast (byte*) 1024
@ -1247,86 +1324,6 @@ Simplifying constant integer cast 0
Simplifying constant integer cast 5
Simplifying constant integer cast 8
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 6
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 7
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 4
Simplifying constant integer cast 7
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 1
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 7
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 7
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 6
Simplifying constant integer cast 3
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 7
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 3
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 7
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 4
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 7
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 4
Simplifying constant integer cast 7
Simplifying constant integer cast 7
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 4
Simplifying constant integer cast 4
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
@ -1448,10 +1445,10 @@ Inferred type updated to word in (unumber~) init_angle_screen::$11 ← (word) in
Inferred type updated to byte in (unumber~) init_angle_screen::$12 ← > (word~) init_angle_screen::$11
Inferred type updated to byte in (unumber~) init_angle_screen::$14 ← (byte) $80 + (byte) init_angle_screen::ang_w#0
Inferred type updated to byte in (unumber~) init_angle_screen::$15 ← (byte) $80 - (byte) init_angle_screen::ang_w#0
Inversing boolean not [61] (bool~) atan2_16::$17 ← (signed word) atan2_16::yi#3 != (signed byte) 0 from [60] (bool~) atan2_16::$16 ← (signed word) atan2_16::yi#3 == (signed byte) 0
Inversing boolean not [70] (bool~) atan2_16::$11 ← (signed word) atan2_16::x#4 >= (signed byte) 0 from [69] (bool~) atan2_16::$10 ← (signed word) atan2_16::x#4 < (signed byte) 0
Inversing boolean not [81] (bool~) atan2_16::$19 ← (byte) 0 == (byte) atan2_16::shift#4 from [80] (bool~) atan2_16::$24 ← (byte) 0 != (byte) atan2_16::shift#4
Inversing boolean not [105] (bool~) atan2_16::$14 ← (signed word) atan2_16::y#4 >= (signed byte) 0 from [104] (bool~) atan2_16::$13 ← (signed word) atan2_16::y#4 < (signed byte) 0
Inversing boolean not [60] (bool~) atan2_16::$17 ← (signed word) atan2_16::yi#3 != (signed byte) 0 from [59] (bool~) atan2_16::$16 ← (signed word) atan2_16::yi#3 == (signed byte) 0
Inversing boolean not [69] (bool~) atan2_16::$11 ← (signed word) atan2_16::x#4 >= (signed byte) 0 from [68] (bool~) atan2_16::$10 ← (signed word) atan2_16::x#4 < (signed byte) 0
Inversing boolean not [80] (bool~) atan2_16::$19 ← (byte) 0 == (byte) atan2_16::shift#4 from [79] (bool~) atan2_16::$24 ← (byte) 0 != (byte) atan2_16::shift#4
Inversing boolean not [104] (bool~) atan2_16::$14 ← (signed word) atan2_16::y#4 >= (signed byte) 0 from [103] (bool~) atan2_16::$13 ← (signed word) atan2_16::y#4 < (signed byte) 0
Successful SSA optimization Pass2UnaryNotSimplification
Alias (byte*) init_font_hex::charset#3 = (byte*) init_font_hex::charset#4
Alias (byte) init_font_hex::idx#2 = (byte) init_font_hex::idx#6
@ -1576,27 +1573,26 @@ Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) init_font_hex::$3 [19] if((byte) init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3
Simple Condition (bool~) init_font_hex::$4 [29] if((byte) init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2
Simple Condition (bool~) init_font_hex::$5 [34] if((byte) init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1
Simple Condition (bool~) atan2_16::$0 [40] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1
Simple Condition (bool~) atan2_16::$5 [49] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4
Simple Condition (bool~) atan2_16::$17 [62] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@16
Simple Condition (bool~) atan2_16::$11 [71] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7
Simple Condition (bool~) atan2_16::$18 [74] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@19
Simple Condition (bool~) atan2_16::$19 [82] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@25
Simple Condition (bool~) atan2_16::$20 [85] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@26
Simple Condition (bool~) atan2_16::$21 [102] if((byte) atan2_16::i#1!=rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@15
Simple Condition (bool~) atan2_16::$14 [106] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8
Simple Condition (bool~) init_angle_screen::$2 [230] if((byte) init_angle_screen::x#2<=(byte) $13) goto init_angle_screen::@3
Simple Condition (bool~) init_angle_screen::$16 [267] if((byte) init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1
Simple Condition (bool~) atan2_16::$0 [39] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1
Simple Condition (bool~) atan2_16::$5 [48] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4
Simple Condition (bool~) atan2_16::$17 [61] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@16
Simple Condition (bool~) atan2_16::$11 [70] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7
Simple Condition (bool~) atan2_16::$18 [73] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@19
Simple Condition (bool~) atan2_16::$19 [81] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@25
Simple Condition (bool~) atan2_16::$20 [84] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@26
Simple Condition (bool~) atan2_16::$21 [101] if((byte) atan2_16::i#1!=rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@15
Simple Condition (bool~) atan2_16::$14 [105] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8
Simple Condition (bool~) init_angle_screen::$2 [229] if((byte) init_angle_screen::x#2<=(byte) $13) goto init_angle_screen::@3
Simple Condition (bool~) init_angle_screen::$16 [266] if((byte) init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Negating conditional jump and destination [102] if((byte) atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@17
Negating conditional jump and destination [101] if((byte) atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@17
Successful SSA optimization Pass2ConditionalJumpSequenceImprovement
Identified constant from value list (byte[]) { (byte) 2, (byte) 5, (byte) 5, (byte) 5, (byte) 2, (byte) 6, (byte) 2, (byte) 2, (byte) 2, (byte) 7, (byte) 6, (byte) 1, (byte) 2, (byte) 4, (byte) 7, (byte) 6, (byte) 1, (byte) 2, (byte) 1, (byte) 6, (byte) 5, (byte) 5, (byte) 7, (byte) 1, (byte) 1, (byte) 7, (byte) 4, (byte) 6, (byte) 1, (byte) 6, (byte) 3, (byte) 4, (byte) 6, (byte) 5, (byte) 2, (byte) 7, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 2, (byte) 5, (byte) 2, (byte) 5, (byte) 2, (byte) 2, (byte) 5, (byte) 3, (byte) 1, (byte) 1, (byte) 2, (byte) 5, (byte) 7, (byte) 5, (byte) 5, (byte) 6, (byte) 5, (byte) 6, (byte) 5, (byte) 6, (byte) 2, (byte) 5, (byte) 4, (byte) 5, (byte) 2, (byte) 6, (byte) 5, (byte) 5, (byte) 5, (byte) 6, (byte) 7, (byte) 4, (byte) 6, (byte) 4, (byte) 7, (byte) 7, (byte) 4, (byte) 6, (byte) 4, (byte) 4 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const byte*) init_font_hex::proto_hi#0 = FONT_HEX_PROTO
Constant (const byte) init_font_hex::c#0 = 0
Constant (const byte*) init_font_hex::proto_lo#0 = FONT_HEX_PROTO
Constant (const byte) init_font_hex::c1#0 = 0
Constant (const byte) init_font_hex::idx#0 = 0
Constant (const byte) init_font_hex::i#0 = 0
Constant (const byte[]) FONT_HEX_PROTO = { 2, 5, 5, 5, 2, 6, 2, 2, 2, 7, 6, 1, 2, 4, 7, 6, 1, 2, 1, 6, 5, 5, 7, 1, 1, 7, 4, 6, 1, 6, 3, 4, 6, 5, 2, 7, 1, 1, 1, 1, 2, 5, 2, 5, 2, 2, 5, 3, 1, 1, 2, 5, 7, 5, 5, 6, 5, 6, 5, 6, 2, 5, 4, 5, 2, 6, 5, 5, 5, 6, 7, 4, 6, 4, 7, 7, 4, 6, 4, 4 }
Constant (const word[CORDIC_ITERATIONS_16]) CORDIC_ATAN2_ANGLES_16 = kickasm {{ .for (var i=0; i<CORDIC_ITERATIONS_16; i++)
.word 256*2*256*atan(1/pow(2,i))/PI/2
}}
@ -1613,8 +1609,6 @@ Constant (const byte) init_angle_screen::y#0 = 0
Constant (const byte) init_angle_screen::x#0 = 0
Constant (const byte) init_angle_screen::xb#0 = $27
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte*) init_font_hex::proto_hi#0 = FONT_HEX_PROTO
Constant (const byte*) init_font_hex::proto_lo#0 = FONT_HEX_PROTO
Constant (const byte*) print_word_at::at#0 = print_dword_at::at#0
Constant (const word) main::toD0181_$0 = (word)main::toD0181_screen#0
Constant (const word) main::toD0181_$4 = (word)main::toD0181_gfx#0
@ -1627,20 +1621,20 @@ Resolved ranged next value [27] init_font_hex::c1#1 ← ++ init_font_hex::c1#4 t
Resolved ranged comparison value [29] if(init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 to (number) $10
Resolved ranged next value [32] init_font_hex::c#1 ← ++ init_font_hex::c#6 to ++
Resolved ranged comparison value [34] if(init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 to (number) $10
Resolved ranged next value [100] atan2_16::i#1 ← ++ atan2_16::i#2 to ++
Resolved ranged comparison value [102] 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
Resolved ranged next value [265] init_angle_screen::y#1 ← ++ init_angle_screen::y#5 to ++
Resolved ranged comparison value [267] if(init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 to (number) $d
Rewriting conditional comparison [230] if((byte) init_angle_screen::x#2<=(byte) $13) goto init_angle_screen::@3
Simplifying constant evaluating to zero (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES in [123] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES
Simplifying constant evaluating to zero (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS in [124] *((const byte*) CIA2_TIMER_B_CONTROL) ← (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A
Resolved ranged next value [99] atan2_16::i#1 ← ++ atan2_16::i#2 to ++
Resolved ranged comparison value [101] 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
Resolved ranged next value [264] init_angle_screen::y#1 ← ++ init_angle_screen::y#5 to ++
Resolved ranged comparison value [266] if(init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 to (number) $d
Rewriting conditional comparison [229] if((byte) init_angle_screen::x#2<=(byte) $13) goto init_angle_screen::@3
Simplifying constant evaluating to zero (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES in [122] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES
Simplifying constant evaluating to zero (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS in [123] *((const byte*) CIA2_TIMER_B_CONTROL) ← (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A
Successful SSA optimization PassNSimplifyConstantZero
Simplifying expression containing zero init_font_hex::charset#2 in [8] *((byte*) init_font_hex::charset#2 + (const byte) init_font_hex::idx#0) ← (byte) 0
Simplifying expression containing zero CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A in [124] *((const byte*) CIA2_TIMER_B_CONTROL) ← (byte) 0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A
Simplifying expression containing zero CIA_TIMER_CONTROL_START in [126] *((const byte*) CIA2_TIMER_B_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A
Simplifying expression containing zero CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_CONTINUOUS in [127] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES
Simplifying expression containing zero CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A in [123] *((const byte*) CIA2_TIMER_B_CONTROL) ← (byte) 0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A
Simplifying expression containing zero CIA_TIMER_CONTROL_START in [125] *((const byte*) CIA2_TIMER_B_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A
Simplifying expression containing zero CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_CONTINUOUS in [126] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES
Successful SSA optimization PassNSimplifyExpressionWithZero
Simplifying expression containing zero CIA_TIMER_CONTROL_START in [127] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS
Simplifying expression containing zero CIA_TIMER_CONTROL_START in [126] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused variable (byte) init_font_hex::idx#4 and assignment [15] (byte) init_font_hex::idx#4 ← ++ (byte) init_font_hex::idx#3
Eliminating unused constant (const byte) CIA_TIMER_CONTROL_STOP
@ -1727,13 +1721,13 @@ Rewriting multiplication to use shift [49] (byte~) atan2_16::$23 ← (byte) atan
Rewriting multiplication to use shift [109] (byte~) init_angle_screen::$3 ← (byte) init_angle_screen::x#2 * (byte) 2
Rewriting multiplication to use shift [113] (byte~) init_angle_screen::$7 ← (byte) init_angle_screen::y#5 * (byte) 2
Successful SSA optimization Pass2MultiplyToShiftRewriting
Inlining constant with var siblings (const byte*) init_font_hex::proto_hi#0
Inlining constant with var siblings (const byte) init_font_hex::c#0
Inlining constant with var siblings (const byte*) init_font_hex::proto_lo#0
Inlining constant with var siblings (const byte) init_font_hex::c1#0
Inlining constant with var siblings (const byte) init_font_hex::idx#0
Inlining constant with var siblings (const byte) init_font_hex::i#0
Inlining constant with var siblings (const byte*) init_font_hex::charset#1
Inlining constant with var siblings (const byte*) init_font_hex::proto_hi#0
Inlining constant with var siblings (const byte*) init_font_hex::proto_lo#0
Inlining constant with var siblings (const byte) init_font_hex::idx#1
Inlining constant with var siblings (const word) atan2_16::angle#0
Inlining constant with var siblings (const byte) atan2_16::i#0
@ -3639,9 +3633,9 @@ init_font_hex: {
rts
}
// File Data
print_hextab: .text "0123456789abcdef"
// Bit patterns for symbols 0-f (3x5 pixels) used in font hex
FONT_HEX_PROTO: .byte 2, 5, 5, 5, 2, 6, 2, 2, 2, 7, 6, 1, 2, 4, 7, 6, 1, 2, 1, 6, 5, 5, 7, 1, 1, 7, 4, 6, 1, 6, 3, 4, 6, 5, 2, 7, 1, 1, 1, 1, 2, 5, 2, 5, 2, 2, 5, 3, 1, 1, 2, 5, 7, 5, 5, 6, 5, 6, 5, 6, 2, 5, 4, 5, 2, 6, 5, 5, 5, 6, 7, 4, 6, 4, 7, 7, 4, 6, 4, 4
print_hextab: .text "0123456789abcdef"
// Angles representing ATAN(0.5), ATAN(0.25), ATAN(0.125), ...
CORDIC_ATAN2_ANGLES_16:
.for (var i=0; i<CORDIC_ITERATIONS_16; i++)
@ -4941,9 +4935,9 @@ init_font_hex: {
rts
}
// File Data
print_hextab: .text "0123456789abcdef"
// Bit patterns for symbols 0-f (3x5 pixels) used in font hex
FONT_HEX_PROTO: .byte 2, 5, 5, 5, 2, 6, 2, 2, 2, 7, 6, 1, 2, 4, 7, 6, 1, 2, 1, 6, 5, 5, 7, 1, 1, 7, 4, 6, 1, 6, 3, 4, 6, 5, 2, 7, 1, 1, 1, 1, 2, 5, 2, 5, 2, 2, 5, 3, 1, 1, 2, 5, 7, 5, 5, 6, 5, 6, 5, 6, 2, 5, 4, 5, 2, 6, 5, 5, 5, 6, 7, 4, 6, 4, 7, 7, 4, 6, 4, 4
print_hextab: .text "0123456789abcdef"
// Angles representing ATAN(0.5), ATAN(0.25), ATAN(0.125), ...
CORDIC_ATAN2_ANGLES_16:
.for (var i=0; i<CORDIC_ITERATIONS_16; i++)
@ -6319,9 +6313,9 @@ init_font_hex: {
rts
}
// File Data
print_hextab: .text "0123456789abcdef"
// Bit patterns for symbols 0-f (3x5 pixels) used in font hex
FONT_HEX_PROTO: .byte 2, 5, 5, 5, 2, 6, 2, 2, 2, 7, 6, 1, 2, 4, 7, 6, 1, 2, 1, 6, 5, 5, 7, 1, 1, 7, 4, 6, 1, 6, 3, 4, 6, 5, 2, 7, 1, 1, 1, 1, 2, 5, 2, 5, 2, 2, 5, 3, 1, 1, 2, 5, 7, 5, 5, 6, 5, 6, 5, 6, 2, 5, 4, 5, 2, 6, 5, 5, 5, 6, 7, 4, 6, 4, 7, 7, 4, 6, 4, 4
print_hextab: .text "0123456789abcdef"
// Angles representing ATAN(0.5), ATAN(0.25), ATAN(0.125), ...
CORDIC_ATAN2_ANGLES_16:
.for (var i=0; i<CORDIC_ITERATIONS_16; i++)

View File

@ -543,6 +543,6 @@ init_font_hex: {
bne __b1
rts
}
print_hextab: .text "0123456789abcdef"
// Bit patterns for symbols 0-f (3x5 pixels) used in font hex
FONT_HEX_PROTO: .byte 2, 5, 5, 5, 2, 6, 2, 2, 2, 7, 6, 1, 2, 4, 7, 6, 1, 2, 1, 6, 5, 5, 7, 1, 1, 7, 4, 6, 1, 6, 3, 4, 6, 5, 2, 7, 1, 1, 1, 1, 2, 5, 2, 5, 2, 2, 5, 3, 1, 1, 2, 5, 7, 5, 5, 6, 5, 6, 5, 6, 2, 5, 4, 5, 2, 6, 5, 5, 5, 6, 7, 4, 6, 4, 7, 7, 4, 6, 4, 4
print_hextab: .text "0123456789abcdef"

View File

@ -1,5 +1,5 @@
Resolved forward reference FONT_HEX_PROTO to (byte[]) FONT_HEX_PROTO
Resolved forward reference FONT_HEX_PROTO to (byte[]) FONT_HEX_PROTO
Resolved forward reference FONT_HEX_PROTO to (const byte[]) FONT_HEX_PROTO
Resolved forward reference FONT_HEX_PROTO to (const byte[]) FONT_HEX_PROTO
Fixing pointer addition (word*~) bsearch16u::$7 ← (word*) bsearch16u::items + (byte~) bsearch16u::$6
Fixing pointer addition (word*~) bsearch16u::$15 ← (word*) bsearch16u::pivot + (number) 1
Fixing pointer addition (word*~) bsearch16u::$1 ← (word*) bsearch16u::items - (number) 1
@ -49,6 +49,7 @@ Culled Empty Block (label) @17
Culled Empty Block (label) @18
Culled Empty Block (label) @19
Culled Empty Block (label) init_font_hex::@6
Culled Empty Block (label) @20
Culled Empty Block (label) clock::@1
Culled Empty Block (label) @21
Culled Empty Block (label) @22
@ -196,10 +197,10 @@ bsearch16u::@3: scope:[bsearch16u] from bsearch16u::@1 bsearch16u::@2
(word*) bsearch16u::return#2 ← (word*~) bsearch16u::$4
to:bsearch16u::@return
@12: scope:[] from @4
(byte*) heap_head#30 ← phi( @4/(byte*) heap_head#0 )
(byte*) heap_head#29 ← phi( @4/(byte*) heap_head#0 )
(byte) NUM_SQUARES#0 ← (number) $ff
(word*) SQUARES#0 ← (word*) 0
to:@20
to:@48
(void()) init_squares()
init_squares: scope:[init_squares] from init_dist_screen
@ -289,14 +290,14 @@ sqrt::@return: scope:[sqrt] from sqrt::@2
(void()) init_font_hex((byte*) init_font_hex::charset)
init_font_hex: scope:[init_font_hex] from main
(byte*) init_font_hex::charset#6 ← phi( main/(byte*) init_font_hex::charset#1 )
(byte*) init_font_hex::proto_hi#0 ← (byte[]) FONT_HEX_PROTO
(byte*) init_font_hex::proto_hi#0 ← (const byte[]) FONT_HEX_PROTO
(byte) init_font_hex::c#0 ← (byte) 0
to:init_font_hex::@1
init_font_hex::@1: scope:[init_font_hex] from init_font_hex init_font_hex::@5
(byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) init_font_hex::c#0 init_font_hex::@5/(byte) init_font_hex::c#1 )
(byte*) init_font_hex::proto_hi#6 ← phi( init_font_hex/(byte*) init_font_hex::proto_hi#0 init_font_hex::@5/(byte*) init_font_hex::proto_hi#1 )
(byte*) init_font_hex::charset#5 ← phi( init_font_hex/(byte*) init_font_hex::charset#6 init_font_hex::@5/(byte*) init_font_hex::charset#7 )
(byte*) init_font_hex::proto_lo#0 ← (byte[]) FONT_HEX_PROTO
(byte*) init_font_hex::proto_lo#0 ← (const byte[]) FONT_HEX_PROTO
(byte) init_font_hex::c1#0 ← (byte) 0
to:init_font_hex::@2
init_font_hex::@2: scope:[init_font_hex] from init_font_hex::@1 init_font_hex::@4
@ -356,12 +357,6 @@ init_font_hex::@5: scope:[init_font_hex] from init_font_hex::@4
init_font_hex::@return: scope:[init_font_hex] from init_font_hex::@5
return
to:@return
@20: scope:[] from @12
(word*) SQUARES#33 ← phi( @12/(word*) SQUARES#0 )
(byte*) heap_head#29 ← phi( @12/(byte*) heap_head#30 )
(byte) NUM_SQUARES#22 ← phi( @12/(byte) NUM_SQUARES#0 )
(byte[]) FONT_HEX_PROTO ← { (number) 2, (number) 5, (number) 5, (number) 5, (number) 2, (number) 6, (number) 2, (number) 2, (number) 2, (number) 7, (number) 6, (number) 1, (number) 2, (number) 4, (number) 7, (number) 6, (number) 1, (number) 2, (number) 1, (number) 6, (number) 5, (number) 5, (number) 7, (number) 1, (number) 1, (number) 7, (number) 4, (number) 6, (number) 1, (number) 6, (number) 3, (number) 4, (number) 6, (number) 5, (number) 2, (number) 7, (number) 1, (number) 1, (number) 1, (number) 1, (number) 2, (number) 5, (number) 2, (number) 5, (number) 2, (number) 2, (number) 5, (number) 3, (number) 1, (number) 1, (number) 2, (number) 5, (number) 7, (number) 5, (number) 5, (number) 6, (number) 5, (number) 6, (number) 5, (number) 6, (number) 2, (number) 5, (number) 4, (number) 5, (number) 2, (number) 6, (number) 5, (number) 5, (number) 5, (number) 6, (number) 7, (number) 4, (number) 6, (number) 4, (number) 7, (number) 7, (number) 4, (number) 6, (number) 4, (number) 4 }
to:@48
(dword()) clock()
clock: scope:[clock] from main::@5
@ -470,23 +465,23 @@ print_char_at::@return: scope:[print_char_at] from print_char_at
(void()) main()
main: scope:[main] from @48
(word*) SQUARES#44 ← phi( @48/(word*) SQUARES#25 )
(byte*) heap_head#44 ← phi( @48/(byte*) heap_head#25 )
(byte) NUM_SQUARES#37 ← phi( @48/(byte) NUM_SQUARES#17 )
(word*) SQUARES#43 ← phi( @48/(word*) SQUARES#25 )
(byte*) heap_head#43 ← phi( @48/(byte*) heap_head#25 )
(byte) NUM_SQUARES#36 ← phi( @48/(byte) NUM_SQUARES#17 )
(byte*) init_font_hex::charset#1 ← (const byte*) CHARSET
call init_font_hex
to:main::@3
main::@3: scope:[main] from main
(word*) SQUARES#42 ← phi( main/(word*) SQUARES#44 )
(byte*) heap_head#39 ← phi( main/(byte*) heap_head#44 )
(byte) NUM_SQUARES#33 ← phi( main/(byte) NUM_SQUARES#37 )
(word*) SQUARES#41 ← phi( main/(word*) SQUARES#43 )
(byte*) heap_head#38 ← phi( main/(byte*) heap_head#43 )
(byte) NUM_SQUARES#32 ← phi( main/(byte) NUM_SQUARES#36 )
(byte*) main::toD0181_screen#0 ← (const byte*) SCREEN
(byte*) main::toD0181_gfx#0 ← (const byte*) CHARSET
to:main::toD0181
main::toD0181: scope:[main] from main::@3
(word*) SQUARES#40 ← phi( main::@3/(word*) SQUARES#42 )
(byte*) heap_head#35 ← phi( main::@3/(byte*) heap_head#39 )
(byte) NUM_SQUARES#29 ← phi( main::@3/(byte) NUM_SQUARES#33 )
(word*) SQUARES#39 ← phi( main::@3/(word*) SQUARES#41 )
(byte*) heap_head#34 ← phi( main::@3/(byte*) heap_head#38 )
(byte) NUM_SQUARES#28 ← phi( main::@3/(byte) NUM_SQUARES#32 )
(byte*) main::toD0181_gfx#1 ← phi( main::@3/(byte*) main::toD0181_gfx#0 )
(byte*) main::toD0181_screen#1 ← phi( main::@3/(byte*) main::toD0181_screen#0 )
(word~) main::toD0181_$0 ← ((word)) (byte*) main::toD0181_screen#1
@ -501,16 +496,16 @@ main::toD0181: scope:[main] from main::@3
(byte) main::toD0181_return#0 ← (number~) main::toD0181_$8
to:main::toD0181_@return
main::toD0181_@return: scope:[main] from main::toD0181
(word*) SQUARES#34 ← phi( main::toD0181/(word*) SQUARES#40 )
(byte*) heap_head#31 ← phi( main::toD0181/(byte*) heap_head#35 )
(byte) NUM_SQUARES#23 ← phi( main::toD0181/(byte) NUM_SQUARES#29 )
(word*) SQUARES#33 ← phi( main::toD0181/(word*) SQUARES#39 )
(byte*) heap_head#30 ← phi( main::toD0181/(byte*) heap_head#34 )
(byte) NUM_SQUARES#22 ← phi( main::toD0181/(byte) NUM_SQUARES#28 )
(byte) main::toD0181_return#2 ← phi( main::toD0181/(byte) main::toD0181_return#0 )
(byte) main::toD0181_return#1 ← (byte) main::toD0181_return#2
to:main::@1
main::@1: scope:[main] from main::toD0181_@return
(word*) SQUARES#26 ← phi( main::toD0181_@return/(word*) SQUARES#34 )
(byte*) heap_head#26 ← phi( main::toD0181_@return/(byte*) heap_head#31 )
(byte) NUM_SQUARES#18 ← phi( main::toD0181_@return/(byte) NUM_SQUARES#23 )
(word*) SQUARES#26 ← phi( main::toD0181_@return/(word*) SQUARES#33 )
(byte*) heap_head#26 ← phi( main::toD0181_@return/(byte*) heap_head#30 )
(byte) NUM_SQUARES#18 ← phi( main::toD0181_@return/(byte) NUM_SQUARES#22 )
(byte) main::toD0181_return#3 ← phi( main::toD0181_@return/(byte) main::toD0181_return#1 )
(byte~) main::$1 ← (byte) main::toD0181_return#3
*((const byte*) D018) ← (byte~) main::$1
@ -534,9 +529,9 @@ main::@5: scope:[main] from main::@4
(dword) clock::return#2 ← (dword) clock::return#1
to:main::@6
main::@6: scope:[main] from main::@5
(word*) SQUARES#43 ← phi( main::@5/(word*) SQUARES#3 )
(byte*) heap_head#40 ← phi( main::@5/(byte*) heap_head#5 )
(byte) NUM_SQUARES#34 ← phi( main::@5/(byte) NUM_SQUARES#1 )
(word*) SQUARES#42 ← phi( main::@5/(word*) SQUARES#3 )
(byte*) heap_head#39 ← phi( main::@5/(byte*) heap_head#5 )
(byte) NUM_SQUARES#33 ← phi( main::@5/(byte) NUM_SQUARES#1 )
(dword) clock::return#4 ← phi( main::@5/(dword) clock::return#2 )
(dword~) main::$4 ← (dword) clock::return#4
(dword~) main::$5 ← (dword~) main::$4 - (const dword) CLOCKS_PER_INIT
@ -546,16 +541,16 @@ main::@6: scope:[main] from main::@5
call print_dword_at
to:main::@7
main::@7: scope:[main] from main::@6
(word*) SQUARES#41 ← phi( main::@6/(word*) SQUARES#43 )
(byte*) heap_head#36 ← phi( main::@6/(byte*) heap_head#40 )
(byte) NUM_SQUARES#30 ← phi( main::@6/(byte) NUM_SQUARES#34 )
(word*) SQUARES#40 ← phi( main::@6/(word*) SQUARES#42 )
(byte*) heap_head#35 ← phi( main::@6/(byte*) heap_head#39 )
(byte) NUM_SQUARES#29 ← phi( main::@6/(byte) NUM_SQUARES#33 )
(byte*) main::toD0182_screen#0 ← (const byte*) main::BASE_SCREEN
(byte*) main::toD0182_gfx#0 ← (const byte*) main::BASE_CHARSET
to:main::toD0182
main::toD0182: scope:[main] from main::@7
(word*) SQUARES#35 ← phi( main::@7/(word*) SQUARES#41 )
(byte*) heap_head#32 ← phi( main::@7/(byte*) heap_head#36 )
(byte) NUM_SQUARES#24 ← phi( main::@7/(byte) NUM_SQUARES#30 )
(word*) SQUARES#34 ← phi( main::@7/(word*) SQUARES#40 )
(byte*) heap_head#31 ← phi( main::@7/(byte*) heap_head#35 )
(byte) NUM_SQUARES#23 ← phi( main::@7/(byte) NUM_SQUARES#29 )
(byte*) main::toD0182_gfx#1 ← phi( main::@7/(byte*) main::toD0182_gfx#0 )
(byte*) main::toD0182_screen#1 ← phi( main::@7/(byte*) main::toD0182_screen#0 )
(word~) main::toD0182_$0 ← ((word)) (byte*) main::toD0182_screen#1
@ -570,9 +565,9 @@ main::toD0182: scope:[main] from main::@7
(byte) main::toD0182_return#0 ← (number~) main::toD0182_$8
to:main::toD0182_@return
main::toD0182_@return: scope:[main] from main::toD0182
(word*) SQUARES#27 ← phi( main::toD0182/(word*) SQUARES#35 )
(byte*) heap_head#27 ← phi( main::toD0182/(byte*) heap_head#32 )
(byte) NUM_SQUARES#19 ← phi( main::toD0182/(byte) NUM_SQUARES#24 )
(word*) SQUARES#27 ← phi( main::toD0182/(word*) SQUARES#34 )
(byte*) heap_head#27 ← phi( main::toD0182/(byte*) heap_head#31 )
(byte) NUM_SQUARES#19 ← phi( main::toD0182/(byte) NUM_SQUARES#23 )
(byte) main::toD0182_return#2 ← phi( main::toD0182/(byte) main::toD0182_return#0 )
(byte) main::toD0182_return#1 ← (byte) main::toD0182_return#2
to:main::@2
@ -603,7 +598,7 @@ init_dist_screen: scope:[init_dist_screen] from main::@4
call init_squares
to:init_dist_screen::@19
init_dist_screen::@19: scope:[init_dist_screen] from init_dist_screen
(byte) NUM_SQUARES#39 ← phi( init_dist_screen/(byte) NUM_SQUARES#3 )
(byte) NUM_SQUARES#38 ← phi( init_dist_screen/(byte) NUM_SQUARES#3 )
(byte*) init_dist_screen::screen#1 ← phi( init_dist_screen/(byte*) init_dist_screen::screen#2 )
(word*) SQUARES#14 ← phi( init_dist_screen/(word*) SQUARES#2 )
(byte*) heap_head#16 ← phi( init_dist_screen/(byte*) heap_head#4 )
@ -615,11 +610,11 @@ init_dist_screen::@19: scope:[init_dist_screen] from init_dist_screen
(byte) init_dist_screen::y#0 ← (byte) 0
to:init_dist_screen::@1
init_dist_screen::@1: scope:[init_dist_screen] from init_dist_screen::@19 init_dist_screen::@7
(byte*) heap_head#45 ← phi( init_dist_screen::@19/(byte*) heap_head#7 init_dist_screen::@7/(byte*) heap_head#24 )
(byte) NUM_SQUARES#38 ← phi( init_dist_screen::@19/(byte) NUM_SQUARES#39 init_dist_screen::@7/(byte) NUM_SQUARES#16 )
(byte*) heap_head#44 ← phi( init_dist_screen::@19/(byte*) heap_head#7 init_dist_screen::@7/(byte*) heap_head#24 )
(byte) NUM_SQUARES#37 ← phi( init_dist_screen::@19/(byte) NUM_SQUARES#38 init_dist_screen::@7/(byte) NUM_SQUARES#16 )
(byte*) init_dist_screen::screen_bottomline#14 ← phi( init_dist_screen::@19/(byte*) init_dist_screen::screen_bottomline#0 init_dist_screen::@7/(byte*) init_dist_screen::screen_bottomline#1 )
(byte*) init_dist_screen::screen_topline#14 ← phi( init_dist_screen::@19/(byte*) init_dist_screen::screen_topline#0 init_dist_screen::@7/(byte*) init_dist_screen::screen_topline#1 )
(word*) SQUARES#36 ← phi( init_dist_screen::@19/(word*) SQUARES#5 init_dist_screen::@7/(word*) SQUARES#24 )
(word*) SQUARES#35 ← phi( init_dist_screen::@19/(word*) SQUARES#5 init_dist_screen::@7/(word*) SQUARES#24 )
(byte) init_dist_screen::y#2 ← phi( init_dist_screen::@19/(byte) init_dist_screen::y#0 init_dist_screen::@7/(byte) init_dist_screen::y#1 )
(number~) init_dist_screen::$2 ← (byte) init_dist_screen::y#2 * (number) 2
(byte) init_dist_screen::y2#0 ← (number~) init_dist_screen::$2
@ -627,30 +622,30 @@ init_dist_screen::@1: scope:[init_dist_screen] from init_dist_screen::@19 init_
if((bool~) init_dist_screen::$3) goto init_dist_screen::@2
to:init_dist_screen::@3
init_dist_screen::@2: scope:[init_dist_screen] from init_dist_screen::@1
(byte*) heap_head#41 ← phi( init_dist_screen::@1/(byte*) heap_head#45 )
(byte) NUM_SQUARES#35 ← phi( init_dist_screen::@1/(byte) NUM_SQUARES#38 )
(byte*) heap_head#40 ← phi( init_dist_screen::@1/(byte*) heap_head#44 )
(byte) NUM_SQUARES#34 ← phi( init_dist_screen::@1/(byte) NUM_SQUARES#37 )
(byte) init_dist_screen::y#9 ← phi( init_dist_screen::@1/(byte) init_dist_screen::y#2 )
(byte*) init_dist_screen::screen_bottomline#11 ← phi( init_dist_screen::@1/(byte*) init_dist_screen::screen_bottomline#14 )
(byte*) init_dist_screen::screen_topline#11 ← phi( init_dist_screen::@1/(byte*) init_dist_screen::screen_topline#14 )
(word*) SQUARES#28 ← phi( init_dist_screen::@1/(word*) SQUARES#36 )
(word*) SQUARES#28 ← phi( init_dist_screen::@1/(word*) SQUARES#35 )
(byte) init_dist_screen::y2#1 ← phi( init_dist_screen::@1/(byte) init_dist_screen::y2#0 )
(number~) init_dist_screen::$6 ← (byte) init_dist_screen::y2#1 - (number) $18
(number~) init_dist_screen::$7 ← (number~) init_dist_screen::$6
to:init_dist_screen::@4
init_dist_screen::@3: scope:[init_dist_screen] from init_dist_screen::@1
(byte*) heap_head#42 ← phi( init_dist_screen::@1/(byte*) heap_head#45 )
(byte) NUM_SQUARES#36 ← phi( init_dist_screen::@1/(byte) NUM_SQUARES#38 )
(byte*) heap_head#41 ← phi( init_dist_screen::@1/(byte*) heap_head#44 )
(byte) NUM_SQUARES#35 ← phi( init_dist_screen::@1/(byte) NUM_SQUARES#37 )
(byte) init_dist_screen::y#10 ← phi( init_dist_screen::@1/(byte) init_dist_screen::y#2 )
(byte*) init_dist_screen::screen_bottomline#12 ← phi( init_dist_screen::@1/(byte*) init_dist_screen::screen_bottomline#14 )
(byte*) init_dist_screen::screen_topline#12 ← phi( init_dist_screen::@1/(byte*) init_dist_screen::screen_topline#14 )
(word*) SQUARES#29 ← phi( init_dist_screen::@1/(word*) SQUARES#36 )
(word*) SQUARES#29 ← phi( init_dist_screen::@1/(word*) SQUARES#35 )
(byte) init_dist_screen::y2#2 ← phi( init_dist_screen::@1/(byte) init_dist_screen::y2#0 )
(number~) init_dist_screen::$4 ← (number) $18 - (byte) init_dist_screen::y2#2
(number~) init_dist_screen::$5 ← (number~) init_dist_screen::$4
to:init_dist_screen::@4
init_dist_screen::@4: scope:[init_dist_screen] from init_dist_screen::@2 init_dist_screen::@3
(byte*) heap_head#37 ← phi( init_dist_screen::@2/(byte*) heap_head#41 init_dist_screen::@3/(byte*) heap_head#42 )
(byte) NUM_SQUARES#31 ← phi( init_dist_screen::@2/(byte) NUM_SQUARES#35 init_dist_screen::@3/(byte) NUM_SQUARES#36 )
(byte*) heap_head#36 ← phi( init_dist_screen::@2/(byte*) heap_head#40 init_dist_screen::@3/(byte*) heap_head#41 )
(byte) NUM_SQUARES#30 ← phi( init_dist_screen::@2/(byte) NUM_SQUARES#34 init_dist_screen::@3/(byte) NUM_SQUARES#35 )
(byte) init_dist_screen::y#7 ← phi( init_dist_screen::@2/(byte) init_dist_screen::y#9 init_dist_screen::@3/(byte) init_dist_screen::y#10 )
(byte*) init_dist_screen::screen_bottomline#8 ← phi( init_dist_screen::@2/(byte*) init_dist_screen::screen_bottomline#11 init_dist_screen::@3/(byte*) init_dist_screen::screen_bottomline#12 )
(byte*) init_dist_screen::screen_topline#8 ← phi( init_dist_screen::@2/(byte*) init_dist_screen::screen_topline#11 init_dist_screen::@3/(byte*) init_dist_screen::screen_topline#12 )
@ -662,9 +657,9 @@ init_dist_screen::@4: scope:[init_dist_screen] from init_dist_screen::@2 init_d
(word) sqr::return#2 ← (word) sqr::return#1
to:init_dist_screen::@20
init_dist_screen::@20: scope:[init_dist_screen] from init_dist_screen::@4
(word*) SQUARES#37 ← phi( init_dist_screen::@4/(word*) SQUARES#19 )
(byte*) heap_head#33 ← phi( init_dist_screen::@4/(byte*) heap_head#37 )
(byte) NUM_SQUARES#25 ← phi( init_dist_screen::@4/(byte) NUM_SQUARES#31 )
(word*) SQUARES#36 ← phi( init_dist_screen::@4/(word*) SQUARES#19 )
(byte*) heap_head#32 ← phi( init_dist_screen::@4/(byte*) heap_head#36 )
(byte) NUM_SQUARES#24 ← phi( init_dist_screen::@4/(byte) NUM_SQUARES#30 )
(byte) init_dist_screen::y#5 ← phi( init_dist_screen::@4/(byte) init_dist_screen::y#7 )
(byte*) init_dist_screen::screen_bottomline#6 ← phi( init_dist_screen::@4/(byte*) init_dist_screen::screen_bottomline#8 )
(byte*) init_dist_screen::screen_topline#6 ← phi( init_dist_screen::@4/(byte*) init_dist_screen::screen_topline#8 )
@ -677,9 +672,9 @@ init_dist_screen::@20: scope:[init_dist_screen] from init_dist_screen::@4
init_dist_screen::@5: scope:[init_dist_screen] from init_dist_screen::@20 init_dist_screen::@22
(byte) init_dist_screen::xb#8 ← phi( init_dist_screen::@20/(byte) init_dist_screen::xb#0 init_dist_screen::@22/(byte) init_dist_screen::xb#1 )
(word) init_dist_screen::yds#6 ← phi( init_dist_screen::@20/(word) init_dist_screen::yds#0 init_dist_screen::@22/(word) init_dist_screen::yds#7 )
(word*) SQUARES#30 ← phi( init_dist_screen::@20/(word*) SQUARES#37 init_dist_screen::@22/(word*) SQUARES#38 )
(byte*) heap_head#28 ← phi( init_dist_screen::@20/(byte*) heap_head#33 init_dist_screen::@22/(byte*) heap_head#34 )
(byte) NUM_SQUARES#20 ← phi( init_dist_screen::@20/(byte) NUM_SQUARES#25 init_dist_screen::@22/(byte) NUM_SQUARES#26 )
(word*) SQUARES#30 ← phi( init_dist_screen::@20/(word*) SQUARES#36 init_dist_screen::@22/(word*) SQUARES#37 )
(byte*) heap_head#28 ← phi( init_dist_screen::@20/(byte*) heap_head#32 init_dist_screen::@22/(byte*) heap_head#33 )
(byte) NUM_SQUARES#20 ← phi( init_dist_screen::@20/(byte) NUM_SQUARES#24 init_dist_screen::@22/(byte) NUM_SQUARES#25 )
(byte) init_dist_screen::y#4 ← phi( init_dist_screen::@20/(byte) init_dist_screen::y#5 init_dist_screen::@22/(byte) init_dist_screen::y#6 )
(byte*) init_dist_screen::screen_bottomline#4 ← phi( init_dist_screen::@20/(byte*) init_dist_screen::screen_bottomline#6 init_dist_screen::@22/(byte*) init_dist_screen::screen_bottomline#3 )
(byte*) init_dist_screen::screen_topline#4 ← phi( init_dist_screen::@20/(byte*) init_dist_screen::screen_topline#6 init_dist_screen::@22/(byte*) init_dist_screen::screen_topline#3 )
@ -688,14 +683,14 @@ init_dist_screen::@5: scope:[init_dist_screen] from init_dist_screen::@20 init_
if((bool~) init_dist_screen::$10) goto init_dist_screen::@6
to:init_dist_screen::@7
init_dist_screen::@6: scope:[init_dist_screen] from init_dist_screen::@5
(byte*) heap_head#48 ← phi( init_dist_screen::@5/(byte*) heap_head#28 )
(byte*) heap_head#47 ← phi( init_dist_screen::@5/(byte*) heap_head#28 )
(byte) init_dist_screen::y#14 ← phi( init_dist_screen::@5/(byte) init_dist_screen::y#4 )
(byte) init_dist_screen::xb#7 ← phi( init_dist_screen::@5/(byte) init_dist_screen::xb#8 )
(byte*) init_dist_screen::screen_bottomline#13 ← phi( init_dist_screen::@5/(byte*) init_dist_screen::screen_bottomline#4 )
(byte*) init_dist_screen::screen_topline#13 ← phi( init_dist_screen::@5/(byte*) init_dist_screen::screen_topline#4 )
(byte) NUM_SQUARES#32 ← phi( init_dist_screen::@5/(byte) NUM_SQUARES#20 )
(byte) NUM_SQUARES#31 ← phi( init_dist_screen::@5/(byte) NUM_SQUARES#20 )
(word) init_dist_screen::yds#5 ← phi( init_dist_screen::@5/(word) init_dist_screen::yds#6 )
(word*) SQUARES#39 ← phi( init_dist_screen::@5/(word*) SQUARES#30 )
(word*) SQUARES#38 ← phi( init_dist_screen::@5/(word*) SQUARES#30 )
(byte) init_dist_screen::x#3 ← phi( init_dist_screen::@5/(byte) init_dist_screen::x#2 )
(number~) init_dist_screen::$11 ← (byte) init_dist_screen::x#3 * (number) 2
(byte) init_dist_screen::x2#0 ← (number~) init_dist_screen::$11
@ -716,41 +711,41 @@ init_dist_screen::@7: scope:[init_dist_screen] from init_dist_screen::@5
if((bool~) init_dist_screen::$21) goto init_dist_screen::@1
to:init_dist_screen::@return
init_dist_screen::@8: scope:[init_dist_screen] from init_dist_screen::@6
(byte*) heap_head#46 ← phi( init_dist_screen::@6/(byte*) heap_head#48 )
(byte*) heap_head#45 ← phi( init_dist_screen::@6/(byte*) heap_head#47 )
(byte) init_dist_screen::y#12 ← phi( init_dist_screen::@6/(byte) init_dist_screen::y#14 )
(byte) init_dist_screen::xb#5 ← phi( init_dist_screen::@6/(byte) init_dist_screen::xb#7 )
(byte*) init_dist_screen::screen_bottomline#9 ← phi( init_dist_screen::@6/(byte*) init_dist_screen::screen_bottomline#13 )
(byte) init_dist_screen::x#7 ← phi( init_dist_screen::@6/(byte) init_dist_screen::x#3 )
(byte*) init_dist_screen::screen_topline#9 ← phi( init_dist_screen::@6/(byte*) init_dist_screen::screen_topline#13 )
(byte) NUM_SQUARES#27 ← phi( init_dist_screen::@6/(byte) NUM_SQUARES#32 )
(byte) NUM_SQUARES#26 ← phi( init_dist_screen::@6/(byte) NUM_SQUARES#31 )
(word) init_dist_screen::yds#3 ← phi( init_dist_screen::@6/(word) init_dist_screen::yds#5 )
(word*) SQUARES#31 ← phi( init_dist_screen::@6/(word*) SQUARES#39 )
(word*) SQUARES#31 ← phi( init_dist_screen::@6/(word*) SQUARES#38 )
(byte) init_dist_screen::x2#1 ← phi( init_dist_screen::@6/(byte) init_dist_screen::x2#0 )
(number~) init_dist_screen::$15 ← (byte) init_dist_screen::x2#1 - (number) $27
(number~) init_dist_screen::$16 ← (number~) init_dist_screen::$15
to:init_dist_screen::@10
init_dist_screen::@9: scope:[init_dist_screen] from init_dist_screen::@6
(byte*) heap_head#47 ← phi( init_dist_screen::@6/(byte*) heap_head#48 )
(byte*) heap_head#46 ← phi( init_dist_screen::@6/(byte*) heap_head#47 )
(byte) init_dist_screen::y#13 ← phi( init_dist_screen::@6/(byte) init_dist_screen::y#14 )
(byte) init_dist_screen::xb#6 ← phi( init_dist_screen::@6/(byte) init_dist_screen::xb#7 )
(byte*) init_dist_screen::screen_bottomline#10 ← phi( init_dist_screen::@6/(byte*) init_dist_screen::screen_bottomline#13 )
(byte) init_dist_screen::x#8 ← phi( init_dist_screen::@6/(byte) init_dist_screen::x#3 )
(byte*) init_dist_screen::screen_topline#10 ← phi( init_dist_screen::@6/(byte*) init_dist_screen::screen_topline#13 )
(byte) NUM_SQUARES#28 ← phi( init_dist_screen::@6/(byte) NUM_SQUARES#32 )
(byte) NUM_SQUARES#27 ← phi( init_dist_screen::@6/(byte) NUM_SQUARES#31 )
(word) init_dist_screen::yds#4 ← phi( init_dist_screen::@6/(word) init_dist_screen::yds#5 )
(word*) SQUARES#32 ← phi( init_dist_screen::@6/(word*) SQUARES#39 )
(word*) SQUARES#32 ← phi( init_dist_screen::@6/(word*) SQUARES#38 )
(byte) init_dist_screen::x2#2 ← phi( init_dist_screen::@6/(byte) init_dist_screen::x2#0 )
(number~) init_dist_screen::$13 ← (number) $27 - (byte) init_dist_screen::x2#2
(number~) init_dist_screen::$14 ← (number~) init_dist_screen::$13
to:init_dist_screen::@10
init_dist_screen::@10: scope:[init_dist_screen] from init_dist_screen::@8 init_dist_screen::@9
(byte*) heap_head#43 ← phi( init_dist_screen::@8/(byte*) heap_head#46 init_dist_screen::@9/(byte*) heap_head#47 )
(byte*) heap_head#42 ← phi( init_dist_screen::@8/(byte*) heap_head#45 init_dist_screen::@9/(byte*) heap_head#46 )
(byte) init_dist_screen::y#11 ← phi( init_dist_screen::@8/(byte) init_dist_screen::y#12 init_dist_screen::@9/(byte) init_dist_screen::y#13 )
(byte) init_dist_screen::xb#4 ← phi( init_dist_screen::@8/(byte) init_dist_screen::xb#5 init_dist_screen::@9/(byte) init_dist_screen::xb#6 )
(byte*) init_dist_screen::screen_bottomline#7 ← phi( init_dist_screen::@8/(byte*) init_dist_screen::screen_bottomline#9 init_dist_screen::@9/(byte*) init_dist_screen::screen_bottomline#10 )
(byte) init_dist_screen::x#6 ← phi( init_dist_screen::@8/(byte) init_dist_screen::x#7 init_dist_screen::@9/(byte) init_dist_screen::x#8 )
(byte*) init_dist_screen::screen_topline#7 ← phi( init_dist_screen::@8/(byte*) init_dist_screen::screen_topline#9 init_dist_screen::@9/(byte*) init_dist_screen::screen_topline#10 )
(byte) NUM_SQUARES#21 ← phi( init_dist_screen::@8/(byte) NUM_SQUARES#27 init_dist_screen::@9/(byte) NUM_SQUARES#28 )
(byte) NUM_SQUARES#21 ← phi( init_dist_screen::@8/(byte) NUM_SQUARES#26 init_dist_screen::@9/(byte) NUM_SQUARES#27 )
(word) init_dist_screen::yds#2 ← phi( init_dist_screen::@8/(word) init_dist_screen::yds#3 init_dist_screen::@9/(word) init_dist_screen::yds#4 )
(word*) SQUARES#18 ← phi( init_dist_screen::@8/(word*) SQUARES#31 init_dist_screen::@9/(word*) SQUARES#32 )
(number~) init_dist_screen::$17 ← phi( init_dist_screen::@8/(number~) init_dist_screen::$16 init_dist_screen::@9/(number~) init_dist_screen::$14 )
@ -760,7 +755,7 @@ init_dist_screen::@10: scope:[init_dist_screen] from init_dist_screen::@8 init_
(word) sqr::return#3 ← (word) sqr::return#1
to:init_dist_screen::@21
init_dist_screen::@21: scope:[init_dist_screen] from init_dist_screen::@10
(byte*) heap_head#38 ← phi( init_dist_screen::@10/(byte*) heap_head#43 )
(byte*) heap_head#37 ← phi( init_dist_screen::@10/(byte*) heap_head#42 )
(byte) init_dist_screen::y#8 ← phi( init_dist_screen::@10/(byte) init_dist_screen::y#11 )
(byte) init_dist_screen::xb#3 ← phi( init_dist_screen::@10/(byte) init_dist_screen::xb#4 )
(byte*) init_dist_screen::screen_bottomline#5 ← phi( init_dist_screen::@10/(byte*) init_dist_screen::screen_bottomline#7 )
@ -780,9 +775,9 @@ init_dist_screen::@21: scope:[init_dist_screen] from init_dist_screen::@10
to:init_dist_screen::@22
init_dist_screen::@22: scope:[init_dist_screen] from init_dist_screen::@21
(word) init_dist_screen::yds#7 ← phi( init_dist_screen::@21/(word) init_dist_screen::yds#1 )
(word*) SQUARES#38 ← phi( init_dist_screen::@21/(word*) SQUARES#20 )
(byte*) heap_head#34 ← phi( init_dist_screen::@21/(byte*) heap_head#38 )
(byte) NUM_SQUARES#26 ← phi( init_dist_screen::@21/(byte) NUM_SQUARES#13 )
(word*) SQUARES#37 ← phi( init_dist_screen::@21/(word*) SQUARES#20 )
(byte*) heap_head#33 ← phi( init_dist_screen::@21/(byte*) heap_head#37 )
(byte) NUM_SQUARES#25 ← phi( init_dist_screen::@21/(byte) NUM_SQUARES#13 )
(byte) init_dist_screen::y#6 ← phi( init_dist_screen::@21/(byte) init_dist_screen::y#8 )
(byte) init_dist_screen::xb#2 ← phi( init_dist_screen::@21/(byte) init_dist_screen::xb#3 )
(byte*) init_dist_screen::screen_bottomline#3 ← phi( init_dist_screen::@21/(byte*) init_dist_screen::screen_bottomline#5 )
@ -807,10 +802,10 @@ init_dist_screen::@return: scope:[init_dist_screen] from init_dist_screen::@7
(word*) SQUARES#6 ← (word*) SQUARES#15
return
to:@return
@48: scope:[] from @20
(word*) SQUARES#25 ← phi( @20/(word*) SQUARES#33 )
(byte*) heap_head#25 ← phi( @20/(byte*) heap_head#29 )
(byte) NUM_SQUARES#17 ← phi( @20/(byte) NUM_SQUARES#22 )
@48: scope:[] from @12
(word*) SQUARES#25 ← phi( @12/(word*) SQUARES#0 )
(byte*) heap_head#25 ← phi( @12/(byte*) heap_head#29 )
(byte) NUM_SQUARES#17 ← phi( @12/(byte) NUM_SQUARES#0 )
call main
to:@49
@49: scope:[] from @48
@ -825,7 +820,6 @@ init_dist_screen::@return: scope:[init_dist_screen] from init_dist_screen::@7
SYMBOL TABLE SSA
(label) @12
(label) @20
(label) @4
(label) @48
(label) @49
@ -842,7 +836,7 @@ SYMBOL TABLE SSA
(const byte) CIA_TIMER_CONTROL_STOP = (number) 0
(const dword) CLOCKS_PER_INIT = (number) $12
(const byte*) D018 = (byte*)(number) $d018
(byte[]) FONT_HEX_PROTO
(const byte[]) FONT_HEX_PROTO = { (byte)(number) 2, (byte)(number) 5, (byte)(number) 5, (byte)(number) 5, (byte)(number) 2, (byte)(number) 6, (byte)(number) 2, (byte)(number) 2, (byte)(number) 2, (byte)(number) 7, (byte)(number) 6, (byte)(number) 1, (byte)(number) 2, (byte)(number) 4, (byte)(number) 7, (byte)(number) 6, (byte)(number) 1, (byte)(number) 2, (byte)(number) 1, (byte)(number) 6, (byte)(number) 5, (byte)(number) 5, (byte)(number) 7, (byte)(number) 1, (byte)(number) 1, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 1, (byte)(number) 6, (byte)(number) 3, (byte)(number) 4, (byte)(number) 6, (byte)(number) 5, (byte)(number) 2, (byte)(number) 7, (byte)(number) 1, (byte)(number) 1, (byte)(number) 1, (byte)(number) 1, (byte)(number) 2, (byte)(number) 5, (byte)(number) 2, (byte)(number) 5, (byte)(number) 2, (byte)(number) 2, (byte)(number) 5, (byte)(number) 3, (byte)(number) 1, (byte)(number) 1, (byte)(number) 2, (byte)(number) 5, (byte)(number) 7, (byte)(number) 5, (byte)(number) 5, (byte)(number) 6, (byte)(number) 5, (byte)(number) 6, (byte)(number) 5, (byte)(number) 6, (byte)(number) 2, (byte)(number) 5, (byte)(number) 4, (byte)(number) 5, (byte)(number) 2, (byte)(number) 6, (byte)(number) 5, (byte)(number) 5, (byte)(number) 5, (byte)(number) 6, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 4, (byte)(number) 7, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 4, (byte)(number) 4 }
(const byte*) HEAP_TOP = (byte*)(number) $a000
(byte) NUM_SQUARES
(byte) NUM_SQUARES#0
@ -878,7 +872,6 @@ SYMBOL TABLE SSA
(byte) NUM_SQUARES#36
(byte) NUM_SQUARES#37
(byte) NUM_SQUARES#38
(byte) NUM_SQUARES#39
(byte) NUM_SQUARES#4
(byte) NUM_SQUARES#5
(byte) NUM_SQUARES#6
@ -931,7 +924,6 @@ SYMBOL TABLE SSA
(word*) SQUARES#41
(word*) SQUARES#42
(word*) SQUARES#43
(word*) SQUARES#44
(word*) SQUARES#5
(word*) SQUARES#6
(word*) SQUARES#7
@ -1068,7 +1060,6 @@ SYMBOL TABLE SSA
(byte*) heap_head#45
(byte*) heap_head#46
(byte*) heap_head#47
(byte*) heap_head#48
(byte*) heap_head#5
(byte*) heap_head#6
(byte*) heap_head#7
@ -1531,8 +1522,8 @@ Adding number conversion cast (unumber) init_dist_screen::$7 in (number~) init_d
Adding number conversion cast (unumber) $18 in (number~) init_dist_screen::$4 ← (number) $18 - (byte) init_dist_screen::y2#2
Adding number conversion cast (unumber) init_dist_screen::$4 in (number~) init_dist_screen::$4 ← (unumber)(number) $18 - (byte) init_dist_screen::y2#2
Adding number conversion cast (unumber) init_dist_screen::$5 in (number~) init_dist_screen::$5 ← (unumber~) init_dist_screen::$4
Adding number conversion cast (unumber) init_dist_screen::$8 in (byte*) heap_head#37 ← phi( init_dist_screen::@2/(byte*) heap_head#41 init_dist_screen::@3/(byte*) heap_head#42 )
(byte) NUM_SQUARES#31 ← phi( init_dist_screen::@2/(byte) NUM_SQUARES#35 init_dist_screen::@3/(byte) NUM_SQUARES#36 )
Adding number conversion cast (unumber) init_dist_screen::$8 in (byte*) heap_head#36 ← phi( init_dist_screen::@2/(byte*) heap_head#40 init_dist_screen::@3/(byte*) heap_head#41 )
(byte) NUM_SQUARES#30 ← phi( init_dist_screen::@2/(byte) NUM_SQUARES#34 init_dist_screen::@3/(byte) NUM_SQUARES#35 )
(byte) init_dist_screen::y#7 ← phi( init_dist_screen::@2/(byte) init_dist_screen::y#9 init_dist_screen::@3/(byte) init_dist_screen::y#10 )
(byte*) init_dist_screen::screen_bottomline#8 ← phi( init_dist_screen::@2/(byte*) init_dist_screen::screen_bottomline#11 init_dist_screen::@3/(byte*) init_dist_screen::screen_bottomline#12 )
(byte*) init_dist_screen::screen_topline#8 ← phi( init_dist_screen::@2/(byte*) init_dist_screen::screen_topline#11 init_dist_screen::@3/(byte*) init_dist_screen::screen_topline#12 )
@ -1552,19 +1543,17 @@ Adding number conversion cast (unumber) init_dist_screen::$16 in (number~) init_
Adding number conversion cast (unumber) $27 in (number~) init_dist_screen::$13 ← (number) $27 - (byte) init_dist_screen::x2#2
Adding number conversion cast (unumber) init_dist_screen::$13 in (number~) init_dist_screen::$13 ← (unumber)(number) $27 - (byte) init_dist_screen::x2#2
Adding number conversion cast (unumber) init_dist_screen::$14 in (number~) init_dist_screen::$14 ← (unumber~) init_dist_screen::$13
Adding number conversion cast (unumber) init_dist_screen::$17 in (byte*) heap_head#43 ← phi( init_dist_screen::@8/(byte*) heap_head#46 init_dist_screen::@9/(byte*) heap_head#47 )
Adding number conversion cast (unumber) init_dist_screen::$17 in (byte*) heap_head#42 ← phi( init_dist_screen::@8/(byte*) heap_head#45 init_dist_screen::@9/(byte*) heap_head#46 )
(byte) init_dist_screen::y#11 ← phi( init_dist_screen::@8/(byte) init_dist_screen::y#12 init_dist_screen::@9/(byte) init_dist_screen::y#13 )
(byte) init_dist_screen::xb#4 ← phi( init_dist_screen::@8/(byte) init_dist_screen::xb#5 init_dist_screen::@9/(byte) init_dist_screen::xb#6 )
(byte*) init_dist_screen::screen_bottomline#7 ← phi( init_dist_screen::@8/(byte*) init_dist_screen::screen_bottomline#9 init_dist_screen::@9/(byte*) init_dist_screen::screen_bottomline#10 )
(byte) init_dist_screen::x#6 ← phi( init_dist_screen::@8/(byte) init_dist_screen::x#7 init_dist_screen::@9/(byte) init_dist_screen::x#8 )
(byte*) init_dist_screen::screen_topline#7 ← phi( init_dist_screen::@8/(byte*) init_dist_screen::screen_topline#9 init_dist_screen::@9/(byte*) init_dist_screen::screen_topline#10 )
(byte) NUM_SQUARES#21 ← phi( init_dist_screen::@8/(byte) NUM_SQUARES#27 init_dist_screen::@9/(byte) NUM_SQUARES#28 )
(byte) NUM_SQUARES#21 ← phi( init_dist_screen::@8/(byte) NUM_SQUARES#26 init_dist_screen::@9/(byte) NUM_SQUARES#27 )
(word) init_dist_screen::yds#2 ← phi( init_dist_screen::@8/(word) init_dist_screen::yds#3 init_dist_screen::@9/(word) init_dist_screen::yds#4 )
(word*) SQUARES#18 ← phi( init_dist_screen::@8/(word*) SQUARES#31 init_dist_screen::@9/(word*) SQUARES#32 )
(number~) init_dist_screen::$17 ← phi( init_dist_screen::@8/(unumber~) init_dist_screen::$16 init_dist_screen::@9/(unumber~) init_dist_screen::$14 )
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (byte[]) FONT_HEX_PROTO ← (byte[]){ (byte)(number) 2, (byte)(number) 5, (byte)(number) 5, (byte)(number) 5, (byte)(number) 2, (byte)(number) 6, (byte)(number) 2, (byte)(number) 2, (byte)(number) 2, (byte)(number) 7, (byte)(number) 6, (byte)(number) 1, (byte)(number) 2, (byte)(number) 4, (byte)(number) 7, (byte)(number) 6, (byte)(number) 1, (byte)(number) 2, (byte)(number) 1, (byte)(number) 6, (byte)(number) 5, (byte)(number) 5, (byte)(number) 7, (byte)(number) 1, (byte)(number) 1, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 1, (byte)(number) 6, (byte)(number) 3, (byte)(number) 4, (byte)(number) 6, (byte)(number) 5, (byte)(number) 2, (byte)(number) 7, (byte)(number) 1, (byte)(number) 1, (byte)(number) 1, (byte)(number) 1, (byte)(number) 2, (byte)(number) 5, (byte)(number) 2, (byte)(number) 5, (byte)(number) 2, (byte)(number) 2, (byte)(number) 5, (byte)(number) 3, (byte)(number) 1, (byte)(number) 1, (byte)(number) 2, (byte)(number) 5, (byte)(number) 7, (byte)(number) 5, (byte)(number) 5, (byte)(number) 6, (byte)(number) 5, (byte)(number) 6, (byte)(number) 5, (byte)(number) 6, (byte)(number) 2, (byte)(number) 5, (byte)(number) 4, (byte)(number) 5, (byte)(number) 2, (byte)(number) 6, (byte)(number) 5, (byte)(number) 5, (byte)(number) 5, (byte)(number) 6, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 4, (byte)(number) 7, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 4, (byte)(number) 4 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (void*) malloc::return#0 ← (void*)(byte*) malloc::mem#0
Inlining cast (signed word~) bsearch16u::$8 ← (signed word)(word) bsearch16u::key#1
Inlining cast (signed word~) bsearch16u::$9 ← (signed word)*((word*) bsearch16u::pivot#0)
@ -1589,6 +1578,86 @@ Simplifying constant pointer cast (byte*) 53272
Simplifying constant pointer cast (dword*) 56580
Simplifying constant pointer cast (byte*) 56590
Simplifying constant pointer cast (byte*) 56591
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 6
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 7
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 4
Simplifying constant integer cast 7
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 1
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 7
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 7
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 6
Simplifying constant integer cast 3
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 7
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 3
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 7
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 4
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 7
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 4
Simplifying constant integer cast 7
Simplifying constant integer cast 7
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 4
Simplifying constant integer cast 4
Simplifying constant pointer cast (byte*) 8192
Simplifying constant pointer cast (byte*) 10240
Simplifying constant pointer cast (byte*) 1024
@ -1615,86 +1684,6 @@ Simplifying constant integer cast 0
Simplifying constant integer cast 5
Simplifying constant integer cast 8
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 6
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 7
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 4
Simplifying constant integer cast 7
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 1
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 7
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 7
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 6
Simplifying constant integer cast 3
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 7
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 3
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 7
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 4
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 7
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 4
Simplifying constant integer cast 7
Simplifying constant integer cast 7
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 4
Simplifying constant integer cast 4
Simplifying constant integer cast $ffffffff
Simplifying constant integer cast $ffffffff
Simplifying constant integer cast 2
@ -1822,7 +1811,7 @@ Alias (word*) bsearch16u::return#1 = (word*) bsearch16u::return#4
Alias (word*) bsearch16u::items#0 = (word*~) bsearch16u::$15
Alias (word*~) bsearch16u::$2 = (word*~) bsearch16u::$1
Alias (word*) bsearch16u::return#2 = (word*~) bsearch16u::$4
Alias (byte*) heap_head#0 = (byte*) heap_head#30 (byte*) heap_head#29 (byte*) heap_head#25
Alias (byte*) heap_head#0 = (byte*) heap_head#29 (byte*) heap_head#25
Alias (word) malloc::size#0 = (byte~) init_squares::$0
Alias (void*) malloc::return#2 = (void*) malloc::return#4
Alias (byte) NUM_SQUARES#6 = (byte) NUM_SQUARES#7
@ -1841,8 +1830,6 @@ Alias (byte) init_font_hex::c1#2 = (byte) init_font_hex::c1#3
Alias (byte*) init_font_hex::proto_hi#2 = (byte*) init_font_hex::proto_hi#5 (byte*) init_font_hex::proto_hi#3
Alias (byte) init_font_hex::c#2 = (byte) init_font_hex::c#3 (byte) init_font_hex::c#4
Alias (byte*) init_font_hex::charset#0 = (byte*) init_font_hex::charset#7
Alias (byte) NUM_SQUARES#0 = (byte) NUM_SQUARES#22 (byte) NUM_SQUARES#17
Alias (word*) SQUARES#0 = (word*) SQUARES#33 (word*) SQUARES#25
Alias (dword) clock::return#0 = (dword~) clock::$0 (dword) clock::return#3 (dword) clock::return#1
Alias (byte) print_byte_at::b#0 = (byte~) print_word_at::$0
Alias (word) print_word_at::w#2 = (word) print_word_at::w#3
@ -1857,32 +1844,32 @@ Alias (byte*) print_word_at::at#1 = (byte*~) print_dword_at::$3
Alias (byte) print_byte_at::b#2 = (byte) print_byte_at::b#3
Alias (byte*) print_byte_at::at#2 = (byte*) print_byte_at::at#3
Alias (byte*) print_char_at::at#1 = (byte*~) print_byte_at::$3
Alias (byte) NUM_SQUARES#14 = (byte) NUM_SQUARES#33 (byte) NUM_SQUARES#37 (byte) NUM_SQUARES#29 (byte) NUM_SQUARES#23 (byte) NUM_SQUARES#18
Alias (byte*) heap_head#21 = (byte*) heap_head#39 (byte*) heap_head#44 (byte*) heap_head#35 (byte*) heap_head#31 (byte*) heap_head#26
Alias (word*) SQUARES#21 = (word*) SQUARES#42 (word*) SQUARES#44 (word*) SQUARES#40 (word*) SQUARES#34 (word*) SQUARES#26
Alias (byte) NUM_SQUARES#14 = (byte) NUM_SQUARES#32 (byte) NUM_SQUARES#36 (byte) NUM_SQUARES#28 (byte) NUM_SQUARES#22 (byte) NUM_SQUARES#18
Alias (byte*) heap_head#21 = (byte*) heap_head#38 (byte*) heap_head#43 (byte*) heap_head#34 (byte*) heap_head#30 (byte*) heap_head#26
Alias (word*) SQUARES#21 = (word*) SQUARES#41 (word*) SQUARES#43 (word*) SQUARES#39 (word*) SQUARES#33 (word*) SQUARES#26
Alias (byte*) main::toD0181_screen#0 = (byte*) main::toD0181_screen#1
Alias (byte*) main::toD0181_gfx#0 = (byte*) main::toD0181_gfx#1
Alias (byte) main::toD0181_return#0 = (byte~) main::toD0181_$8 (byte) main::toD0181_return#2 (byte) main::toD0181_return#1 (byte) main::toD0181_return#3 (byte~) main::$1
Alias (byte) NUM_SQUARES#1 = (byte) NUM_SQUARES#9 (byte) NUM_SQUARES#34 (byte) NUM_SQUARES#30 (byte) NUM_SQUARES#24 (byte) NUM_SQUARES#19 (byte) NUM_SQUARES#15 (byte) NUM_SQUARES#10 (byte) NUM_SQUARES#2
Alias (byte*) heap_head#14 = (byte*) heap_head#5 (byte*) heap_head#40 (byte*) heap_head#36 (byte*) heap_head#32 (byte*) heap_head#27 (byte*) heap_head#22 (byte*) heap_head#15 (byte*) heap_head#6
Alias (word*) SQUARES#12 = (word*) SQUARES#3 (word*) SQUARES#43 (word*) SQUARES#41 (word*) SQUARES#35 (word*) SQUARES#27 (word*) SQUARES#22 (word*) SQUARES#13 (word*) SQUARES#4
Alias (byte) NUM_SQUARES#1 = (byte) NUM_SQUARES#9 (byte) NUM_SQUARES#33 (byte) NUM_SQUARES#29 (byte) NUM_SQUARES#23 (byte) NUM_SQUARES#19 (byte) NUM_SQUARES#15 (byte) NUM_SQUARES#10 (byte) NUM_SQUARES#2
Alias (byte*) heap_head#14 = (byte*) heap_head#5 (byte*) heap_head#39 (byte*) heap_head#35 (byte*) heap_head#31 (byte*) heap_head#27 (byte*) heap_head#22 (byte*) heap_head#15 (byte*) heap_head#6
Alias (word*) SQUARES#12 = (word*) SQUARES#3 (word*) SQUARES#42 (word*) SQUARES#40 (word*) SQUARES#34 (word*) SQUARES#27 (word*) SQUARES#22 (word*) SQUARES#13 (word*) SQUARES#4
Alias (dword) clock::return#2 = (dword) clock::return#4
Alias (dword) main::cyclecount#0 = (dword~) main::$5
Alias (byte*) main::toD0182_screen#0 = (byte*) main::toD0182_screen#1
Alias (byte*) main::toD0182_gfx#0 = (byte*) main::toD0182_gfx#1
Alias (byte) main::toD0182_return#0 = (byte~) main::toD0182_$8 (byte) main::toD0182_return#2 (byte) main::toD0182_return#1 (byte) main::toD0182_return#3 (byte~) main::$7
Alias (byte*) init_dist_screen::screen#1 = (byte*) init_dist_screen::screen#2 (byte*) init_dist_screen::screen_topline#0
Alias (byte) NUM_SQUARES#3 = (byte) NUM_SQUARES#39
Alias (byte) NUM_SQUARES#3 = (byte) NUM_SQUARES#38
Alias (byte*) heap_head#16 = (byte*) heap_head#7
Alias (word*) SQUARES#14 = (word*) SQUARES#5
Alias (byte*) init_dist_screen::screen_bottomline#0 = (byte*~) init_dist_screen::$1
Alias (byte) init_dist_screen::y2#0 = (byte~) init_dist_screen::$2 (byte) init_dist_screen::y2#1 (byte) init_dist_screen::y2#2
Alias (word*) SQUARES#28 = (word*) SQUARES#36 (word*) SQUARES#29
Alias (word*) SQUARES#28 = (word*) SQUARES#35 (word*) SQUARES#29
Alias (byte*) init_dist_screen::screen_topline#11 = (byte*) init_dist_screen::screen_topline#14 (byte*) init_dist_screen::screen_topline#12
Alias (byte*) init_dist_screen::screen_bottomline#11 = (byte*) init_dist_screen::screen_bottomline#14 (byte*) init_dist_screen::screen_bottomline#12
Alias (byte) init_dist_screen::y#10 = (byte) init_dist_screen::y#9 (byte) init_dist_screen::y#2
Alias (byte) NUM_SQUARES#35 = (byte) NUM_SQUARES#38 (byte) NUM_SQUARES#36
Alias (byte*) heap_head#41 = (byte*) heap_head#45 (byte*) heap_head#42
Alias (byte) NUM_SQUARES#34 = (byte) NUM_SQUARES#37 (byte) NUM_SQUARES#35
Alias (byte*) heap_head#40 = (byte*) heap_head#44 (byte*) heap_head#41
Alias (byte~) init_dist_screen::$7 = (byte~) init_dist_screen::$6
Alias (byte~) init_dist_screen::$5 = (byte~) init_dist_screen::$4
Alias (byte) init_dist_screen::yd#0 = (byte~) init_dist_screen::$8
@ -1890,37 +1877,39 @@ Alias (word) sqr::return#2 = (word) sqr::return#5
Alias (byte*) init_dist_screen::screen_topline#6 = (byte*) init_dist_screen::screen_topline#8
Alias (byte*) init_dist_screen::screen_bottomline#6 = (byte*) init_dist_screen::screen_bottomline#8
Alias (byte) init_dist_screen::y#5 = (byte) init_dist_screen::y#7
Alias (byte) NUM_SQUARES#25 = (byte) NUM_SQUARES#31
Alias (byte*) heap_head#33 = (byte*) heap_head#37
Alias (word*) SQUARES#19 = (word*) SQUARES#37
Alias (byte) NUM_SQUARES#24 = (byte) NUM_SQUARES#30
Alias (byte*) heap_head#32 = (byte*) heap_head#36
Alias (word*) SQUARES#19 = (word*) SQUARES#36
Alias (word) init_dist_screen::yds#0 = (word~) init_dist_screen::$9
Alias (byte) init_dist_screen::x#2 = (byte) init_dist_screen::x#3 (byte) init_dist_screen::x#7 (byte) init_dist_screen::x#8
Alias (word*) SQUARES#15 = (word*) SQUARES#39 (word*) SQUARES#30 (word*) SQUARES#24 (word*) SQUARES#31 (word*) SQUARES#32 (word*) SQUARES#6
Alias (word*) SQUARES#15 = (word*) SQUARES#38 (word*) SQUARES#30 (word*) SQUARES#24 (word*) SQUARES#31 (word*) SQUARES#32 (word*) SQUARES#6
Alias (word) init_dist_screen::yds#3 = (word) init_dist_screen::yds#5 (word) init_dist_screen::yds#6 (word) init_dist_screen::yds#4
Alias (byte) NUM_SQUARES#11 = (byte) NUM_SQUARES#32 (byte) NUM_SQUARES#20 (byte) NUM_SQUARES#16 (byte) NUM_SQUARES#27 (byte) NUM_SQUARES#28 (byte) NUM_SQUARES#4
Alias (byte) NUM_SQUARES#11 = (byte) NUM_SQUARES#31 (byte) NUM_SQUARES#20 (byte) NUM_SQUARES#16 (byte) NUM_SQUARES#26 (byte) NUM_SQUARES#27 (byte) NUM_SQUARES#4
Alias (byte*) init_dist_screen::screen_topline#10 = (byte*) init_dist_screen::screen_topline#13 (byte*) init_dist_screen::screen_topline#4 (byte*) init_dist_screen::screen_topline#2 (byte*) init_dist_screen::screen_topline#9
Alias (byte*) init_dist_screen::screen_bottomline#10 = (byte*) init_dist_screen::screen_bottomline#13 (byte*) init_dist_screen::screen_bottomline#4 (byte*) init_dist_screen::screen_bottomline#2 (byte*) init_dist_screen::screen_bottomline#9
Alias (byte) init_dist_screen::xb#5 = (byte) init_dist_screen::xb#7 (byte) init_dist_screen::xb#8 (byte) init_dist_screen::xb#6
Alias (byte) init_dist_screen::y#12 = (byte) init_dist_screen::y#14 (byte) init_dist_screen::y#4 (byte) init_dist_screen::y#3 (byte) init_dist_screen::y#13
Alias (byte*) heap_head#17 = (byte*) heap_head#48 (byte*) heap_head#28 (byte*) heap_head#24 (byte*) heap_head#46 (byte*) heap_head#47 (byte*) heap_head#8
Alias (byte*) heap_head#17 = (byte*) heap_head#47 (byte*) heap_head#28 (byte*) heap_head#24 (byte*) heap_head#45 (byte*) heap_head#46 (byte*) heap_head#8
Alias (byte) init_dist_screen::x2#0 = (byte~) init_dist_screen::$11 (byte) init_dist_screen::x2#1 (byte) init_dist_screen::x2#2
Alias (byte~) init_dist_screen::$16 = (byte~) init_dist_screen::$15
Alias (byte~) init_dist_screen::$14 = (byte~) init_dist_screen::$13
Alias (byte) init_dist_screen::xd#0 = (byte~) init_dist_screen::$17
Alias (word) sqr::return#3 = (word) sqr::return#6
Alias (word) init_dist_screen::yds#1 = (word) init_dist_screen::yds#2 (word) init_dist_screen::yds#7
Alias (word*) SQUARES#18 = (word*) SQUARES#20 (word*) SQUARES#38
Alias (byte) NUM_SQUARES#13 = (byte) NUM_SQUARES#21 (byte) NUM_SQUARES#26
Alias (word*) SQUARES#18 = (word*) SQUARES#20 (word*) SQUARES#37
Alias (byte) NUM_SQUARES#13 = (byte) NUM_SQUARES#21 (byte) NUM_SQUARES#25
Alias (byte*) init_dist_screen::screen_topline#3 = (byte*) init_dist_screen::screen_topline#5 (byte*) init_dist_screen::screen_topline#7
Alias (byte) init_dist_screen::x#4 = (byte) init_dist_screen::x#5 (byte) init_dist_screen::x#6
Alias (byte*) init_dist_screen::screen_bottomline#3 = (byte*) init_dist_screen::screen_bottomline#5 (byte*) init_dist_screen::screen_bottomline#7
Alias (byte) init_dist_screen::xb#2 = (byte) init_dist_screen::xb#3 (byte) init_dist_screen::xb#4
Alias (byte) init_dist_screen::y#11 = (byte) init_dist_screen::y#8 (byte) init_dist_screen::y#6
Alias (byte*) heap_head#34 = (byte*) heap_head#38 (byte*) heap_head#43
Alias (byte*) heap_head#33 = (byte*) heap_head#37 (byte*) heap_head#42
Alias (word) init_dist_screen::xds#0 = (word~) init_dist_screen::$18
Alias (word) init_dist_screen::ds#0 = (word~) init_dist_screen::$19
Alias (byte) sqrt::return#2 = (byte) sqrt::return#4
Alias (byte) init_dist_screen::d#0 = (byte~) init_dist_screen::$20
Alias (byte) NUM_SQUARES#0 = (byte) NUM_SQUARES#17
Alias (word*) SQUARES#0 = (word*) SQUARES#25
Alias (byte) NUM_SQUARES#12 = (byte) NUM_SQUARES#5
Alias (byte*) heap_head#18 = (byte*) heap_head#9
Alias (word*) SQUARES#16 = (word*) SQUARES#7
@ -1930,8 +1919,8 @@ Alias (word*) SQUARES#19 = (word*) SQUARES#28
Alias (byte*) init_dist_screen::screen_topline#11 = (byte*) init_dist_screen::screen_topline#6
Alias (byte*) init_dist_screen::screen_bottomline#11 = (byte*) init_dist_screen::screen_bottomline#6
Alias (byte) init_dist_screen::y#10 = (byte) init_dist_screen::y#5
Alias (byte) NUM_SQUARES#25 = (byte) NUM_SQUARES#35
Alias (byte*) heap_head#33 = (byte*) heap_head#41
Alias (byte) NUM_SQUARES#24 = (byte) NUM_SQUARES#34
Alias (byte*) heap_head#32 = (byte*) heap_head#40
Alias (word*) SQUARES#15 = (word*) SQUARES#18
Alias (word) init_dist_screen::yds#1 = (word) init_dist_screen::yds#3
Alias (byte) NUM_SQUARES#11 = (byte) NUM_SQUARES#13
@ -1940,7 +1929,7 @@ Alias (byte) init_dist_screen::x#2 = (byte) init_dist_screen::x#4
Alias (byte*) init_dist_screen::screen_bottomline#10 = (byte*) init_dist_screen::screen_bottomline#3
Alias (byte) init_dist_screen::xb#2 = (byte) init_dist_screen::xb#5
Alias (byte) init_dist_screen::y#11 = (byte) init_dist_screen::y#12
Alias (byte*) heap_head#17 = (byte*) heap_head#34
Alias (byte*) heap_head#17 = (byte*) heap_head#33
Successful SSA optimization Pass2AliasElimination
Identical Phi Values (byte*) heap_head#10 (byte*) heap_head#19
Identical Phi Values (word) malloc::size#1 (word) malloc::size#0
@ -1978,8 +1967,8 @@ Identical Phi Values (word*) SQUARES#14 (word*) SQUARES#17
Identical Phi Values (byte*) init_dist_screen::screen_topline#10 (byte*) init_dist_screen::screen_topline#11
Identical Phi Values (byte*) init_dist_screen::screen_bottomline#10 (byte*) init_dist_screen::screen_bottomline#11
Identical Phi Values (byte) init_dist_screen::y#11 (byte) init_dist_screen::y#10
Identical Phi Values (byte) NUM_SQUARES#11 (byte) NUM_SQUARES#25
Identical Phi Values (byte*) heap_head#17 (byte*) heap_head#33
Identical Phi Values (byte) NUM_SQUARES#11 (byte) NUM_SQUARES#24
Identical Phi Values (byte*) heap_head#17 (byte*) heap_head#32
Identical Phi Values (word*) SQUARES#15 (word*) SQUARES#19
Identical Phi Values (word) init_dist_screen::yds#1 (word) init_dist_screen::yds#0
Identical Phi Values (byte) NUM_SQUARES#12 (byte) NUM_SQUARES#1
@ -1990,8 +1979,8 @@ Identical Phi Values (word*) SQUARES#9 (word*) SQUARES#19
Identical Phi Values (byte*) init_font_hex::proto_hi#4 (byte*) init_font_hex::proto_hi#6
Identical Phi Values (byte) init_font_hex::c#5 (byte) init_font_hex::c#6
Identical Phi Values (word*) SQUARES#19 (word*) SQUARES#1
Identical Phi Values (byte) NUM_SQUARES#25 (byte) NUM_SQUARES#3
Identical Phi Values (byte*) heap_head#33 (byte*) heap_head#1
Identical Phi Values (byte) NUM_SQUARES#24 (byte) NUM_SQUARES#3
Identical Phi Values (byte*) heap_head#32 (byte*) heap_head#1
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) bsearch16u::$5 [13] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@7
Simple Condition (bool~) bsearch16u::$12 [25] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@9
@ -2001,16 +1990,14 @@ Simple Condition (bool~) init_squares::$5 [77] if((byte) init_squares::i#1!=rang
Simple Condition (bool~) init_font_hex::$3 [124] if((byte) init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3
Simple Condition (bool~) init_font_hex::$4 [134] if((byte) init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2
Simple Condition (bool~) init_font_hex::$5 [139] if((byte) init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1
Simple Condition (bool~) init_dist_screen::$3 [270] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2
Simple Condition (bool~) init_dist_screen::$10 [289] if((byte) init_dist_screen::x#2<=(byte) $13) goto init_dist_screen::@6
Simple Condition (bool~) init_dist_screen::$12 [294] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@8
Simple Condition (bool~) init_dist_screen::$21 [300] if((byte) init_dist_screen::y#1!=rangelast(0,$c)) goto init_dist_screen::@1
Simple Condition (bool~) init_dist_screen::$3 [268] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2
Simple Condition (bool~) init_dist_screen::$10 [287] if((byte) init_dist_screen::x#2<=(byte) $13) goto init_dist_screen::@6
Simple Condition (bool~) init_dist_screen::$12 [292] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@8
Simple Condition (bool~) init_dist_screen::$21 [298] if((byte) init_dist_screen::y#1!=rangelast(0,$c)) goto init_dist_screen::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant right-side identified [41] (byte~) bsearch16u::$17 ← (byte) 1 * (const byte) SIZEOF_WORD
Constant right-side identified [48] (byte~) bsearch16u::$18 ← (byte) 1 * (const byte) SIZEOF_WORD
Successful SSA optimization Pass2ConstantRValueConsolidation
Identified constant from value list (byte[]) { (byte) 2, (byte) 5, (byte) 5, (byte) 5, (byte) 2, (byte) 6, (byte) 2, (byte) 2, (byte) 2, (byte) 7, (byte) 6, (byte) 1, (byte) 2, (byte) 4, (byte) 7, (byte) 6, (byte) 1, (byte) 2, (byte) 1, (byte) 6, (byte) 5, (byte) 5, (byte) 7, (byte) 1, (byte) 1, (byte) 7, (byte) 4, (byte) 6, (byte) 1, (byte) 6, (byte) 3, (byte) 4, (byte) 6, (byte) 5, (byte) 2, (byte) 7, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 2, (byte) 5, (byte) 2, (byte) 5, (byte) 2, (byte) 2, (byte) 5, (byte) 3, (byte) 1, (byte) 1, (byte) 2, (byte) 5, (byte) 7, (byte) 5, (byte) 5, (byte) 6, (byte) 5, (byte) 6, (byte) 5, (byte) 6, (byte) 2, (byte) 5, (byte) 4, (byte) 5, (byte) 2, (byte) 6, (byte) 5, (byte) 5, (byte) 5, (byte) 6, (byte) 7, (byte) 4, (byte) 6, (byte) 4, (byte) 7, (byte) 7, (byte) 4, (byte) 6, (byte) 4, (byte) 4 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const byte*) heap_head#0 = HEAP_TOP
Constant (const byte) bsearch16u::$17 = 1*SIZEOF_WORD
Constant (const byte) bsearch16u::$18 = 1*SIZEOF_WORD
@ -2018,11 +2005,12 @@ Constant (const byte) NUM_SQUARES#0 = $ff
Constant (const word*) SQUARES#0 = (word*) 0
Constant (const word) init_squares::sqr#0 = 0
Constant (const byte) init_squares::i#0 = 0
Constant (const byte*) init_font_hex::proto_hi#0 = FONT_HEX_PROTO
Constant (const byte) init_font_hex::c#0 = 0
Constant (const byte*) init_font_hex::proto_lo#0 = FONT_HEX_PROTO
Constant (const byte) init_font_hex::c1#0 = 0
Constant (const byte) init_font_hex::idx#0 = 0
Constant (const byte) init_font_hex::i#0 = 0
Constant (const byte[]) FONT_HEX_PROTO = { 2, 5, 5, 5, 2, 6, 2, 2, 2, 7, 6, 1, 2, 4, 7, 6, 1, 2, 1, 6, 5, 5, 7, 1, 1, 7, 4, 6, 1, 6, 3, 4, 6, 5, 2, 7, 1, 1, 1, 1, 2, 5, 2, 5, 2, 2, 5, 3, 1, 1, 2, 5, 7, 5, 5, 6, 5, 6, 5, 6, 2, 5, 4, 5, 2, 6, 5, 5, 5, 6, 7, 4, 6, 4, 7, 7, 4, 6, 4, 4 }
Constant (const byte*) init_font_hex::charset#1 = CHARSET
Constant (const byte*) main::toD0181_screen#0 = SCREEN
Constant (const byte*) main::toD0181_gfx#0 = CHARSET
@ -2036,8 +2024,6 @@ Constant (const byte) init_dist_screen::x#0 = 0
Constant (const byte) init_dist_screen::xb#0 = $27
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte) bsearch16u::num#2 = NUM_SQUARES#3
Constant (const byte*) init_font_hex::proto_hi#0 = FONT_HEX_PROTO
Constant (const byte*) init_font_hex::proto_lo#0 = FONT_HEX_PROTO
Constant (const byte*) print_word_at::at#0 = print_dword_at::at#0
Constant (const word) main::toD0181_$0 = (word)main::toD0181_screen#0
Constant (const word) main::toD0181_$4 = (word)main::toD0181_gfx#0
@ -2050,18 +2036,18 @@ Resolved ranged next value [132] init_font_hex::c1#1 ← ++ init_font_hex::c1#4
Resolved ranged comparison value [134] if(init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 to (number) $10
Resolved ranged next value [137] init_font_hex::c#1 ← ++ init_font_hex::c#6 to ++
Resolved ranged comparison value [139] if(init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 to (number) $10
Resolved ranged next value [298] init_dist_screen::y#1 ← ++ init_dist_screen::y#10 to ++
Resolved ranged comparison value [300] if(init_dist_screen::y#1!=rangelast(0,$c)) goto init_dist_screen::@1 to (number) $d
Rewriting conditional comparison [289] if((byte) init_dist_screen::x#2<=(byte) $13) goto init_dist_screen::@6
Simplifying constant evaluating to zero (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES in [148] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES
Simplifying constant evaluating to zero (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS in [149] *((const byte*) CIA2_TIMER_B_CONTROL) ← (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A
Resolved ranged next value [296] init_dist_screen::y#1 ← ++ init_dist_screen::y#10 to ++
Resolved ranged comparison value [298] if(init_dist_screen::y#1!=rangelast(0,$c)) goto init_dist_screen::@1 to (number) $d
Rewriting conditional comparison [287] if((byte) init_dist_screen::x#2<=(byte) $13) goto init_dist_screen::@6
Simplifying constant evaluating to zero (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES in [146] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES
Simplifying constant evaluating to zero (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS in [147] *((const byte*) CIA2_TIMER_B_CONTROL) ← (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A
Successful SSA optimization PassNSimplifyConstantZero
Simplifying expression containing zero init_font_hex::charset#2 in [113] *((byte*) init_font_hex::charset#2 + (const byte) init_font_hex::idx#0) ← (byte) 0
Simplifying expression containing zero CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A in [149] *((const byte*) CIA2_TIMER_B_CONTROL) ← (byte) 0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A
Simplifying expression containing zero CIA_TIMER_CONTROL_START in [151] *((const byte*) CIA2_TIMER_B_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A
Simplifying expression containing zero CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_CONTINUOUS in [152] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES
Simplifying expression containing zero CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A in [147] *((const byte*) CIA2_TIMER_B_CONTROL) ← (byte) 0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A
Simplifying expression containing zero CIA_TIMER_CONTROL_START in [149] *((const byte*) CIA2_TIMER_B_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A
Simplifying expression containing zero CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_CONTINUOUS in [150] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES
Successful SSA optimization PassNSimplifyExpressionWithZero
Simplifying expression containing zero CIA_TIMER_CONTROL_START in [152] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS
Simplifying expression containing zero CIA_TIMER_CONTROL_START in [150] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused variable (byte*) heap_head#1 and assignment [1] (byte*) heap_head#1 ← (byte*) malloc::mem#0
Eliminating unused variable (byte) init_font_hex::idx#4 and assignment [67] (byte) init_font_hex::idx#4 ← ++ (byte) init_font_hex::idx#3
@ -2176,13 +2162,13 @@ Inlining constant with var siblings (const word*) bsearch16u::items#1
Inlining constant with var siblings (const word) init_squares::sqr#0
Inlining constant with var siblings (const byte) init_squares::i#0
Inlining constant with var siblings (const word*) init_squares::squares#0
Inlining constant with var siblings (const byte*) init_font_hex::proto_hi#0
Inlining constant with var siblings (const byte) init_font_hex::c#0
Inlining constant with var siblings (const byte*) init_font_hex::proto_lo#0
Inlining constant with var siblings (const byte) init_font_hex::c1#0
Inlining constant with var siblings (const byte) init_font_hex::idx#0
Inlining constant with var siblings (const byte) init_font_hex::i#0
Inlining constant with var siblings (const byte*) init_font_hex::charset#1
Inlining constant with var siblings (const byte*) init_font_hex::proto_hi#0
Inlining constant with var siblings (const byte*) init_font_hex::proto_lo#0
Inlining constant with var siblings (const byte) init_font_hex::idx#1
Inlining constant with var siblings (const byte*) print_word_at::at#0
Inlining constant with var siblings (const byte*) print_word_at::at#1
@ -2249,7 +2235,6 @@ Added new block during phi lifting init_dist_screen::@23(between init_dist_scree
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @4
Adding NOP phi() at start of @12
Adding NOP phi() at start of @20
Adding NOP phi() at start of @48
Adding NOP phi() at start of @49
Adding NOP phi() at start of @end
@ -2273,63 +2258,62 @@ Adding NOP phi() at start of init_squares::@3
Adding NOP phi() at start of malloc
Adding NOP phi() at start of init_font_hex
CALL GRAPH
Calls in [] to main:5
Calls in [main] to init_font_hex:9 clock_start:14 init_dist_screen:16 clock:18 print_dword_at:23
Calls in [print_dword_at] to print_word_at:31 print_word_at:34
Calls in [print_word_at] to print_byte_at:42 print_byte_at:47
Calls in [print_byte_at] to print_char_at:56 print_char_at:62
Calls in [init_dist_screen] to init_squares:71 sqr:81 sqr:101 sqrt:106
Calls in [sqrt] to bsearch16u:122
Calls in [init_squares] to malloc:162
Calls in [] to main:4
Calls in [main] to init_font_hex:8 clock_start:13 init_dist_screen:15 clock:17 print_dword_at:22
Calls in [print_dword_at] to print_word_at:30 print_word_at:33
Calls in [print_word_at] to print_byte_at:41 print_byte_at:46
Calls in [print_byte_at] to print_char_at:55 print_char_at:61
Calls in [init_dist_screen] to init_squares:70 sqr:80 sqr:100 sqrt:105
Calls in [sqrt] to bsearch16u:121
Calls in [init_squares] to malloc:161
Created 31 initial phi equivalence classes
Coalesced [30] print_word_at::w#4 ← print_word_at::w#0
Coalesced [33] print_word_at::w#5 ← print_word_at::w#1
Coalesced [40] print_byte_at::b#4 ← print_byte_at::b#0
Coalesced [41] print_byte_at::at#4 ← print_byte_at::at#0
Coalesced [45] print_byte_at::b#5 ← print_byte_at::b#1
Coalesced [46] print_byte_at::at#5 ← print_byte_at::at#1
Coalesced [54] print_char_at::ch#3 ← print_char_at::ch#0
Coalesced [55] print_char_at::at#3 ← print_char_at::at#0
Coalesced [60] print_char_at::ch#4 ← print_char_at::ch#1
Coalesced [61] print_char_at::at#4 ← print_char_at::at#1
Coalesced [77] init_dist_screen::yd#2 ← init_dist_screen::$5
Coalesced [80] sqr::val#4 ← sqr::val#0
Coalesced [91] init_dist_screen::y#15 ← init_dist_screen::y#1
Coalesced [92] init_dist_screen::screen_topline#15 ← init_dist_screen::screen_topline#1
Coalesced [93] init_dist_screen::screen_bottomline#15 ← init_dist_screen::screen_bottomline#1
Coalesced [97] init_dist_screen::xd#2 ← init_dist_screen::$14
Coalesced [100] sqr::val#3 ← sqr::val#1
Coalesced [115] init_dist_screen::x#9 ← init_dist_screen::x#1
Coalesced [116] init_dist_screen::xb#9 ← init_dist_screen::xb#1
Coalesced [118] init_dist_screen::xd#1 ← init_dist_screen::$16
Coalesced [120] init_dist_screen::yd#1 ← init_dist_screen::$7
Coalesced [134] bsearch16u::return#9 ← bsearch16u::$2
Coalesced [136] bsearch16u::return#7 ← bsearch16u::return#2
Coalesced [139] bsearch16u::return#8 ← bsearch16u::items#2
Not coalescing [145] bsearch16u::return#6 ← bsearch16u::pivot#0
Coalesced [149] bsearch16u::num#10 ← bsearch16u::num#1
Coalesced [150] bsearch16u::items#11 ← bsearch16u::items#0
Coalesced [153] bsearch16u::num#9 ← bsearch16u::num#0
Coalesced [154] bsearch16u::items#10 ← bsearch16u::items#8
Coalesced [155] bsearch16u::num#11 ← bsearch16u::num#3
Coalesced (already) [156] bsearch16u::items#12 ← bsearch16u::items#2
Coalesced [173] init_squares::sqr#3 ← init_squares::sqr#1
Coalesced [174] init_squares::squares#3 ← init_squares::squares#1
Coalesced [175] init_squares::i#3 ← init_squares::i#1
Coalesced [186] init_font_hex::charset#9 ← init_font_hex::charset#5
Coalesced [208] init_font_hex::charset#8 ← init_font_hex::charset#0
Coalesced [209] init_font_hex::proto_hi#7 ← init_font_hex::proto_hi#1
Coalesced [210] init_font_hex::c#7 ← init_font_hex::c#1
Coalesced (already) [211] init_font_hex::charset#10 ← init_font_hex::charset#0
Coalesced [212] init_font_hex::proto_lo#5 ← init_font_hex::proto_lo#1
Coalesced [213] init_font_hex::c1#5 ← init_font_hex::c1#1
Coalesced [214] init_font_hex::i#3 ← init_font_hex::i#1
Coalesced [215] init_font_hex::idx#7 ← init_font_hex::idx#2
Coalesced [29] print_word_at::w#4 ← print_word_at::w#0
Coalesced [32] print_word_at::w#5 ← print_word_at::w#1
Coalesced [39] print_byte_at::b#4 ← print_byte_at::b#0
Coalesced [40] print_byte_at::at#4 ← print_byte_at::at#0
Coalesced [44] print_byte_at::b#5 ← print_byte_at::b#1
Coalesced [45] print_byte_at::at#5 ← print_byte_at::at#1
Coalesced [53] print_char_at::ch#3 ← print_char_at::ch#0
Coalesced [54] print_char_at::at#3 ← print_char_at::at#0
Coalesced [59] print_char_at::ch#4 ← print_char_at::ch#1
Coalesced [60] print_char_at::at#4 ← print_char_at::at#1
Coalesced [76] init_dist_screen::yd#2 ← init_dist_screen::$5
Coalesced [79] sqr::val#4 ← sqr::val#0
Coalesced [90] init_dist_screen::y#15 ← init_dist_screen::y#1
Coalesced [91] init_dist_screen::screen_topline#15 ← init_dist_screen::screen_topline#1
Coalesced [92] init_dist_screen::screen_bottomline#15 ← init_dist_screen::screen_bottomline#1
Coalesced [96] init_dist_screen::xd#2 ← init_dist_screen::$14
Coalesced [99] sqr::val#3 ← sqr::val#1
Coalesced [114] init_dist_screen::x#9 ← init_dist_screen::x#1
Coalesced [115] init_dist_screen::xb#9 ← init_dist_screen::xb#1
Coalesced [117] init_dist_screen::xd#1 ← init_dist_screen::$16
Coalesced [119] init_dist_screen::yd#1 ← init_dist_screen::$7
Coalesced [133] bsearch16u::return#9 ← bsearch16u::$2
Coalesced [135] bsearch16u::return#7 ← bsearch16u::return#2
Coalesced [138] bsearch16u::return#8 ← bsearch16u::items#2
Not coalescing [144] bsearch16u::return#6 ← bsearch16u::pivot#0
Coalesced [148] bsearch16u::num#10 ← bsearch16u::num#1
Coalesced [149] bsearch16u::items#11 ← bsearch16u::items#0
Coalesced [152] bsearch16u::num#9 ← bsearch16u::num#0
Coalesced [153] bsearch16u::items#10 ← bsearch16u::items#8
Coalesced [154] bsearch16u::num#11 ← bsearch16u::num#3
Coalesced (already) [155] bsearch16u::items#12 ← bsearch16u::items#2
Coalesced [172] init_squares::sqr#3 ← init_squares::sqr#1
Coalesced [173] init_squares::squares#3 ← init_squares::squares#1
Coalesced [174] init_squares::i#3 ← init_squares::i#1
Coalesced [185] init_font_hex::charset#9 ← init_font_hex::charset#5
Coalesced [207] init_font_hex::charset#8 ← init_font_hex::charset#0
Coalesced [208] init_font_hex::proto_hi#7 ← init_font_hex::proto_hi#1
Coalesced [209] init_font_hex::c#7 ← init_font_hex::c#1
Coalesced (already) [210] init_font_hex::charset#10 ← init_font_hex::charset#0
Coalesced [211] init_font_hex::proto_lo#5 ← init_font_hex::proto_lo#1
Coalesced [212] init_font_hex::c1#5 ← init_font_hex::c1#1
Coalesced [213] init_font_hex::i#3 ← init_font_hex::i#1
Coalesced [214] init_font_hex::idx#7 ← init_font_hex::idx#2
Coalesced down to 27 phi equivalence classes
Culled Empty Block (label) @4
Culled Empty Block (label) @12
Culled Empty Block (label) @20
Culled Empty Block (label) @49
Culled Empty Block (label) main::@3
Culled Empty Block (label) main::toD0181_@return
@ -4210,9 +4194,9 @@ init_font_hex: {
rts
}
// File Data
print_hextab: .text "0123456789abcdef"
// Bit patterns for symbols 0-f (3x5 pixels) used in font hex
FONT_HEX_PROTO: .byte 2, 5, 5, 5, 2, 6, 2, 2, 2, 7, 6, 1, 2, 4, 7, 6, 1, 2, 1, 6, 5, 5, 7, 1, 1, 7, 4, 6, 1, 6, 3, 4, 6, 5, 2, 7, 1, 1, 1, 1, 2, 5, 2, 5, 2, 2, 5, 3, 1, 1, 2, 5, 7, 5, 5, 6, 5, 6, 5, 6, 2, 5, 4, 5, 2, 6, 5, 5, 5, 6, 7, 4, 6, 4, 7, 7, 4, 6, 4, 4
print_hextab: .text "0123456789abcdef"
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [7] *((const byte*) D018) ← (const byte) main::toD0181_return#0 [ ] ( main:2 [ ] ) always clobbers reg byte a
@ -5593,9 +5577,9 @@ init_font_hex: {
rts
}
// File Data
print_hextab: .text "0123456789abcdef"
// Bit patterns for symbols 0-f (3x5 pixels) used in font hex
FONT_HEX_PROTO: .byte 2, 5, 5, 5, 2, 6, 2, 2, 2, 7, 6, 1, 2, 4, 7, 6, 1, 2, 1, 6, 5, 5, 7, 1, 1, 7, 4, 6, 1, 6, 3, 4, 6, 5, 2, 7, 1, 1, 1, 1, 2, 5, 2, 5, 2, 2, 5, 3, 1, 1, 2, 5, 7, 5, 5, 6, 5, 6, 5, 6, 2, 5, 4, 5, 2, 6, 5, 5, 5, 6, 7, 4, 6, 4, 7, 7, 4, 6, 4, 4
print_hextab: .text "0123456789abcdef"
ASSEMBLER OPTIMIZATIONS
Removing instruction jmp __b1
@ -7012,7 +6996,7 @@ init_font_hex: {
rts
}
// File Data
print_hextab: .text "0123456789abcdef"
// Bit patterns for symbols 0-f (3x5 pixels) used in font hex
FONT_HEX_PROTO: .byte 2, 5, 5, 5, 2, 6, 2, 2, 2, 7, 6, 1, 2, 4, 7, 6, 1, 2, 1, 6, 5, 5, 7, 1, 1, 7, 4, 6, 1, 6, 3, 4, 6, 5, 2, 7, 1, 1, 1, 1, 2, 5, 2, 5, 2, 2, 5, 3, 1, 1, 2, 5, 7, 5, 5, 6, 5, 6, 5, 6, 2, 5, 4, 5, 2, 6, 5, 5, 5, 6, 7, 4, 6, 4, 7, 7, 4, 6, 4, 4
print_hextab: .text "0123456789abcdef"

View File

@ -52,8 +52,8 @@ main::@11: scope:[main] from main::@10
[25] call print_ln
to:main::@12
main::@12: scope:[main] from main::@11
[26] (byte*~) print_line_cursor#155 ← (byte*) print_line_cursor#1
[27] (byte*~) print_char_cursor#226 ← (byte*) print_line_cursor#1
[26] (byte*~) print_line_cursor#154 ← (byte*) print_line_cursor#1
[27] (byte*~) print_char_cursor#225 ← (byte*) print_line_cursor#1
[28] call print_ln
to:main::@13
main::@13: scope:[main] from main::@12
@ -61,12 +61,12 @@ main::@13: scope:[main] from main::@12
[30] call printEntry
to:main::@14
main::@14: scope:[main] from main::@13
[31] (byte*~) print_line_cursor#156 ← (byte*) print_line_cursor#1
[32] (byte*~) print_char_cursor#227 ← (byte*) print_line_cursor#1
[31] (byte*~) print_line_cursor#155 ← (byte*) print_line_cursor#1
[32] (byte*~) print_char_cursor#226 ← (byte*) print_line_cursor#1
[33] call print_ln
to:main::@15
main::@15: scope:[main] from main::@14
[34] (byte*~) print_char_cursor#208 ← (byte*) print_line_cursor#1
[34] (byte*~) print_char_cursor#207 ← (byte*) print_line_cursor#1
[35] call print_str
to:main::@1
main::@1: scope:[main] from main::@15 main::@16
@ -91,8 +91,8 @@ main::@18: scope:[main] from main::@17
[46] call print_ln
to:main::@19
main::@19: scope:[main] from main::@18
[47] (byte*~) print_line_cursor#157 ← (byte*) print_line_cursor#1
[48] (byte*~) print_char_cursor#229 ← (byte*) print_line_cursor#1
[47] (byte*~) print_line_cursor#156 ← (byte*) print_line_cursor#1
[48] (byte*~) print_char_cursor#228 ← (byte*) print_line_cursor#1
[49] call print_ln
to:main::@20
main::@20: scope:[main] from main::@19
@ -100,12 +100,12 @@ main::@20: scope:[main] from main::@19
[51] call printEntry
to:main::@21
main::@21: scope:[main] from main::@20
[52] (byte*~) print_line_cursor#158 ← (byte*) print_line_cursor#1
[53] (byte*~) print_char_cursor#230 ← (byte*) print_line_cursor#1
[52] (byte*~) print_line_cursor#157 ← (byte*) print_line_cursor#1
[53] (byte*~) print_char_cursor#229 ← (byte*) print_line_cursor#1
[54] call print_ln
to:main::@22
main::@22: scope:[main] from main::@21
[55] (byte*~) print_char_cursor#209 ← (byte*) print_line_cursor#1
[55] (byte*~) print_char_cursor#208 ← (byte*) print_line_cursor#1
[56] call print_str
to:main::@3
main::@3: scope:[main] from main::@22 main::@23
@ -175,7 +175,7 @@ keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matri
(void()) print_str((byte*) print_str::str)
print_str: scope:[print_str] from main::@10 main::@15 main::@17 main::@22 printEntry printEntry::@15 printEntry::@17 printEntry::@19 printEntry::@21 printEntry::@23 printEntry::@25 printEntry::@27 printEntry::@29 printEntry::@31 printEntry::@33 printEntry::@35 printEntry::@37
[83] (byte*) print_char_cursor#164 ← phi( main::@10/(byte*) 1024 main::@15/(byte*~) print_char_cursor#208 main::@17/(byte*) 1024 main::@22/(byte*~) print_char_cursor#209 printEntry/(byte*~) print_char_cursor#210 printEntry::@15/(byte*~) print_char_cursor#211 printEntry::@17/(byte*~) print_char_cursor#212 printEntry::@19/(byte*~) print_char_cursor#213 printEntry::@21/(byte*~) print_char_cursor#214 printEntry::@23/(byte*~) print_char_cursor#215 printEntry::@25/(byte*~) print_char_cursor#216 printEntry::@27/(byte*~) print_char_cursor#217 printEntry::@29/(byte*~) print_char_cursor#218 printEntry::@31/(byte*~) print_char_cursor#219 printEntry::@33/(byte*~) print_char_cursor#220 printEntry::@35/(byte*~) print_char_cursor#221 printEntry::@37/(byte*~) print_char_cursor#222 )
[83] (byte*) print_char_cursor#164 ← phi( main::@10/(byte*) 1024 main::@15/(byte*~) print_char_cursor#207 main::@17/(byte*) 1024 main::@22/(byte*~) print_char_cursor#208 printEntry/(byte*~) print_char_cursor#209 printEntry::@15/(byte*~) print_char_cursor#210 printEntry::@17/(byte*~) print_char_cursor#211 printEntry::@19/(byte*~) print_char_cursor#212 printEntry::@21/(byte*~) print_char_cursor#213 printEntry::@23/(byte*~) print_char_cursor#214 printEntry::@25/(byte*~) print_char_cursor#215 printEntry::@27/(byte*~) print_char_cursor#216 printEntry::@29/(byte*~) print_char_cursor#217 printEntry::@31/(byte*~) print_char_cursor#218 printEntry::@33/(byte*~) print_char_cursor#219 printEntry::@35/(byte*~) print_char_cursor#220 printEntry::@37/(byte*~) print_char_cursor#221 )
[83] (byte*) print_str::str#20 ← phi( main::@10/(const string) main::str main::@15/(const string) main::str1 main::@17/(const string) main::str2 main::@22/(const string) main::str1 printEntry/(const string) printEntry::str printEntry::@15/(const string) printEntry::str1 printEntry::@17/(const string) printEntry::str2 printEntry::@19/(const string) printEntry::str3 printEntry::@21/(const string) printEntry::str4 printEntry::@23/(const string) printEntry::str5 printEntry::@25/(const string) printEntry::str6 printEntry::@27/(const string) printEntry::str7 printEntry::@29/(const string) printEntry::str8 printEntry::@31/(const string) printEntry::str9 printEntry::@33/(const string) printEntry::str10 printEntry::@35/(const string) printEntry::str11 printEntry::@37/(const string) printEntry::str12 )
to:print_str::@1
print_str::@1: scope:[print_str] from print_str print_str::@2
@ -194,11 +194,11 @@ print_str::@2: scope:[print_str] from print_str::@1
(void()) print_ln()
print_ln: scope:[print_ln] from main::@11 main::@12 main::@14 main::@18 main::@19 main::@21 printEntry::@14 printEntry::@16 printEntry::@18 printEntry::@20 printEntry::@22 printEntry::@24 printEntry::@26 printEntry::@28 printEntry::@30 printEntry::@32 printEntry::@34 printEntry::@36 printEntry::@38
[90] (byte*) print_char_cursor#143 ← phi( main::@11/(byte*) print_char_cursor#142 main::@12/(byte*~) print_char_cursor#226 main::@14/(byte*~) print_char_cursor#227 main::@18/(byte*) print_char_cursor#142 main::@19/(byte*~) print_char_cursor#229 main::@21/(byte*~) print_char_cursor#230 printEntry::@14/(byte*) print_char_cursor#11 printEntry::@16/(byte*) print_char_cursor#11 printEntry::@18/(byte*) print_char_cursor#11 printEntry::@20/(byte*) print_char_cursor#11 printEntry::@22/(byte*) print_char_cursor#11 printEntry::@24/(byte*) print_char_cursor#11 printEntry::@26/(byte*) print_char_cursor#11 printEntry::@28/(byte*) print_char_cursor#11 printEntry::@30/(byte*) print_char_cursor#11 printEntry::@32/(byte*) print_char_cursor#11 printEntry::@34/(byte*) print_char_cursor#11 printEntry::@36/(byte*) print_char_cursor#11 printEntry::@38/(byte*) print_char_cursor#11 )
[90] (byte*) print_line_cursor#63 ← phi( main::@11/(byte*) 1024 main::@12/(byte*~) print_line_cursor#155 main::@14/(byte*~) print_line_cursor#156 main::@18/(byte*) 1024 main::@19/(byte*~) print_line_cursor#157 main::@21/(byte*~) print_line_cursor#158 printEntry::@14/(byte*~) print_line_cursor#159 printEntry::@16/(byte*~) print_line_cursor#160 printEntry::@18/(byte*~) print_line_cursor#161 printEntry::@20/(byte*~) print_line_cursor#162 printEntry::@22/(byte*~) print_line_cursor#163 printEntry::@24/(byte*~) print_line_cursor#164 printEntry::@26/(byte*~) print_line_cursor#165 printEntry::@28/(byte*~) print_line_cursor#166 printEntry::@30/(byte*~) print_line_cursor#167 printEntry::@32/(byte*~) print_line_cursor#168 printEntry::@34/(byte*~) print_line_cursor#169 printEntry::@36/(byte*~) print_line_cursor#170 printEntry::@38/(byte*~) print_line_cursor#171 )
[90] (byte*) print_char_cursor#143 ← phi( main::@11/(byte*) print_char_cursor#142 main::@12/(byte*~) print_char_cursor#225 main::@14/(byte*~) print_char_cursor#226 main::@18/(byte*) print_char_cursor#142 main::@19/(byte*~) print_char_cursor#228 main::@21/(byte*~) print_char_cursor#229 printEntry::@14/(byte*) print_char_cursor#11 printEntry::@16/(byte*) print_char_cursor#11 printEntry::@18/(byte*) print_char_cursor#11 printEntry::@20/(byte*) print_char_cursor#11 printEntry::@22/(byte*) print_char_cursor#11 printEntry::@24/(byte*) print_char_cursor#11 printEntry::@26/(byte*) print_char_cursor#11 printEntry::@28/(byte*) print_char_cursor#11 printEntry::@30/(byte*) print_char_cursor#11 printEntry::@32/(byte*) print_char_cursor#11 printEntry::@34/(byte*) print_char_cursor#11 printEntry::@36/(byte*) print_char_cursor#11 printEntry::@38/(byte*) print_char_cursor#11 )
[90] (byte*) print_line_cursor#63 ← phi( main::@11/(byte*) 1024 main::@12/(byte*~) print_line_cursor#154 main::@14/(byte*~) print_line_cursor#155 main::@18/(byte*) 1024 main::@19/(byte*~) print_line_cursor#156 main::@21/(byte*~) print_line_cursor#157 printEntry::@14/(byte*~) print_line_cursor#158 printEntry::@16/(byte*~) print_line_cursor#159 printEntry::@18/(byte*~) print_line_cursor#160 printEntry::@20/(byte*~) print_line_cursor#161 printEntry::@22/(byte*~) print_line_cursor#162 printEntry::@24/(byte*~) print_line_cursor#163 printEntry::@26/(byte*~) print_line_cursor#164 printEntry::@28/(byte*~) print_line_cursor#165 printEntry::@30/(byte*~) print_line_cursor#166 printEntry::@32/(byte*~) print_line_cursor#167 printEntry::@34/(byte*~) print_line_cursor#168 printEntry::@36/(byte*~) print_line_cursor#169 printEntry::@38/(byte*~) print_line_cursor#170 )
to:print_ln::@1
print_ln::@1: scope:[print_ln] from print_ln print_ln::@2
[91] (byte*) print_line_cursor#32 ← phi( print_ln/(byte*) print_line_cursor#63 print_ln::@2/(byte*~) print_line_cursor#173 )
[91] (byte*) print_line_cursor#32 ← phi( print_ln/(byte*) print_line_cursor#63 print_ln::@2/(byte*~) print_line_cursor#172 )
[92] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#32 + (byte) $28
[93] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#143) goto print_ln::@2
to:print_ln::@return
@ -206,13 +206,13 @@ print_ln::@return: scope:[print_ln] from print_ln::@1
[94] return
to:@return
print_ln::@2: scope:[print_ln] from print_ln::@1
[95] (byte*~) print_line_cursor#173 ← (byte*) print_line_cursor#1
[95] (byte*~) print_line_cursor#172 ← (byte*) print_line_cursor#1
to:print_ln::@1
(void()) printEntry((byte*) printEntry::entry)
printEntry: scope:[printEntry] from main::@13 main::@20
[96] (byte*) printEntry::entry#10 ← phi( main::@13/(byte*) printEntry::entry#0 main::@20/(byte*) printEntry::entry#1 )
[97] (byte*~) print_char_cursor#210 ← (byte*) print_line_cursor#1
[97] (byte*~) print_char_cursor#209 ← (byte*) print_line_cursor#1
[98] call print_str
to:printEntry::entryBufDisk1
printEntry::entryBufDisk1: scope:[printEntry] from printEntry
@ -223,11 +223,11 @@ printEntry::@1: scope:[printEntry] from printEntry::entryBufDisk1
[101] call print_word
to:printEntry::@14
printEntry::@14: scope:[printEntry] from printEntry::@1
[102] (byte*~) print_line_cursor#159 ← (byte*) print_line_cursor#1
[102] (byte*~) print_line_cursor#158 ← (byte*) print_line_cursor#1
[103] call print_ln
to:printEntry::@15
printEntry::@15: scope:[printEntry] from printEntry::@14
[104] (byte*~) print_char_cursor#211 ← (byte*) print_line_cursor#1
[104] (byte*~) print_char_cursor#210 ← (byte*) print_line_cursor#1
[105] call print_str
to:printEntry::entryBufEdit1
printEntry::entryBufEdit1: scope:[printEntry] from printEntry::@15
@ -238,11 +238,11 @@ printEntry::@2: scope:[printEntry] from printEntry::entryBufEdit1
[108] call print_word
to:printEntry::@16
printEntry::@16: scope:[printEntry] from printEntry::@2
[109] (byte*~) print_line_cursor#160 ← (byte*) print_line_cursor#1
[109] (byte*~) print_line_cursor#159 ← (byte*) print_line_cursor#1
[110] call print_ln
to:printEntry::@17
printEntry::@17: scope:[printEntry] from printEntry::@16
[111] (byte*~) print_char_cursor#212 ← (byte*) print_line_cursor#1
[111] (byte*~) print_char_cursor#211 ← (byte*) print_line_cursor#1
[112] call print_str
to:printEntry::entryTsLen1
printEntry::entryTsLen1: scope:[printEntry] from printEntry::@17
@ -253,11 +253,11 @@ printEntry::@3: scope:[printEntry] from printEntry::entryTsLen1
[115] call print_word
to:printEntry::@18
printEntry::@18: scope:[printEntry] from printEntry::@3
[116] (byte*~) print_line_cursor#161 ← (byte*) print_line_cursor#1
[116] (byte*~) print_line_cursor#160 ← (byte*) print_line_cursor#1
[117] call print_ln
to:printEntry::@19
printEntry::@19: scope:[printEntry] from printEntry::@18
[118] (byte*~) print_char_cursor#213 ← (byte*) print_line_cursor#1
[118] (byte*~) print_char_cursor#212 ← (byte*) print_line_cursor#1
[119] call print_str
to:printEntry::entryTsOrder1
printEntry::entryTsOrder1: scope:[printEntry] from printEntry::@19
@ -268,11 +268,11 @@ printEntry::@4: scope:[printEntry] from printEntry::entryTsOrder1
[122] call print_word
to:printEntry::@20
printEntry::@20: scope:[printEntry] from printEntry::@4
[123] (byte*~) print_line_cursor#162 ← (byte*) print_line_cursor#1
[123] (byte*~) print_line_cursor#161 ← (byte*) print_line_cursor#1
[124] call print_ln
to:printEntry::@21
printEntry::@21: scope:[printEntry] from printEntry::@20
[125] (byte*~) print_char_cursor#214 ← (byte*) print_line_cursor#1
[125] (byte*~) print_char_cursor#213 ← (byte*) print_line_cursor#1
[126] call print_str
to:printEntry::entryTLastLink1
printEntry::entryTLastLink1: scope:[printEntry] from printEntry::@21
@ -283,11 +283,11 @@ printEntry::@5: scope:[printEntry] from printEntry::entryTLastLink1
[129] call print_byte
to:printEntry::@22
printEntry::@22: scope:[printEntry] from printEntry::@5
[130] (byte*~) print_line_cursor#163 ← (byte*) print_line_cursor#1
[130] (byte*~) print_line_cursor#162 ← (byte*) print_line_cursor#1
[131] call print_ln
to:printEntry::@23
printEntry::@23: scope:[printEntry] from printEntry::@22
[132] (byte*~) print_char_cursor#215 ← (byte*) print_line_cursor#1
[132] (byte*~) print_char_cursor#214 ← (byte*) print_line_cursor#1
[133] call print_str
to:printEntry::entrySLastLink1
printEntry::entrySLastLink1: scope:[printEntry] from printEntry::@23
@ -298,11 +298,11 @@ printEntry::@6: scope:[printEntry] from printEntry::entrySLastLink1
[136] call print_byte
to:printEntry::@24
printEntry::@24: scope:[printEntry] from printEntry::@6
[137] (byte*~) print_line_cursor#164 ← (byte*) print_line_cursor#1
[137] (byte*~) print_line_cursor#163 ← (byte*) print_line_cursor#1
[138] call print_ln
to:printEntry::@25
printEntry::@25: scope:[printEntry] from printEntry::@24
[139] (byte*~) print_char_cursor#216 ← (byte*) print_line_cursor#1
[139] (byte*~) print_char_cursor#215 ← (byte*) print_line_cursor#1
[140] call print_str
to:printEntry::entryBFlag1
printEntry::entryBFlag1: scope:[printEntry] from printEntry::@25
@ -313,11 +313,11 @@ printEntry::@7: scope:[printEntry] from printEntry::entryBFlag1
[143] call print_byte
to:printEntry::@26
printEntry::@26: scope:[printEntry] from printEntry::@7
[144] (byte*~) print_line_cursor#165 ← (byte*) print_line_cursor#1
[144] (byte*~) print_line_cursor#164 ← (byte*) print_line_cursor#1
[145] call print_ln
to:printEntry::@27
printEntry::@27: scope:[printEntry] from printEntry::@26
[146] (byte*~) print_char_cursor#217 ← (byte*) print_line_cursor#1
[146] (byte*~) print_char_cursor#216 ← (byte*) print_line_cursor#1
[147] call print_str
to:printEntry::entryBError1
printEntry::entryBError1: scope:[printEntry] from printEntry::@27
@ -328,11 +328,11 @@ printEntry::@8: scope:[printEntry] from printEntry::entryBError1
[150] call print_byte
to:printEntry::@28
printEntry::@28: scope:[printEntry] from printEntry::@8
[151] (byte*~) print_line_cursor#166 ← (byte*) print_line_cursor#1
[151] (byte*~) print_line_cursor#165 ← (byte*) print_line_cursor#1
[152] call print_ln
to:printEntry::@29
printEntry::@29: scope:[printEntry] from printEntry::@28
[153] (byte*~) print_char_cursor#218 ← (byte*) print_line_cursor#1
[153] (byte*~) print_char_cursor#217 ← (byte*) print_line_cursor#1
[154] call print_str
to:printEntry::entryUCross1
printEntry::entryUCross1: scope:[printEntry] from printEntry::@29
@ -343,11 +343,11 @@ printEntry::@9: scope:[printEntry] from printEntry::entryUCross1
[157] call print_word
to:printEntry::@30
printEntry::@30: scope:[printEntry] from printEntry::@9
[158] (byte*~) print_line_cursor#167 ← (byte*) print_line_cursor#1
[158] (byte*~) print_line_cursor#166 ← (byte*) print_line_cursor#1
[159] call print_ln
to:printEntry::@31
printEntry::@31: scope:[printEntry] from printEntry::@30
[160] (byte*~) print_char_cursor#219 ← (byte*) print_line_cursor#1
[160] (byte*~) print_char_cursor#218 ← (byte*) print_line_cursor#1
[161] call print_str
to:printEntry::entryBAddrLo1
printEntry::entryBAddrLo1: scope:[printEntry] from printEntry::@31
@ -358,11 +358,11 @@ printEntry::@10: scope:[printEntry] from printEntry::entryBAddrLo1
[164] call print_byte
to:printEntry::@32
printEntry::@32: scope:[printEntry] from printEntry::@10
[165] (byte*~) print_line_cursor#168 ← (byte*) print_line_cursor#1
[165] (byte*~) print_line_cursor#167 ← (byte*) print_line_cursor#1
[166] call print_ln
to:printEntry::@33
printEntry::@33: scope:[printEntry] from printEntry::@32
[167] (byte*~) print_char_cursor#220 ← (byte*) print_line_cursor#1
[167] (byte*~) print_char_cursor#219 ← (byte*) print_line_cursor#1
[168] call print_str
to:printEntry::entryBAddrHi1
printEntry::entryBAddrHi1: scope:[printEntry] from printEntry::@33
@ -373,11 +373,11 @@ printEntry::@11: scope:[printEntry] from printEntry::entryBAddrHi1
[171] call print_byte
to:printEntry::@34
printEntry::@34: scope:[printEntry] from printEntry::@11
[172] (byte*~) print_line_cursor#169 ← (byte*) print_line_cursor#1
[172] (byte*~) print_line_cursor#168 ← (byte*) print_line_cursor#1
[173] call print_ln
to:printEntry::@35
printEntry::@35: scope:[printEntry] from printEntry::@34
[174] (byte*~) print_char_cursor#221 ← (byte*) print_line_cursor#1
[174] (byte*~) print_char_cursor#220 ← (byte*) print_line_cursor#1
[175] call print_str
to:printEntry::entryTHi1
printEntry::entryTHi1: scope:[printEntry] from printEntry::@35
@ -388,11 +388,11 @@ printEntry::@12: scope:[printEntry] from printEntry::entryTHi1
[178] call print_byte
to:printEntry::@36
printEntry::@36: scope:[printEntry] from printEntry::@12
[179] (byte*~) print_line_cursor#170 ← (byte*) print_line_cursor#1
[179] (byte*~) print_line_cursor#169 ← (byte*) print_line_cursor#1
[180] call print_ln
to:printEntry::@37
printEntry::@37: scope:[printEntry] from printEntry::@36
[181] (byte*~) print_char_cursor#222 ← (byte*) print_line_cursor#1
[181] (byte*~) print_char_cursor#221 ← (byte*) print_line_cursor#1
[182] call print_str
to:printEntry::entryTLo1
printEntry::entryTLo1: scope:[printEntry] from printEntry::@37
@ -403,7 +403,7 @@ printEntry::@13: scope:[printEntry] from printEntry::entryTLo1
[185] call print_byte
to:printEntry::@38
printEntry::@38: scope:[printEntry] from printEntry::@13
[186] (byte*~) print_line_cursor#171 ← (byte*) print_line_cursor#1
[186] (byte*~) print_line_cursor#170 ← (byte*) print_line_cursor#1
[187] call print_ln
to:printEntry::@return
printEntry::@return: scope:[printEntry] from printEntry::@38

File diff suppressed because one or more lines are too long

View File

@ -318,6 +318,7 @@
(byte*) print_char_cursor#143 print_char_cursor zp[2]:4 9.800000000000002
(byte*) print_char_cursor#145 print_char_cursor zp[2]:4 7.333333333333334
(byte*) print_char_cursor#164 print_char_cursor zp[2]:4 32.0
(byte*~) print_char_cursor#207 print_char_cursor zp[2]:4 4.0
(byte*~) print_char_cursor#208 print_char_cursor zp[2]:4 4.0
(byte*~) print_char_cursor#209 print_char_cursor zp[2]:4 4.0
(byte*~) print_char_cursor#210 print_char_cursor zp[2]:4 4.0
@ -332,21 +333,21 @@
(byte*~) print_char_cursor#219 print_char_cursor zp[2]:4 4.0
(byte*~) print_char_cursor#220 print_char_cursor zp[2]:4 4.0
(byte*~) print_char_cursor#221 print_char_cursor zp[2]:4 4.0
(byte*~) print_char_cursor#222 print_char_cursor zp[2]:4 4.0
(byte*~) print_char_cursor#225 print_char_cursor zp[2]:4 4.0
(byte*~) print_char_cursor#226 print_char_cursor zp[2]:4 4.0
(byte*~) print_char_cursor#227 print_char_cursor zp[2]:4 4.0
(byte*~) print_char_cursor#228 print_char_cursor zp[2]:4 4.0
(byte*~) print_char_cursor#229 print_char_cursor zp[2]:4 4.0
(byte*~) print_char_cursor#230 print_char_cursor zp[2]:4 4.0
(byte*) print_char_cursor#82 print_char_cursor zp[2]:4 4.0
(void()) print_cls()
(label) print_cls::@return
(const byte[]) print_hextab = (string) "0123456789abcdef"z
(byte*) print_line_cursor
(byte*) print_line_cursor#1 print_line_cursor zp[2]:8 1.0824742268041243
(byte*~) print_line_cursor#154 print_line_cursor_1 zp[2]:10 2.0
(byte*~) print_line_cursor#155 print_line_cursor_1 zp[2]:10 2.0
(byte*~) print_line_cursor#156 print_line_cursor_1 zp[2]:10 2.0
(byte*~) print_line_cursor#157 print_line_cursor_1 zp[2]:10 2.0
(byte*~) print_line_cursor#158 print_line_cursor_1 zp[2]:10 2.0
(byte*~) print_line_cursor#158 print_line_cursor_1 zp[2]:10 4.0
(byte*~) print_line_cursor#159 print_line_cursor_1 zp[2]:10 4.0
(byte*~) print_line_cursor#160 print_line_cursor_1 zp[2]:10 4.0
(byte*~) print_line_cursor#161 print_line_cursor_1 zp[2]:10 4.0
@ -359,8 +360,7 @@
(byte*~) print_line_cursor#168 print_line_cursor_1 zp[2]:10 4.0
(byte*~) print_line_cursor#169 print_line_cursor_1 zp[2]:10 4.0
(byte*~) print_line_cursor#170 print_line_cursor_1 zp[2]:10 4.0
(byte*~) print_line_cursor#171 print_line_cursor_1 zp[2]:10 4.0
(byte*~) print_line_cursor#173 print_line_cursor_1 zp[2]:10 22.0
(byte*~) print_line_cursor#172 print_line_cursor_1 zp[2]:10 22.0
(byte*) print_line_cursor#32 print_line_cursor_1 zp[2]:10 24.0
(byte*) print_line_cursor#63 print_line_cursor_1 zp[2]:10 36.0
(void()) print_ln()
@ -390,7 +390,7 @@
zp[2]:2 [ printEntry::entry#10 printEntry::entry#0 printEntry::entry#1 main::entry1#0 main::fileEntry1_$0 ]
reg byte x [ print_byte::b#10 print_byte::b#6 print_byte::b#7 print_byte::b#8 print_byte::b#9 print_byte::b#2 print_byte::b#3 print_byte::b#4 print_byte::b#5 print_byte::b#0 print_byte::b#1 ]
reg byte a [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ]
zp[2]:4 [ initEntry::entry#10 initEntry::entry#0 initEntry::entry#1 print_char_cursor#82 print_char_cursor#145 print_char_cursor#143 print_char_cursor#142 print_char_cursor#164 print_char_cursor#208 print_char_cursor#209 print_char_cursor#210 print_char_cursor#211 print_char_cursor#212 print_char_cursor#213 print_char_cursor#214 print_char_cursor#215 print_char_cursor#216 print_char_cursor#217 print_char_cursor#218 print_char_cursor#219 print_char_cursor#220 print_char_cursor#221 print_char_cursor#222 print_char_cursor#1 print_char_cursor#226 print_char_cursor#227 print_char_cursor#229 print_char_cursor#230 print_char_cursor#11 ]
zp[2]:4 [ initEntry::entry#10 initEntry::entry#0 initEntry::entry#1 print_char_cursor#82 print_char_cursor#145 print_char_cursor#143 print_char_cursor#142 print_char_cursor#164 print_char_cursor#207 print_char_cursor#208 print_char_cursor#209 print_char_cursor#210 print_char_cursor#211 print_char_cursor#212 print_char_cursor#213 print_char_cursor#214 print_char_cursor#215 print_char_cursor#216 print_char_cursor#217 print_char_cursor#218 print_char_cursor#219 print_char_cursor#220 print_char_cursor#221 print_char_cursor#1 print_char_cursor#225 print_char_cursor#226 print_char_cursor#228 print_char_cursor#229 print_char_cursor#11 ]
reg byte x [ initEntry::n#10 ]
reg byte x [ mul8u::a#3 mul8u::a#6 mul8u::a#0 ]
zp[2]:6 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 mul8u::return#2 mul8u::return#3 main::fileEntry2_$0 main::entry2#0 ]
@ -405,7 +405,7 @@ reg byte a [ keyboard_matrix_read::return#0 ]
reg byte a [ print_byte::$0 ]
reg byte x [ print_byte::$2 ]
zp[2]:8 [ initEntry::$1 print_line_cursor#1 mul8u::mb#2 mul8u::mb#1 ]
zp[2]:10 [ initEntry::$3 print_word::w#5 print_word::w#7 print_word::w#8 print_word::w#2 print_word::w#10 print_word::w#4 print_line_cursor#32 print_line_cursor#63 print_line_cursor#155 print_line_cursor#156 print_line_cursor#157 print_line_cursor#158 print_line_cursor#159 print_line_cursor#160 print_line_cursor#161 print_line_cursor#162 print_line_cursor#163 print_line_cursor#164 print_line_cursor#165 print_line_cursor#166 print_line_cursor#167 print_line_cursor#168 print_line_cursor#169 print_line_cursor#170 print_line_cursor#171 print_line_cursor#173 print_str::str#18 print_str::str#20 print_str::str#0 memset::dst#2 memset::dst#1 ]
zp[2]:10 [ initEntry::$3 print_word::w#5 print_word::w#7 print_word::w#8 print_word::w#2 print_word::w#10 print_word::w#4 print_line_cursor#32 print_line_cursor#63 print_line_cursor#154 print_line_cursor#155 print_line_cursor#156 print_line_cursor#157 print_line_cursor#158 print_line_cursor#159 print_line_cursor#160 print_line_cursor#161 print_line_cursor#162 print_line_cursor#163 print_line_cursor#164 print_line_cursor#165 print_line_cursor#166 print_line_cursor#167 print_line_cursor#168 print_line_cursor#169 print_line_cursor#170 print_line_cursor#172 print_str::str#18 print_str::str#20 print_str::str#0 memset::dst#2 memset::dst#1 ]
zp[2]:12 [ initEntry::$5 ]
zp[2]:14 [ initEntry::$7 ]
reg byte a [ initEntry::$9 ]

View File

@ -43,6 +43,7 @@ Culled Empty Block (label) @18
Culled Empty Block (label) @19
Culled Empty Block (label) @20
Culled Empty Block (label) @21
Culled Empty Block (label) @22
Culled Empty Block (label) utoa::@13
Culled Empty Block (label) utoa::@5
Culled Empty Block (label) utoa::@14
@ -59,6 +60,7 @@ Culled Empty Block (label) utoa_append::@4
Culled Empty Block (label) utoa_append::@5
Culled Empty Block (label) utoa_append::@6
Culled Empty Block (label) utoa_append::@7
Culled Empty Block (label) @24
Culled Empty Block (label) ultoa::@13
Culled Empty Block (label) ultoa::@5
Culled Empty Block (label) ultoa::@14
@ -189,7 +191,7 @@ clock_start::@return: scope:[clock_start] from clock_start
to:@return
@12: scope:[] from @begin
(word) rem16u#0 ← (number) 0
to:@22
to:@26
(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem)
divr16u: scope:[divr16u] from div32u16u div32u16u::@2
@ -314,13 +316,6 @@ div32u16u::@return: scope:[div32u16u] from div32u16u::@3
(word) rem16u#5 ← (word) rem16u#12
return
to:@return
@22: scope:[] from @12
(word) rem16u#37 ← phi( @12/(word) rem16u#0 )
(word[]) RADIX_BINARY_VALUES ← { (number) $8000, (number) $4000, (number) $2000, (number) $1000, (number) $800, (number) $400, (number) $200, (number) $100, (number) $80, (number) $40, (number) $20, (number) $10, (number) 8, (number) 4, (number) 2 }
(word[]) RADIX_OCTAL_VALUES ← { (number) $8000, (number) $1000, (number) $200, (number) $40, (number) 8 }
(word[]) RADIX_DECIMAL_VALUES ← { (number) $2710, (number) $3e8, (number) $64, (number) $a }
(word[]) RADIX_HEXADECIMAL_VALUES ← { (number) $1000, (number) $100, (number) $10 }
to:@24
(void()) utoa((word) utoa::value , (byte*) utoa::buffer , (byte) utoa::radix)
utoa: scope:[utoa] from print_word_decimal
@ -336,7 +331,7 @@ utoa::@1: scope:[utoa] from utoa
(byte*) utoa::buffer#17 ← phi( utoa/(byte*) utoa::buffer#21 )
(word) utoa::value#8 ← phi( utoa/(word) utoa::value#12 )
(byte) utoa::max_digits#1 ← (number) 5
(word*) utoa::digit_values#1 ← (word[]) RADIX_DECIMAL_VALUES
(word*) utoa::digit_values#1 ← (const word[]) RADIX_DECIMAL_VALUES
to:utoa::@8
utoa::@9: scope:[utoa] from utoa
(word) utoa::value#13 ← phi( utoa/(word) utoa::value#12 )
@ -349,7 +344,7 @@ utoa::@2: scope:[utoa] from utoa::@9
(byte*) utoa::buffer#18 ← phi( utoa::@9/(byte*) utoa::buffer#16 )
(word) utoa::value#9 ← phi( utoa::@9/(word) utoa::value#13 )
(byte) utoa::max_digits#2 ← (number) 4
(word*) utoa::digit_values#2 ← (word[]) RADIX_HEXADECIMAL_VALUES
(word*) utoa::digit_values#2 ← (const word[]) RADIX_HEXADECIMAL_VALUES
to:utoa::@8
utoa::@10: scope:[utoa] from utoa::@9
(word) utoa::value#14 ← phi( utoa::@9/(word) utoa::value#13 )
@ -362,7 +357,7 @@ utoa::@3: scope:[utoa] from utoa::@10
(byte*) utoa::buffer#19 ← phi( utoa::@10/(byte*) utoa::buffer#13 )
(word) utoa::value#10 ← phi( utoa::@10/(word) utoa::value#14 )
(byte) utoa::max_digits#3 ← (number) 6
(word*) utoa::digit_values#3 ← (word[]) RADIX_OCTAL_VALUES
(word*) utoa::digit_values#3 ← (const word[]) RADIX_OCTAL_VALUES
to:utoa::@8
utoa::@11: scope:[utoa] from utoa::@10
(word) utoa::value#15 ← phi( utoa::@10/(word) utoa::value#14 )
@ -375,7 +370,7 @@ utoa::@4: scope:[utoa] from utoa::@11
(byte*) utoa::buffer#20 ← phi( utoa::@11/(byte*) utoa::buffer#10 )
(word) utoa::value#11 ← phi( utoa::@11/(word) utoa::value#15 )
(byte) utoa::max_digits#4 ← (number) $10
(word*) utoa::digit_values#4 ← (word[]) RADIX_BINARY_VALUES
(word*) utoa::digit_values#4 ← (const word[]) RADIX_BINARY_VALUES
to:utoa::@8
utoa::@12: scope:[utoa] from utoa::@11
(byte*) utoa::buffer#6 ← phi( utoa::@11/(byte*) utoa::buffer#10 )
@ -500,13 +495,6 @@ utoa_append::@return: scope:[utoa_append] from utoa_append::@3
(word) utoa_append::return#2 ← (word) utoa_append::return#4
return
to:@return
@24: scope:[] from @22
(word) rem16u#31 ← phi( @22/(word) rem16u#37 )
(dword[]) RADIX_BINARY_VALUES_LONG ← { (number) $80000000, (number) $40000000, (number) $20000000, (number) $10000000, (number) $8000000, (number) $4000000, (number) $2000000, (number) $1000000, (number) $800000, (number) $400000, (number) $200000, (number) $100000, (number) $80000, (number) $40000, (number) $20000, (number) $10000, (number) $8000, (number) $4000, (number) $2000, (number) $1000, (number) $800, (number) $400, (number) $200, (number) $100, (number) $80, (number) $40, (number) $20, (number) $10, (number) 8, (number) 4, (number) 2 }
(dword[]) RADIX_OCTAL_VALUES_LONG ← { (number) $40000000, (number) $8000000, (number) $1000000, (number) $200000, (number) $40000, (number) $8000, (number) $1000, (number) $200, (number) $40, (number) 8 }
(dword[]) RADIX_DECIMAL_VALUES_LONG ← { (number) $3b9aca00, (number) $5f5e100, (number) $989680, (number) $f4240, (number) $186a0, (number) $2710, (number) $3e8, (number) $64, (number) $a }
(dword[]) RADIX_HEXADECIMAL_VALUES_LONG ← { (number) $10000000, (number) $1000000, (number) $100000, (number) $10000, (number) $1000, (number) $100, (number) $10 }
to:@26
(void()) ultoa((dword) ultoa::value , (byte*) ultoa::buffer , (byte) ultoa::radix)
ultoa: scope:[ultoa] from print_dword_decimal
@ -522,7 +510,7 @@ ultoa::@1: scope:[ultoa] from ultoa
(byte*) ultoa::buffer#17 ← phi( ultoa/(byte*) ultoa::buffer#21 )
(dword) ultoa::value#8 ← phi( ultoa/(dword) ultoa::value#12 )
(byte) ultoa::max_digits#1 ← (number) $a
(dword*) ultoa::digit_values#1 ← (dword[]) RADIX_DECIMAL_VALUES_LONG
(dword*) ultoa::digit_values#1 ← (const dword[]) RADIX_DECIMAL_VALUES_LONG
to:ultoa::@8
ultoa::@9: scope:[ultoa] from ultoa
(dword) ultoa::value#13 ← phi( ultoa/(dword) ultoa::value#12 )
@ -535,7 +523,7 @@ ultoa::@2: scope:[ultoa] from ultoa::@9
(byte*) ultoa::buffer#18 ← phi( ultoa::@9/(byte*) ultoa::buffer#16 )
(dword) ultoa::value#9 ← phi( ultoa::@9/(dword) ultoa::value#13 )
(byte) ultoa::max_digits#2 ← (number) 8
(dword*) ultoa::digit_values#2 ← (dword[]) RADIX_HEXADECIMAL_VALUES_LONG
(dword*) ultoa::digit_values#2 ← (const dword[]) RADIX_HEXADECIMAL_VALUES_LONG
to:ultoa::@8
ultoa::@10: scope:[ultoa] from ultoa::@9
(dword) ultoa::value#14 ← phi( ultoa::@9/(dword) ultoa::value#13 )
@ -548,7 +536,7 @@ ultoa::@3: scope:[ultoa] from ultoa::@10
(byte*) ultoa::buffer#19 ← phi( ultoa::@10/(byte*) ultoa::buffer#13 )
(dword) ultoa::value#10 ← phi( ultoa::@10/(dword) ultoa::value#14 )
(byte) ultoa::max_digits#3 ← (number) $b
(dword*) ultoa::digit_values#3 ← (dword[]) RADIX_OCTAL_VALUES_LONG
(dword*) ultoa::digit_values#3 ← (const dword[]) RADIX_OCTAL_VALUES_LONG
to:ultoa::@8
ultoa::@11: scope:[ultoa] from ultoa::@10
(dword) ultoa::value#15 ← phi( ultoa::@10/(dword) ultoa::value#14 )
@ -561,7 +549,7 @@ ultoa::@4: scope:[ultoa] from ultoa::@11
(byte*) ultoa::buffer#20 ← phi( ultoa::@11/(byte*) ultoa::buffer#10 )
(dword) ultoa::value#11 ← phi( ultoa::@11/(dword) ultoa::value#15 )
(byte) ultoa::max_digits#4 ← (number) $20
(dword*) ultoa::digit_values#4 ← (dword[]) RADIX_BINARY_VALUES_LONG
(dword*) ultoa::digit_values#4 ← (const dword[]) RADIX_BINARY_VALUES_LONG
to:ultoa::@8
ultoa::@12: scope:[ultoa] from ultoa::@11
(byte*) ultoa::buffer#6 ← phi( ultoa::@11/(byte*) ultoa::buffer#10 )
@ -686,8 +674,8 @@ ultoa_append::@return: scope:[ultoa_append] from ultoa_append::@3
(dword) ultoa_append::return#2 ← (dword) ultoa_append::return#4
return
to:@return
@26: scope:[] from @24
(word) rem16u#27 ← phi( @24/(word) rem16u#31 )
@26: scope:[] from @12
(word) rem16u#27 ← phi( @12/(word) rem16u#0 )
(byte*) print_screen#0 ← ((byte*)) (number) $400
(byte*) print_line_cursor#0 ← (byte*) print_screen#0
(byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0
@ -841,7 +829,7 @@ print_cls::@return: scope:[print_cls] from print_cls::@1
(void()) main()
main: scope:[main] from @51
(word) rem16u#57 ← phi( @51/(word) rem16u#19 )
(word) rem16u#55 ← phi( @51/(word) rem16u#19 )
(byte*) print_char_cursor#79 ← phi( @51/(byte*) print_char_cursor#65 )
(byte*) print_line_cursor#38 ← phi( @51/(byte*) print_line_cursor#27 )
(byte*) print_screen#6 ← phi( @51/(byte*) print_screen#7 )
@ -849,7 +837,7 @@ main: scope:[main] from @51
(byte*) main::toD0181_gfx#0 ← (byte*)(number) $1800
to:main::toD0181
main::toD0181: scope:[main] from main
(word) rem16u#56 ← phi( main/(word) rem16u#57 )
(word) rem16u#54 ← phi( main/(word) rem16u#55 )
(byte*) print_char_cursor#76 ← phi( main/(byte*) print_char_cursor#79 )
(byte*) print_line_cursor#35 ← phi( main/(byte*) print_line_cursor#38 )
(byte*) print_screen#5 ← phi( main/(byte*) print_screen#6 )
@ -867,7 +855,7 @@ main::toD0181: scope:[main] from main
(byte) main::toD0181_return#0 ← (number~) main::toD0181_$8
to:main::toD0181_@return
main::toD0181_@return: scope:[main] from main::toD0181
(word) rem16u#55 ← phi( main::toD0181/(word) rem16u#56 )
(word) rem16u#53 ← phi( main::toD0181/(word) rem16u#54 )
(byte*) print_char_cursor#69 ← phi( main::toD0181/(byte*) print_char_cursor#76 )
(byte*) print_line_cursor#28 ← phi( main::toD0181/(byte*) print_line_cursor#35 )
(byte*) print_screen#4 ← phi( main::toD0181/(byte*) print_screen#5 )
@ -875,7 +863,7 @@ main::toD0181_@return: scope:[main] from main::toD0181
(byte) main::toD0181_return#1 ← (byte) main::toD0181_return#2
to:main::@29
main::@29: scope:[main] from main::toD0181_@return
(word) rem16u#54 ← phi( main::toD0181_@return/(word) rem16u#55 )
(word) rem16u#52 ← phi( main::toD0181_@return/(word) rem16u#53 )
(byte*) print_char_cursor#60 ← phi( main::toD0181_@return/(byte*) print_char_cursor#69 )
(byte*) print_line_cursor#22 ← phi( main::toD0181_@return/(byte*) print_line_cursor#28 )
(byte*) print_screen#3 ← phi( main::toD0181_@return/(byte*) print_screen#4 )
@ -885,7 +873,7 @@ main::@29: scope:[main] from main::toD0181_@return
call print_cls
to:main::@30
main::@30: scope:[main] from main::@29
(word) rem16u#53 ← phi( main::@29/(word) rem16u#54 )
(word) rem16u#51 ← phi( main::@29/(word) rem16u#52 )
(byte*) print_char_cursor#40 ← phi( main::@29/(byte*) print_char_cursor#12 )
(byte*) print_line_cursor#15 ← phi( main::@29/(byte*) print_line_cursor#4 )
(byte*) print_line_cursor#5 ← (byte*) print_line_cursor#15
@ -894,14 +882,14 @@ main::@30: scope:[main] from main::@29
call print_str
to:main::@31
main::@31: scope:[main] from main::@30
(word) rem16u#52 ← phi( main::@30/(word) rem16u#53 )
(word) rem16u#50 ← phi( main::@30/(word) rem16u#51 )
(byte*) print_line_cursor#23 ← phi( main::@30/(byte*) print_line_cursor#5 )
(byte*) print_char_cursor#41 ← phi( main::@30/(byte*) print_char_cursor#2 )
(byte*) print_char_cursor#14 ← (byte*) print_char_cursor#41
call print_ln
to:main::@32
main::@32: scope:[main] from main::@31
(word) rem16u#50 ← phi( main::@31/(word) rem16u#52 )
(word) rem16u#48 ← phi( main::@31/(word) rem16u#50 )
(byte*) print_char_cursor#42 ← phi( main::@31/(byte*) print_char_cursor#4 )
(byte*) print_line_cursor#16 ← phi( main::@31/(byte*) print_line_cursor#2 )
(byte*) print_line_cursor#6 ← (byte*) print_line_cursor#16
@ -910,7 +898,7 @@ main::@32: scope:[main] from main::@31
call print_str
to:main::@33
main::@33: scope:[main] from main::@32
(word) rem16u#47 ← phi( main::@32/(word) rem16u#50 )
(word) rem16u#45 ← phi( main::@32/(word) rem16u#48 )
(byte*) print_line_cursor#29 ← phi( main::@32/(byte*) print_line_cursor#6 )
(byte*) print_char_cursor#43 ← phi( main::@32/(byte*) print_char_cursor#2 )
(byte*) print_char_cursor#16 ← (byte*) print_char_cursor#43
@ -918,14 +906,14 @@ main::@33: scope:[main] from main::@32
call print_word_decimal
to:main::@34
main::@34: scope:[main] from main::@33
(word) rem16u#44 ← phi( main::@33/(word) rem16u#47 )
(word) rem16u#42 ← phi( main::@33/(word) rem16u#45 )
(byte*) print_line_cursor#24 ← phi( main::@33/(byte*) print_line_cursor#29 )
(byte*) print_char_cursor#44 ← phi( main::@33/(byte*) print_char_cursor#6 )
(byte*) print_char_cursor#17 ← (byte*) print_char_cursor#44
call print_ln
to:main::@35
main::@35: scope:[main] from main::@34
(word) rem16u#38 ← phi( main::@34/(word) rem16u#44 )
(word) rem16u#36 ← phi( main::@34/(word) rem16u#42 )
(byte*) print_char_cursor#45 ← phi( main::@34/(byte*) print_char_cursor#4 )
(byte*) print_line_cursor#17 ← phi( main::@34/(byte*) print_line_cursor#2 )
(byte*) print_line_cursor#7 ← (byte*) print_line_cursor#17
@ -939,13 +927,13 @@ main::@35: scope:[main] from main::@34
main::@36: scope:[main] from main::@35
(byte*) print_line_cursor#52 ← phi( main::@35/(byte*) print_line_cursor#7 )
(byte*) print_char_cursor#83 ← phi( main::@35/(byte*) print_char_cursor#18 )
(word) rem16u#32 ← phi( main::@35/(word) rem16u#38 )
(word) rem16u#31 ← phi( main::@35/(word) rem16u#36 )
call clock_start
to:main::@37
main::@37: scope:[main] from main::@36
(byte*) print_line_cursor#50 ← phi( main::@36/(byte*) print_line_cursor#52 )
(byte*) print_char_cursor#81 ← phi( main::@36/(byte*) print_char_cursor#83 )
(word) rem16u#28 ← phi( main::@36/(word) rem16u#32 )
(word) rem16u#28 ← phi( main::@36/(word) rem16u#31 )
(word) main::i#0 ← (number) 2
(byte*~) main::$9 ← & *((const byte*) sieve + (word) main::i#0)
(byte*) main::sieve_i#0 ← (byte*~) main::$9
@ -962,7 +950,7 @@ main::@1: scope:[main] from main::@37 main::@4
main::@2: scope:[main] from main::@1
(byte*) print_line_cursor#53 ← phi( main::@1/(byte*) print_line_cursor#48 )
(byte*) print_char_cursor#84 ← phi( main::@1/(byte*) print_char_cursor#80 )
(word) rem16u#33 ← phi( main::@1/(word) rem16u#25 )
(word) rem16u#32 ← phi( main::@1/(word) rem16u#25 )
(word) main::i#12 ← phi( main::@1/(word) main::i#4 )
(byte*) main::sieve_i#2 ← phi( main::@1/(byte*) main::sieve_i#4 )
(bool~) main::$33 ← (number) 0 != *((byte*) main::sieve_i#2)
@ -1005,7 +993,7 @@ main::@39: scope:[main] from main::@38
call print_str
to:main::@40
main::@40: scope:[main] from main::@39
(word) rem16u#51 ← phi( main::@39/(word) rem16u#6 )
(word) rem16u#49 ← phi( main::@39/(word) rem16u#6 )
(byte*) print_line_cursor#39 ← phi( main::@39/(byte*) print_line_cursor#41 )
(dword) main::cyclecount#3 ← phi( main::@39/(dword) main::cyclecount#4 )
(word) main::sec100s#1 ← phi( main::@39/(word) main::sec100s#0 )
@ -1015,7 +1003,7 @@ main::@40: scope:[main] from main::@39
call print_word_decimal
to:main::@41
main::@41: scope:[main] from main::@40
(word) rem16u#48 ← phi( main::@40/(word) rem16u#51 )
(word) rem16u#46 ← phi( main::@40/(word) rem16u#49 )
(byte*) print_line_cursor#36 ← phi( main::@40/(byte*) print_line_cursor#39 )
(dword) main::cyclecount#2 ← phi( main::@40/(dword) main::cyclecount#3 )
(byte*) print_char_cursor#47 ← phi( main::@40/(byte*) print_char_cursor#6 )
@ -1024,7 +1012,7 @@ main::@41: scope:[main] from main::@40
call print_str
to:main::@42
main::@42: scope:[main] from main::@41
(word) rem16u#45 ← phi( main::@41/(word) rem16u#48 )
(word) rem16u#43 ← phi( main::@41/(word) rem16u#46 )
(byte*) print_line_cursor#30 ← phi( main::@41/(byte*) print_line_cursor#36 )
(dword) main::cyclecount#1 ← phi( main::@41/(dword) main::cyclecount#2 )
(byte*) print_char_cursor#48 ← phi( main::@41/(byte*) print_char_cursor#2 )
@ -1033,14 +1021,14 @@ main::@42: scope:[main] from main::@41
call print_dword_decimal
to:main::@43
main::@43: scope:[main] from main::@42
(word) rem16u#39 ← phi( main::@42/(word) rem16u#45 )
(word) rem16u#37 ← phi( main::@42/(word) rem16u#43 )
(byte*) print_line_cursor#25 ← phi( main::@42/(byte*) print_line_cursor#30 )
(byte*) print_char_cursor#49 ← phi( main::@42/(byte*) print_char_cursor#8 )
(byte*) print_char_cursor#22 ← (byte*) print_char_cursor#49
call print_ln
to:main::@44
main::@44: scope:[main] from main::@43
(word) rem16u#36 ← phi( main::@43/(word) rem16u#39 )
(word) rem16u#35 ← phi( main::@43/(word) rem16u#37 )
(byte*) print_char_cursor#50 ← phi( main::@43/(byte*) print_char_cursor#4 )
(byte*) print_line_cursor#18 ← phi( main::@43/(byte*) print_line_cursor#2 )
(byte*) print_line_cursor#8 ← (byte*) print_line_cursor#18
@ -1050,7 +1038,7 @@ main::@44: scope:[main] from main::@43
main::@4: scope:[main] from main::@2 main::@5
(byte*) print_line_cursor#51 ← phi( main::@2/(byte*) print_line_cursor#53 main::@5/(byte*) print_line_cursor#54 )
(byte*) print_char_cursor#82 ← phi( main::@2/(byte*) print_char_cursor#84 main::@5/(byte*) print_char_cursor#85 )
(word) rem16u#29 ← phi( main::@2/(word) rem16u#33 main::@5/(word) rem16u#34 )
(word) rem16u#29 ← phi( main::@2/(word) rem16u#32 main::@5/(word) rem16u#33 )
(byte*) main::sieve_i#3 ← phi( main::@2/(byte*) main::sieve_i#2 main::@5/(byte*) main::sieve_i#5 )
(word) main::i#5 ← phi( main::@2/(word) main::i#12 main::@5/(word) main::i#13 )
(word) main::i#2 ← ++ (word) main::i#5
@ -1059,7 +1047,7 @@ main::@4: scope:[main] from main::@2 main::@5
main::@13: scope:[main] from main::@2
(byte*) print_line_cursor#55 ← phi( main::@2/(byte*) print_line_cursor#53 )
(byte*) print_char_cursor#86 ← phi( main::@2/(byte*) print_char_cursor#84 )
(word) rem16u#40 ← phi( main::@2/(word) rem16u#33 )
(word) rem16u#38 ← phi( main::@2/(word) rem16u#32 )
(byte*) main::sieve_i#6 ← phi( main::@2/(byte*) main::sieve_i#2 )
(word) main::i#6 ← phi( main::@2/(word) main::i#12 )
(number~) main::$24 ← (word) main::i#6 * (number) 2
@ -1070,7 +1058,7 @@ main::@13: scope:[main] from main::@2
main::@5: scope:[main] from main::@13 main::@6
(byte*) print_line_cursor#54 ← phi( main::@13/(byte*) print_line_cursor#55 main::@6/(byte*) print_line_cursor#56 )
(byte*) print_char_cursor#85 ← phi( main::@13/(byte*) print_char_cursor#86 main::@6/(byte*) print_char_cursor#87 )
(word) rem16u#34 ← phi( main::@13/(word) rem16u#40 main::@6/(word) rem16u#41 )
(word) rem16u#33 ← phi( main::@13/(word) rem16u#38 main::@6/(word) rem16u#39 )
(byte*) main::s#3 ← phi( main::@13/(byte*) main::s#0 main::@6/(byte*) main::s#1 )
(byte*) main::sieve_i#5 ← phi( main::@13/(byte*) main::sieve_i#6 main::@6/(byte*) main::sieve_i#7 )
(word) main::i#13 ← phi( main::@13/(word) main::i#6 main::@6/(word) main::i#7 )
@ -1081,7 +1069,7 @@ main::@5: scope:[main] from main::@13 main::@6
main::@6: scope:[main] from main::@5
(byte*) print_line_cursor#56 ← phi( main::@5/(byte*) print_line_cursor#54 )
(byte*) print_char_cursor#87 ← phi( main::@5/(byte*) print_char_cursor#85 )
(word) rem16u#41 ← phi( main::@5/(word) rem16u#34 )
(word) rem16u#39 ← phi( main::@5/(word) rem16u#33 )
(byte*) main::sieve_i#7 ← phi( main::@5/(byte*) main::sieve_i#5 )
(word) main::j#3 ← phi( main::@5/(word) main::j#2 )
(word) main::i#7 ← phi( main::@5/(word) main::i#13 )
@ -1091,7 +1079,7 @@ main::@6: scope:[main] from main::@5
(word) main::j#1 ← (word) main::j#3 + (word) main::i#7
to:main::@5
main::@15: scope:[main] from main::@18 main::@44
(word) rem16u#30 ← phi( main::@18/(word) rem16u#35 main::@44/(word) rem16u#36 )
(word) rem16u#30 ← phi( main::@18/(word) rem16u#34 main::@44/(word) rem16u#35 )
(byte*) print_line_cursor#40 ← phi( main::@18/(byte*) print_line_cursor#42 main::@44/(byte*) print_line_cursor#8 )
(byte*) print_char_cursor#71 ← phi( main::@18/(byte*) print_char_cursor#78 main::@44/(byte*) print_char_cursor#23 )
(word) main::i#8 ← phi( main::@18/(word) main::i#3 main::@44/(word) main::i#1 )
@ -1099,7 +1087,7 @@ main::@15: scope:[main] from main::@18 main::@44
if((bool~) main::$27) goto main::@16
to:main::@17
main::@16: scope:[main] from main::@15
(word) rem16u#42 ← phi( main::@15/(word) rem16u#30 )
(word) rem16u#40 ← phi( main::@15/(word) rem16u#30 )
(byte*) print_line_cursor#44 ← phi( main::@15/(byte*) print_line_cursor#40 )
(byte*) print_char_cursor#72 ← phi( main::@15/(byte*) print_char_cursor#71 )
(word) main::i#9 ← phi( main::@15/(word) main::i#8 )
@ -1122,14 +1110,14 @@ main::@45: scope:[main] from main::@17
(byte*) print_char_cursor#24 ← (byte*) print_char_cursor#51
to:main::@23
main::@18: scope:[main] from main::@16 main::@47
(word) rem16u#35 ← phi( main::@16/(word) rem16u#42 main::@47/(word) rem16u#43 )
(word) rem16u#34 ← phi( main::@16/(word) rem16u#40 main::@47/(word) rem16u#41 )
(byte*) print_line_cursor#42 ← phi( main::@16/(byte*) print_line_cursor#44 main::@47/(byte*) print_line_cursor#45 )
(byte*) print_char_cursor#78 ← phi( main::@16/(byte*) print_char_cursor#72 main::@47/(byte*) print_char_cursor#26 )
(word) main::i#10 ← phi( main::@16/(word) main::i#9 main::@47/(word) main::i#14 )
(word) main::i#3 ← ++ (word) main::i#10
to:main::@15
main::@21: scope:[main] from main::@16
(word) rem16u#49 ← phi( main::@16/(word) rem16u#42 )
(word) rem16u#47 ← phi( main::@16/(word) rem16u#40 )
(byte*) print_line_cursor#49 ← phi( main::@16/(byte*) print_line_cursor#44 )
(byte*) print_char_cursor#63 ← phi( main::@16/(byte*) print_char_cursor#72 )
(word) main::i#11 ← phi( main::@16/(word) main::i#9 )
@ -1137,7 +1125,7 @@ main::@21: scope:[main] from main::@16
call print_word_decimal
to:main::@46
main::@46: scope:[main] from main::@21
(word) rem16u#46 ← phi( main::@21/(word) rem16u#49 )
(word) rem16u#44 ← phi( main::@21/(word) rem16u#47 )
(byte*) print_line_cursor#47 ← phi( main::@21/(byte*) print_line_cursor#49 )
(word) main::i#15 ← phi( main::@21/(word) main::i#11 )
(byte*) print_char_cursor#52 ← phi( main::@21/(byte*) print_char_cursor#6 )
@ -1146,7 +1134,7 @@ main::@46: scope:[main] from main::@21
call print_char
to:main::@47
main::@47: scope:[main] from main::@46
(word) rem16u#43 ← phi( main::@46/(word) rem16u#46 )
(word) rem16u#41 ← phi( main::@46/(word) rem16u#44 )
(byte*) print_line_cursor#45 ← phi( main::@46/(byte*) print_line_cursor#47 )
(word) main::i#14 ← phi( main::@46/(word) main::i#15 )
(byte*) print_char_cursor#53 ← phi( main::@46/(byte*) print_char_cursor#10 )
@ -1192,8 +1180,6 @@ main::@return: scope:[main] from main::@23
SYMBOL TABLE SSA
(label) @12
(label) @22
(label) @24
(label) @26
(label) @36
(label) @40
@ -1224,14 +1210,14 @@ SYMBOL TABLE SSA
(const byte) RADIX::DECIMAL = (number) $a
(const byte) RADIX::HEXADECIMAL = (number) $10
(const byte) RADIX::OCTAL = (number) 8
(word[]) RADIX_BINARY_VALUES
(dword[]) RADIX_BINARY_VALUES_LONG
(word[]) RADIX_DECIMAL_VALUES
(dword[]) RADIX_DECIMAL_VALUES_LONG
(word[]) RADIX_HEXADECIMAL_VALUES
(dword[]) RADIX_HEXADECIMAL_VALUES_LONG
(word[]) RADIX_OCTAL_VALUES
(dword[]) RADIX_OCTAL_VALUES_LONG
(const word[]) RADIX_BINARY_VALUES = { (word)(number) $8000, (word)(number) $4000, (word)(number) $2000, (word)(number) $1000, (word)(number) $800, (word)(number) $400, (word)(number) $200, (word)(number) $100, (word)(number) $80, (word)(number) $40, (word)(number) $20, (word)(number) $10, (word)(number) 8, (word)(number) 4, (word)(number) 2 }
(const dword[]) RADIX_BINARY_VALUES_LONG = { (dword)(number) $80000000, (dword)(number) $40000000, (dword)(number) $20000000, (dword)(number) $10000000, (dword)(number) $8000000, (dword)(number) $4000000, (dword)(number) $2000000, (dword)(number) $1000000, (dword)(number) $800000, (dword)(number) $400000, (dword)(number) $200000, (dword)(number) $100000, (dword)(number) $80000, (dword)(number) $40000, (dword)(number) $20000, (dword)(number) $10000, (dword)(number) $8000, (dword)(number) $4000, (dword)(number) $2000, (dword)(number) $1000, (dword)(number) $800, (dword)(number) $400, (dword)(number) $200, (dword)(number) $100, (dword)(number) $80, (dword)(number) $40, (dword)(number) $20, (dword)(number) $10, (dword)(number) 8, (dword)(number) 4, (dword)(number) 2 }
(const word[]) RADIX_DECIMAL_VALUES = { (word)(number) $2710, (word)(number) $3e8, (word)(number) $64, (word)(number) $a }
(const dword[]) RADIX_DECIMAL_VALUES_LONG = { (dword)(number) $3b9aca00, (dword)(number) $5f5e100, (dword)(number) $989680, (dword)(number) $f4240, (dword)(number) $186a0, (dword)(number) $2710, (dword)(number) $3e8, (dword)(number) $64, (dword)(number) $a }
(const word[]) RADIX_HEXADECIMAL_VALUES = { (word)(number) $1000, (word)(number) $100, (word)(number) $10 }
(const dword[]) RADIX_HEXADECIMAL_VALUES_LONG = { (dword)(number) $10000000, (dword)(number) $1000000, (dword)(number) $100000, (dword)(number) $10000, (dword)(number) $1000, (dword)(number) $100, (dword)(number) $10 }
(const word[]) RADIX_OCTAL_VALUES = { (word)(number) $8000, (word)(number) $1000, (word)(number) $200, (word)(number) $40, (word)(number) 8 }
(const dword[]) RADIX_OCTAL_VALUES_LONG = { (dword)(number) $40000000, (dword)(number) $8000000, (dword)(number) $1000000, (dword)(number) $200000, (dword)(number) $40000, (dword)(number) $8000, (dword)(number) $1000, (dword)(number) $200, (dword)(number) $40, (dword)(number) 8 }
(const byte*) SCREEN = (byte*)(number) $400
(const byte) SIZEOF_DWORD = (byte) 4
(const byte) SIZEOF_WORD = (byte) 2
@ -1785,8 +1771,6 @@ SYMBOL TABLE SSA
(word) rem16u#53
(word) rem16u#54
(word) rem16u#55
(word) rem16u#56
(word) rem16u#57
(word) rem16u#6
(word) rem16u#7
(word) rem16u#8
@ -2163,15 +2147,6 @@ Adding number conversion cast (unumber) $514 in (bool~) main::$27 ← (word) mai
Adding number conversion cast (unumber) 0 in (bool~) main::$34 ← (number) 0 != *((const byte*) sieve + (word) main::i#9)
Adding number conversion cast (unumber) $3e7 in *((const byte*) SCREEN+(number) $3e7) ← ++ *((const byte*) SCREEN+(number) $3e7)
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (word[]) RADIX_BINARY_VALUES ← (word[]){ (word)(number) $8000, (word)(number) $4000, (word)(number) $2000, (word)(number) $1000, (word)(number) $800, (word)(number) $400, (word)(number) $200, (word)(number) $100, (word)(number) $80, (word)(number) $40, (word)(number) $20, (word)(number) $10, (word)(number) 8, (word)(number) 4, (word)(number) 2 }
Added casts to value list in (word[]) RADIX_OCTAL_VALUES ← (word[]){ (word)(number) $8000, (word)(number) $1000, (word)(number) $200, (word)(number) $40, (word)(number) 8 }
Added casts to value list in (word[]) RADIX_DECIMAL_VALUES ← (word[]){ (word)(number) $2710, (word)(number) $3e8, (word)(number) $64, (word)(number) $a }
Added casts to value list in (word[]) RADIX_HEXADECIMAL_VALUES ← (word[]){ (word)(number) $1000, (word)(number) $100, (word)(number) $10 }
Added casts to value list in (dword[]) RADIX_BINARY_VALUES_LONG ← (dword[]){ (dword)(number) $80000000, (dword)(number) $40000000, (dword)(number) $20000000, (dword)(number) $10000000, (dword)(number) $8000000, (dword)(number) $4000000, (dword)(number) $2000000, (dword)(number) $1000000, (dword)(number) $800000, (dword)(number) $400000, (dword)(number) $200000, (dword)(number) $100000, (dword)(number) $80000, (dword)(number) $40000, (dword)(number) $20000, (dword)(number) $10000, (dword)(number) $8000, (dword)(number) $4000, (dword)(number) $2000, (dword)(number) $1000, (dword)(number) $800, (dword)(number) $400, (dword)(number) $200, (dword)(number) $100, (dword)(number) $80, (dword)(number) $40, (dword)(number) $20, (dword)(number) $10, (dword)(number) 8, (dword)(number) 4, (dword)(number) 2 }
Added casts to value list in (dword[]) RADIX_OCTAL_VALUES_LONG ← (dword[]){ (dword)(number) $40000000, (dword)(number) $8000000, (dword)(number) $1000000, (dword)(number) $200000, (dword)(number) $40000, (dword)(number) $8000, (dword)(number) $1000, (dword)(number) $200, (dword)(number) $40, (dword)(number) 8 }
Added casts to value list in (dword[]) RADIX_DECIMAL_VALUES_LONG ← (dword[]){ (dword)(number) $3b9aca00, (dword)(number) $5f5e100, (dword)(number) $989680, (dword)(number) $f4240, (dword)(number) $186a0, (dword)(number) $2710, (dword)(number) $3e8, (dword)(number) $64, (dword)(number) $a }
Added casts to value list in (dword[]) RADIX_HEXADECIMAL_VALUES_LONG ← (dword[]){ (dword)(number) $10000000, (dword)(number) $1000000, (dword)(number) $100000, (dword)(number) $10000, (dword)(number) $1000, (dword)(number) $100, (dword)(number) $10 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (byte*~) memset::$2 ← (byte*)(void*) memset::str#3
Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#3
Inlining cast *((const dword*) CIA2_TIMER_AB) ← (unumber)(number) $ffffffff
@ -2215,22 +2190,6 @@ Simplifying constant pointer cast (byte*) 53272
Simplifying constant pointer cast (dword*) 56580
Simplifying constant pointer cast (byte*) 56590
Simplifying constant pointer cast (byte*) 56591
Simplifying constant pointer cast (byte*) 1024
Simplifying constant pointer cast (byte*) 4096
Simplifying constant integer cast 0
Simplifying constant integer cast $ffffffff
Simplifying constant integer cast $ffffffff
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast $80
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast (word) div32u16u::quotient_hi#1
Simplifying constant integer cast (word) div32u16u::quotient_lo#0
Simplifying constant integer cast $8000
Simplifying constant integer cast $4000
Simplifying constant integer cast $2000
@ -2258,17 +2217,6 @@ Simplifying constant integer cast $a
Simplifying constant integer cast $1000
Simplifying constant integer cast $100
Simplifying constant integer cast $10
Simplifying constant integer cast 5
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast $10
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast $80000000
Simplifying constant integer cast $40000000
Simplifying constant integer cast $20000000
@ -2326,6 +2274,33 @@ Simplifying constant integer cast $10000
Simplifying constant integer cast $1000
Simplifying constant integer cast $100
Simplifying constant integer cast $10
Simplifying constant pointer cast (byte*) 1024
Simplifying constant pointer cast (byte*) 4096
Simplifying constant integer cast 0
Simplifying constant integer cast $ffffffff
Simplifying constant integer cast $ffffffff
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast $80
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast (word) div32u16u::quotient_hi#1
Simplifying constant integer cast (word) div32u16u::quotient_lo#0
Simplifying constant integer cast 5
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast $10
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast $a
Simplifying constant integer cast 8
Simplifying constant integer cast $b
@ -2424,10 +2399,10 @@ Inferred type updated to word in (unumber~) main::$24 ← (word) main::i#6 * (by
Inversing boolean not [2] (bool~) memset::$1 ← (word) memset::num#2 <= (byte) 0 from [1] (bool~) memset::$0 ← (word) memset::num#2 > (byte) 0
Inversing boolean not [41] (bool~) divr16u::$4 ← (byte~) divr16u::$2 == (byte) 0 from [40] (bool~) divr16u::$3 ← (byte~) divr16u::$2 != (byte) 0
Inversing boolean not [49] (bool~) divr16u::$9 ← (word) divr16u::rem#6 < (word) divr16u::divisor#2 from [48] (bool~) divr16u::$8 ← (word) divr16u::rem#6 >= (word) divr16u::divisor#2
Inversing boolean not [404] (bool~) main::$22 ← (byte) 0 == *((byte*) main::sieve_i#2) from [403] (bool~) main::$33 ← (byte) 0 != *((byte*) main::sieve_i#2)
Inversing boolean not [405] (bool~) main::$23 ← (byte) 0 != *((byte*) main::sieve_i#2) from [404] (bool~) main::$22 ← (byte) 0 == *((byte*) main::sieve_i#2)
Inversing boolean not [465] (bool~) main::$28 ← (byte) 0 == *((const byte*) sieve + (word) main::i#9) from [464] (bool~) main::$34 ← (byte) 0 != *((const byte*) sieve + (word) main::i#9)
Inversing boolean not [466] (bool~) main::$29 ← (byte) 0 != *((const byte*) sieve + (word) main::i#9) from [465] (bool~) main::$28 ← (byte) 0 == *((const byte*) sieve + (word) main::i#9)
Inversing boolean not [394] (bool~) main::$22 ← (byte) 0 == *((byte*) main::sieve_i#2) from [393] (bool~) main::$33 ← (byte) 0 != *((byte*) main::sieve_i#2)
Inversing boolean not [395] (bool~) main::$23 ← (byte) 0 != *((byte*) main::sieve_i#2) from [394] (bool~) main::$22 ← (byte) 0 == *((byte*) main::sieve_i#2)
Inversing boolean not [455] (bool~) main::$28 ← (byte) 0 == *((const byte*) sieve + (word) main::i#9) from [454] (bool~) main::$34 ← (byte) 0 != *((const byte*) sieve + (word) main::i#9)
Inversing boolean not [456] (bool~) main::$29 ← (byte) 0 != *((const byte*) sieve + (word) main::i#9) from [455] (bool~) main::$28 ← (byte) 0 == *((const byte*) sieve + (word) main::i#9)
Successful SSA optimization Pass2UnaryNotSimplification
Alias (void*) memset::return#0 = (void*) memset::str#2 (void*) memset::return#4 (void*) memset::return#1
Alias (void*) memset::str#3 = (void*) memset::str#4
@ -2465,7 +2440,6 @@ Alias (word) divr16u::return#3 = (word) divr16u::return#6
Alias (word) rem16u#11 = (word) rem16u#4 (word) rem16u#12 (word) rem16u#5
Alias (word) div32u16u::quotient_lo#0 = (word~) div32u16u::$3
Alias (dword) div32u16u::return#0 = (dword) div32u16u::quotient#0 (dword~) div32u16u::$4 (dword) div32u16u::return#3 (dword) div32u16u::return#1
Alias (word) rem16u#0 = (word) rem16u#37 (word) rem16u#31 (word) rem16u#27 (word) rem16u#24 (word) rem16u#23 (word) rem16u#19
Alias (word) utoa::value#10 = (word) utoa::value#8 (word) utoa::value#12 (word) utoa::value#13 (word) utoa::value#9 (word) utoa::value#14 (word) utoa::value#15 (word) utoa::value#11
Alias (byte*) utoa::buffer#10 = (byte*) utoa::buffer#17 (byte*) utoa::buffer#21 (byte*) utoa::buffer#16 (byte*) utoa::buffer#18 (byte*) utoa::buffer#13 (byte*) utoa::buffer#19 (byte*) utoa::buffer#20 (byte*) utoa::buffer#6
Alias (byte) utoa::radix#1 = (byte) utoa::radix#2 (byte) utoa::radix#3 (byte) utoa::radix#4
@ -2498,6 +2472,7 @@ Alias (byte) ultoa_append::digit#2 = (byte) ultoa_append::digit#4 (byte) ultoa_a
Alias (dword) ultoa_append::value#2 = (dword) ultoa_append::value#3 (dword) ultoa_append::value#4 (dword) ultoa_append::return#1 (dword) ultoa_append::return#4 (dword) ultoa_append::return#2
Alias (dword) ultoa_append::sub#1 = (dword) ultoa_append::sub#2
Alias (byte*) ultoa_append::buffer#1 = (byte*) ultoa_append::buffer#4 (byte*) ultoa_append::buffer#2
Alias (word) rem16u#0 = (word) rem16u#27 (word) rem16u#24 (word) rem16u#23 (word) rem16u#19
Alias (byte*) print_line_cursor#0 = (byte*) print_screen#0 (byte*) print_char_cursor#0 (byte*) print_line_cursor#34 (byte*) print_char_cursor#75 (byte*) print_screen#9 (byte*) print_line_cursor#33 (byte*) print_char_cursor#74 (byte*) print_screen#8 (byte*) print_line_cursor#27 (byte*) print_char_cursor#65 (byte*) print_screen#7
Alias (byte*) print_str::str#8 = (byte*) print_str::str#9
Alias (byte*) print_char_cursor#2 = (byte*) print_char_cursor#29 (byte*) print_char_cursor#56 (byte*) print_char_cursor#30
@ -2513,7 +2488,7 @@ Alias (byte*) main::toD0181_gfx#0 = (byte*) main::toD0181_gfx#1
Alias (byte*) print_screen#3 = (byte*) print_screen#5 (byte*) print_screen#6 (byte*) print_screen#4
Alias (byte*) print_line_cursor#22 = (byte*) print_line_cursor#35 (byte*) print_line_cursor#38 (byte*) print_line_cursor#28
Alias (byte*) print_char_cursor#60 = (byte*) print_char_cursor#76 (byte*) print_char_cursor#79 (byte*) print_char_cursor#69
Alias (word) rem16u#28 = (word) rem16u#56 (word) rem16u#57 (word) rem16u#55 (word) rem16u#54 (word) rem16u#53 (word) rem16u#52 (word) rem16u#50 (word) rem16u#47 (word) rem16u#44 (word) rem16u#38 (word) rem16u#32
Alias (word) rem16u#28 = (word) rem16u#54 (word) rem16u#55 (word) rem16u#53 (word) rem16u#52 (word) rem16u#51 (word) rem16u#50 (word) rem16u#48 (word) rem16u#45 (word) rem16u#42 (word) rem16u#36 (word) rem16u#31
Alias (byte) main::toD0181_return#0 = (byte~) main::toD0181_$8 (byte) main::toD0181_return#2 (byte) main::toD0181_return#1 (byte) main::toD0181_return#3 (byte~) main::$0
Alias (byte*) print_line_cursor#15 = (byte*) print_line_cursor#5 (byte*) print_line_cursor#23
Alias (byte*) print_char_cursor#13 = (byte*) print_char_cursor#40
@ -2527,14 +2502,14 @@ Alias (byte*) print_char_cursor#18 = (byte*) print_char_cursor#45 (byte*) print_
Alias (byte*) main::sieve_i#0 = (byte*~) main::$9
Alias (byte*) main::sieve_i#2 = (byte*) main::sieve_i#4 (byte*) main::sieve_i#6
Alias (word) main::i#12 = (word) main::i#4 (word) main::i#6
Alias (word) rem16u#17 = (word) rem16u#33 (word) rem16u#25 (word) rem16u#20 (word) rem16u#40
Alias (word) rem16u#17 = (word) rem16u#32 (word) rem16u#25 (word) rem16u#20 (word) rem16u#38
Alias (byte*) print_char_cursor#61 = (byte*) print_char_cursor#84 (byte*) print_char_cursor#80 (byte*) print_char_cursor#77 (byte*) print_char_cursor#70 (byte*) print_char_cursor#86
Alias (byte*) print_line_cursor#25 = (byte*) print_line_cursor#53 (byte*) print_line_cursor#48 (byte*) print_line_cursor#46 (byte*) print_line_cursor#43 (byte*) print_line_cursor#41 (byte*) print_line_cursor#39 (byte*) print_line_cursor#36 (byte*) print_line_cursor#30 (byte*) print_line_cursor#55
Alias (dword) clock::return#2 = (dword) clock::return#4
Alias (dword) main::cyclecount#0 = (dword~) main::$11 (dword) main::cyclecount#4 (dword) main::cyclecount#3 (dword) main::cyclecount#2 (dword) main::cyclecount#1
Alias (word) div32u16u::divisor#0 = (word~) main::$12
Alias (dword) div32u16u::return#2 = (dword) div32u16u::return#4
Alias (word) rem16u#13 = (word) rem16u#6 (word) rem16u#51 (word) rem16u#48 (word) rem16u#45 (word) rem16u#39 (word) rem16u#36
Alias (word) rem16u#13 = (word) rem16u#6 (word) rem16u#49 (word) rem16u#46 (word) rem16u#43 (word) rem16u#37 (word) rem16u#35
Alias (word) main::sec100s#0 = (word~) main::$14 (word) main::sec100s#1
Alias (byte*) print_char_cursor#19 = (byte*) print_char_cursor#46
Alias (byte*) print_char_cursor#20 = (byte*) print_char_cursor#47
@ -2548,13 +2523,13 @@ Alias (byte*) main::s#2 = (byte*) main::s#3
Alias (word) main::i#13 = (word) main::i#7
Alias (word) main::j#2 = (word) main::j#3
Alias (byte*) main::sieve_i#5 = (byte*) main::sieve_i#7
Alias (word) rem16u#34 = (word) rem16u#41
Alias (word) rem16u#33 = (word) rem16u#39
Alias (byte*) print_char_cursor#85 = (byte*) print_char_cursor#87
Alias (byte*) print_line_cursor#54 = (byte*) print_line_cursor#56
Alias (word) main::i#11 = (word) main::i#9 (word) main::i#8 (word) main::i#15 (word) main::i#14
Alias (byte*) print_char_cursor#62 = (byte*) print_char_cursor#72 (byte*) print_char_cursor#71 (byte*) print_char_cursor#63
Alias (byte*) print_line_cursor#32 = (byte*) print_line_cursor#44 (byte*) print_line_cursor#40 (byte*) print_line_cursor#37 (byte*) print_line_cursor#49 (byte*) print_line_cursor#47 (byte*) print_line_cursor#45
Alias (word) rem16u#22 = (word) rem16u#42 (word) rem16u#30 (word) rem16u#26 (word) rem16u#49 (word) rem16u#46 (word) rem16u#43
Alias (word) rem16u#22 = (word) rem16u#40 (word) rem16u#30 (word) rem16u#26 (word) rem16u#47 (word) rem16u#44 (word) rem16u#41
Alias (byte*) print_char_cursor#24 = (byte*) print_char_cursor#51
Alias (byte*) print_char_cursor#25 = (byte*) print_char_cursor#52
Alias (byte*) print_char_cursor#26 = (byte*) print_char_cursor#53
@ -2582,7 +2557,7 @@ Alias (byte) ultoa::max_digits#10 = (byte) ultoa::max_digits#6
Alias (dword*) ultoa::digit_values#10 = (dword*) ultoa::digit_values#7
Alias (word) main::i#10 = (word) main::i#11
Alias (byte*) print_line_cursor#32 = (byte*) print_line_cursor#42
Alias (word) rem16u#22 = (word) rem16u#35
Alias (word) rem16u#22 = (word) rem16u#34
Successful SSA optimization Pass2AliasElimination
Identical Phi Values (byte*) memset::end#1 (byte*) memset::end#0
Identical Phi Values (void*) memset::str#5 (void*) memset::str#3
@ -2643,7 +2618,7 @@ Identical Phi Values (byte*) print_line_cursor#18 (byte*) print_line_cursor#1
Identical Phi Values (byte*) print_char_cursor#23 (byte*) print_line_cursor#1
Identical Phi Values (word) main::i#13 (word) main::i#12
Identical Phi Values (byte*) main::sieve_i#5 (byte*) main::sieve_i#2
Identical Phi Values (word) rem16u#34 (word) rem16u#17
Identical Phi Values (word) rem16u#33 (word) rem16u#17
Identical Phi Values (byte*) print_char_cursor#85 (byte*) print_char_cursor#61
Identical Phi Values (byte*) print_line_cursor#54 (byte*) print_line_cursor#25
Identical Phi Values (byte*) print_line_cursor#32 (byte*) print_line_cursor#18
@ -2675,78 +2650,69 @@ Simple Condition (bool~) memset::$4 [13] if((byte*) memset::dst#2!=(byte*) memse
Simple Condition (bool~) divr16u::$4 [42] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2
Simple Condition (bool~) divr16u::$9 [50] if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3
Simple Condition (bool~) divr16u::$11 [57] if((byte) divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1
Simple Condition (bool~) utoa::$0 [106] if((byte) utoa::radix#0==(const byte) DECIMAL) goto utoa::@1
Simple Condition (bool~) utoa::$1 [112] if((byte) utoa::radix#0==(const byte) HEXADECIMAL) goto utoa::@2
Simple Condition (bool~) utoa::$2 [118] if((byte) utoa::radix#0==(const byte) OCTAL) goto utoa::@3
Simple Condition (bool~) utoa::$3 [124] if((byte) utoa::radix#0==(const byte) BINARY) goto utoa::@4
Simple Condition (bool~) utoa::$6 [143] if((byte) utoa::digit#2<(byte~) utoa::$5) goto utoa::@19
Simple Condition (bool~) utoa_append::$0 [173] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2
Simple Condition (bool~) ultoa::$0 [192] if((byte) ultoa::radix#0==(const byte) DECIMAL) goto ultoa::@1
Simple Condition (bool~) ultoa::$1 [198] if((byte) ultoa::radix#0==(const byte) HEXADECIMAL) goto ultoa::@2
Simple Condition (bool~) ultoa::$2 [204] if((byte) ultoa::radix#0==(const byte) OCTAL) goto ultoa::@3
Simple Condition (bool~) ultoa::$3 [210] if((byte) ultoa::radix#0==(const byte) BINARY) goto ultoa::@4
Simple Condition (bool~) ultoa::$6 [229] if((byte) ultoa::digit#2<(byte~) ultoa::$5) goto ultoa::@19
Simple Condition (bool~) ultoa_append::$0 [259] if((dword) ultoa_append::value#2>=(dword) ultoa_append::sub#0) goto ultoa_append::@2
Simple Condition (bool~) print_str::$0 [276] if((byte) 0!=*((byte*) print_str::str#8)) goto print_str::@2
Simple Condition (bool~) print_ln::$1 [289] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1
Simple Condition (bool~) main::$21 [401] if((word) main::i#12<(const byte) SQRT_COUNT) goto main::@2
Simple Condition (bool~) main::$23 [406] if((byte) 0!=*((byte*) main::sieve_i#2)) goto main::@4
Simple Condition (bool~) main::$26 [455] if((word) main::j#2<(const word) COUNT) goto main::@6
Simple Condition (bool~) main::$27 [462] if((word) main::i#10<(word) $514) goto main::@16
Simple Condition (bool~) main::$29 [467] if((byte) 0!=*((const byte*) sieve + (word) main::i#10)) goto main::@18
Simple Condition (bool~) utoa::$0 [101] if((byte) utoa::radix#0==(const byte) DECIMAL) goto utoa::@1
Simple Condition (bool~) utoa::$1 [107] if((byte) utoa::radix#0==(const byte) HEXADECIMAL) goto utoa::@2
Simple Condition (bool~) utoa::$2 [113] if((byte) utoa::radix#0==(const byte) OCTAL) goto utoa::@3
Simple Condition (bool~) utoa::$3 [119] if((byte) utoa::radix#0==(const byte) BINARY) goto utoa::@4
Simple Condition (bool~) utoa::$6 [138] if((byte) utoa::digit#2<(byte~) utoa::$5) goto utoa::@19
Simple Condition (bool~) utoa_append::$0 [168] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2
Simple Condition (bool~) ultoa::$0 [182] if((byte) ultoa::radix#0==(const byte) DECIMAL) goto ultoa::@1
Simple Condition (bool~) ultoa::$1 [188] if((byte) ultoa::radix#0==(const byte) HEXADECIMAL) goto ultoa::@2
Simple Condition (bool~) ultoa::$2 [194] if((byte) ultoa::radix#0==(const byte) OCTAL) goto ultoa::@3
Simple Condition (bool~) ultoa::$3 [200] if((byte) ultoa::radix#0==(const byte) BINARY) goto ultoa::@4
Simple Condition (bool~) ultoa::$6 [219] if((byte) ultoa::digit#2<(byte~) ultoa::$5) goto ultoa::@19
Simple Condition (bool~) ultoa_append::$0 [249] if((dword) ultoa_append::value#2>=(dword) ultoa_append::sub#0) goto ultoa_append::@2
Simple Condition (bool~) print_str::$0 [266] if((byte) 0!=*((byte*) print_str::str#8)) goto print_str::@2
Simple Condition (bool~) print_ln::$1 [279] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1
Simple Condition (bool~) main::$21 [391] if((word) main::i#12<(const byte) SQRT_COUNT) goto main::@2
Simple Condition (bool~) main::$23 [396] if((byte) 0!=*((byte*) main::sieve_i#2)) goto main::@4
Simple Condition (bool~) main::$26 [445] if((word) main::j#2<(const word) COUNT) goto main::@6
Simple Condition (bool~) main::$27 [452] if((word) main::i#10<(word) $514) goto main::@16
Simple Condition (bool~) main::$29 [457] if((byte) 0!=*((const byte*) sieve + (word) main::i#10)) goto main::@18
Successful SSA optimization Pass2ConditionalJumpSimplification
Rewriting ! if()-condition to reversed if() [149] (bool~) utoa::$9 ← ! (bool~) utoa::$8
Rewriting || if()-condition to two if()s [148] (bool~) utoa::$8 ← (byte) utoa::started#2 || (bool~) utoa::$7
Rewriting ! if()-condition to reversed if() [235] (bool~) ultoa::$9 ← ! (bool~) ultoa::$8
Rewriting || if()-condition to two if()s [234] (bool~) ultoa::$8 ← (byte) ultoa::started#2 || (bool~) ultoa::$7
Rewriting ! if()-condition to reversed if() [144] (bool~) utoa::$9 ← ! (bool~) utoa::$8
Rewriting || if()-condition to two if()s [143] (bool~) utoa::$8 ← (byte) utoa::started#2 || (bool~) utoa::$7
Rewriting ! if()-condition to reversed if() [225] (bool~) ultoa::$9 ← ! (bool~) ultoa::$8
Rewriting || if()-condition to two if()s [224] (bool~) ultoa::$8 ← (byte) ultoa::started#2 || (bool~) ultoa::$7
Successful SSA optimization Pass2ConditionalAndOrRewriting
Warning! Adding boolean cast to non-boolean condition (byte) utoa::started#2
Warning! Adding boolean cast to non-boolean condition (byte) ultoa::started#2
Rewriting array member address-of to pointer addition [397] (byte*) main::sieve_i#0 ← (const byte*) sieve + (word) main::i#0
Rewriting array member address-of to pointer addition [451] (byte*) main::s#0 ← (const byte*) sieve + (word) main::j#0
Rewriting array member address-of to pointer addition [387] (byte*) main::sieve_i#0 ← (const byte*) sieve + (word) main::i#0
Rewriting array member address-of to pointer addition [441] (byte*) main::s#0 ← (const byte*) sieve + (word) main::j#0
Successful SSA optimization PassNArrayElementAddressOfRewriting
Constant right-side identified [297] (byte[6]) decimal_digits ← { fill( 6, 0) }
Constant right-side identified [312] (byte[$b]) decimal_digits_long ← { fill( $b, 0) }
Constant right-side identified [388] (void*) memset::str#1 ← (void*)(const byte*) sieve
Constant right-side identified [414] (word) div32u16u::divisor#0 ← (word)(const dword) CLOCKS_PER_SEC/(byte) $64
Constant right-side identified [287] (byte[6]) decimal_digits ← { fill( 6, 0) }
Constant right-side identified [302] (byte[$b]) decimal_digits_long ← { fill( $b, 0) }
Constant right-side identified [378] (void*) memset::str#1 ← (void*)(const byte*) sieve
Constant right-side identified [404] (word) div32u16u::divisor#0 ← (word)(const dword) CLOCKS_PER_SEC/(byte) $64
Successful SSA optimization Pass2ConstantRValueConsolidation
Identified constant from value list (word[]) { (word) $8000, (word) $4000, (word) $2000, (word) $1000, (word) $800, (word) $400, (word) $200, (word) $100, (word) $80, (word) $40, (word) $20, (word) $10, (word) 8, (word) 4, (word) 2 }
Identified constant from value list (word[]) { (word) $8000, (word) $1000, (word) $200, (word) $40, (word) 8 }
Identified constant from value list (word[]) { (word) $2710, (word) $3e8, (word) $64, (word) $a }
Identified constant from value list (word[]) { (word) $1000, (word) $100, (word) $10 }
Identified constant from value list (dword[]) { (dword) $80000000, (dword) $40000000, (dword) $20000000, (dword) $10000000, (dword) $8000000, (dword) $4000000, (dword) $2000000, (dword) $1000000, (dword) $800000, (dword) $400000, (dword) $200000, (dword) $100000, (dword) $80000, (dword) $40000, (dword) $20000, (dword) $10000, (dword) $8000, (dword) $4000, (dword) $2000, (dword) $1000, (dword) $800, (dword) $400, (dword) $200, (dword) $100, (dword) $80, (dword) $40, (dword) $20, (dword) $10, (dword) 8, (dword) 4, (dword) 2 }
Identified constant from value list (dword[]) { (dword) $40000000, (dword) $8000000, (dword) $1000000, (dword) $200000, (dword) $40000, (dword) $8000, (dword) $1000, (dword) $200, (dword) $40, (dword) 8 }
Identified constant from value list (dword[]) { (dword) $3b9aca00, (dword) $5f5e100, (dword) $989680, (dword) $f4240, (dword) $186a0, (dword) $2710, (dword) $3e8, (dword) $64, (dword) $a }
Identified constant from value list (dword[]) { (dword) $10000000, (dword) $1000000, (dword) $100000, (dword) $10000, (dword) $1000, (dword) $100, (dword) $10 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const word) rem16u#0 = 0
Constant (const word) divr16u::quotient#0 = 0
Constant (const byte) divr16u::i#0 = 0
Constant (const word) divr16u::rem#3 = 0
Constant (const word[]) RADIX_BINARY_VALUES = { $8000, $4000, $2000, $1000, $800, $400, $200, $100, $80, $40, $20, $10, 8, 4, 2 }
Constant (const word[]) RADIX_OCTAL_VALUES = { $8000, $1000, $200, $40, 8 }
Constant (const word[]) RADIX_DECIMAL_VALUES = { $2710, $3e8, $64, $a }
Constant (const word[]) RADIX_HEXADECIMAL_VALUES = { $1000, $100, $10 }
Constant (const byte) utoa::max_digits#0 = 0
Constant (const word*) utoa::digit_values#0 = (word*) 0
Constant (const byte) utoa::max_digits#1 = 5
Constant (const word*) utoa::digit_values#1 = RADIX_DECIMAL_VALUES
Constant (const byte) utoa::max_digits#2 = 4
Constant (const word*) utoa::digit_values#2 = RADIX_HEXADECIMAL_VALUES
Constant (const byte) utoa::max_digits#3 = 6
Constant (const word*) utoa::digit_values#3 = RADIX_OCTAL_VALUES
Constant (const byte) utoa::max_digits#4 = $10
Constant (const word*) utoa::digit_values#4 = RADIX_BINARY_VALUES
Constant (const byte) utoa::started#0 = 0
Constant (const byte) utoa::digit#0 = 0
Constant (const byte) utoa::started#1 = 1
Constant (const byte) utoa_append::digit#0 = 0
Constant (const dword[]) RADIX_BINARY_VALUES_LONG = { $80000000, $40000000, $20000000, $10000000, $8000000, $4000000, $2000000, $1000000, $800000, $400000, $200000, $100000, $80000, $40000, $20000, $10000, $8000, $4000, $2000, $1000, $800, $400, $200, $100, $80, $40, $20, $10, 8, 4, 2 }
Constant (const dword[]) RADIX_OCTAL_VALUES_LONG = { $40000000, $8000000, $1000000, $200000, $40000, $8000, $1000, $200, $40, 8 }
Constant (const dword[]) RADIX_DECIMAL_VALUES_LONG = { $3b9aca00, $5f5e100, $989680, $f4240, $186a0, $2710, $3e8, $64, $a }
Constant (const dword[]) RADIX_HEXADECIMAL_VALUES_LONG = { $10000000, $1000000, $100000, $10000, $1000, $100, $10 }
Constant (const byte) ultoa::max_digits#0 = 0
Constant (const dword*) ultoa::digit_values#0 = (dword*) 0
Constant (const byte) ultoa::max_digits#1 = $a
Constant (const dword*) ultoa::digit_values#1 = RADIX_DECIMAL_VALUES_LONG
Constant (const byte) ultoa::max_digits#2 = 8
Constant (const dword*) ultoa::digit_values#2 = RADIX_HEXADECIMAL_VALUES_LONG
Constant (const byte) ultoa::max_digits#3 = $b
Constant (const dword*) ultoa::digit_values#3 = RADIX_OCTAL_VALUES_LONG
Constant (const byte) ultoa::max_digits#4 = $20
Constant (const dword*) ultoa::digit_values#4 = RADIX_BINARY_VALUES_LONG
Constant (const byte) ultoa::started#0 = 0
Constant (const byte) ultoa::digit#0 = 0
Constant (const byte) ultoa::started#1 = 1
@ -2776,14 +2742,6 @@ Constant (const byte) print_char::ch#0 = ' '
Successful SSA optimization Pass2ConstantIdentification
Constant (const word) divr16u::divisor#0 = div32u16u::divisor#0
Constant (const word) divr16u::divisor#1 = div32u16u::divisor#0
Constant (const word*) utoa::digit_values#1 = RADIX_DECIMAL_VALUES
Constant (const word*) utoa::digit_values#2 = RADIX_HEXADECIMAL_VALUES
Constant (const word*) utoa::digit_values#3 = RADIX_OCTAL_VALUES
Constant (const word*) utoa::digit_values#4 = RADIX_BINARY_VALUES
Constant (const dword*) ultoa::digit_values#1 = RADIX_DECIMAL_VALUES_LONG
Constant (const dword*) ultoa::digit_values#2 = RADIX_HEXADECIMAL_VALUES_LONG
Constant (const dword*) ultoa::digit_values#3 = RADIX_OCTAL_VALUES_LONG
Constant (const dword*) ultoa::digit_values#4 = RADIX_BINARY_VALUES_LONG
Constant (const byte*) utoa::buffer#5 = decimal_digits
Constant (const byte*) print_str::str#1 = decimal_digits
Constant (const byte*) ultoa::buffer#5 = decimal_digits_long
@ -2792,19 +2750,19 @@ Constant (const void*) memset::str#0 = (void*)print_line_cursor#0
Constant (const word) main::toD0181_$0 = (word)main::toD0181_screen#0
Constant (const word) main::toD0181_$4 = (word)main::toD0181_gfx#0
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [106] if((const byte) utoa::radix#0==(const byte) DECIMAL) goto utoa::@1
if() condition always false - eliminating [112] if((const byte) utoa::radix#0==(const byte) HEXADECIMAL) goto utoa::@2
if() condition always false - eliminating [118] if((const byte) utoa::radix#0==(const byte) OCTAL) goto utoa::@3
if() condition always false - eliminating [124] if((const byte) utoa::radix#0==(const byte) BINARY) goto utoa::@4
if() condition always true - replacing block destination [192] if((const byte) ultoa::radix#0==(const byte) DECIMAL) goto ultoa::@1
if() condition always false - eliminating [198] if((const byte) ultoa::radix#0==(const byte) HEXADECIMAL) goto ultoa::@2
if() condition always false - eliminating [204] if((const byte) ultoa::radix#0==(const byte) OCTAL) goto ultoa::@3
if() condition always false - eliminating [210] if((const byte) ultoa::radix#0==(const byte) BINARY) goto ultoa::@4
if() condition always true - replacing block destination [485] if(true) goto main::@24
if() condition always true - replacing block destination [101] if((const byte) utoa::radix#0==(const byte) DECIMAL) goto utoa::@1
if() condition always false - eliminating [107] if((const byte) utoa::radix#0==(const byte) HEXADECIMAL) goto utoa::@2
if() condition always false - eliminating [113] if((const byte) utoa::radix#0==(const byte) OCTAL) goto utoa::@3
if() condition always false - eliminating [119] if((const byte) utoa::radix#0==(const byte) BINARY) goto utoa::@4
if() condition always true - replacing block destination [182] if((const byte) ultoa::radix#0==(const byte) DECIMAL) goto ultoa::@1
if() condition always false - eliminating [188] if((const byte) ultoa::radix#0==(const byte) HEXADECIMAL) goto ultoa::@2
if() condition always false - eliminating [194] if((const byte) ultoa::radix#0==(const byte) OCTAL) goto ultoa::@3
if() condition always false - eliminating [200] if((const byte) ultoa::radix#0==(const byte) BINARY) goto ultoa::@4
if() condition always true - replacing block destination [475] if(true) goto main::@24
Successful SSA optimization Pass2ConstantIfs
Resolved ranged next value [55] divr16u::i#1 ← ++ divr16u::i#2 to ++
Resolved ranged comparison value [57] if(divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 to (number) $10
De-inlining pointer[w] to *(pointer+w) [467] if((byte) 0!=*((const byte*) sieve + (word) main::i#10)) goto main::@18
De-inlining pointer[w] to *(pointer+w) [457] if((byte) 0!=*((const byte*) sieve + (word) main::i#10)) goto main::@18
Successful SSA optimization Pass2DeInlineWordDerefIdx
Simplifying constant evaluating to zero (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES in [25] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES
Simplifying constant evaluating to zero (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS in [26] *((const byte*) CIA2_TIMER_B_CONTROL) ← (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A
@ -2902,16 +2860,16 @@ Constant (const byte) main::toD0181_$5 = >main::toD0181_$4
Constant (const byte*) main::sieve_i#0 = sieve+main::i#0
Successful SSA optimization Pass2ConstantIdentification
Eliminating unused constant (const byte) utoa::max_digits#2
Eliminating unused constant (const byte) utoa::max_digits#3
Eliminating unused constant (const byte) utoa::max_digits#4
Eliminating unused constant (const word*) utoa::digit_values#2
Eliminating unused constant (const byte) utoa::max_digits#3
Eliminating unused constant (const word*) utoa::digit_values#3
Eliminating unused constant (const byte) utoa::max_digits#4
Eliminating unused constant (const word*) utoa::digit_values#4
Eliminating unused constant (const byte) ultoa::max_digits#2
Eliminating unused constant (const byte) ultoa::max_digits#3
Eliminating unused constant (const byte) ultoa::max_digits#4
Eliminating unused constant (const dword*) ultoa::digit_values#2
Eliminating unused constant (const byte) ultoa::max_digits#3
Eliminating unused constant (const dword*) ultoa::digit_values#3
Eliminating unused constant (const byte) ultoa::max_digits#4
Eliminating unused constant (const dword*) ultoa::digit_values#4
Successful SSA optimization PassNEliminateUnusedVars
Eliminating unused constant (const word[]) RADIX_BINARY_VALUES
@ -3038,8 +2996,6 @@ Added new block during phi lifting print_ln::@3(between print_ln::@1 and print_l
Added new block during phi lifting main::@48(between main::@16 and main::@18)
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @12
Adding NOP phi() at start of @22
Adding NOP phi() at start of @24
Adding NOP phi() at start of @26
Adding NOP phi() at start of @36
Adding NOP phi() at start of @40
@ -3069,92 +3025,90 @@ Adding NOP phi() at start of memset::@1
Adding NOP phi() at start of print_cls
Adding NOP phi() at start of print_cls::@1
CALL GRAPH
Calls in [] to main:8
Calls in [main] to print_cls:15 print_str:17 print_ln:19 print_str:21 print_word_decimal:23 print_ln:25 memset:27 clock_start:29 clock:34 div32u16u:39 print_str:44 print_word_decimal:48 print_str:50 print_dword_decimal:52 print_ln:54 print_str:59 print_word_decimal:68 print_char:70
Calls in [print_word_decimal] to utoa:98 print_str:100
Calls in [utoa] to utoa_append:140
Calls in [print_dword_decimal] to ultoa:164 print_str:166
Calls in [ultoa] to ultoa_append:195
Calls in [div32u16u] to divr16u:212 divr16u:219
Calls in [print_cls] to memset:274
Calls in [] to main:6
Calls in [main] to print_cls:13 print_str:15 print_ln:17 print_str:19 print_word_decimal:21 print_ln:23 memset:25 clock_start:27 clock:32 div32u16u:37 print_str:42 print_word_decimal:46 print_str:48 print_dword_decimal:50 print_ln:52 print_str:57 print_word_decimal:66 print_char:68
Calls in [print_word_decimal] to utoa:96 print_str:98
Calls in [utoa] to utoa_append:138
Calls in [print_dword_decimal] to ultoa:162 print_str:164
Calls in [ultoa] to ultoa_append:193
Calls in [div32u16u] to divr16u:210 divr16u:217
Calls in [print_cls] to memset:272
Created 46 initial phi equivalence classes
Not coalescing [20] print_char_cursor#89 ← print_line_cursor#1
Coalesced [22] print_char_cursor#97 ← print_char_cursor#2
Coalesced [24] print_line_cursor#57 ← print_line_cursor#1
Not coalescing [43] print_char_cursor#90 ← print_line_cursor#1
Coalesced [46] print_word_decimal::w#5 ← print_word_decimal::w#1
Coalesced (already) [47] print_char_cursor#98 ← print_char_cursor#2
Coalesced [49] print_char_cursor#91 ← print_char_cursor#2
Coalesced (already) [53] print_line_cursor#58 ← print_line_cursor#1
Coalesced [55] print_char_cursor#100 ← print_line_cursor#1
Not coalescing [58] print_char_cursor#88 ← print_char_cursor#62
Coalesced [66] print_word_decimal::w#4 ← print_word_decimal::w#2
Not coalescing [67] print_char_cursor#96 ← print_char_cursor#62
Coalesced [71] print_char_cursor#102 ← print_char_cursor#10
Coalesced [74] main::i#17 ← main::i#3
Coalesced [75] print_char_cursor#99 ← print_char_cursor#78
Coalesced (already) [76] print_char_cursor#101 ← print_char_cursor#62
Coalesced [80] main::j#4 ← main::j#0
Coalesced [81] main::s#4 ← main::s#0
Coalesced [86] main::i#16 ← main::i#2
Coalesced [87] main::sieve_i#8 ← main::sieve_i#1
Coalesced [91] main::j#5 ← main::j#1
Coalesced [92] main::s#5 ← main::s#1
Coalesced (already) [99] print_char_cursor#93 ← print_char_cursor#58
Coalesced [104] print_str::str#11 ← print_str::str#10
Coalesced (already) [105] print_char_cursor#94 ← print_char_cursor#66
Coalesced [112] print_str::str#12 ← print_str::str#0
Coalesced [113] print_char_cursor#95 ← print_char_cursor#1
Coalesced [116] utoa::value#17 ← utoa::value#1
Coalesced [128] utoa::value#18 ← utoa::value#2
Coalesced [129] utoa::started#6 ← utoa::started#2
Coalesced [130] utoa::buffer#23 ← utoa::buffer#11
Coalesced [133] utoa::digit#7 ← utoa::digit#1
Coalesced (already) [134] utoa::value#16 ← utoa::value#6
Coalesced (already) [135] utoa::started#5 ← utoa::started#4
Coalesced (already) [136] utoa::buffer#22 ← utoa::buffer#14
Coalesced [144] utoa::value#19 ← utoa::value#0
Coalesced [145] utoa::buffer#24 ← utoa::buffer#4
Coalesced [146] utoa_append::value#6 ← utoa_append::value#0
Coalesced [153] utoa_append::value#7 ← utoa_append::value#1
Coalesced [154] utoa_append::digit#5 ← utoa_append::digit#1
Coalesced [156] print_line_cursor#59 ← print_line_cursor#21
Coalesced (already) [162] print_line_cursor#60 ← print_line_cursor#1
Coalesced (already) [165] print_char_cursor#92 ← print_char_cursor#2
Coalesced [171] ultoa::value#17 ← ultoa::value#1
Coalesced [183] ultoa::value#18 ← ultoa::value#2
Coalesced [184] ultoa::started#6 ← ultoa::started#2
Coalesced [185] ultoa::buffer#23 ← ultoa::buffer#11
Coalesced [188] ultoa::digit#7 ← ultoa::digit#1
Coalesced (already) [189] ultoa::value#16 ← ultoa::value#6
Coalesced (already) [190] ultoa::started#5 ← ultoa::started#4
Coalesced (already) [191] ultoa::buffer#22 ← ultoa::buffer#14
Coalesced [199] ultoa::value#19 ← ultoa::value#0
Coalesced [200] ultoa::buffer#24 ← ultoa::buffer#4
Coalesced [201] ultoa_append::value#6 ← ultoa_append::value#0
Coalesced [208] ultoa_append::value#7 ← ultoa_append::value#1
Coalesced [209] ultoa_append::digit#5 ← ultoa_append::digit#1
Coalesced [211] divr16u::dividend#9 ← divr16u::dividend#1
Coalesced [217] divr16u::rem#12 ← divr16u::rem#4
Coalesced [218] divr16u::dividend#10 ← divr16u::dividend#2
Coalesced [225] divr16u::rem#13 ← divr16u::rem#10
Coalesced [226] divr16u::dividend#11 ← divr16u::dividend#5
Coalesced [233] divr16u::rem#16 ← divr16u::rem#1
Coalesced [240] divr16u::rem#18 ← divr16u::rem#2
Coalesced [241] divr16u::return#8 ← divr16u::quotient#2
Coalesced [247] divr16u::rem#14 ← divr16u::rem#11
Coalesced [248] divr16u::dividend#12 ← divr16u::dividend#0
Coalesced [249] divr16u::quotient#9 ← divr16u::return#0
Coalesced [250] divr16u::i#7 ← divr16u::i#1
Coalesced [251] divr16u::rem#17 ← divr16u::rem#6
Coalesced [252] divr16u::return#7 ← divr16u::quotient#1
Coalesced [253] divr16u::rem#15 ← divr16u::rem#0
Coalesced [272] memset::dst#5 ← memset::dst#1
Not coalescing [18] print_char_cursor#89 ← print_line_cursor#1
Coalesced [20] print_char_cursor#97 ← print_char_cursor#2
Coalesced [22] print_line_cursor#57 ← print_line_cursor#1
Not coalescing [41] print_char_cursor#90 ← print_line_cursor#1
Coalesced [44] print_word_decimal::w#5 ← print_word_decimal::w#1
Coalesced (already) [45] print_char_cursor#98 ← print_char_cursor#2
Coalesced [47] print_char_cursor#91 ← print_char_cursor#2
Coalesced (already) [51] print_line_cursor#58 ← print_line_cursor#1
Coalesced [53] print_char_cursor#100 ← print_line_cursor#1
Not coalescing [56] print_char_cursor#88 ← print_char_cursor#62
Coalesced [64] print_word_decimal::w#4 ← print_word_decimal::w#2
Not coalescing [65] print_char_cursor#96 ← print_char_cursor#62
Coalesced [69] print_char_cursor#102 ← print_char_cursor#10
Coalesced [72] main::i#17 ← main::i#3
Coalesced [73] print_char_cursor#99 ← print_char_cursor#78
Coalesced (already) [74] print_char_cursor#101 ← print_char_cursor#62
Coalesced [78] main::j#4 ← main::j#0
Coalesced [79] main::s#4 ← main::s#0
Coalesced [84] main::i#16 ← main::i#2
Coalesced [85] main::sieve_i#8 ← main::sieve_i#1
Coalesced [89] main::j#5 ← main::j#1
Coalesced [90] main::s#5 ← main::s#1
Coalesced (already) [97] print_char_cursor#93 ← print_char_cursor#58
Coalesced [102] print_str::str#11 ← print_str::str#10
Coalesced (already) [103] print_char_cursor#94 ← print_char_cursor#66
Coalesced [110] print_str::str#12 ← print_str::str#0
Coalesced [111] print_char_cursor#95 ← print_char_cursor#1
Coalesced [114] utoa::value#17 ← utoa::value#1
Coalesced [126] utoa::value#18 ← utoa::value#2
Coalesced [127] utoa::started#6 ← utoa::started#2
Coalesced [128] utoa::buffer#23 ← utoa::buffer#11
Coalesced [131] utoa::digit#7 ← utoa::digit#1
Coalesced (already) [132] utoa::value#16 ← utoa::value#6
Coalesced (already) [133] utoa::started#5 ← utoa::started#4
Coalesced (already) [134] utoa::buffer#22 ← utoa::buffer#14
Coalesced [142] utoa::value#19 ← utoa::value#0
Coalesced [143] utoa::buffer#24 ← utoa::buffer#4
Coalesced [144] utoa_append::value#6 ← utoa_append::value#0
Coalesced [151] utoa_append::value#7 ← utoa_append::value#1
Coalesced [152] utoa_append::digit#5 ← utoa_append::digit#1
Coalesced [154] print_line_cursor#59 ← print_line_cursor#21
Coalesced (already) [160] print_line_cursor#60 ← print_line_cursor#1
Coalesced (already) [163] print_char_cursor#92 ← print_char_cursor#2
Coalesced [169] ultoa::value#17 ← ultoa::value#1
Coalesced [181] ultoa::value#18 ← ultoa::value#2
Coalesced [182] ultoa::started#6 ← ultoa::started#2
Coalesced [183] ultoa::buffer#23 ← ultoa::buffer#11
Coalesced [186] ultoa::digit#7 ← ultoa::digit#1
Coalesced (already) [187] ultoa::value#16 ← ultoa::value#6
Coalesced (already) [188] ultoa::started#5 ← ultoa::started#4
Coalesced (already) [189] ultoa::buffer#22 ← ultoa::buffer#14
Coalesced [197] ultoa::value#19 ← ultoa::value#0
Coalesced [198] ultoa::buffer#24 ← ultoa::buffer#4
Coalesced [199] ultoa_append::value#6 ← ultoa_append::value#0
Coalesced [206] ultoa_append::value#7 ← ultoa_append::value#1
Coalesced [207] ultoa_append::digit#5 ← ultoa_append::digit#1
Coalesced [209] divr16u::dividend#9 ← divr16u::dividend#1
Coalesced [215] divr16u::rem#12 ← divr16u::rem#4
Coalesced [216] divr16u::dividend#10 ← divr16u::dividend#2
Coalesced [223] divr16u::rem#13 ← divr16u::rem#10
Coalesced [224] divr16u::dividend#11 ← divr16u::dividend#5
Coalesced [231] divr16u::rem#16 ← divr16u::rem#1
Coalesced [238] divr16u::rem#18 ← divr16u::rem#2
Coalesced [239] divr16u::return#8 ← divr16u::quotient#2
Coalesced [245] divr16u::rem#14 ← divr16u::rem#11
Coalesced [246] divr16u::dividend#12 ← divr16u::dividend#0
Coalesced [247] divr16u::quotient#9 ← divr16u::return#0
Coalesced [248] divr16u::i#7 ← divr16u::i#1
Coalesced [249] divr16u::rem#17 ← divr16u::rem#6
Coalesced [250] divr16u::return#7 ← divr16u::quotient#1
Coalesced [251] divr16u::rem#15 ← divr16u::rem#0
Coalesced [270] memset::dst#5 ← memset::dst#1
Coalesced down to 29 phi equivalence classes
Culled Empty Block (label) @12
Culled Empty Block (label) @22
Culled Empty Block (label) @24
Culled Empty Block (label) @26
Culled Empty Block (label) @36
Culled Empty Block (label) @40

View File

@ -35,7 +35,7 @@ main::@2: scope:[main] from main::@6
to:main::@3
main::@3: scope:[main] from main::@2 main::@9
[16] (byte*) print_line_cursor#19 ← phi( main::@9/(byte*) print_line_cursor#1 main::@2/(byte*) 1024 )
[16] (byte*) print_char_cursor#49 ← phi( main::@9/(byte*~) print_char_cursor#62 main::@2/(byte*) 1024 )
[16] (byte*) print_char_cursor#49 ← phi( main::@9/(byte*~) print_char_cursor#61 main::@2/(byte*) 1024 )
[16] (byte) main::j#2 ← phi( main::@9/(byte) main::j#1 main::@2/(byte) 0 )
[17] (byte~) main::$8 ← (byte) main::j#2 << (byte) 1
[18] (signed word) print_sword::w#1 ← *((const signed word[]) words + (byte~) main::$8)
@ -53,7 +53,7 @@ main::@return: scope:[main] from main::@8
[24] return
to:@return
main::@9: scope:[main] from main::@8
[25] (byte*~) print_char_cursor#62 ← (byte*) print_line_cursor#1
[25] (byte*~) print_char_cursor#61 ← (byte*) print_line_cursor#1
to:main::@3
(void()) print_ln()

View File

@ -3,9 +3,9 @@ Fixing pointer addition (word*~) bsearch16u::$15 ← (word*) bsearch16u::pivot +
Fixing pointer addition (word*~) bsearch16u::$1 ← (word*) bsearch16u::items - (number) 1
Fixing pointer array-indexing *((word*) utoa::digit_values + (byte) utoa::digit)
Fixing pointer array-indexing *((dword*) ultoa::digit_values + (byte) ultoa::digit)
Fixing pointer array-indexing *((signed word[]) words + (byte) main::j)
Fixing pointer array-indexing *((signed word[]) words + (byte) sub::idx)
Fixing pointer array-indexing *((signed word[]) words + (byte) sub::idx)
Fixing pointer array-indexing *((const signed word[]) words + (byte) main::j)
Fixing pointer array-indexing *((const signed word[]) words + (byte) sub::idx)
Fixing pointer array-indexing *((const signed word[]) words + (byte) sub::idx)
Warning! Adding boolean cast to non-boolean condition *((byte*) strcpy::src)
Warning! Adding boolean cast to non-boolean condition *((byte*) print_str_lines::str)
Warning! Adding boolean cast to non-boolean condition (byte) print_str_lines::ch
@ -53,6 +53,7 @@ Culled Empty Block (label) @32
Culled Empty Block (label) @33
Culled Empty Block (label) @34
Culled Empty Block (label) @35
Culled Empty Block (label) @36
Culled Empty Block (label) main::@4
Culled Empty Block (label) @37
@ -107,7 +108,7 @@ memset::@return: scope:[memset] from memset::@1
(byte*) print_screen#0 ← ((byte*)) (number) $400
(byte*) print_line_cursor#0 ← (byte*) print_screen#0
(byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0
to:@36
to:@38
(void()) print_ln()
print_ln: scope:[print_ln] from main::@9
@ -268,23 +269,17 @@ print_cls::@return: scope:[print_cls] from print_cls::@1
(byte*) print_char_cursor#16 ← (byte*) print_char_cursor#36
return
to:@return
@36: scope:[] from @12
(byte*) print_screen#10 ← phi( @12/(byte*) print_screen#0 )
(byte*) print_char_cursor#53 ← phi( @12/(byte*) print_char_cursor#0 )
(byte*) print_line_cursor#23 ← phi( @12/(byte*) print_line_cursor#0 )
(signed word[]) words ← { (number) -$6000, (number) -$600, (number) -$60, (number) -6, (number) 0, (number) 6, (number) $60, (number) $600, (number) $6000 }
to:@38
(void()) main()
main: scope:[main] from @38
(byte*) print_char_cursor#57 ← phi( @38/(byte*) print_char_cursor#50 )
(byte*) print_line_cursor#27 ← phi( @38/(byte*) print_line_cursor#20 )
(byte*) print_char_cursor#56 ← phi( @38/(byte*) print_char_cursor#50 )
(byte*) print_line_cursor#26 ← phi( @38/(byte*) print_line_cursor#20 )
(byte*) print_screen#8 ← phi( @38/(byte*) print_screen#9 )
(byte) main::i#0 ← (byte) 0
to:main::@1
main::@1: scope:[main] from main main::@7
(byte*) print_char_cursor#56 ← phi( main/(byte*) print_char_cursor#57 main::@7/(byte*) print_char_cursor#52 )
(byte*) print_line_cursor#26 ← phi( main/(byte*) print_line_cursor#27 main::@7/(byte*) print_line_cursor#21 )
(byte*) print_char_cursor#55 ← phi( main/(byte*) print_char_cursor#56 main::@7/(byte*) print_char_cursor#52 )
(byte*) print_line_cursor#25 ← phi( main/(byte*) print_line_cursor#26 main::@7/(byte*) print_line_cursor#21 )
(byte*) print_screen#7 ← phi( main/(byte*) print_screen#8 main::@7/(byte*) print_screen#4 )
(byte) main::i#2 ← phi( main/(byte) main::i#0 main::@7/(byte) main::i#1 )
(byte) sub::idx#0 ← (byte) main::i#2
@ -292,8 +287,8 @@ main::@1: scope:[main] from main main::@7
call sub
to:main::@5
main::@5: scope:[main] from main::@1
(byte*) print_char_cursor#55 ← phi( main::@1/(byte*) print_char_cursor#56 )
(byte*) print_line_cursor#25 ← phi( main::@1/(byte*) print_line_cursor#26 )
(byte*) print_char_cursor#54 ← phi( main::@1/(byte*) print_char_cursor#55 )
(byte*) print_line_cursor#24 ← phi( main::@1/(byte*) print_line_cursor#25 )
(byte*) print_screen#6 ← phi( main::@1/(byte*) print_screen#7 )
(byte) main::i#3 ← phi( main::@1/(byte) main::i#2 )
(byte) sub::idx#1 ← (byte) main::i#3
@ -301,8 +296,8 @@ main::@5: scope:[main] from main::@1
call sub
to:main::@6
main::@6: scope:[main] from main::@5
(byte*) print_char_cursor#54 ← phi( main::@5/(byte*) print_char_cursor#55 )
(byte*) print_line_cursor#24 ← phi( main::@5/(byte*) print_line_cursor#25 )
(byte*) print_char_cursor#53 ← phi( main::@5/(byte*) print_char_cursor#54 )
(byte*) print_line_cursor#23 ← phi( main::@5/(byte*) print_line_cursor#24 )
(byte*) print_screen#5 ← phi( main::@5/(byte*) print_screen#6 )
(byte) main::i#4 ← phi( main::@5/(byte) main::i#3 )
(byte) sub::idx#2 ← (byte) main::i#4
@ -310,8 +305,8 @@ main::@6: scope:[main] from main::@5
call sub
to:main::@7
main::@7: scope:[main] from main::@6
(byte*) print_char_cursor#52 ← phi( main::@6/(byte*) print_char_cursor#54 )
(byte*) print_line_cursor#21 ← phi( main::@6/(byte*) print_line_cursor#24 )
(byte*) print_char_cursor#52 ← phi( main::@6/(byte*) print_char_cursor#53 )
(byte*) print_line_cursor#21 ← phi( main::@6/(byte*) print_line_cursor#23 )
(byte*) print_screen#4 ← phi( main::@6/(byte*) print_screen#5 )
(byte) main::i#5 ← phi( main::@6/(byte) main::i#4 )
(byte) main::i#1 ← (byte) main::i#5 + rangenext(0,8)
@ -336,7 +331,7 @@ main::@3: scope:[main] from main::@10 main::@8
(byte*) print_char_cursor#49 ← phi( main::@10/(byte*) print_char_cursor#19 main::@8/(byte*) print_char_cursor#17 )
(byte) main::j#2 ← phi( main::@10/(byte) main::j#1 main::@8/(byte) main::j#0 )
(byte~) main::$8 ← (byte) main::j#2 * (const byte) SIZEOF_SIGNED_WORD
(signed word) print_sword::w#1 ← *((signed word[]) words + (byte~) main::$8)
(signed word) print_sword::w#1 ← *((const signed word[]) words + (byte~) main::$8)
call print_sword
to:main::@9
main::@9: scope:[main] from main::@3
@ -369,15 +364,15 @@ sub: scope:[sub] from main::@1 main::@5 main::@6
(byte) sub::s#3 ← phi( main::@1/(byte) sub::s#0 main::@5/(byte) sub::s#1 main::@6/(byte) sub::s#2 )
(byte) sub::idx#3 ← phi( main::@1/(byte) sub::idx#0 main::@5/(byte) sub::idx#1 main::@6/(byte) sub::idx#2 )
(byte~) sub::$0 ← (byte) sub::idx#3 * (const byte) SIZEOF_SIGNED_WORD
*((signed word[]) words + (byte~) sub::$0) ← *((signed word[]) words + (byte~) sub::$0) - (byte) sub::s#3
*((const signed word[]) words + (byte~) sub::$0) ← *((const signed word[]) words + (byte~) sub::$0) - (byte) sub::s#3
to:sub::@return
sub::@return: scope:[sub] from sub
return
to:@return
@38: scope:[] from @36
(byte*) print_screen#9 ← phi( @36/(byte*) print_screen#10 )
(byte*) print_char_cursor#50 ← phi( @36/(byte*) print_char_cursor#53 )
(byte*) print_line_cursor#20 ← phi( @36/(byte*) print_line_cursor#23 )
@38: scope:[] from @12
(byte*) print_screen#9 ← phi( @12/(byte*) print_screen#0 )
(byte*) print_char_cursor#50 ← phi( @12/(byte*) print_char_cursor#0 )
(byte*) print_line_cursor#20 ← phi( @12/(byte*) print_line_cursor#0 )
call main
to:@39
@39: scope:[] from @38
@ -390,7 +385,6 @@ sub::@return: scope:[sub] from sub
SYMBOL TABLE SSA
(label) @12
(label) @36
(label) @38
(label) @39
(label) @begin
@ -542,7 +536,6 @@ SYMBOL TABLE SSA
(byte*) print_char_cursor#54
(byte*) print_char_cursor#55
(byte*) print_char_cursor#56
(byte*) print_char_cursor#57
(byte*) print_char_cursor#6
(byte*) print_char_cursor#7
(byte*) print_char_cursor#8
@ -572,7 +565,6 @@ SYMBOL TABLE SSA
(byte*) print_line_cursor#24
(byte*) print_line_cursor#25
(byte*) print_line_cursor#26
(byte*) print_line_cursor#27
(byte*) print_line_cursor#3
(byte*) print_line_cursor#4
(byte*) print_line_cursor#5
@ -589,7 +581,6 @@ SYMBOL TABLE SSA
(byte*) print_screen
(byte*) print_screen#0
(byte*) print_screen#1
(byte*) print_screen#10
(byte*) print_screen#2
(byte*) print_screen#3
(byte*) print_screen#4
@ -641,7 +632,7 @@ SYMBOL TABLE SSA
(byte) sub::s#1
(byte) sub::s#2
(byte) sub::s#3
(signed word[]) words
(const signed word[]) words = { (signed word)(number) -$6000, (signed word)(number) -$600, (signed word)(number) -$60, (signed word)(number) -6, (signed word)(number) 0, (signed word)(number) 6, (signed word)(number) $60, (signed word)(number) $600, (signed word)(number) $6000 }
Adding number conversion cast (unumber) 0 in (bool~) memset::$0 ← (word) memset::num#1 > (number) 0
Adding number conversion cast (unumber) $28 in (byte*~) print_ln::$0 ← (byte*) print_line_cursor#9 + (number) $28
@ -654,8 +645,6 @@ Adding number conversion cast (unumber) $80 in (byte) sub::s#0 ← (number) $80
Adding number conversion cast (unumber) $40 in (byte) sub::s#1 ← (number) $40
Adding number conversion cast (unumber) $40 in (byte) sub::s#2 ← (number) $40
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (signed word[]) words ← (signed word[]){ (signed word)(number) -$6000, (signed word)(number) -$600, (signed word)(number) -$60, (signed word)(number) -6, (signed word)(number) 0, (signed word)(number) 6, (signed word)(number) $60, (signed word)(number) $600, (signed word)(number) $6000 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (byte*~) memset::$2 ← (byte*)(void*) memset::str#2
Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#2
Inlining cast (byte*) print_screen#0 ← (byte*)(number) $400
@ -665,13 +654,6 @@ Inlining cast (byte) sub::s#0 ← (unumber)(number) $80
Inlining cast (byte) sub::s#1 ← (unumber)(number) $40
Inlining cast (byte) sub::s#2 ← (unumber)(number) $40
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast 0
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast $28
Simplifying constant integer cast 0
Simplifying constant integer cast 4
Simplifying constant integer cast $f
Simplifying constant integer cast $3e8
Simplifying constant integer cast -$6000
Simplifying constant integer cast -$600
Simplifying constant integer cast -$60
@ -681,6 +663,13 @@ Simplifying constant integer cast 6
Simplifying constant integer cast $60
Simplifying constant integer cast $600
Simplifying constant integer cast $6000
Simplifying constant integer cast 0
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast $28
Simplifying constant integer cast 0
Simplifying constant integer cast 4
Simplifying constant integer cast $f
Simplifying constant integer cast $3e8
Simplifying constant integer cast $80
Simplifying constant integer cast $40
Simplifying constant integer cast $40
@ -707,7 +696,7 @@ Alias (byte) memset::c#1 = (byte) memset::c#2
Alias (byte*) memset::dst#2 = (byte*) memset::dst#3
Alias (byte*) memset::end#1 = (byte*) memset::end#2
Alias (void*) memset::str#4 = (void*) memset::str#5
Alias (byte*) print_line_cursor#0 = (byte*) print_screen#0 (byte*) print_char_cursor#0 (byte*) print_line_cursor#23 (byte*) print_char_cursor#53 (byte*) print_screen#10 (byte*) print_line_cursor#20 (byte*) print_char_cursor#50 (byte*) print_screen#9
Alias (byte*) print_line_cursor#0 = (byte*) print_screen#0 (byte*) print_char_cursor#0 (byte*) print_line_cursor#20 (byte*) print_char_cursor#50 (byte*) print_screen#9
Alias (byte*) print_line_cursor#1 = (byte*~) print_ln::$0 (byte*) print_line_cursor#10 (byte*) print_char_cursor#1 (byte*) print_line_cursor#11 (byte*) print_char_cursor#23 (byte*) print_line_cursor#2 (byte*) print_char_cursor#2
Alias (byte*) print_char_cursor#43 = (byte*) print_char_cursor#51 (byte*) print_char_cursor#44
Alias (signed word) print_sword::w#2 = (signed word) print_sword::w#5 (signed word) print_sword::w#3 (signed word) print_sword::w#7 (signed word) print_sword::w#6
@ -728,8 +717,8 @@ Alias (byte*) print_char_cursor#13 = (byte*) print_char_cursor#35 (byte*) print_
Alias (byte*) print_line_cursor#12 = (byte*) print_screen#2 (byte*) print_screen#1 (byte*) print_line_cursor#3 (byte*) print_char_cursor#15 (byte*) print_char_cursor#36 (byte*) print_line_cursor#4 (byte*) print_char_cursor#16
Alias (byte) main::i#2 = (byte) main::i#3 (byte) main::i#4 (byte) main::i#5
Alias (byte*) print_screen#3 = (byte*) print_screen#6 (byte*) print_screen#7 (byte*) print_screen#5 (byte*) print_screen#4
Alias (byte*) print_line_cursor#18 = (byte*) print_line_cursor#25 (byte*) print_line_cursor#26 (byte*) print_line_cursor#24 (byte*) print_line_cursor#21
Alias (byte*) print_char_cursor#48 = (byte*) print_char_cursor#55 (byte*) print_char_cursor#56 (byte*) print_char_cursor#54 (byte*) print_char_cursor#52
Alias (byte*) print_line_cursor#18 = (byte*) print_line_cursor#24 (byte*) print_line_cursor#25 (byte*) print_line_cursor#23 (byte*) print_line_cursor#21
Alias (byte*) print_char_cursor#48 = (byte*) print_char_cursor#54 (byte*) print_char_cursor#55 (byte*) print_char_cursor#53 (byte*) print_char_cursor#52
Alias (byte*) print_line_cursor#13 = (byte*) print_line_cursor#5
Alias (byte*) print_char_cursor#17 = (byte*) print_char_cursor#37
Alias (byte*) print_line_cursor#19 = (byte*) print_line_cursor#22
@ -762,11 +751,11 @@ Identical Phi Values (byte*) print_char_cursor#10 (byte*) print_char_cursor#13
Identical Phi Values (byte*) print_char_cursor#11 (byte*) print_char_cursor#13
Identical Phi Values (byte*) print_line_cursor#12 (byte*) print_screen#3
Identical Phi Values (byte*) print_screen#8 (byte*) print_line_cursor#0
Identical Phi Values (byte*) print_line_cursor#27 (byte*) print_line_cursor#0
Identical Phi Values (byte*) print_char_cursor#57 (byte*) print_line_cursor#0
Identical Phi Values (byte*) print_line_cursor#26 (byte*) print_line_cursor#0
Identical Phi Values (byte*) print_char_cursor#56 (byte*) print_line_cursor#0
Identical Phi Values (byte*) print_screen#3 (byte*) print_screen#8
Identical Phi Values (byte*) print_line_cursor#18 (byte*) print_line_cursor#27
Identical Phi Values (byte*) print_char_cursor#48 (byte*) print_char_cursor#57
Identical Phi Values (byte*) print_line_cursor#18 (byte*) print_line_cursor#26
Identical Phi Values (byte*) print_char_cursor#48 (byte*) print_char_cursor#56
Identical Phi Values (byte*) print_line_cursor#13 (byte*) print_line_cursor#12
Identical Phi Values (byte*) print_char_cursor#17 (byte*) print_line_cursor#12
Identical Phi Values (byte*) print_char_cursor#18 (byte*) print_char_cursor#26
@ -784,17 +773,14 @@ Simple Condition (bool~) memset::$1 [3] if((word) memset::num#0<=(byte) 0) goto
Simple Condition (bool~) memset::$4 [13] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5
Simple Condition (bool~) print_ln::$1 [28] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#13) goto print_ln::@1
Simple Condition (bool~) print_sword::$0 [37] if((signed word) print_sword::w#1<(signed byte) 0) goto print_sword::@1
Simple Condition (bool~) main::$4 [125] if((byte) main::i#1!=rangelast(0,8)) goto main::@1
Simple Condition (bool~) main::$7 [144] if((byte) main::j#1!=rangelast(0,8)) goto main::@3
Simple Condition (bool~) main::$4 [123] if((byte) main::i#1!=rangelast(0,8)) goto main::@1
Simple Condition (bool~) main::$7 [142] if((byte) main::j#1!=rangelast(0,8)) goto main::@3
Successful SSA optimization Pass2ConditionalJumpSimplification
Identified constant from value list (signed word[]) { (signed word) -$6000, (signed word) -$600, (signed word) -$60, (signed word) -6, (signed word) 0, (signed word) 6, (signed word) $60, (signed word) $600, (signed word) $6000 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const byte*) print_line_cursor#0 = (byte*) 1024
Constant (const byte) print_char::ch#0 = '-'
Constant (const byte) print_char::ch#1 = ' '
Constant (const byte) memset::c#0 = ' '
Constant (const word) memset::num#0 = $3e8
Constant (const signed word[]) words = { -$6000, -$600, -$60, -6, 0, 6, $60, $600, $6000 }
Constant (const byte) main::i#0 = 0
Constant (const byte) sub::s#0 = $80
Constant (const byte) sub::s#1 = $40
@ -809,10 +795,10 @@ Constant (const void*) memset::return#2 = memset::str#0
Successful SSA optimization Pass2ConstantIdentification
if() condition always false - eliminating [3] if((const word) memset::num#0<=(byte) 0) goto memset::@1
Successful SSA optimization Pass2ConstantIfs
Resolved ranged next value [123] main::i#1 ← ++ main::i#2 to ++
Resolved ranged comparison value [125] if(main::i#1!=rangelast(0,8)) goto main::@1 to (number) 9
Resolved ranged next value [142] main::j#1 ← ++ main::j#2 to ++
Resolved ranged comparison value [144] if(main::j#1!=rangelast(0,8)) goto main::@3 to (number) 9
Resolved ranged next value [121] main::i#1 ← ++ main::i#2 to ++
Resolved ranged comparison value [123] if(main::i#1!=rangelast(0,8)) goto main::@1 to (number) 9
Resolved ranged next value [140] main::j#1 ← ++ main::j#2 to ++
Resolved ranged comparison value [142] if(main::j#1!=rangelast(0,8)) goto main::@3 to (number) 9
Eliminating unused constant (const void*) memset::return#2
Successful SSA optimization PassNEliminateUnusedVars
Adding number conversion cast (unumber) 9 in if((byte) main::i#1!=(number) 9) goto main::@1
@ -858,7 +844,6 @@ Added new block during phi lifting main::@11(between main::@7 and main::@1)
Added new block during phi lifting main::@12(between main::@10 and main::@3)
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @12
Adding NOP phi() at start of @36
Adding NOP phi() at start of @38
Adding NOP phi() at start of @39
Adding NOP phi() at start of @end
@ -876,37 +861,36 @@ Adding NOP phi() at start of memset
Adding NOP phi() at start of memset::@2
Adding NOP phi() at start of memset::@1
CALL GRAPH
Calls in [] to main:4
Calls in [main] to sub:11 sub:14 sub:17 print_cls:21 print_sword:26 print_ln:28
Calls in [print_sword] to print_char:45 print_word:49 print_char:53
Calls in [print_word] to print_byte:62 print_byte:65
Calls in [print_byte] to print_char:73 print_char:78
Calls in [print_cls] to memset:82
Calls in [] to main:3
Calls in [main] to sub:10 sub:13 sub:16 print_cls:20 print_sword:25 print_ln:27
Calls in [print_sword] to print_char:44 print_word:48 print_char:52
Calls in [print_word] to print_byte:61 print_byte:64
Calls in [print_byte] to print_char:72 print_char:77
Calls in [print_cls] to memset:81
Created 12 initial phi equivalence classes
Coalesced [10] sub::idx#4 ← sub::idx#0
Coalesced [13] sub::idx#5 ← sub::idx#1
Coalesced [16] sub::idx#6 ← sub::idx#2
Coalesced [32] main::j#5 ← main::j#1
Not coalescing [33] print_char_cursor#62 ← print_line_cursor#1
Coalesced [34] print_line_cursor#30 ← print_line_cursor#1
Coalesced [35] main::i#6 ← main::i#1
Coalesced [36] print_line_cursor#28 ← print_line_cursor#19
Coalesced (already) [42] print_line_cursor#29 ← print_line_cursor#1
Coalesced [44] print_char_cursor#61 ← print_char_cursor#49
Coalesced [46] print_sword::w#9 ← print_sword::w#1
Coalesced (already) [52] print_char_cursor#60 ← print_char_cursor#49
Coalesced [55] print_sword::w#8 ← print_sword::w#0
Coalesced [61] print_byte::b#4 ← print_byte::b#0
Coalesced [64] print_byte::b#5 ← print_byte::b#1
Coalesced [71] print_char::ch#5 ← print_char::ch#2
Coalesced [72] print_char_cursor#58 ← print_char_cursor#13
Coalesced [76] print_char::ch#6 ← print_char::ch#3
Coalesced (already) [77] print_char_cursor#59 ← print_char_cursor#13
Coalesced [93] memset::dst#4 ← memset::dst#1
Coalesced [9] sub::idx#4 ← sub::idx#0
Coalesced [12] sub::idx#5 ← sub::idx#1
Coalesced [15] sub::idx#6 ← sub::idx#2
Coalesced [31] main::j#5 ← main::j#1
Not coalescing [32] print_char_cursor#61 ← print_line_cursor#1
Coalesced [33] print_line_cursor#29 ← print_line_cursor#1
Coalesced [34] main::i#6 ← main::i#1
Coalesced [35] print_line_cursor#27 ← print_line_cursor#19
Coalesced (already) [41] print_line_cursor#28 ← print_line_cursor#1
Coalesced [43] print_char_cursor#60 ← print_char_cursor#49
Coalesced [45] print_sword::w#9 ← print_sword::w#1
Coalesced (already) [51] print_char_cursor#59 ← print_char_cursor#49
Coalesced [54] print_sword::w#8 ← print_sword::w#0
Coalesced [60] print_byte::b#4 ← print_byte::b#0
Coalesced [63] print_byte::b#5 ← print_byte::b#1
Coalesced [70] print_char::ch#5 ← print_char::ch#2
Coalesced [71] print_char_cursor#57 ← print_char_cursor#13
Coalesced [75] print_char::ch#6 ← print_char::ch#3
Coalesced (already) [76] print_char_cursor#58 ← print_char_cursor#13
Coalesced [92] memset::dst#4 ← memset::dst#1
Coalesced down to 10 phi equivalence classes
Culled Empty Block (label) @12
Culled Empty Block (label) @36
Culled Empty Block (label) @39
Culled Empty Block (label) main::@8
Culled Empty Block (label) main::@11
@ -979,7 +963,7 @@ main::@2: scope:[main] from main::@6
to:main::@3
main::@3: scope:[main] from main::@2 main::@9
[16] (byte*) print_line_cursor#19 ← phi( main::@9/(byte*) print_line_cursor#1 main::@2/(byte*) 1024 )
[16] (byte*) print_char_cursor#49 ← phi( main::@9/(byte*~) print_char_cursor#62 main::@2/(byte*) 1024 )
[16] (byte*) print_char_cursor#49 ← phi( main::@9/(byte*~) print_char_cursor#61 main::@2/(byte*) 1024 )
[16] (byte) main::j#2 ← phi( main::@9/(byte) main::j#1 main::@2/(byte) 0 )
[17] (byte~) main::$8 ← (byte) main::j#2 << (byte) 1
[18] (signed word) print_sword::w#1 ← *((const signed word[]) words + (byte~) main::$8)
@ -997,7 +981,7 @@ main::@return: scope:[main] from main::@8
[24] return
to:@return
main::@9: scope:[main] from main::@8
[25] (byte*~) print_char_cursor#62 ← (byte*) print_line_cursor#1
[25] (byte*~) print_char_cursor#61 ← (byte*) print_line_cursor#1
to:main::@3
(void()) print_ln()
@ -1148,7 +1132,7 @@ VARIABLE REGISTER WEIGHTS
(byte*) print_char_cursor#13 3.821428571428572
(byte*) print_char_cursor#34 6.0
(byte*) print_char_cursor#49 2.5
(byte*~) print_char_cursor#62 22.0
(byte*~) print_char_cursor#61 22.0
(void()) print_cls()
(byte*) print_line_cursor
(byte*) print_line_cursor#1 46.42857142857143
@ -1180,7 +1164,7 @@ Initial phi equivalence classes
[ print_line_cursor#9 print_line_cursor#19 print_line_cursor#1 ]
[ print_sword::w#4 print_sword::w#0 print_sword::w#1 ]
[ print_char::ch#4 print_char::ch#2 print_char::ch#3 ]
[ print_char_cursor#34 print_char_cursor#13 print_char_cursor#49 print_char_cursor#62 ]
[ print_char_cursor#34 print_char_cursor#13 print_char_cursor#49 print_char_cursor#61 ]
[ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
[ memset::dst#2 memset::dst#1 ]
[ sub::idx#3 sub::idx#0 sub::idx#1 sub::idx#2 ]
@ -1196,7 +1180,7 @@ Complete equivalence classes
[ print_line_cursor#9 print_line_cursor#19 print_line_cursor#1 ]
[ print_sword::w#4 print_sword::w#0 print_sword::w#1 ]
[ print_char::ch#4 print_char::ch#2 print_char::ch#3 ]
[ print_char_cursor#34 print_char_cursor#13 print_char_cursor#49 print_char_cursor#62 ]
[ print_char_cursor#34 print_char_cursor#13 print_char_cursor#49 print_char_cursor#61 ]
[ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
[ memset::dst#2 memset::dst#1 ]
[ sub::idx#3 sub::idx#0 sub::idx#1 sub::idx#2 ]
@ -1211,7 +1195,7 @@ Allocated zp[1]:3 [ main::j#2 main::j#1 ]
Allocated zp[2]:4 [ print_line_cursor#9 print_line_cursor#19 print_line_cursor#1 ]
Allocated zp[2]:6 [ print_sword::w#4 print_sword::w#0 print_sword::w#1 ]
Allocated zp[1]:8 [ print_char::ch#4 print_char::ch#2 print_char::ch#3 ]
Allocated zp[2]:9 [ print_char_cursor#34 print_char_cursor#13 print_char_cursor#49 print_char_cursor#62 ]
Allocated zp[2]:9 [ print_char_cursor#34 print_char_cursor#13 print_char_cursor#49 print_char_cursor#61 ]
Allocated zp[1]:11 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
Allocated zp[2]:12 [ memset::dst#2 memset::dst#1 ]
Allocated zp[1]:14 [ sub::idx#3 sub::idx#0 sub::idx#1 sub::idx#2 ]
@ -1378,7 +1362,7 @@ main: {
rts
// main::@9
__b9:
// [25] (byte*~) print_char_cursor#62 ← (byte*) print_line_cursor#1 -- pbuz1=pbuz2
// [25] (byte*~) print_char_cursor#61 ← (byte*) print_line_cursor#1 -- pbuz1=pbuz2
lda.z print_line_cursor
sta.z print_char_cursor
lda.z print_line_cursor+1
@ -1386,7 +1370,7 @@ main: {
// [16] phi from main::@9 to main::@3 [phi:main::@9->main::@3]
__b3_from___b9:
// [16] phi (byte*) print_line_cursor#19 = (byte*) print_line_cursor#1 [phi:main::@9->main::@3#0] -- register_copy
// [16] phi (byte*) print_char_cursor#49 = (byte*~) print_char_cursor#62 [phi:main::@9->main::@3#1] -- register_copy
// [16] phi (byte*) print_char_cursor#49 = (byte*~) print_char_cursor#61 [phi:main::@9->main::@3#1] -- register_copy
// [16] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@9->main::@3#2] -- register_copy
jmp __b3
}
@ -1678,7 +1662,7 @@ REGISTER UPLIFT POTENTIAL REGISTERS
Statement [17] (byte~) main::$8 ← (byte) main::j#2 << (byte) 1 [ main::j#2 print_char_cursor#49 print_line_cursor#19 main::$8 ] ( main:2 [ main::j#2 print_char_cursor#49 print_line_cursor#19 main::$8 ] ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp[1]:3 [ main::j#2 main::j#1 ]
Statement [18] (signed word) print_sword::w#1 ← *((const signed word[]) words + (byte~) main::$8) [ main::j#2 print_char_cursor#49 print_line_cursor#19 print_sword::w#1 ] ( main:2 [ main::j#2 print_char_cursor#49 print_line_cursor#19 print_sword::w#1 ] ) always clobbers reg byte a
Statement [25] (byte*~) print_char_cursor#62 ← (byte*) print_line_cursor#1 [ main::j#1 print_char_cursor#62 print_line_cursor#1 ] ( main:2 [ main::j#1 print_char_cursor#62 print_line_cursor#1 ] ) always clobbers reg byte a
Statement [25] (byte*~) print_char_cursor#61 ← (byte*) print_line_cursor#1 [ main::j#1 print_char_cursor#61 print_line_cursor#1 ] ( main:2 [ main::j#1 print_char_cursor#61 print_line_cursor#1 ] ) always clobbers reg byte a
Statement [28] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#9 + (byte) $28 [ print_line_cursor#1 print_char_cursor#13 ] ( main:2::print_ln:21 [ main::j#2 print_line_cursor#1 print_char_cursor#13 ] ) always clobbers reg byte a
Statement [29] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#13) goto print_ln::@1 [ print_line_cursor#1 print_char_cursor#13 ] ( main:2::print_ln:21 [ main::j#2 print_line_cursor#1 print_char_cursor#13 ] ) always clobbers reg byte a
Statement [31] if((signed word) print_sword::w#1<(signed byte) 0) goto print_sword::@1 [ print_char_cursor#49 print_sword::w#1 ] ( main:2::print_sword:19 [ main::j#2 print_line_cursor#19 print_char_cursor#49 print_sword::w#1 ] ) always clobbers reg byte a
@ -1700,7 +1684,7 @@ Removing always clobbered register reg byte a as potential for zp[1]:15 [ sub::s
Statement [69] *((const signed word[]) words + (byte~) sub::$0) ← *((const signed word[]) words + (byte~) sub::$0) - (byte) sub::s#3 [ ] ( main:2::sub:7 [ main::i#2 ] main:2::sub:9 [ main::i#2 ] main:2::sub:11 [ main::i#2 ] ) always clobbers reg byte a
Statement [17] (byte~) main::$8 ← (byte) main::j#2 << (byte) 1 [ main::j#2 print_char_cursor#49 print_line_cursor#19 main::$8 ] ( main:2 [ main::j#2 print_char_cursor#49 print_line_cursor#19 main::$8 ] ) always clobbers reg byte a
Statement [18] (signed word) print_sword::w#1 ← *((const signed word[]) words + (byte~) main::$8) [ main::j#2 print_char_cursor#49 print_line_cursor#19 print_sword::w#1 ] ( main:2 [ main::j#2 print_char_cursor#49 print_line_cursor#19 print_sword::w#1 ] ) always clobbers reg byte a
Statement [25] (byte*~) print_char_cursor#62 ← (byte*) print_line_cursor#1 [ main::j#1 print_char_cursor#62 print_line_cursor#1 ] ( main:2 [ main::j#1 print_char_cursor#62 print_line_cursor#1 ] ) always clobbers reg byte a
Statement [25] (byte*~) print_char_cursor#61 ← (byte*) print_line_cursor#1 [ main::j#1 print_char_cursor#61 print_line_cursor#1 ] ( main:2 [ main::j#1 print_char_cursor#61 print_line_cursor#1 ] ) always clobbers reg byte a
Statement [28] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#9 + (byte) $28 [ print_line_cursor#1 print_char_cursor#13 ] ( main:2::print_ln:21 [ main::j#2 print_line_cursor#1 print_char_cursor#13 ] ) always clobbers reg byte a
Statement [29] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#13) goto print_ln::@1 [ print_line_cursor#1 print_char_cursor#13 ] ( main:2::print_ln:21 [ main::j#2 print_line_cursor#1 print_char_cursor#13 ] ) always clobbers reg byte a
Statement [31] if((signed word) print_sword::w#1<(signed byte) 0) goto print_sword::@1 [ print_char_cursor#49 print_sword::w#1 ] ( main:2::print_sword:19 [ main::j#2 print_line_cursor#19 print_char_cursor#49 print_sword::w#1 ] ) always clobbers reg byte a
@ -1720,7 +1704,7 @@ Potential registers zp[1]:3 [ main::j#2 main::j#1 ] : zp[1]:3 , reg byte x ,
Potential registers zp[2]:4 [ print_line_cursor#9 print_line_cursor#19 print_line_cursor#1 ] : zp[2]:4 ,
Potential registers zp[2]:6 [ print_sword::w#4 print_sword::w#0 print_sword::w#1 ] : zp[2]:6 ,
Potential registers zp[1]:8 [ print_char::ch#4 print_char::ch#2 print_char::ch#3 ] : zp[1]:8 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[2]:9 [ print_char_cursor#34 print_char_cursor#13 print_char_cursor#49 print_char_cursor#62 ] : zp[2]:9 ,
Potential registers zp[2]:9 [ print_char_cursor#34 print_char_cursor#13 print_char_cursor#49 print_char_cursor#61 ] : zp[2]:9 ,
Potential registers zp[1]:11 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] : zp[1]:11 , reg byte x ,
Potential registers zp[2]:12 [ memset::dst#2 memset::dst#1 ] : zp[2]:12 ,
Potential registers zp[1]:14 [ sub::idx#3 sub::idx#0 sub::idx#1 sub::idx#2 ] : zp[1]:14 , reg byte a , reg byte x , reg byte y ,
@ -1732,7 +1716,7 @@ Potential registers zp[1]:20 [ print_byte::$2 ] : zp[1]:20 , reg byte a , reg by
Potential registers zp[1]:21 [ sub::$0 ] : zp[1]:21 , reg byte a , reg byte x , reg byte y ,
REGISTER UPLIFT SCOPES
Uplift Scope [] 252.6: zp[2]:4 [ print_line_cursor#9 print_line_cursor#19 print_line_cursor#1 ] 34.32: zp[2]:9 [ print_char_cursor#34 print_char_cursor#13 print_char_cursor#49 print_char_cursor#62 ]
Uplift Scope [] 252.6: zp[2]:4 [ print_line_cursor#9 print_line_cursor#19 print_line_cursor#1 ] 34.32: zp[2]:9 [ print_char_cursor#34 print_char_cursor#13 print_char_cursor#49 print_char_cursor#61 ]
Uplift Scope [sub] 101: zp[1]:14 [ sub::idx#3 sub::idx#0 sub::idx#1 sub::idx#2 ] 6: zp[1]:21 [ sub::$0 ] 1: zp[1]:15 [ sub::s#3 ]
Uplift Scope [main] 24.36: zp[1]:2 [ main::i#2 main::i#1 ] 22: zp[1]:16 [ main::$8 ] 16.5: zp[1]:3 [ main::j#2 main::j#1 ]
Uplift Scope [memset] 36.67: zp[2]:12 [ memset::dst#2 memset::dst#1 ]
@ -1744,7 +1728,7 @@ Uplift Scope [RADIX]
Uplift Scope [print_ln]
Uplift Scope [print_cls]
Uplifting [] best 6585 combination zp[2]:4 [ print_line_cursor#9 print_line_cursor#19 print_line_cursor#1 ] zp[2]:9 [ print_char_cursor#34 print_char_cursor#13 print_char_cursor#49 print_char_cursor#62 ]
Uplifting [] best 6585 combination zp[2]:4 [ print_line_cursor#9 print_line_cursor#19 print_line_cursor#1 ] zp[2]:9 [ print_char_cursor#34 print_char_cursor#13 print_char_cursor#49 print_char_cursor#61 ]
Uplifting [sub] best 6482 combination reg byte a [ sub::idx#3 sub::idx#0 sub::idx#1 sub::idx#2 ] reg byte a [ sub::$0 ] reg byte x [ sub::s#3 ]
Uplifting [main] best 6222 combination reg byte y [ main::i#2 main::i#1 ] reg byte a [ main::$8 ] reg byte x [ main::j#2 main::j#1 ]
Uplifting [memset] best 6222 combination zp[2]:12 [ memset::dst#2 memset::dst#1 ]
@ -1760,7 +1744,7 @@ Uplifting [print_byte] best 6199 combination zp[1]:11 [ print_byte::b#2 print_by
Coalescing zero page register [ zp[2]:6 [ print_sword::w#4 print_sword::w#0 print_sword::w#1 ] ] with [ zp[2]:17 [ print_word::w#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:12 [ memset::dst#2 memset::dst#1 ] ] with [ zp[2]:4 [ print_line_cursor#9 print_line_cursor#19 print_line_cursor#1 ] ]
Allocated (was zp[2]:6) zp[2]:2 [ print_sword::w#4 print_sword::w#0 print_sword::w#1 print_word::w#0 ]
Allocated (was zp[2]:9) zp[2]:4 [ print_char_cursor#34 print_char_cursor#13 print_char_cursor#49 print_char_cursor#62 ]
Allocated (was zp[2]:9) zp[2]:4 [ print_char_cursor#34 print_char_cursor#13 print_char_cursor#49 print_char_cursor#61 ]
Allocated (was zp[1]:11) zp[1]:6 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
Allocated (was zp[2]:12) zp[2]:7 [ memset::dst#2 memset::dst#1 print_line_cursor#9 print_line_cursor#19 print_line_cursor#1 ]
@ -1905,7 +1889,7 @@ main: {
rts
// main::@9
__b9:
// [25] (byte*~) print_char_cursor#62 ← (byte*) print_line_cursor#1 -- pbuz1=pbuz2
// [25] (byte*~) print_char_cursor#61 ← (byte*) print_line_cursor#1 -- pbuz1=pbuz2
lda.z print_line_cursor
sta.z print_char_cursor
lda.z print_line_cursor+1
@ -1913,7 +1897,7 @@ main: {
// [16] phi from main::@9 to main::@3 [phi:main::@9->main::@3]
__b3_from___b9:
// [16] phi (byte*) print_line_cursor#19 = (byte*) print_line_cursor#1 [phi:main::@9->main::@3#0] -- register_copy
// [16] phi (byte*) print_char_cursor#49 = (byte*~) print_char_cursor#62 [phi:main::@9->main::@3#1] -- register_copy
// [16] phi (byte*) print_char_cursor#49 = (byte*~) print_char_cursor#61 [phi:main::@9->main::@3#1] -- register_copy
// [16] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@9->main::@3#2] -- register_copy
jmp __b3
}
@ -2339,7 +2323,7 @@ FINAL SYMBOL TABLE
(byte*) print_char_cursor#13 print_char_cursor zp[2]:4 3.821428571428572
(byte*) print_char_cursor#34 print_char_cursor zp[2]:4 6.0
(byte*) print_char_cursor#49 print_char_cursor zp[2]:4 2.5
(byte*~) print_char_cursor#62 print_char_cursor zp[2]:4 22.0
(byte*~) print_char_cursor#61 print_char_cursor zp[2]:4 22.0
(void()) print_cls()
(label) print_cls::@return
(const byte[]) print_hextab = (string) "0123456789abcdef"z
@ -2382,7 +2366,7 @@ reg byte y [ main::i#2 main::i#1 ]
reg byte x [ main::j#2 main::j#1 ]
zp[2]:2 [ print_sword::w#4 print_sword::w#0 print_sword::w#1 print_word::w#0 ]
reg byte a [ print_char::ch#4 print_char::ch#2 print_char::ch#3 ]
zp[2]:4 [ print_char_cursor#34 print_char_cursor#13 print_char_cursor#49 print_char_cursor#62 ]
zp[2]:4 [ print_char_cursor#34 print_char_cursor#13 print_char_cursor#49 print_char_cursor#61 ]
zp[1]:6 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
zp[2]:7 [ memset::dst#2 memset::dst#1 print_line_cursor#9 print_line_cursor#19 print_line_cursor#1 ]
reg byte a [ sub::idx#3 sub::idx#0 sub::idx#1 sub::idx#2 ]
@ -2509,14 +2493,14 @@ main: {
rts
// main::@9
__b9:
// [25] (byte*~) print_char_cursor#62 ← (byte*) print_line_cursor#1 -- pbuz1=pbuz2
// [25] (byte*~) print_char_cursor#61 ← (byte*) print_line_cursor#1 -- pbuz1=pbuz2
lda.z print_line_cursor
sta.z print_char_cursor
lda.z print_line_cursor+1
sta.z print_char_cursor+1
// [16] phi from main::@9 to main::@3 [phi:main::@9->main::@3]
// [16] phi (byte*) print_line_cursor#19 = (byte*) print_line_cursor#1 [phi:main::@9->main::@3#0] -- register_copy
// [16] phi (byte*) print_char_cursor#49 = (byte*~) print_char_cursor#62 [phi:main::@9->main::@3#1] -- register_copy
// [16] phi (byte*) print_char_cursor#49 = (byte*~) print_char_cursor#61 [phi:main::@9->main::@3#1] -- register_copy
// [16] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@9->main::@3#2] -- register_copy
jmp __b3
}

View File

@ -58,7 +58,7 @@
(byte*) print_char_cursor#13 print_char_cursor zp[2]:4 3.821428571428572
(byte*) print_char_cursor#34 print_char_cursor zp[2]:4 6.0
(byte*) print_char_cursor#49 print_char_cursor zp[2]:4 2.5
(byte*~) print_char_cursor#62 print_char_cursor zp[2]:4 22.0
(byte*~) print_char_cursor#61 print_char_cursor zp[2]:4 22.0
(void()) print_cls()
(label) print_cls::@return
(const byte[]) print_hextab = (string) "0123456789abcdef"z
@ -101,7 +101,7 @@ reg byte y [ main::i#2 main::i#1 ]
reg byte x [ main::j#2 main::j#1 ]
zp[2]:2 [ print_sword::w#4 print_sword::w#0 print_sword::w#1 print_word::w#0 ]
reg byte a [ print_char::ch#4 print_char::ch#2 print_char::ch#3 ]
zp[2]:4 [ print_char_cursor#34 print_char_cursor#13 print_char_cursor#49 print_char_cursor#62 ]
zp[2]:4 [ print_char_cursor#34 print_char_cursor#13 print_char_cursor#49 print_char_cursor#61 ]
zp[1]:6 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
zp[2]:7 [ memset::dst#2 memset::dst#1 print_line_cursor#9 print_line_cursor#19 print_line_cursor#1 ]
reg byte a [ sub::idx#3 sub::idx#0 sub::idx#1 sub::idx#2 ]

View File

@ -319,8 +319,6 @@ divFACby10::@return: scope:[divFACby10] from divFACby10
main: scope:[main] from @64
(byte*) print_line_cursor#28 ← phi( @64/(byte*) print_line_cursor#14 )
(byte*) print_char_cursor#46 ← phi( @64/(byte*) print_char_cursor#33 )
(byte[]) main::f_i ← { (number) 0, (number) 0, (number) 0, (number) 0, (number) 0 }
(byte[]) main::f_127 ← { (number) 0, (number) 0, (number) 0, (number) 0, (number) 0 }
(word) setFAC::w#0 ← (number) $4fb
call setFAC
to:main::@3
@ -332,7 +330,7 @@ main::@3: scope:[main] from main
main::@4: scope:[main] from main::@3
(byte*) print_line_cursor#26 ← phi( main::@3/(byte*) print_line_cursor#27 )
(byte*) print_char_cursor#44 ← phi( main::@3/(byte*) print_char_cursor#45 )
(byte*) setMEMtoFAC::mem#0 ← (byte[]) main::f_127
(byte*) setMEMtoFAC::mem#0 ← (const byte[]) main::f_127
call setMEMtoFAC
to:main::@5
main::@5: scope:[main] from main::@4
@ -359,7 +357,7 @@ main::@7: scope:[main] from main::@6
(byte) main::i#12 ← phi( main::@6/(byte) main::i#13 )
(byte*) print_line_cursor#22 ← phi( main::@6/(byte*) print_line_cursor#23 )
(byte*) print_char_cursor#40 ← phi( main::@6/(byte*) print_char_cursor#41 )
(byte*) setMEMtoFAC::mem#1 ← (byte[]) main::f_i
(byte*) setMEMtoFAC::mem#1 ← (const byte[]) main::f_i
call setMEMtoFAC
to:main::@8
main::@8: scope:[main] from main::@7
@ -373,7 +371,7 @@ main::@9: scope:[main] from main::@8
(byte) main::i#10 ← phi( main::@8/(byte) main::i#11 )
(byte*) print_line_cursor#20 ← phi( main::@8/(byte*) print_line_cursor#21 )
(byte*) print_char_cursor#38 ← phi( main::@8/(byte*) print_char_cursor#39 )
(byte*) divMEMbyFAC::mem#0 ← (byte[]) main::f_i
(byte*) divMEMbyFAC::mem#0 ← (const byte[]) main::f_i
call divMEMbyFAC
to:main::@10
main::@10: scope:[main] from main::@9
@ -386,14 +384,14 @@ main::@11: scope:[main] from main::@10
(byte) main::i#8 ← phi( main::@10/(byte) main::i#9 )
(byte*) print_line_cursor#18 ← phi( main::@10/(byte*) print_line_cursor#19 )
(byte*) print_char_cursor#36 ← phi( main::@10/(byte*) print_char_cursor#37 )
(byte*) mulFACbyMEM::mem#1 ← (byte[]) main::f_127
(byte*) mulFACbyMEM::mem#1 ← (const byte[]) main::f_127
call mulFACbyMEM
to:main::@12
main::@12: scope:[main] from main::@11
(byte) main::i#7 ← phi( main::@11/(byte) main::i#8 )
(byte*) print_line_cursor#17 ← phi( main::@11/(byte*) print_line_cursor#18 )
(byte*) print_char_cursor#35 ← phi( main::@11/(byte*) print_char_cursor#36 )
(byte*) addMEMtoFAC::mem#0 ← (byte[]) main::f_127
(byte*) addMEMtoFAC::mem#0 ← (const byte[]) main::f_127
call addMEMtoFAC
to:main::@13
main::@13: scope:[main] from main::@12
@ -517,9 +515,9 @@ SYMBOL TABLE SSA
(label) main::@8
(label) main::@9
(label) main::@return
(byte[]) main::f_127
(const byte[]) main::f_127 = { (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0 }
(const byte*) main::f_2pi = (byte*)(number) $e2e5
(byte[]) main::f_i
(const byte[]) main::f_i = { (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0 }
(byte) main::i
(byte) main::i#0
(byte) main::i#1
@ -705,9 +703,6 @@ Adding number conversion cast (unumber) print_byte::$2 in (number~) print_byte::
Adding number conversion cast (unumber) $4fb in (word) setFAC::w#0 ← (number) $4fb
Adding number conversion cast (unumber) $19 in (word) setFAC::w#2 ← (number) $19
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (byte[]) main::f_i ← (byte[]){ (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0 }
Added casts to value list in (byte[]) main::f_127 ← (byte[]){ (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (byte*) print_screen#0 ← (byte*)(number) $400
Inlining cast (word~) setMEMtoFAC::$0 ← (word)(byte*) setMEMtoFAC::mem#2
Inlining cast (word~) addMEMtoFAC::$0 ← (word)(byte*) addMEMtoFAC::mem#1
@ -719,6 +714,16 @@ Inlining cast (word) setFAC::w#2 ← (unumber)(number) $19
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 254
Simplifying constant pointer cast (byte*) 255
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant pointer cast (byte*) 58085
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast $28
@ -726,16 +731,6 @@ Simplifying constant integer cast 4
Simplifying constant integer cast $f
Simplifying constant integer cast *((const byte*) memHi)
Simplifying constant integer cast *((const byte*) memLo)
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $4fb
Simplifying constant integer cast $19
Successful SSA optimization PassNCastSimplification
@ -797,21 +792,15 @@ Identical Phi Values (byte*) print_char_cursor#14 (byte*) print_char_cursor#12
Identical Phi Values (byte*) print_line_cursor#11 (byte*) print_line_cursor#10
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) print_ln::$1 [8] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#10) goto print_ln::@1
Simple Condition (bool~) main::$15 [160] if((byte) main::i#1!=rangelast(1,$19)) goto main::@1
Simple Condition (bool~) main::$15 [158] if((byte) main::i#1!=rangelast(1,$19)) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Identified constant from value list (byte[]) { (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0 }
Identified constant from value list (byte[]) { (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const byte*) print_char_cursor#0 = (byte*) 1024
Constant (const byte[]) main::f_i = { 0, 0, 0, 0, 0 }
Constant (const byte[]) main::f_127 = { 0, 0, 0, 0, 0 }
Constant (const word) setFAC::w#0 = $4fb
Constant (const byte*) setMEMtoFAC::mem#0 = main::f_127
Constant (const byte) main::i#0 = 1
Constant (const byte*) mulFACbyMEM::mem#0 = main::f_2pi
Constant (const word) setFAC::w#2 = $19
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte*) setMEMtoFAC::mem#0 = main::f_127
Constant (const byte*) setMEMtoFAC::mem#1 = main::f_i
Constant (const word) setFAC::w#2 = $19
Constant (const byte*) divMEMbyFAC::mem#0 = main::f_i
Constant (const byte*) mulFACbyMEM::mem#1 = main::f_127
Constant (const byte*) addMEMtoFAC::mem#0 = main::f_127
@ -819,8 +808,8 @@ Successful SSA optimization Pass2ConstantIdentification
Constant (const word) addMEMtoFAC::prepareMEM1_mem#0 = (word)addMEMtoFAC::mem#0
Constant (const word) divMEMbyFAC::prepareMEM1_mem#0 = (word)divMEMbyFAC::mem#0
Successful SSA optimization Pass2ConstantIdentification
Resolved ranged next value [158] main::i#1 ← ++ main::i#10 to ++
Resolved ranged comparison value [160] if(main::i#1!=rangelast(1,$19)) goto main::@1 to (number) $1a
Resolved ranged next value [156] main::i#1 ← ++ main::i#10 to ++
Resolved ranged comparison value [158] if(main::i#1!=rangelast(1,$19)) goto main::@1 to (number) $1a
Adding number conversion cast (unumber) $1a in if((byte) main::i#1!=(number) $1a) goto main::@1
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant integer cast $1a

View File

@ -438,6 +438,6 @@ divr16u: {
rts
}
print_hextab: .text "0123456789abcdef"
sintab2: .fill $c0, 0
// .fill $c0, round(127.5*sin(i*2*PI/$c0))
sintabref: .byte 0, 4, 8, $c, $11, $15, $19, $1d, $21, $25, $29, $2d, $31, $35, $38, $3c, $40, $43, $47, $4a, $4e, $51, $54, $57, $5a, $5d, $60, $63, $65, $68, $6a, $6c, $6e, $70, $72, $74, $76, $77, $79, $7a, $7b, $7c, $7d, $7e, $7e, $7f, $7f, $7f, $80, $7f, $7f, $7f, $7e, $7e, $7d, $7c, $7b, $7a, $79, $77, $76, $74, $72, $70, $6e, $6c, $6a, $68, $65, $63, $60, $5d, $5a, $57, $54, $51, $4e, $4a, $47, $43, $40, $3c, $38, $35, $31, $2d, $29, $25, $21, $1d, $19, $15, $11, $c, 8, 4, 0, $fc, $f8, $f4, $ef, $eb, $e7, $e3, $df, $db, $d7, $d3, $cf, $cb, $c8, $c4, $c0, $bd, $b9, $b6, $b2, $af, $ac, $a9, $a6, $a3, $a0, $9d, $9b, $98, $96, $94, $92, $90, $8e, $8c, $8a, $89, $87, $86, $85, $84, $83, $82, $82, $81, $81, $81, $81, $81, $81, $81, $82, $82, $83, $84, $85, $86, $87, $89, $8a, $8c, $8e, $90, $92, $94, $96, $98, $9b, $9d, $a0, $a3, $a6, $a9, $ac, $af, $b2, $b6, $b9, $bd, $c0, $c4, $c8, $cb, $cf, $d3, $d7, $db, $df, $e3, $e7, $eb, $ef, $f4, $f8, $fc
sintab2: .fill $c0, 0

View File

@ -640,7 +640,6 @@ print_cls::@return: scope:[print_cls] from print_cls::@1
(byte*) print_char_cursor#47 ← phi( @32/(byte*) print_char_cursor#0 )
(byte*) print_line_cursor#15 ← phi( @32/(byte*) print_line_cursor#0 )
(signed byte[$c0]) sintab2 ← { fill( $c0, 0) }
(byte[]) sintabref ← { (number) 0, (number) 4, (number) 8, (number) $c, (number) $11, (number) $15, (number) $19, (number) $1d, (number) $21, (number) $25, (number) $29, (number) $2d, (number) $31, (number) $35, (number) $38, (number) $3c, (number) $40, (number) $43, (number) $47, (number) $4a, (number) $4e, (number) $51, (number) $54, (number) $57, (number) $5a, (number) $5d, (number) $60, (number) $63, (number) $65, (number) $68, (number) $6a, (number) $6c, (number) $6e, (number) $70, (number) $72, (number) $74, (number) $76, (number) $77, (number) $79, (number) $7a, (number) $7b, (number) $7c, (number) $7d, (number) $7e, (number) $7e, (number) $7f, (number) $7f, (number) $7f, (number) $80, (number) $7f, (number) $7f, (number) $7f, (number) $7e, (number) $7e, (number) $7d, (number) $7c, (number) $7b, (number) $7a, (number) $79, (number) $77, (number) $76, (number) $74, (number) $72, (number) $70, (number) $6e, (number) $6c, (number) $6a, (number) $68, (number) $65, (number) $63, (number) $60, (number) $5d, (number) $5a, (number) $57, (number) $54, (number) $51, (number) $4e, (number) $4a, (number) $47, (number) $43, (number) $40, (number) $3c, (number) $38, (number) $35, (number) $31, (number) $2d, (number) $29, (number) $25, (number) $21, (number) $1d, (number) $19, (number) $15, (number) $11, (number) $c, (number) 8, (number) 4, (number) 0, (number) $fc, (number) $f8, (number) $f4, (number) $ef, (number) $eb, (number) $e7, (number) $e3, (number) $df, (number) $db, (number) $d7, (number) $d3, (number) $cf, (number) $cb, (number) $c8, (number) $c4, (number) $c0, (number) $bd, (number) $b9, (number) $b6, (number) $b2, (number) $af, (number) $ac, (number) $a9, (number) $a6, (number) $a3, (number) $a0, (number) $9d, (number) $9b, (number) $98, (number) $96, (number) $94, (number) $92, (number) $90, (number) $8e, (number) $8c, (number) $8a, (number) $89, (number) $87, (number) $86, (number) $85, (number) $84, (number) $83, (number) $82, (number) $82, (number) $81, (number) $81, (number) $81, (number) $81, (number) $81, (number) $81, (number) $81, (number) $82, (number) $82, (number) $83, (number) $84, (number) $85, (number) $86, (number) $87, (number) $89, (number) $8a, (number) $8c, (number) $8e, (number) $90, (number) $92, (number) $94, (number) $96, (number) $98, (number) $9b, (number) $9d, (number) $a0, (number) $a3, (number) $a6, (number) $a9, (number) $ac, (number) $af, (number) $b2, (number) $b6, (number) $b9, (number) $bd, (number) $c0, (number) $c4, (number) $c8, (number) $cb, (number) $cf, (number) $d3, (number) $d7, (number) $db, (number) $df, (number) $e3, (number) $e7, (number) $eb, (number) $ef, (number) $f4, (number) $f8, (number) $fc }
to:@57
(void()) main()
@ -669,7 +668,7 @@ main::@1: scope:[main] from main::@4 main::@6
(byte*) print_line_cursor#16 ← phi( main::@4/(byte*) print_line_cursor#3 main::@6/(byte*) print_line_cursor#11 )
(byte*) print_char_cursor#42 ← phi( main::@4/(byte*) print_char_cursor#14 main::@6/(byte*) print_char_cursor#16 )
(byte) main::i#2 ← phi( main::@4/(byte) main::i#0 main::@6/(byte) main::i#1 )
(signed byte~) main::$2 ← ((signed byte)) *((byte[]) sintabref + (byte) main::i#2)
(signed byte~) main::$2 ← ((signed byte)) *((const byte[]) sintabref + (byte) main::i#2)
(signed byte~) main::$3 ← *((signed byte[$c0]) sintab2 + (byte) main::i#2) - (signed byte~) main::$2
(signed byte) main::sb#0 ← (signed byte~) main::$3
(signed byte) print_sbyte::b#1 ← (signed byte) main::sb#0
@ -1234,7 +1233,7 @@ SYMBOL TABLE SSA
(word) sin8s_gen::x#3
(word) sin8s_gen::x#4
(signed byte[$c0]) sintab2
(byte[]) sintabref
(const byte[]) sintabref = { (byte)(number) 0, (byte)(number) 4, (byte)(number) 8, (byte)(number) $c, (byte)(number) $11, (byte)(number) $15, (byte)(number) $19, (byte)(number) $1d, (byte)(number) $21, (byte)(number) $25, (byte)(number) $29, (byte)(number) $2d, (byte)(number) $31, (byte)(number) $35, (byte)(number) $38, (byte)(number) $3c, (byte)(number) $40, (byte)(number) $43, (byte)(number) $47, (byte)(number) $4a, (byte)(number) $4e, (byte)(number) $51, (byte)(number) $54, (byte)(number) $57, (byte)(number) $5a, (byte)(number) $5d, (byte)(number) $60, (byte)(number) $63, (byte)(number) $65, (byte)(number) $68, (byte)(number) $6a, (byte)(number) $6c, (byte)(number) $6e, (byte)(number) $70, (byte)(number) $72, (byte)(number) $74, (byte)(number) $76, (byte)(number) $77, (byte)(number) $79, (byte)(number) $7a, (byte)(number) $7b, (byte)(number) $7c, (byte)(number) $7d, (byte)(number) $7e, (byte)(number) $7e, (byte)(number) $7f, (byte)(number) $7f, (byte)(number) $7f, (byte)(number) $80, (byte)(number) $7f, (byte)(number) $7f, (byte)(number) $7f, (byte)(number) $7e, (byte)(number) $7e, (byte)(number) $7d, (byte)(number) $7c, (byte)(number) $7b, (byte)(number) $7a, (byte)(number) $79, (byte)(number) $77, (byte)(number) $76, (byte)(number) $74, (byte)(number) $72, (byte)(number) $70, (byte)(number) $6e, (byte)(number) $6c, (byte)(number) $6a, (byte)(number) $68, (byte)(number) $65, (byte)(number) $63, (byte)(number) $60, (byte)(number) $5d, (byte)(number) $5a, (byte)(number) $57, (byte)(number) $54, (byte)(number) $51, (byte)(number) $4e, (byte)(number) $4a, (byte)(number) $47, (byte)(number) $43, (byte)(number) $40, (byte)(number) $3c, (byte)(number) $38, (byte)(number) $35, (byte)(number) $31, (byte)(number) $2d, (byte)(number) $29, (byte)(number) $25, (byte)(number) $21, (byte)(number) $1d, (byte)(number) $19, (byte)(number) $15, (byte)(number) $11, (byte)(number) $c, (byte)(number) 8, (byte)(number) 4, (byte)(number) 0, (byte)(number) $fc, (byte)(number) $f8, (byte)(number) $f4, (byte)(number) $ef, (byte)(number) $eb, (byte)(number) $e7, (byte)(number) $e3, (byte)(number) $df, (byte)(number) $db, (byte)(number) $d7, (byte)(number) $d3, (byte)(number) $cf, (byte)(number) $cb, (byte)(number) $c8, (byte)(number) $c4, (byte)(number) $c0, (byte)(number) $bd, (byte)(number) $b9, (byte)(number) $b6, (byte)(number) $b2, (byte)(number) $af, (byte)(number) $ac, (byte)(number) $a9, (byte)(number) $a6, (byte)(number) $a3, (byte)(number) $a0, (byte)(number) $9d, (byte)(number) $9b, (byte)(number) $98, (byte)(number) $96, (byte)(number) $94, (byte)(number) $92, (byte)(number) $90, (byte)(number) $8e, (byte)(number) $8c, (byte)(number) $8a, (byte)(number) $89, (byte)(number) $87, (byte)(number) $86, (byte)(number) $85, (byte)(number) $84, (byte)(number) $83, (byte)(number) $82, (byte)(number) $82, (byte)(number) $81, (byte)(number) $81, (byte)(number) $81, (byte)(number) $81, (byte)(number) $81, (byte)(number) $81, (byte)(number) $81, (byte)(number) $82, (byte)(number) $82, (byte)(number) $83, (byte)(number) $84, (byte)(number) $85, (byte)(number) $86, (byte)(number) $87, (byte)(number) $89, (byte)(number) $8a, (byte)(number) $8c, (byte)(number) $8e, (byte)(number) $90, (byte)(number) $92, (byte)(number) $94, (byte)(number) $96, (byte)(number) $98, (byte)(number) $9b, (byte)(number) $9d, (byte)(number) $a0, (byte)(number) $a3, (byte)(number) $a6, (byte)(number) $a9, (byte)(number) $ac, (byte)(number) $af, (byte)(number) $b2, (byte)(number) $b6, (byte)(number) $b9, (byte)(number) $bd, (byte)(number) $c0, (byte)(number) $c4, (byte)(number) $c8, (byte)(number) $cb, (byte)(number) $cf, (byte)(number) $d3, (byte)(number) $d7, (byte)(number) $db, (byte)(number) $df, (byte)(number) $e3, (byte)(number) $e7, (byte)(number) $eb, (byte)(number) $ef, (byte)(number) $f4, (byte)(number) $f8, (byte)(number) $fc }
(const word) wavelength = (word) $c0
Adding number conversion cast (unumber) 0 in (word) divr16u::quotient#0 ← (number) 0
@ -1275,8 +1274,6 @@ Adding number conversion cast (unumber) $f in (number~) print_byte::$2 ← (byte
Adding number conversion cast (unumber) print_byte::$2 in (number~) print_byte::$2 ← (byte) print_byte::b#2 & (unumber)(number) $f
Adding number conversion cast (unumber) $3e8 in (word) memset::num#0 ← (number) $3e8
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (byte[]) sintabref ← (byte[]){ (byte)(number) 0, (byte)(number) 4, (byte)(number) 8, (byte)(number) $c, (byte)(number) $11, (byte)(number) $15, (byte)(number) $19, (byte)(number) $1d, (byte)(number) $21, (byte)(number) $25, (byte)(number) $29, (byte)(number) $2d, (byte)(number) $31, (byte)(number) $35, (byte)(number) $38, (byte)(number) $3c, (byte)(number) $40, (byte)(number) $43, (byte)(number) $47, (byte)(number) $4a, (byte)(number) $4e, (byte)(number) $51, (byte)(number) $54, (byte)(number) $57, (byte)(number) $5a, (byte)(number) $5d, (byte)(number) $60, (byte)(number) $63, (byte)(number) $65, (byte)(number) $68, (byte)(number) $6a, (byte)(number) $6c, (byte)(number) $6e, (byte)(number) $70, (byte)(number) $72, (byte)(number) $74, (byte)(number) $76, (byte)(number) $77, (byte)(number) $79, (byte)(number) $7a, (byte)(number) $7b, (byte)(number) $7c, (byte)(number) $7d, (byte)(number) $7e, (byte)(number) $7e, (byte)(number) $7f, (byte)(number) $7f, (byte)(number) $7f, (byte)(number) $80, (byte)(number) $7f, (byte)(number) $7f, (byte)(number) $7f, (byte)(number) $7e, (byte)(number) $7e, (byte)(number) $7d, (byte)(number) $7c, (byte)(number) $7b, (byte)(number) $7a, (byte)(number) $79, (byte)(number) $77, (byte)(number) $76, (byte)(number) $74, (byte)(number) $72, (byte)(number) $70, (byte)(number) $6e, (byte)(number) $6c, (byte)(number) $6a, (byte)(number) $68, (byte)(number) $65, (byte)(number) $63, (byte)(number) $60, (byte)(number) $5d, (byte)(number) $5a, (byte)(number) $57, (byte)(number) $54, (byte)(number) $51, (byte)(number) $4e, (byte)(number) $4a, (byte)(number) $47, (byte)(number) $43, (byte)(number) $40, (byte)(number) $3c, (byte)(number) $38, (byte)(number) $35, (byte)(number) $31, (byte)(number) $2d, (byte)(number) $29, (byte)(number) $25, (byte)(number) $21, (byte)(number) $1d, (byte)(number) $19, (byte)(number) $15, (byte)(number) $11, (byte)(number) $c, (byte)(number) 8, (byte)(number) 4, (byte)(number) 0, (byte)(number) $fc, (byte)(number) $f8, (byte)(number) $f4, (byte)(number) $ef, (byte)(number) $eb, (byte)(number) $e7, (byte)(number) $e3, (byte)(number) $df, (byte)(number) $db, (byte)(number) $d7, (byte)(number) $d3, (byte)(number) $cf, (byte)(number) $cb, (byte)(number) $c8, (byte)(number) $c4, (byte)(number) $c0, (byte)(number) $bd, (byte)(number) $b9, (byte)(number) $b6, (byte)(number) $b2, (byte)(number) $af, (byte)(number) $ac, (byte)(number) $a9, (byte)(number) $a6, (byte)(number) $a3, (byte)(number) $a0, (byte)(number) $9d, (byte)(number) $9b, (byte)(number) $98, (byte)(number) $96, (byte)(number) $94, (byte)(number) $92, (byte)(number) $90, (byte)(number) $8e, (byte)(number) $8c, (byte)(number) $8a, (byte)(number) $89, (byte)(number) $87, (byte)(number) $86, (byte)(number) $85, (byte)(number) $84, (byte)(number) $83, (byte)(number) $82, (byte)(number) $82, (byte)(number) $81, (byte)(number) $81, (byte)(number) $81, (byte)(number) $81, (byte)(number) $81, (byte)(number) $81, (byte)(number) $81, (byte)(number) $82, (byte)(number) $82, (byte)(number) $83, (byte)(number) $84, (byte)(number) $85, (byte)(number) $86, (byte)(number) $87, (byte)(number) $89, (byte)(number) $8a, (byte)(number) $8c, (byte)(number) $8e, (byte)(number) $90, (byte)(number) $92, (byte)(number) $94, (byte)(number) $96, (byte)(number) $98, (byte)(number) $9b, (byte)(number) $9d, (byte)(number) $a0, (byte)(number) $a3, (byte)(number) $a6, (byte)(number) $a9, (byte)(number) $ac, (byte)(number) $af, (byte)(number) $b2, (byte)(number) $b6, (byte)(number) $b9, (byte)(number) $bd, (byte)(number) $c0, (byte)(number) $c4, (byte)(number) $c8, (byte)(number) $cb, (byte)(number) $cf, (byte)(number) $d3, (byte)(number) $d7, (byte)(number) $db, (byte)(number) $df, (byte)(number) $e3, (byte)(number) $e7, (byte)(number) $eb, (byte)(number) $ef, (byte)(number) $f4, (byte)(number) $f8, (byte)(number) $fc }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (word) divr16u::quotient#0 ← (unumber)(number) 0
Inlining cast (word) divr16u::rem#3 ← (unumber)(number) 0
Inlining cast (word) mul8u::res#0 ← (unumber)(number) 0
@ -1296,9 +1293,201 @@ Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#2
Inlining cast (byte*) print_screen#0 ← (byte*)(number) $400
Inlining cast (byte~) print_sbyte::$1 ← (byte)(signed byte) print_sbyte::b#4
Inlining cast (word) memset::num#0 ← (unumber)(number) $3e8
Inlining cast (signed byte~) main::$2 ← (signed byte)*((byte[]) sintabref + (byte) main::i#2)
Inlining cast (signed byte~) main::$2 ← (signed byte)*((const byte[]) sintabref + (byte) main::i#2)
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast 0
Simplifying constant integer cast 4
Simplifying constant integer cast 8
Simplifying constant integer cast $c
Simplifying constant integer cast $11
Simplifying constant integer cast $15
Simplifying constant integer cast $19
Simplifying constant integer cast $1d
Simplifying constant integer cast $21
Simplifying constant integer cast $25
Simplifying constant integer cast $29
Simplifying constant integer cast $2d
Simplifying constant integer cast $31
Simplifying constant integer cast $35
Simplifying constant integer cast $38
Simplifying constant integer cast $3c
Simplifying constant integer cast $40
Simplifying constant integer cast $43
Simplifying constant integer cast $47
Simplifying constant integer cast $4a
Simplifying constant integer cast $4e
Simplifying constant integer cast $51
Simplifying constant integer cast $54
Simplifying constant integer cast $57
Simplifying constant integer cast $5a
Simplifying constant integer cast $5d
Simplifying constant integer cast $60
Simplifying constant integer cast $63
Simplifying constant integer cast $65
Simplifying constant integer cast $68
Simplifying constant integer cast $6a
Simplifying constant integer cast $6c
Simplifying constant integer cast $6e
Simplifying constant integer cast $70
Simplifying constant integer cast $72
Simplifying constant integer cast $74
Simplifying constant integer cast $76
Simplifying constant integer cast $77
Simplifying constant integer cast $79
Simplifying constant integer cast $7a
Simplifying constant integer cast $7b
Simplifying constant integer cast $7c
Simplifying constant integer cast $7d
Simplifying constant integer cast $7e
Simplifying constant integer cast $7e
Simplifying constant integer cast $7f
Simplifying constant integer cast $7f
Simplifying constant integer cast $7f
Simplifying constant integer cast $80
Simplifying constant integer cast $7f
Simplifying constant integer cast $7f
Simplifying constant integer cast $7f
Simplifying constant integer cast $7e
Simplifying constant integer cast $7e
Simplifying constant integer cast $7d
Simplifying constant integer cast $7c
Simplifying constant integer cast $7b
Simplifying constant integer cast $7a
Simplifying constant integer cast $79
Simplifying constant integer cast $77
Simplifying constant integer cast $76
Simplifying constant integer cast $74
Simplifying constant integer cast $72
Simplifying constant integer cast $70
Simplifying constant integer cast $6e
Simplifying constant integer cast $6c
Simplifying constant integer cast $6a
Simplifying constant integer cast $68
Simplifying constant integer cast $65
Simplifying constant integer cast $63
Simplifying constant integer cast $60
Simplifying constant integer cast $5d
Simplifying constant integer cast $5a
Simplifying constant integer cast $57
Simplifying constant integer cast $54
Simplifying constant integer cast $51
Simplifying constant integer cast $4e
Simplifying constant integer cast $4a
Simplifying constant integer cast $47
Simplifying constant integer cast $43
Simplifying constant integer cast $40
Simplifying constant integer cast $3c
Simplifying constant integer cast $38
Simplifying constant integer cast $35
Simplifying constant integer cast $31
Simplifying constant integer cast $2d
Simplifying constant integer cast $29
Simplifying constant integer cast $25
Simplifying constant integer cast $21
Simplifying constant integer cast $1d
Simplifying constant integer cast $19
Simplifying constant integer cast $15
Simplifying constant integer cast $11
Simplifying constant integer cast $c
Simplifying constant integer cast 8
Simplifying constant integer cast 4
Simplifying constant integer cast 0
Simplifying constant integer cast $fc
Simplifying constant integer cast $f8
Simplifying constant integer cast $f4
Simplifying constant integer cast $ef
Simplifying constant integer cast $eb
Simplifying constant integer cast $e7
Simplifying constant integer cast $e3
Simplifying constant integer cast $df
Simplifying constant integer cast $db
Simplifying constant integer cast $d7
Simplifying constant integer cast $d3
Simplifying constant integer cast $cf
Simplifying constant integer cast $cb
Simplifying constant integer cast $c8
Simplifying constant integer cast $c4
Simplifying constant integer cast $c0
Simplifying constant integer cast $bd
Simplifying constant integer cast $b9
Simplifying constant integer cast $b6
Simplifying constant integer cast $b2
Simplifying constant integer cast $af
Simplifying constant integer cast $ac
Simplifying constant integer cast $a9
Simplifying constant integer cast $a6
Simplifying constant integer cast $a3
Simplifying constant integer cast $a0
Simplifying constant integer cast $9d
Simplifying constant integer cast $9b
Simplifying constant integer cast $98
Simplifying constant integer cast $96
Simplifying constant integer cast $94
Simplifying constant integer cast $92
Simplifying constant integer cast $90
Simplifying constant integer cast $8e
Simplifying constant integer cast $8c
Simplifying constant integer cast $8a
Simplifying constant integer cast $89
Simplifying constant integer cast $87
Simplifying constant integer cast $86
Simplifying constant integer cast $85
Simplifying constant integer cast $84
Simplifying constant integer cast $83
Simplifying constant integer cast $82
Simplifying constant integer cast $82
Simplifying constant integer cast $81
Simplifying constant integer cast $81
Simplifying constant integer cast $81
Simplifying constant integer cast $81
Simplifying constant integer cast $81
Simplifying constant integer cast $81
Simplifying constant integer cast $81
Simplifying constant integer cast $82
Simplifying constant integer cast $82
Simplifying constant integer cast $83
Simplifying constant integer cast $84
Simplifying constant integer cast $85
Simplifying constant integer cast $86
Simplifying constant integer cast $87
Simplifying constant integer cast $89
Simplifying constant integer cast $8a
Simplifying constant integer cast $8c
Simplifying constant integer cast $8e
Simplifying constant integer cast $90
Simplifying constant integer cast $92
Simplifying constant integer cast $94
Simplifying constant integer cast $96
Simplifying constant integer cast $98
Simplifying constant integer cast $9b
Simplifying constant integer cast $9d
Simplifying constant integer cast $a0
Simplifying constant integer cast $a3
Simplifying constant integer cast $a6
Simplifying constant integer cast $a9
Simplifying constant integer cast $ac
Simplifying constant integer cast $af
Simplifying constant integer cast $b2
Simplifying constant integer cast $b6
Simplifying constant integer cast $b9
Simplifying constant integer cast $bd
Simplifying constant integer cast $c0
Simplifying constant integer cast $c4
Simplifying constant integer cast $c8
Simplifying constant integer cast $cb
Simplifying constant integer cast $cf
Simplifying constant integer cast $d3
Simplifying constant integer cast $d7
Simplifying constant integer cast $db
Simplifying constant integer cast $df
Simplifying constant integer cast $e3
Simplifying constant integer cast $e7
Simplifying constant integer cast $eb
Simplifying constant integer cast $ef
Simplifying constant integer cast $f4
Simplifying constant integer cast $f8
Simplifying constant integer cast $fc
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast $80
Simplifying constant integer cast 0
@ -1332,198 +1521,6 @@ Simplifying constant integer cast 0
Simplifying constant integer cast 4
Simplifying constant integer cast $f
Simplifying constant integer cast $3e8
Simplifying constant integer cast 0
Simplifying constant integer cast 4
Simplifying constant integer cast 8
Simplifying constant integer cast $c
Simplifying constant integer cast $11
Simplifying constant integer cast $15
Simplifying constant integer cast $19
Simplifying constant integer cast $1d
Simplifying constant integer cast $21
Simplifying constant integer cast $25
Simplifying constant integer cast $29
Simplifying constant integer cast $2d
Simplifying constant integer cast $31
Simplifying constant integer cast $35
Simplifying constant integer cast $38
Simplifying constant integer cast $3c
Simplifying constant integer cast $40
Simplifying constant integer cast $43
Simplifying constant integer cast $47
Simplifying constant integer cast $4a
Simplifying constant integer cast $4e
Simplifying constant integer cast $51
Simplifying constant integer cast $54
Simplifying constant integer cast $57
Simplifying constant integer cast $5a
Simplifying constant integer cast $5d
Simplifying constant integer cast $60
Simplifying constant integer cast $63
Simplifying constant integer cast $65
Simplifying constant integer cast $68
Simplifying constant integer cast $6a
Simplifying constant integer cast $6c
Simplifying constant integer cast $6e
Simplifying constant integer cast $70
Simplifying constant integer cast $72
Simplifying constant integer cast $74
Simplifying constant integer cast $76
Simplifying constant integer cast $77
Simplifying constant integer cast $79
Simplifying constant integer cast $7a
Simplifying constant integer cast $7b
Simplifying constant integer cast $7c
Simplifying constant integer cast $7d
Simplifying constant integer cast $7e
Simplifying constant integer cast $7e
Simplifying constant integer cast $7f
Simplifying constant integer cast $7f
Simplifying constant integer cast $7f
Simplifying constant integer cast $80
Simplifying constant integer cast $7f
Simplifying constant integer cast $7f
Simplifying constant integer cast $7f
Simplifying constant integer cast $7e
Simplifying constant integer cast $7e
Simplifying constant integer cast $7d
Simplifying constant integer cast $7c
Simplifying constant integer cast $7b
Simplifying constant integer cast $7a
Simplifying constant integer cast $79
Simplifying constant integer cast $77
Simplifying constant integer cast $76
Simplifying constant integer cast $74
Simplifying constant integer cast $72
Simplifying constant integer cast $70
Simplifying constant integer cast $6e
Simplifying constant integer cast $6c
Simplifying constant integer cast $6a
Simplifying constant integer cast $68
Simplifying constant integer cast $65
Simplifying constant integer cast $63
Simplifying constant integer cast $60
Simplifying constant integer cast $5d
Simplifying constant integer cast $5a
Simplifying constant integer cast $57
Simplifying constant integer cast $54
Simplifying constant integer cast $51
Simplifying constant integer cast $4e
Simplifying constant integer cast $4a
Simplifying constant integer cast $47
Simplifying constant integer cast $43
Simplifying constant integer cast $40
Simplifying constant integer cast $3c
Simplifying constant integer cast $38
Simplifying constant integer cast $35
Simplifying constant integer cast $31
Simplifying constant integer cast $2d
Simplifying constant integer cast $29
Simplifying constant integer cast $25
Simplifying constant integer cast $21
Simplifying constant integer cast $1d
Simplifying constant integer cast $19
Simplifying constant integer cast $15
Simplifying constant integer cast $11
Simplifying constant integer cast $c
Simplifying constant integer cast 8
Simplifying constant integer cast 4
Simplifying constant integer cast 0
Simplifying constant integer cast $fc
Simplifying constant integer cast $f8
Simplifying constant integer cast $f4
Simplifying constant integer cast $ef
Simplifying constant integer cast $eb
Simplifying constant integer cast $e7
Simplifying constant integer cast $e3
Simplifying constant integer cast $df
Simplifying constant integer cast $db
Simplifying constant integer cast $d7
Simplifying constant integer cast $d3
Simplifying constant integer cast $cf
Simplifying constant integer cast $cb
Simplifying constant integer cast $c8
Simplifying constant integer cast $c4
Simplifying constant integer cast $c0
Simplifying constant integer cast $bd
Simplifying constant integer cast $b9
Simplifying constant integer cast $b6
Simplifying constant integer cast $b2
Simplifying constant integer cast $af
Simplifying constant integer cast $ac
Simplifying constant integer cast $a9
Simplifying constant integer cast $a6
Simplifying constant integer cast $a3
Simplifying constant integer cast $a0
Simplifying constant integer cast $9d
Simplifying constant integer cast $9b
Simplifying constant integer cast $98
Simplifying constant integer cast $96
Simplifying constant integer cast $94
Simplifying constant integer cast $92
Simplifying constant integer cast $90
Simplifying constant integer cast $8e
Simplifying constant integer cast $8c
Simplifying constant integer cast $8a
Simplifying constant integer cast $89
Simplifying constant integer cast $87
Simplifying constant integer cast $86
Simplifying constant integer cast $85
Simplifying constant integer cast $84
Simplifying constant integer cast $83
Simplifying constant integer cast $82
Simplifying constant integer cast $82
Simplifying constant integer cast $81
Simplifying constant integer cast $81
Simplifying constant integer cast $81
Simplifying constant integer cast $81
Simplifying constant integer cast $81
Simplifying constant integer cast $81
Simplifying constant integer cast $81
Simplifying constant integer cast $82
Simplifying constant integer cast $82
Simplifying constant integer cast $83
Simplifying constant integer cast $84
Simplifying constant integer cast $85
Simplifying constant integer cast $86
Simplifying constant integer cast $87
Simplifying constant integer cast $89
Simplifying constant integer cast $8a
Simplifying constant integer cast $8c
Simplifying constant integer cast $8e
Simplifying constant integer cast $90
Simplifying constant integer cast $92
Simplifying constant integer cast $94
Simplifying constant integer cast $96
Simplifying constant integer cast $98
Simplifying constant integer cast $9b
Simplifying constant integer cast $9d
Simplifying constant integer cast $a0
Simplifying constant integer cast $a3
Simplifying constant integer cast $a6
Simplifying constant integer cast $a9
Simplifying constant integer cast $ac
Simplifying constant integer cast $af
Simplifying constant integer cast $b2
Simplifying constant integer cast $b6
Simplifying constant integer cast $b9
Simplifying constant integer cast $bd
Simplifying constant integer cast $c0
Simplifying constant integer cast $c4
Simplifying constant integer cast $c8
Simplifying constant integer cast $cb
Simplifying constant integer cast $cf
Simplifying constant integer cast $d3
Simplifying constant integer cast $d7
Simplifying constant integer cast $db
Simplifying constant integer cast $df
Simplifying constant integer cast $e3
Simplifying constant integer cast $e7
Simplifying constant integer cast $eb
Simplifying constant integer cast $ef
Simplifying constant integer cast $f4
Simplifying constant integer cast $f8
Simplifying constant integer cast $fc
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
@ -1737,12 +1734,10 @@ Simple Condition (bool~) memset::$1 [198] if((word) memset::num#0<=(byte) 0) got
Simple Condition (bool~) memset::$4 [208] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5
Simple Condition (bool~) print_str::$0 [221] if((byte) 0!=*((byte*) print_str::str#2)) goto print_str::@2
Simple Condition (bool~) print_sbyte::$0 [231] if((signed byte) print_sbyte::b#1<(signed byte) 0) goto print_sbyte::@1
Simple Condition (bool~) main::$6 [313] if((byte) main::i#1!=rangelast(0,$bf)) goto main::@1
Simple Condition (bool~) main::$6 [312] if((byte) main::i#1!=rangelast(0,$bf)) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant right-side identified [287] (signed byte[$c0]) sintab2 ← { fill( $c0, 0) }
Successful SSA optimization Pass2ConstantRValueConsolidation
Identified constant from value list (byte[]) { (byte) 0, (byte) 4, (byte) 8, (byte) $c, (byte) $11, (byte) $15, (byte) $19, (byte) $1d, (byte) $21, (byte) $25, (byte) $29, (byte) $2d, (byte) $31, (byte) $35, (byte) $38, (byte) $3c, (byte) $40, (byte) $43, (byte) $47, (byte) $4a, (byte) $4e, (byte) $51, (byte) $54, (byte) $57, (byte) $5a, (byte) $5d, (byte) $60, (byte) $63, (byte) $65, (byte) $68, (byte) $6a, (byte) $6c, (byte) $6e, (byte) $70, (byte) $72, (byte) $74, (byte) $76, (byte) $77, (byte) $79, (byte) $7a, (byte) $7b, (byte) $7c, (byte) $7d, (byte) $7e, (byte) $7e, (byte) $7f, (byte) $7f, (byte) $7f, (byte) $80, (byte) $7f, (byte) $7f, (byte) $7f, (byte) $7e, (byte) $7e, (byte) $7d, (byte) $7c, (byte) $7b, (byte) $7a, (byte) $79, (byte) $77, (byte) $76, (byte) $74, (byte) $72, (byte) $70, (byte) $6e, (byte) $6c, (byte) $6a, (byte) $68, (byte) $65, (byte) $63, (byte) $60, (byte) $5d, (byte) $5a, (byte) $57, (byte) $54, (byte) $51, (byte) $4e, (byte) $4a, (byte) $47, (byte) $43, (byte) $40, (byte) $3c, (byte) $38, (byte) $35, (byte) $31, (byte) $2d, (byte) $29, (byte) $25, (byte) $21, (byte) $1d, (byte) $19, (byte) $15, (byte) $11, (byte) $c, (byte) 8, (byte) 4, (byte) 0, (byte) $fc, (byte) $f8, (byte) $f4, (byte) $ef, (byte) $eb, (byte) $e7, (byte) $e3, (byte) $df, (byte) $db, (byte) $d7, (byte) $d3, (byte) $cf, (byte) $cb, (byte) $c8, (byte) $c4, (byte) $c0, (byte) $bd, (byte) $b9, (byte) $b6, (byte) $b2, (byte) $af, (byte) $ac, (byte) $a9, (byte) $a6, (byte) $a3, (byte) $a0, (byte) $9d, (byte) $9b, (byte) $98, (byte) $96, (byte) $94, (byte) $92, (byte) $90, (byte) $8e, (byte) $8c, (byte) $8a, (byte) $89, (byte) $87, (byte) $86, (byte) $85, (byte) $84, (byte) $83, (byte) $82, (byte) $82, (byte) $81, (byte) $81, (byte) $81, (byte) $81, (byte) $81, (byte) $81, (byte) $81, (byte) $82, (byte) $82, (byte) $83, (byte) $84, (byte) $85, (byte) $86, (byte) $87, (byte) $89, (byte) $8a, (byte) $8c, (byte) $8e, (byte) $90, (byte) $92, (byte) $94, (byte) $96, (byte) $98, (byte) $9b, (byte) $9d, (byte) $a0, (byte) $a3, (byte) $a6, (byte) $a9, (byte) $ac, (byte) $af, (byte) $b2, (byte) $b6, (byte) $b9, (byte) $bd, (byte) $c0, (byte) $c4, (byte) $c8, (byte) $cb, (byte) $cf, (byte) $d3, (byte) $d7, (byte) $db, (byte) $df, (byte) $e3, (byte) $e7, (byte) $eb, (byte) $ef, (byte) $f4, (byte) $f8, (byte) $fc }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const word) divr16u::quotient#0 = 0
Constant (const byte) divr16u::i#0 = 0
Constant (const word) divr16u::rem#3 = 0
@ -1764,7 +1759,6 @@ Constant (const byte) print_char::ch#1 = ' '
Constant (const byte) memset::c#0 = ' '
Constant (const word) memset::num#0 = $3e8
Constant (const signed byte[$c0]) sintab2 = { fill( $c0, 0) }
Constant (const byte[]) sintabref = { 0, 4, 8, $c, $11, $15, $19, $1d, $21, $25, $29, $2d, $31, $35, $38, $3c, $40, $43, $47, $4a, $4e, $51, $54, $57, $5a, $5d, $60, $63, $65, $68, $6a, $6c, $6e, $70, $72, $74, $76, $77, $79, $7a, $7b, $7c, $7d, $7e, $7e, $7f, $7f, $7f, $80, $7f, $7f, $7f, $7e, $7e, $7d, $7c, $7b, $7a, $79, $77, $76, $74, $72, $70, $6e, $6c, $6a, $68, $65, $63, $60, $5d, $5a, $57, $54, $51, $4e, $4a, $47, $43, $40, $3c, $38, $35, $31, $2d, $29, $25, $21, $1d, $19, $15, $11, $c, 8, 4, 0, $fc, $f8, $f4, $ef, $eb, $e7, $e3, $df, $db, $d7, $d3, $cf, $cb, $c8, $c4, $c0, $bd, $b9, $b6, $b2, $af, $ac, $a9, $a6, $a3, $a0, $9d, $9b, $98, $96, $94, $92, $90, $8e, $8c, $8a, $89, $87, $86, $85, $84, $83, $82, $82, $81, $81, $81, $81, $81, $81, $81, $82, $82, $83, $84, $85, $86, $87, $89, $8a, $8c, $8e, $90, $92, $94, $96, $98, $9b, $9d, $a0, $a3, $a6, $a9, $ac, $af, $b2, $b6, $b9, $bd, $c0, $c4, $c8, $cb, $cf, $d3, $d7, $db, $df, $e3, $e7, $eb, $ef, $f4, $f8, $fc }
Constant (const word) sin8s_gen::wavelength#0 = wavelength
Constant (const byte) main::i#0 = 0
Constant (const byte*) print_str::str#1 = main::str
@ -1783,8 +1777,8 @@ if() condition always false - eliminating [198] if((const word) memset::num#0<=(
Successful SSA optimization Pass2ConstantIfs
Resolved ranged next value [23] divr16u::i#1 ← ++ divr16u::i#2 to ++
Resolved ranged comparison value [25] if(divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 to (number) $10
Resolved ranged next value [311] main::i#1 ← ++ main::i#2 to ++
Resolved ranged comparison value [313] if(main::i#1!=rangelast(0,$bf)) goto main::@1 to (number) $c0
Resolved ranged next value [310] main::i#1 ← ++ main::i#2 to ++
Resolved ranged comparison value [312] if(main::i#1!=rangelast(0,$bf)) goto main::@1 to (number) $c0
Eliminating unused constant (const void*) memset::return#2
Successful SSA optimization PassNEliminateUnusedVars
Adding number conversion cast (unumber) $10 in if((byte) divr16u::i#1!=(number) $10) goto divr16u::@1
@ -3703,9 +3697,9 @@ divr16u: {
}
// File Data
print_hextab: .text "0123456789abcdef"
sintab2: .fill $c0, 0
// .fill $c0, round(127.5*sin(i*2*PI/$c0))
sintabref: .byte 0, 4, 8, $c, $11, $15, $19, $1d, $21, $25, $29, $2d, $31, $35, $38, $3c, $40, $43, $47, $4a, $4e, $51, $54, $57, $5a, $5d, $60, $63, $65, $68, $6a, $6c, $6e, $70, $72, $74, $76, $77, $79, $7a, $7b, $7c, $7d, $7e, $7e, $7f, $7f, $7f, $80, $7f, $7f, $7f, $7e, $7e, $7d, $7c, $7b, $7a, $79, $77, $76, $74, $72, $70, $6e, $6c, $6a, $68, $65, $63, $60, $5d, $5a, $57, $54, $51, $4e, $4a, $47, $43, $40, $3c, $38, $35, $31, $2d, $29, $25, $21, $1d, $19, $15, $11, $c, 8, 4, 0, $fc, $f8, $f4, $ef, $eb, $e7, $e3, $df, $db, $d7, $d3, $cf, $cb, $c8, $c4, $c0, $bd, $b9, $b6, $b2, $af, $ac, $a9, $a6, $a3, $a0, $9d, $9b, $98, $96, $94, $92, $90, $8e, $8c, $8a, $89, $87, $86, $85, $84, $83, $82, $82, $81, $81, $81, $81, $81, $81, $81, $82, $82, $83, $84, $85, $86, $87, $89, $8a, $8c, $8e, $90, $92, $94, $96, $98, $9b, $9d, $a0, $a3, $a6, $a9, $ac, $af, $b2, $b6, $b9, $bd, $c0, $c4, $c8, $cb, $cf, $d3, $d7, $db, $df, $e3, $e7, $eb, $ef, $f4, $f8, $fc
sintab2: .fill $c0, 0
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [9] (signed byte) main::sb#0 ← *((const signed byte[$c0]) sintab2 + (byte) main::i#2) - (signed byte)*((const byte[]) sintabref + (byte) main::i#2) [ main::i#2 print_char_cursor#42 main::sb#0 ] ( main:2 [ main::i#2 print_char_cursor#42 main::sb#0 ] ) always clobbers reg byte a
@ -4842,9 +4836,9 @@ divr16u: {
}
// File Data
print_hextab: .text "0123456789abcdef"
sintab2: .fill $c0, 0
// .fill $c0, round(127.5*sin(i*2*PI/$c0))
sintabref: .byte 0, 4, 8, $c, $11, $15, $19, $1d, $21, $25, $29, $2d, $31, $35, $38, $3c, $40, $43, $47, $4a, $4e, $51, $54, $57, $5a, $5d, $60, $63, $65, $68, $6a, $6c, $6e, $70, $72, $74, $76, $77, $79, $7a, $7b, $7c, $7d, $7e, $7e, $7f, $7f, $7f, $80, $7f, $7f, $7f, $7e, $7e, $7d, $7c, $7b, $7a, $79, $77, $76, $74, $72, $70, $6e, $6c, $6a, $68, $65, $63, $60, $5d, $5a, $57, $54, $51, $4e, $4a, $47, $43, $40, $3c, $38, $35, $31, $2d, $29, $25, $21, $1d, $19, $15, $11, $c, 8, 4, 0, $fc, $f8, $f4, $ef, $eb, $e7, $e3, $df, $db, $d7, $d3, $cf, $cb, $c8, $c4, $c0, $bd, $b9, $b6, $b2, $af, $ac, $a9, $a6, $a3, $a0, $9d, $9b, $98, $96, $94, $92, $90, $8e, $8c, $8a, $89, $87, $86, $85, $84, $83, $82, $82, $81, $81, $81, $81, $81, $81, $81, $82, $82, $83, $84, $85, $86, $87, $89, $8a, $8c, $8e, $90, $92, $94, $96, $98, $9b, $9d, $a0, $a3, $a6, $a9, $ac, $af, $b2, $b6, $b9, $bd, $c0, $c4, $c8, $cb, $cf, $d3, $d7, $db, $df, $e3, $e7, $eb, $ef, $f4, $f8, $fc
sintab2: .fill $c0, 0
ASSEMBLER OPTIMIZATIONS
Removing instruction jmp __b1
@ -6159,7 +6153,7 @@ divr16u: {
}
// File Data
print_hextab: .text "0123456789abcdef"
sintab2: .fill $c0, 0
// .fill $c0, round(127.5*sin(i*2*PI/$c0))
sintabref: .byte 0, 4, 8, $c, $11, $15, $19, $1d, $21, $25, $29, $2d, $31, $35, $38, $3c, $40, $43, $47, $4a, $4e, $51, $54, $57, $5a, $5d, $60, $63, $65, $68, $6a, $6c, $6e, $70, $72, $74, $76, $77, $79, $7a, $7b, $7c, $7d, $7e, $7e, $7f, $7f, $7f, $80, $7f, $7f, $7f, $7e, $7e, $7d, $7c, $7b, $7a, $79, $77, $76, $74, $72, $70, $6e, $6c, $6a, $68, $65, $63, $60, $5d, $5a, $57, $54, $51, $4e, $4a, $47, $43, $40, $3c, $38, $35, $31, $2d, $29, $25, $21, $1d, $19, $15, $11, $c, 8, 4, 0, $fc, $f8, $f4, $ef, $eb, $e7, $e3, $df, $db, $d7, $d3, $cf, $cb, $c8, $c4, $c0, $bd, $b9, $b6, $b2, $af, $ac, $a9, $a6, $a3, $a0, $9d, $9b, $98, $96, $94, $92, $90, $8e, $8c, $8a, $89, $87, $86, $85, $84, $83, $82, $82, $81, $81, $81, $81, $81, $81, $81, $82, $82, $83, $84, $85, $86, $87, $89, $8a, $8c, $8e, $90, $92, $94, $96, $98, $9b, $9d, $a0, $a3, $a6, $a9, $ac, $af, $b2, $b6, $b9, $bd, $c0, $c4, $c8, $cb, $cf, $d3, $d7, $db, $df, $e3, $e7, $eb, $ef, $f4, $f8, $fc
sintab2: .fill $c0, 0

View File

@ -26,8 +26,7 @@ main: scope:[main] from @1
(byte~) main::$9 ← (byte) '0' + (byte~) main::$8
*((const byte*) SCREEN + (byte) main::idx#2) ← (byte~) main::$9
(byte) main::idx#3 ← ++ (byte) main::idx#2
(word[]) main::wb ← { (number) 1, (number) 2, (number) 3, (number) 4 }
(byte~) main::$10 ← sizeof (word[]) main::wb
(byte~) main::$10 ← sizeof (const word[]) main::wb
(byte~) main::$11 ← (byte~) main::$10 / (const byte) SIZEOF_WORD
(byte~) main::$12 ← (byte) '0' + (byte~) main::$11
*((const byte*) SCREEN + (byte) main::idx#3) ← (byte~) main::$12
@ -37,8 +36,7 @@ main: scope:[main] from @1
(byte~) main::$15 ← (byte) '0' + (byte~) main::$14
*((const byte*) SCREEN + (byte) main::idx#4) ← (byte~) main::$15
(byte) main::idx#5 ← ++ (byte) main::idx#4
(byte[]) main::sb ← { (byte) 'a', (byte) 'b', (byte) 'c', (number) 0 }
(byte~) main::$16 ← sizeof (byte[]) main::sb
(byte~) main::$16 ← sizeof (const byte[]) main::sb
(byte~) main::$17 ← (byte~) main::$16 / (const byte) SIZEOF_BYTE
(byte~) main::$18 ← (byte) '0' + (byte~) main::$17
*((const byte*) SCREEN + (byte) main::idx#5) ← (byte~) main::$18
@ -94,28 +92,25 @@ SYMBOL TABLE SSA
(byte) main::idx#5
(byte) main::idx#6
(const byte[]) main::sa = (string) "camelot"
(byte[]) main::sb
(const byte[]) main::sb = { (byte) 'a', (byte) 'b', (byte) 'c', (byte)(number) 0 }
(const byte) main::sz = (byte) 7
(word[3]) main::wa
(word[]) main::wb
(const word[]) main::wb = { (word)(number) 1, (word)(number) 2, (word)(number) 3, (word)(number) 4 }
Adding number conversion cast (unumber) 0 in (byte) main::idx#0 ← (number) 0
Adding number conversion cast (unumber) 2 in (number~) main::$6 ← (const byte) main::sz + (number) 2
Adding number conversion cast (unumber) main::$6 in (number~) main::$6 ← (const byte) main::sz + (unumber)(number) 2
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (word[]) main::wb ← (word[]){ (word)(number) 1, (word)(number) 2, (word)(number) 3, (word)(number) 4 }
Added casts to value list in (byte[]) main::sb ← (byte[]){ (byte) 'a', (byte) 'b', (byte) 'c', (byte)(number) 0 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (byte) main::idx#0 ← (unumber)(number) 0
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 0
Simplifying constant integer cast 2
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 3
Simplifying constant integer cast 4
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 2
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 2
@ -124,107 +119,102 @@ Inferred type updated to byte in (unumber~) main::$6 ← (const byte) main::sz +
Constant right-side identified [1] (byte[3]) main::ba ← { fill( 3, 0) }
Constant right-side identified [7] (word[3]) main::wa ← { fill( 3, 0) }
Constant right-side identified [13] (byte~) main::$6 ← (const byte) main::sz + (byte) 2
Constant right-side identified [26] (byte~) main::$13 ← sizeof (const byte[]) main::sa
Constant right-side identified [20] (byte~) main::$10 ← sizeof (const word[]) main::wb
Constant right-side identified [25] (byte~) main::$13 ← sizeof (const byte[]) main::sa
Constant right-side identified [30] (byte~) main::$16 ← sizeof (const byte[]) main::sb
Successful SSA optimization Pass2ConstantRValueConsolidation
Identified constant from value list (word[]) { (word) 1, (word) 2, (word) 3, (word) 4 }
Identified constant from value list (byte[]) { (byte) 'a', (byte) 'b', (byte) 'c', (byte) 0 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const byte) main::idx#0 = 0
Constant (const byte[3]) main::ba = { fill( 3, 0) }
Constant (const word[3]) main::wa = { fill( 3, 0) }
Constant (const byte) main::$6 = main::sz+2
Constant (const word[]) main::wb = { 1, 2, 3, 4 }
Constant (const byte) main::$10 = sizeof main::wb
Constant (const byte) main::$13 = sizeof main::sa
Constant (const byte[]) main::sb = { 'a', 'b', 'c', 0 }
Constant (const byte) main::$16 = sizeof main::sb
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte[main::$6]) main::bb = { fill( main::$6, 0) }
Successful SSA optimization Pass2ConstantIdentification
Simplifying expression containing zero SCREEN in [5] *((const byte*) SCREEN + (const byte) main::idx#0) ← (byte~) main::$2
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused variable (byte) main::idx#6 and assignment [28] (byte) main::idx#6 ← ++ (byte) main::idx#5
Eliminating unused variable (byte) main::idx#6 and assignment [26] (byte) main::idx#6 ← ++ (byte) main::idx#5
Successful SSA optimization PassNEliminateUnusedVars
Resolving array sizeof() sizeof (const word[]) main::wb
Resolving string sizeof() sizeof (const byte[]) main::sa
Resolving array sizeof() sizeof (const byte[]) main::sb
Successful SSA optimization PassNSizeOfSimplification
Constant right-side identified [0] (byte~) main::$0 ← sizeof (const byte[3]) main::ba
Constant right-side identified [4] (byte) main::idx#1 ← ++ (const byte) main::idx#0
Constant right-side identified [5] (byte~) main::$3 ← sizeof (const word[3]) main::wa
Constant right-side identified [10] (byte~) main::$7 ← sizeof (const byte[main::$6]) main::bb
Constant right-side identified [15] (byte~) main::$10 ← sizeof (const word[]) main::wb
Constant right-side identified [20] (byte~) main::$14 ← (const byte) main::$13 / (const byte) SIZEOF_BYTE
Constant right-side identified [24] (byte~) main::$16 ← sizeof (const byte[]) main::sb
Constant right-side identified [15] (byte~) main::$11 ← (const byte) main::$10 / (const byte) SIZEOF_WORD
Constant right-side identified [19] (byte~) main::$14 ← (const byte) main::$13 / (const byte) SIZEOF_BYTE
Constant right-side identified [23] (byte~) main::$17 ← (const byte) main::$16 / (const byte) SIZEOF_BYTE
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::$0 = sizeof main::ba
Constant (const byte) main::idx#1 = ++main::idx#0
Constant (const byte) main::$3 = sizeof main::wa
Constant (const byte) main::$7 = sizeof main::bb
Constant (const byte) main::$10 = sizeof main::wb
Constant (const byte) main::$11 = main::$10/SIZEOF_WORD
Constant (const byte) main::$14 = main::$13/SIZEOF_BYTE
Constant (const byte) main::$16 = sizeof main::sb
Constant (const byte) main::$17 = main::$16/SIZEOF_BYTE
Successful SSA optimization Pass2ConstantIdentification
Eliminating unused constant (const word[]) main::wb
Eliminating unused constant (const byte[]) main::sa
Eliminating unused constant (const byte[]) main::sb
Successful SSA optimization PassNEliminateUnusedVars
Adding number conversion cast (unumber) 4 in
Adding number conversion cast (unumber) 8 in
Adding number conversion cast (unumber) 4 in
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant integer cast 4
Simplifying constant integer cast 8
Simplifying constant integer cast 4
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) 8
Finalized unsigned number type (byte) 4
Successful SSA optimization PassNFinalizeNumberTypeConversions
Resolving array sizeof() sizeof (const byte[3]) main::ba
Resolving array sizeof() sizeof (const word[3]) main::wa
Resolving array sizeof() sizeof (const byte[main::$6]) main::bb
Resolving array sizeof() sizeof (const word[]) main::wb
Resolving array sizeof() sizeof (const byte[]) main::sb
Successful SSA optimization PassNSizeOfSimplification
Constant right-side identified [0] (byte~) main::$1 ← (const byte) main::$0 / (const byte) SIZEOF_BYTE
Constant right-side identified [3] (byte~) main::$4 ← (const byte) main::$3 / (const byte) SIZEOF_WORD
Constant right-side identified [6] (byte) main::idx#2 ← ++ (const byte) main::idx#1
Constant right-side identified [7] (byte~) main::$8 ← (const byte) main::$7 / (const byte) SIZEOF_BYTE
Constant right-side identified [11] (byte~) main::$11 ← (const byte) main::$10 / (const byte) SIZEOF_WORD
Constant right-side identified [15] (byte~) main::$15 ← (byte) '0' + (const byte) main::$14
Constant right-side identified [18] (byte~) main::$17 ← (const byte) main::$16 / (const byte) SIZEOF_BYTE
Constant right-side identified [11] (byte~) main::$12 ← (byte) '0' + (const byte) main::$11
Constant right-side identified [14] (byte~) main::$15 ← (byte) '0' + (const byte) main::$14
Constant right-side identified [17] (byte~) main::$18 ← (byte) '0' + (const byte) main::$17
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::$1 = main::$0/SIZEOF_BYTE
Constant (const byte) main::$4 = main::$3/SIZEOF_WORD
Constant (const byte) main::idx#2 = ++main::idx#1
Constant (const byte) main::$8 = main::$7/SIZEOF_BYTE
Constant (const byte) main::$11 = main::$10/SIZEOF_WORD
Constant (const byte) main::$12 = '0'+main::$11
Constant (const byte) main::$15 = '0'+main::$14
Constant (const byte) main::$17 = main::$16/SIZEOF_BYTE
Constant (const byte) main::$18 = '0'+main::$17
Successful SSA optimization Pass2ConstantIdentification
Eliminating unused constant (const byte[3]) main::ba
Eliminating unused constant (const word[3]) main::wa
Eliminating unused constant (const word[]) main::wb
Eliminating unused constant (const byte[]) main::sb
Eliminating unused constant (const byte[main::$6]) main::bb
Successful SSA optimization PassNEliminateUnusedVars
Adding number conversion cast (unumber) 3 in
Adding number conversion cast (unumber) 3 in
Adding number conversion cast (unumber) 4 in
Adding number conversion cast (unumber) 4 in
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant integer cast 3
Simplifying constant integer cast 3
Simplifying constant integer cast 4
Simplifying constant integer cast 4
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 3
Finalized unsigned number type (byte) 3
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) 4
Successful SSA optimization PassNFinalizeNumberTypeConversions
Constant right-side identified [0] (byte~) main::$2 ← (byte) '0' + (const byte) main::$1
Constant right-side identified [2] (byte~) main::$5 ← (byte) '0' + (const byte) main::$4
Constant right-side identified [4] (byte~) main::$9 ← (byte) '0' + (const byte) main::$8
Constant right-side identified [6] (byte) main::idx#3 ← ++ (const byte) main::idx#2
Constant right-side identified [7] (byte~) main::$12 ← (byte) '0' + (const byte) main::$11
Constant right-side identified [12] (byte~) main::$18 ← (byte) '0' + (const byte) main::$17
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::$2 = '0'+main::$1
Constant (const byte) main::$5 = '0'+main::$4
Constant (const byte) main::$9 = '0'+main::$8
Constant (const byte) main::idx#3 = ++main::idx#2
Constant (const byte) main::$12 = '0'+main::$11
Constant (const byte) main::$18 = '0'+main::$17
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [4] (byte) main::idx#4 ← ++ (const byte) main::idx#3
Successful SSA optimization Pass2ConstantRValueConsolidation

View File

@ -1,25 +1,24 @@
Fixing pointer array-indexing *((struct RadixInfo) main::info.values + (number) 1)
Fixing pointer array-indexing *((const word*) main::SCREEN + (number) 0)
Fixing pointer array-indexing *((word[]) RADIX_DECIMAL_VALUES + (number) 1)
Fixing pointer array-indexing *((const word[]) RADIX_DECIMAL_VALUES + (number) 1)
Fixing pointer array-indexing *((const word*) main::SCREEN + (number) 1)
Created struct value member variable (word*) main::info_values
Converted struct value to member variables (struct RadixInfo) main::info
Adding struct value list initializer (word*) main::info_values ← (word[]) RADIX_DECIMAL_VALUES
Adding struct value list initializer (word*) main::info_values ← (const word[]) RADIX_DECIMAL_VALUES
Replacing struct member reference (struct RadixInfo) main::info.values with member unwinding reference (word*) main::info_values
Identified constant variable (word*) main::info_values
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
(word[]) RADIX_DECIMAL_VALUES ← { (number) $2710, (number) $3e8, (number) $64, (number) $a }
to:@1
(void()) main()
main: scope:[main] from @1
(word*) main::info_values#0 ← (word[]) RADIX_DECIMAL_VALUES
(number~) main::$0 ← (number) 1 * (const byte) SIZEOF_WORD
(number~) main::$1 ← (number) 0 * (const byte) SIZEOF_WORD
*((const word*) main::SCREEN + (number~) main::$1) ← *((word*) main::info_values#0 + (number~) main::$0)
*((const word*) main::SCREEN + (number~) main::$1) ← *((const word*) main::info_values + (number~) main::$0)
(number~) main::$2 ← (number) 1 * (const byte) SIZEOF_WORD
*((const word*) main::SCREEN + (number~) main::$2) ← *((word[]) RADIX_DECIMAL_VALUES + (number~) main::$2)
*((const word*) main::SCREEN + (number~) main::$2) ← *((const word[]) RADIX_DECIMAL_VALUES + (number~) main::$2)
to:main::@return
main::@return: scope:[main] from main
return
@ -36,7 +35,7 @@ SYMBOL TABLE SSA
(label) @2
(label) @begin
(label) @end
(word[]) RADIX_DECIMAL_VALUES
(const word[]) RADIX_DECIMAL_VALUES = { (word)(number) $2710, (word)(number) $3e8, (word)(number) $64, (word)(number) $a }
(word*) RadixInfo::values
(const byte) SIZEOF_WORD = (byte) 2
(void()) main()
@ -45,8 +44,7 @@ SYMBOL TABLE SSA
(number~) main::$2
(label) main::@return
(const word*) main::SCREEN = (word*)(number) $400
(word*) main::info_values
(word*) main::info_values#0
(const word*) main::info_values = (const word[]) RADIX_DECIMAL_VALUES
Adding number conversion cast (unumber) 1 in (number~) main::$0 ← (number) 1 * (const byte) SIZEOF_WORD
Adding number conversion cast (unumber) main::$0 in (number~) main::$0 ← (unumber)(number) 1 * (const byte) SIZEOF_WORD
@ -55,13 +53,11 @@ Adding number conversion cast (unumber) main::$1 in (number~) main::$1 ← (unum
Adding number conversion cast (unumber) 1 in (number~) main::$2 ← (number) 1 * (const byte) SIZEOF_WORD
Adding number conversion cast (unumber) main::$2 in (number~) main::$2 ← (unumber)(number) 1 * (const byte) SIZEOF_WORD
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (word[]) RADIX_DECIMAL_VALUES ← (word[]){ (word)(number) $2710, (word)(number) $3e8, (word)(number) $64, (word)(number) $a }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Simplifying constant pointer cast (word*) 1024
Simplifying constant integer cast $2710
Simplifying constant integer cast $3e8
Simplifying constant integer cast $64
Simplifying constant integer cast $a
Simplifying constant pointer cast (word*) 1024
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast 1
@ -73,26 +69,21 @@ Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in (unumber~) main::$0 ← (byte) 1 * (const byte) SIZEOF_WORD
Inferred type updated to byte in (unumber~) main::$1 ← (byte) 0 * (const byte) SIZEOF_WORD
Inferred type updated to byte in (unumber~) main::$2 ← (byte) 1 * (const byte) SIZEOF_WORD
Constant right-side identified [2] (byte~) main::$0 ← (byte) 1 * (const byte) SIZEOF_WORD
Constant right-side identified [3] (byte~) main::$1 ← (byte) 0 * (const byte) SIZEOF_WORD
Constant right-side identified [5] (byte~) main::$2 ← (byte) 1 * (const byte) SIZEOF_WORD
Constant right-side identified [0] (byte~) main::$0 ← (byte) 1 * (const byte) SIZEOF_WORD
Constant right-side identified [1] (byte~) main::$1 ← (byte) 0 * (const byte) SIZEOF_WORD
Constant right-side identified [3] (byte~) main::$2 ← (byte) 1 * (const byte) SIZEOF_WORD
Successful SSA optimization Pass2ConstantRValueConsolidation
Identified constant from value list (word[]) { (word) $2710, (word) $3e8, (word) $64, (word) $a }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const word[]) RADIX_DECIMAL_VALUES = { $2710, $3e8, $64, $a }
Constant (const byte) main::$0 = 1*SIZEOF_WORD
Constant (const byte) main::$1 = 0*SIZEOF_WORD
Constant (const byte) main::$2 = 1*SIZEOF_WORD
Successful SSA optimization Pass2ConstantIdentification
Constant (const word*) main::info_values#0 = RADIX_DECIMAL_VALUES
Successful SSA optimization Pass2ConstantIdentification
Simplifying constant evaluating to zero (byte) 0*(const byte) SIZEOF_WORD in
Successful SSA optimization PassNSimplifyConstantZero
Simplifying expression containing zero main::SCREEN in [4] *((const word*) main::SCREEN + (const byte) main::$1) ← *((const word*) main::info_values#0 + (const byte) main::$0)
Simplifying expression containing zero main::SCREEN in [2] *((const word*) main::SCREEN + (const byte) main::$1) ← *((const word*) main::info_values + (const byte) main::$0)
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused constant (const byte) main::$1
Successful SSA optimization PassNEliminateUnusedVars
Constant inlined main::info_values#0 = (const word[]) RADIX_DECIMAL_VALUES
Constant inlined main::info_values = (const word[]) RADIX_DECIMAL_VALUES
Constant inlined main::$2 = (byte) 1*(const byte) SIZEOF_WORD
Constant inlined main::$0 = (byte) 1*(const byte) SIZEOF_WORD
Successful SSA optimization Pass2ConstantInlining
@ -138,7 +129,6 @@ main::@return: scope:[main] from main
VARIABLE REGISTER WEIGHTS
(word*) RadixInfo::values
(void()) main()
(word*) main::info_values
Initial phi equivalence classes
Complete equivalence classes
@ -276,7 +266,6 @@ FINAL SYMBOL TABLE
(void()) main()
(label) main::@return
(const word*) main::SCREEN = (word*) 1024
(word*) main::info_values

View File

@ -7,5 +7,4 @@
(void()) main()
(label) main::@return
(const word*) main::SCREEN = (word*) 1024
(word*) main::info_values

View File

@ -263,11 +263,11 @@ ultoa_append: {
}
// The digits used for numbers
DIGITS: .text "0123456789abcdef"
// Values of decimal digits
RADIX_DECIMAL_VALUES_LONG: .dword $3b9aca00, $5f5e100, $989680, $f4240, $186a0, $2710, $3e8, $64, $a
jesper_initials: .text "jg"
.byte 0
henry_initials: .text "hg"
.byte 0
// Values of decimal digits
RADIX_DECIMAL_VALUES_LONG: .dword $3b9aca00, $5f5e100, $989680, $f4240, $186a0, $2710, $3e8, $64, $a
// Digits used for storing the decimal word
decimal_digits_long: .fill $b, 0

View File

@ -44,6 +44,7 @@ Culled Empty Block (label) @6
Culled Empty Block (label) @7
Culled Empty Block (label) @8
Culled Empty Block (label) @9
Culled Empty Block (label) @10
Culled Empty Block (label) ultoa::@13
Culled Empty Block (label) ultoa::@5
Culled Empty Block (label) ultoa::@14
@ -91,12 +92,6 @@ Culled Empty Block (label) @37
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
to:@10
@10: scope:[] from @begin
(dword[]) RADIX_BINARY_VALUES_LONG ← { (number) $80000000, (number) $40000000, (number) $20000000, (number) $10000000, (number) $8000000, (number) $4000000, (number) $2000000, (number) $1000000, (number) $800000, (number) $400000, (number) $200000, (number) $100000, (number) $80000, (number) $40000, (number) $20000, (number) $10000, (number) $8000, (number) $4000, (number) $2000, (number) $1000, (number) $800, (number) $400, (number) $200, (number) $100, (number) $80, (number) $40, (number) $20, (number) $10, (number) 8, (number) 4, (number) 2 }
(dword[]) RADIX_OCTAL_VALUES_LONG ← { (number) $40000000, (number) $8000000, (number) $1000000, (number) $200000, (number) $40000, (number) $8000, (number) $1000, (number) $200, (number) $40, (number) 8 }
(dword[]) RADIX_DECIMAL_VALUES_LONG ← { (number) $3b9aca00, (number) $5f5e100, (number) $989680, (number) $f4240, (number) $186a0, (number) $2710, (number) $3e8, (number) $64, (number) $a }
(dword[]) RADIX_HEXADECIMAL_VALUES_LONG ← { (number) $10000000, (number) $1000000, (number) $100000, (number) $10000, (number) $1000, (number) $100, (number) $10 }
to:@12
(void()) ultoa((dword) ultoa::value , (byte*) ultoa::buffer , (byte) ultoa::radix)
@ -113,7 +108,7 @@ ultoa::@1: scope:[ultoa] from ultoa
(byte*) ultoa::buffer#17 ← phi( ultoa/(byte*) ultoa::buffer#21 )
(dword) ultoa::value#8 ← phi( ultoa/(dword) ultoa::value#12 )
(byte) ultoa::max_digits#1 ← (number) $a
(dword*) ultoa::digit_values#1 ← (dword[]) RADIX_DECIMAL_VALUES_LONG
(dword*) ultoa::digit_values#1 ← (const dword[]) RADIX_DECIMAL_VALUES_LONG
to:ultoa::@8
ultoa::@9: scope:[ultoa] from ultoa
(dword) ultoa::value#13 ← phi( ultoa/(dword) ultoa::value#12 )
@ -126,7 +121,7 @@ ultoa::@2: scope:[ultoa] from ultoa::@9
(byte*) ultoa::buffer#18 ← phi( ultoa::@9/(byte*) ultoa::buffer#16 )
(dword) ultoa::value#9 ← phi( ultoa::@9/(dword) ultoa::value#13 )
(byte) ultoa::max_digits#2 ← (number) 8
(dword*) ultoa::digit_values#2 ← (dword[]) RADIX_HEXADECIMAL_VALUES_LONG
(dword*) ultoa::digit_values#2 ← (const dword[]) RADIX_HEXADECIMAL_VALUES_LONG
to:ultoa::@8
ultoa::@10: scope:[ultoa] from ultoa::@9
(dword) ultoa::value#14 ← phi( ultoa::@9/(dword) ultoa::value#13 )
@ -139,7 +134,7 @@ ultoa::@3: scope:[ultoa] from ultoa::@10
(byte*) ultoa::buffer#19 ← phi( ultoa::@10/(byte*) ultoa::buffer#13 )
(dword) ultoa::value#10 ← phi( ultoa::@10/(dword) ultoa::value#14 )
(byte) ultoa::max_digits#3 ← (number) $b
(dword*) ultoa::digit_values#3 ← (dword[]) RADIX_OCTAL_VALUES_LONG
(dword*) ultoa::digit_values#3 ← (const dword[]) RADIX_OCTAL_VALUES_LONG
to:ultoa::@8
ultoa::@11: scope:[ultoa] from ultoa::@10
(dword) ultoa::value#15 ← phi( ultoa::@10/(dword) ultoa::value#14 )
@ -152,7 +147,7 @@ ultoa::@4: scope:[ultoa] from ultoa::@11
(byte*) ultoa::buffer#20 ← phi( ultoa::@11/(byte*) ultoa::buffer#10 )
(dword) ultoa::value#11 ← phi( ultoa::@11/(dword) ultoa::value#15 )
(byte) ultoa::max_digits#4 ← (number) $20
(dword*) ultoa::digit_values#4 ← (dword[]) RADIX_BINARY_VALUES_LONG
(dword*) ultoa::digit_values#4 ← (const dword[]) RADIX_BINARY_VALUES_LONG
to:ultoa::@8
ultoa::@12: scope:[ultoa] from ultoa::@11
(byte*) ultoa::buffer#6 ← phi( ultoa::@11/(byte*) ultoa::buffer#10 )
@ -277,7 +272,7 @@ ultoa_append::@return: scope:[ultoa_append] from ultoa_append::@3
(dword) ultoa_append::return#2 ← (dword) ultoa_append::return#4
return
to:@return
@12: scope:[] from @10
@12: scope:[] from @begin
(byte*) print_screen#0 ← ((byte*)) (number) $400
(byte*) print_line_cursor#0 ← (byte*) print_screen#0
(byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0
@ -463,7 +458,6 @@ print_person::@return: scope:[print_person] from print_person::@4
@end: scope:[] from @39
SYMBOL TABLE SSA
(label) @10
(label) @12
(label) @26
(label) @38
@ -481,10 +475,10 @@ SYMBOL TABLE SSA
(const byte) RADIX::DECIMAL = (number) $a
(const byte) RADIX::HEXADECIMAL = (number) $10
(const byte) RADIX::OCTAL = (number) 8
(dword[]) RADIX_BINARY_VALUES_LONG
(dword[]) RADIX_DECIMAL_VALUES_LONG
(dword[]) RADIX_HEXADECIMAL_VALUES_LONG
(dword[]) RADIX_OCTAL_VALUES_LONG
(const dword[]) RADIX_BINARY_VALUES_LONG = { (dword)(number) $80000000, (dword)(number) $40000000, (dword)(number) $20000000, (dword)(number) $10000000, (dword)(number) $8000000, (dword)(number) $4000000, (dword)(number) $2000000, (dword)(number) $1000000, (dword)(number) $800000, (dword)(number) $400000, (dword)(number) $200000, (dword)(number) $100000, (dword)(number) $80000, (dword)(number) $40000, (dword)(number) $20000, (dword)(number) $10000, (dword)(number) $8000, (dword)(number) $4000, (dword)(number) $2000, (dword)(number) $1000, (dword)(number) $800, (dword)(number) $400, (dword)(number) $200, (dword)(number) $100, (dword)(number) $80, (dword)(number) $40, (dword)(number) $20, (dword)(number) $10, (dword)(number) 8, (dword)(number) 4, (dword)(number) 2 }
(const dword[]) RADIX_DECIMAL_VALUES_LONG = { (dword)(number) $3b9aca00, (dword)(number) $5f5e100, (dword)(number) $989680, (dword)(number) $f4240, (dword)(number) $186a0, (dword)(number) $2710, (dword)(number) $3e8, (dword)(number) $64, (dword)(number) $a }
(const dword[]) RADIX_HEXADECIMAL_VALUES_LONG = { (dword)(number) $10000000, (dword)(number) $1000000, (dword)(number) $100000, (dword)(number) $10000, (dword)(number) $1000, (dword)(number) $100, (dword)(number) $10 }
(const dword[]) RADIX_OCTAL_VALUES_LONG = { (dword)(number) $40000000, (dword)(number) $8000000, (dword)(number) $1000000, (dword)(number) $200000, (dword)(number) $40000, (dword)(number) $8000, (dword)(number) $1000, (dword)(number) $200, (dword)(number) $40, (dword)(number) 8 }
(const byte) SIZEOF_DWORD = (byte) 4
(byte[$b]) decimal_digits_long
(const dword) henry_id = (dword) $4466d
@ -784,11 +778,6 @@ Adding number conversion cast (unumber) 0 in (byte) ultoa_append::digit#0 ← (n
Adding number conversion cast (unumber) 0 in (bool~) print_str::$0 ← (number) 0 != *((byte*) print_str::str#3)
Adding number conversion cast (unumber) $28 in (byte*~) print_ln::$0 ← (byte*) print_line_cursor#9 + (number) $28
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (dword[]) RADIX_BINARY_VALUES_LONG ← (dword[]){ (dword)(number) $80000000, (dword)(number) $40000000, (dword)(number) $20000000, (dword)(number) $10000000, (dword)(number) $8000000, (dword)(number) $4000000, (dword)(number) $2000000, (dword)(number) $1000000, (dword)(number) $800000, (dword)(number) $400000, (dword)(number) $200000, (dword)(number) $100000, (dword)(number) $80000, (dword)(number) $40000, (dword)(number) $20000, (dword)(number) $10000, (dword)(number) $8000, (dword)(number) $4000, (dword)(number) $2000, (dword)(number) $1000, (dword)(number) $800, (dword)(number) $400, (dword)(number) $200, (dword)(number) $100, (dword)(number) $80, (dword)(number) $40, (dword)(number) $20, (dword)(number) $10, (dword)(number) 8, (dword)(number) 4, (dword)(number) 2 }
Added casts to value list in (dword[]) RADIX_OCTAL_VALUES_LONG ← (dword[]){ (dword)(number) $40000000, (dword)(number) $8000000, (dword)(number) $1000000, (dword)(number) $200000, (dword)(number) $40000, (dword)(number) $8000, (dword)(number) $1000, (dword)(number) $200, (dword)(number) $40, (dword)(number) 8 }
Added casts to value list in (dword[]) RADIX_DECIMAL_VALUES_LONG ← (dword[]){ (dword)(number) $3b9aca00, (dword)(number) $5f5e100, (dword)(number) $989680, (dword)(number) $f4240, (dword)(number) $186a0, (dword)(number) $2710, (dword)(number) $3e8, (dword)(number) $64, (dword)(number) $a }
Added casts to value list in (dword[]) RADIX_HEXADECIMAL_VALUES_LONG ← (dword[]){ (dword)(number) $10000000, (dword)(number) $1000000, (dword)(number) $100000, (dword)(number) $10000, (dword)(number) $1000, (dword)(number) $100, (dword)(number) $10 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (byte) ultoa::max_digits#1 ← (unumber)(number) $a
Inlining cast (byte) ultoa::max_digits#2 ← (unumber)(number) 8
Inlining cast (byte) ultoa::max_digits#3 ← (unumber)(number) $b
@ -964,36 +953,31 @@ Identical Phi Values (byte*) print_char_cursor#15 (byte*) print_line_cursor#1
Identical Phi Values (byte*) print_char_cursor#17 (byte*) print_char_cursor#10
Identical Phi Values (byte*) print_line_cursor#17 (byte*) print_line_cursor#13
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) ultoa::$0 [8] if((byte) ultoa::radix#0==(const byte) DECIMAL) goto ultoa::@1
Simple Condition (bool~) ultoa::$1 [14] if((byte) ultoa::radix#0==(const byte) HEXADECIMAL) goto ultoa::@2
Simple Condition (bool~) ultoa::$2 [20] if((byte) ultoa::radix#0==(const byte) OCTAL) goto ultoa::@3
Simple Condition (bool~) ultoa::$3 [26] if((byte) ultoa::radix#0==(const byte) BINARY) goto ultoa::@4
Simple Condition (bool~) ultoa::$6 [45] if((byte) ultoa::digit#2<(byte~) ultoa::$5) goto ultoa::@19
Simple Condition (bool~) ultoa_append::$0 [75] if((dword) ultoa_append::value#2>=(dword) ultoa_append::sub#0) goto ultoa_append::@2
Simple Condition (bool~) print_str::$0 [91] if((byte) 0!=*((byte*) print_str::str#3)) goto print_str::@2
Simple Condition (bool~) print_ln::$1 [104] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#18) goto print_ln::@1
Simple Condition (bool~) ultoa::$0 [4] if((byte) ultoa::radix#0==(const byte) DECIMAL) goto ultoa::@1
Simple Condition (bool~) ultoa::$1 [10] if((byte) ultoa::radix#0==(const byte) HEXADECIMAL) goto ultoa::@2
Simple Condition (bool~) ultoa::$2 [16] if((byte) ultoa::radix#0==(const byte) OCTAL) goto ultoa::@3
Simple Condition (bool~) ultoa::$3 [22] if((byte) ultoa::radix#0==(const byte) BINARY) goto ultoa::@4
Simple Condition (bool~) ultoa::$6 [41] if((byte) ultoa::digit#2<(byte~) ultoa::$5) goto ultoa::@19
Simple Condition (bool~) ultoa_append::$0 [71] if((dword) ultoa_append::value#2>=(dword) ultoa_append::sub#0) goto ultoa_append::@2
Simple Condition (bool~) print_str::$0 [87] if((byte) 0!=*((byte*) print_str::str#3)) goto print_str::@2
Simple Condition (bool~) print_ln::$1 [100] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#18) goto print_ln::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Rewriting ! if()-condition to reversed if() [51] (bool~) ultoa::$9 ← ! (bool~) ultoa::$8
Rewriting || if()-condition to two if()s [50] (bool~) ultoa::$8 ← (byte) ultoa::started#2 || (bool~) ultoa::$7
Rewriting ! if()-condition to reversed if() [47] (bool~) ultoa::$9 ← ! (bool~) ultoa::$8
Rewriting || if()-condition to two if()s [46] (bool~) ultoa::$8 ← (byte) ultoa::started#2 || (bool~) ultoa::$7
Successful SSA optimization Pass2ConditionalAndOrRewriting
Warning! Adding boolean cast to non-boolean condition (byte) ultoa::started#2
Constant right-side identified [112] (byte[$b]) decimal_digits_long ← { fill( $b, 0) }
Constant right-side identified [108] (byte[$b]) decimal_digits_long ← { fill( $b, 0) }
Successful SSA optimization Pass2ConstantRValueConsolidation
Identified constant from value list (dword[]) { (dword) $80000000, (dword) $40000000, (dword) $20000000, (dword) $10000000, (dword) $8000000, (dword) $4000000, (dword) $2000000, (dword) $1000000, (dword) $800000, (dword) $400000, (dword) $200000, (dword) $100000, (dword) $80000, (dword) $40000, (dword) $20000, (dword) $10000, (dword) $8000, (dword) $4000, (dword) $2000, (dword) $1000, (dword) $800, (dword) $400, (dword) $200, (dword) $100, (dword) $80, (dword) $40, (dword) $20, (dword) $10, (dword) 8, (dword) 4, (dword) 2 }
Identified constant from value list (dword[]) { (dword) $40000000, (dword) $8000000, (dword) $1000000, (dword) $200000, (dword) $40000, (dword) $8000, (dword) $1000, (dword) $200, (dword) $40, (dword) 8 }
Identified constant from value list (dword[]) { (dword) $3b9aca00, (dword) $5f5e100, (dword) $989680, (dword) $f4240, (dword) $186a0, (dword) $2710, (dword) $3e8, (dword) $64, (dword) $a }
Identified constant from value list (dword[]) { (dword) $10000000, (dword) $1000000, (dword) $100000, (dword) $10000, (dword) $1000, (dword) $100, (dword) $10 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const dword[]) RADIX_BINARY_VALUES_LONG = { $80000000, $40000000, $20000000, $10000000, $8000000, $4000000, $2000000, $1000000, $800000, $400000, $200000, $100000, $80000, $40000, $20000, $10000, $8000, $4000, $2000, $1000, $800, $400, $200, $100, $80, $40, $20, $10, 8, 4, 2 }
Constant (const dword[]) RADIX_OCTAL_VALUES_LONG = { $40000000, $8000000, $1000000, $200000, $40000, $8000, $1000, $200, $40, 8 }
Constant (const dword[]) RADIX_DECIMAL_VALUES_LONG = { $3b9aca00, $5f5e100, $989680, $f4240, $186a0, $2710, $3e8, $64, $a }
Constant (const dword[]) RADIX_HEXADECIMAL_VALUES_LONG = { $10000000, $1000000, $100000, $10000, $1000, $100, $10 }
Constant (const byte) ultoa::max_digits#0 = 0
Constant (const dword*) ultoa::digit_values#0 = (dword*) 0
Constant (const byte) ultoa::max_digits#1 = $a
Constant (const dword*) ultoa::digit_values#1 = RADIX_DECIMAL_VALUES_LONG
Constant (const byte) ultoa::max_digits#2 = 8
Constant (const dword*) ultoa::digit_values#2 = RADIX_HEXADECIMAL_VALUES_LONG
Constant (const byte) ultoa::max_digits#3 = $b
Constant (const dword*) ultoa::digit_values#3 = RADIX_OCTAL_VALUES_LONG
Constant (const byte) ultoa::max_digits#4 = $20
Constant (const dword*) ultoa::digit_values#4 = RADIX_BINARY_VALUES_LONG
Constant (const byte) ultoa::started#0 = 0
Constant (const byte) ultoa::digit#0 = 0
Constant (const byte) ultoa::started#1 = 1
@ -1007,17 +991,13 @@ Constant (const dword) print_person::person_id#1 = henry_id
Constant (const byte[3]) print_person::person_initials#1 = henry_initials
Constant (const byte) print_char::ch#0 = ' '
Successful SSA optimization Pass2ConstantIdentification
Constant (const dword*) ultoa::digit_values#1 = RADIX_DECIMAL_VALUES_LONG
Constant (const dword*) ultoa::digit_values#2 = RADIX_HEXADECIMAL_VALUES_LONG
Constant (const dword*) ultoa::digit_values#3 = RADIX_OCTAL_VALUES_LONG
Constant (const dword*) ultoa::digit_values#4 = RADIX_BINARY_VALUES_LONG
Constant (const byte*) ultoa::buffer#5 = decimal_digits_long
Constant (const byte*) print_str::str#1 = decimal_digits_long
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [8] if((const byte) ultoa::radix#0==(const byte) DECIMAL) goto ultoa::@1
if() condition always false - eliminating [14] if((const byte) ultoa::radix#0==(const byte) HEXADECIMAL) goto ultoa::@2
if() condition always false - eliminating [20] if((const byte) ultoa::radix#0==(const byte) OCTAL) goto ultoa::@3
if() condition always false - eliminating [26] if((const byte) ultoa::radix#0==(const byte) BINARY) goto ultoa::@4
if() condition always true - replacing block destination [4] if((const byte) ultoa::radix#0==(const byte) DECIMAL) goto ultoa::@1
if() condition always false - eliminating [10] if((const byte) ultoa::radix#0==(const byte) HEXADECIMAL) goto ultoa::@2
if() condition always false - eliminating [16] if((const byte) ultoa::radix#0==(const byte) OCTAL) goto ultoa::@3
if() condition always false - eliminating [22] if((const byte) ultoa::radix#0==(const byte) BINARY) goto ultoa::@4
Successful SSA optimization Pass2ConstantIfs
Eliminating unused constant (const byte) BINARY
Eliminating unused constant (const byte) OCTAL
@ -1062,10 +1042,10 @@ Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) ultoa::$5 = ultoa::max_digits#1-1
Successful SSA optimization Pass2ConstantIdentification
Eliminating unused constant (const byte) ultoa::max_digits#2
Eliminating unused constant (const byte) ultoa::max_digits#3
Eliminating unused constant (const byte) ultoa::max_digits#4
Eliminating unused constant (const dword*) ultoa::digit_values#2
Eliminating unused constant (const byte) ultoa::max_digits#3
Eliminating unused constant (const dword*) ultoa::digit_values#3
Eliminating unused constant (const byte) ultoa::max_digits#4
Eliminating unused constant (const dword*) ultoa::digit_values#4
Successful SSA optimization PassNEliminateUnusedVars
Eliminating unused constant (const dword[]) RADIX_BINARY_VALUES_LONG
@ -1104,7 +1084,6 @@ Successful SSA optimization PassNEliminateUnusedVars
Added new block during phi lifting ultoa::@28(between ultoa::@27 and ultoa::@21)
Added new block during phi lifting print_ln::@3(between print_ln::@1 and print_ln::@1)
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @10
Adding NOP phi() at start of @12
Adding NOP phi() at start of @26
Adding NOP phi() at start of @38
@ -1120,39 +1099,38 @@ Adding NOP phi() at start of print_dword_decimal::@2
Adding NOP phi() at start of ultoa
Adding NOP phi() at start of ultoa::@1
CALL GRAPH
Calls in [] to main:5
Calls in [main] to print_person:9 print_person:12
Calls in [print_person] to print_dword_decimal:17 print_char:19 print_str:23 print_ln:25
Calls in [print_dword_decimal] to ultoa:50 print_str:52
Calls in [ultoa] to ultoa_append:81
Calls in [] to main:4
Calls in [main] to print_person:8 print_person:11
Calls in [print_person] to print_dword_decimal:16 print_char:18 print_str:22 print_ln:24
Calls in [print_dword_decimal] to ultoa:49 print_str:51
Calls in [ultoa] to ultoa_append:80
Created 18 initial phi equivalence classes
Not coalescing [10] print_char_cursor#48 ← print_line_cursor#1
Coalesced [11] print_line_cursor#28 ← print_line_cursor#1
Coalesced [21] print_str::str#6 ← print_str::str#2
Coalesced [22] print_char_cursor#45 ← print_char_cursor#25
Coalesced [28] print_line_cursor#26 ← print_line_cursor#20
Coalesced (already) [34] print_line_cursor#27 ← print_line_cursor#1
Coalesced [36] print_str::str#7 ← print_str::str#5
Coalesced [37] print_char_cursor#46 ← print_char_cursor#41
Coalesced [44] print_str::str#8 ← print_str::str#0
Coalesced [45] print_char_cursor#47 ← print_char_cursor#1
Coalesced [51] print_char_cursor#44 ← print_char_cursor#39
Coalesced [57] ultoa::value#17 ← ultoa::value#1
Coalesced [69] ultoa::value#18 ← ultoa::value#2
Coalesced [70] ultoa::started#6 ← ultoa::started#2
Coalesced [71] ultoa::buffer#23 ← ultoa::buffer#11
Coalesced [74] ultoa::digit#7 ← ultoa::digit#1
Coalesced (already) [75] ultoa::value#16 ← ultoa::value#6
Coalesced (already) [76] ultoa::started#5 ← ultoa::started#4
Coalesced (already) [77] ultoa::buffer#22 ← ultoa::buffer#14
Coalesced [85] ultoa::value#19 ← ultoa::value#0
Coalesced [86] ultoa::buffer#24 ← ultoa::buffer#4
Coalesced [87] ultoa_append::value#6 ← ultoa_append::value#0
Coalesced [94] ultoa_append::value#7 ← ultoa_append::value#1
Coalesced [95] ultoa_append::digit#5 ← ultoa_append::digit#1
Not coalescing [9] print_char_cursor#48 ← print_line_cursor#1
Coalesced [10] print_line_cursor#28 ← print_line_cursor#1
Coalesced [20] print_str::str#6 ← print_str::str#2
Coalesced [21] print_char_cursor#45 ← print_char_cursor#25
Coalesced [27] print_line_cursor#26 ← print_line_cursor#20
Coalesced (already) [33] print_line_cursor#27 ← print_line_cursor#1
Coalesced [35] print_str::str#7 ← print_str::str#5
Coalesced [36] print_char_cursor#46 ← print_char_cursor#41
Coalesced [43] print_str::str#8 ← print_str::str#0
Coalesced [44] print_char_cursor#47 ← print_char_cursor#1
Coalesced [50] print_char_cursor#44 ← print_char_cursor#39
Coalesced [56] ultoa::value#17 ← ultoa::value#1
Coalesced [68] ultoa::value#18 ← ultoa::value#2
Coalesced [69] ultoa::started#6 ← ultoa::started#2
Coalesced [70] ultoa::buffer#23 ← ultoa::buffer#11
Coalesced [73] ultoa::digit#7 ← ultoa::digit#1
Coalesced (already) [74] ultoa::value#16 ← ultoa::value#6
Coalesced (already) [75] ultoa::started#5 ← ultoa::started#4
Coalesced (already) [76] ultoa::buffer#22 ← ultoa::buffer#14
Coalesced [84] ultoa::value#19 ← ultoa::value#0
Coalesced [85] ultoa::buffer#24 ← ultoa::buffer#4
Coalesced [86] ultoa_append::value#6 ← ultoa_append::value#0
Coalesced [93] ultoa_append::value#7 ← ultoa_append::value#1
Coalesced [94] ultoa_append::digit#5 ← ultoa_append::digit#1
Coalesced down to 11 phi equivalence classes
Culled Empty Block (label) @10
Culled Empty Block (label) @12
Culled Empty Block (label) @26
Culled Empty Block (label) @39
@ -2034,12 +2012,12 @@ ultoa_append: {
// File Data
// The digits used for numbers
DIGITS: .text "0123456789abcdef"
// Values of decimal digits
RADIX_DECIMAL_VALUES_LONG: .dword $3b9aca00, $5f5e100, $989680, $f4240, $186a0, $2710, $3e8, $64, $a
jesper_initials: .text "jg"
.byte 0
henry_initials: .text "hg"
.byte 0
// Values of decimal digits
RADIX_DECIMAL_VALUES_LONG: .dword $3b9aca00, $5f5e100, $989680, $f4240, $186a0, $2710, $3e8, $64, $a
// Digits used for storing the decimal word
decimal_digits_long: .fill $b, 0
@ -2635,12 +2613,12 @@ ultoa_append: {
// File Data
// The digits used for numbers
DIGITS: .text "0123456789abcdef"
// Values of decimal digits
RADIX_DECIMAL_VALUES_LONG: .dword $3b9aca00, $5f5e100, $989680, $f4240, $186a0, $2710, $3e8, $64, $a
jesper_initials: .text "jg"
.byte 0
henry_initials: .text "hg"
.byte 0
// Values of decimal digits
RADIX_DECIMAL_VALUES_LONG: .dword $3b9aca00, $5f5e100, $989680, $f4240, $186a0, $2710, $3e8, $64, $a
// Digits used for storing the decimal word
decimal_digits_long: .fill $b, 0
@ -3308,12 +3286,12 @@ ultoa_append: {
// File Data
// The digits used for numbers
DIGITS: .text "0123456789abcdef"
// Values of decimal digits
RADIX_DECIMAL_VALUES_LONG: .dword $3b9aca00, $5f5e100, $989680, $f4240, $186a0, $2710, $3e8, $64, $a
jesper_initials: .text "jg"
.byte 0
henry_initials: .text "hg"
.byte 0
// Values of decimal digits
RADIX_DECIMAL_VALUES_LONG: .dword $3b9aca00, $5f5e100, $989680, $f4240, $186a0, $2710, $3e8, $64, $a
// Digits used for storing the decimal word
decimal_digits_long: .fill $b, 0

View File

@ -10,7 +10,7 @@ Culled Empty Block (label) main::@8
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
(struct Setting[]) settings ← { { (number) 0, (byte) 'a' }, { (number) 1, (byte) 'b' }, { (number) 0, (byte) 'c' } }
(struct Setting[]) settings ← { (struct Setting){ (byte)(number) 0, (byte) 'a' }, (struct Setting){ (byte)(number) 1, (byte) 'b' }, (struct Setting){ (byte)(number) 0, (byte) 'c' } }
to:@1
(void()) main()
@ -116,8 +116,6 @@ SYMBOL TABLE SSA
Adding number conversion cast (unumber) 0 in (byte) main::idx#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (bool~) main::$9 ← (number) 0 != *((byte*) main::$7)
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (struct Setting[]) settings ← (struct Setting[]){ (struct Setting){ (byte)(number) 0, (byte) 'a' }, (struct Setting){ (byte)(number) 1, (byte) 'b' }, (struct Setting){ (byte)(number) 0, (byte) 'c' } }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (byte) main::idx#0 ← (unumber)(number) 0
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024

View File

@ -1,4 +1,4 @@
Fixing pointer array-indexing *((word[]) seq + (number) 0)
Fixing pointer array-indexing *((const word[]) seq + (number) 0)
Fixing pointer array-indexing *((struct Setting[]) settings + (number) 0)
Fixing pointer array-indexing *(*((struct Setting*) main::setting).buf + (byte) main::i)
Fixing pointer array-indexing *((const word*) SCREEN + (byte) main::i)
@ -12,10 +12,9 @@ Culled Empty Block (label) main::@6
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
(word[]) seq ← { (number) 1, (number) 2, (number) 3 }
(number~) $1 ← (number) 0 * (const byte) SIZEOF_WORD
(word*~) $0 ← & *((word[]) seq + (number~) $1)
(struct Setting[]) settings ← { { (number) 3, (word*~) $0 } }
(word*~) $0 ← & *((const word[]) seq + (number~) $1)
(struct Setting[]) settings ← { (struct Setting){ (byte)(number) 3, (word*)(word*~) $0 } }
to:@1
(void()) main()
@ -83,7 +82,7 @@ SYMBOL TABLE SSA
(struct Setting*) main::setting#0
(struct Setting*) main::setting#1
(struct Setting*) main::setting#2
(word[]) seq
(const word[]) seq = { (word)(number) 1, (word)(number) 2, (word)(number) 3 }
(struct Setting[]) settings
Adding number conversion cast (unumber) 0 in (number~) $1 ← (number) 0 * (const byte) SIZEOF_WORD
@ -92,9 +91,6 @@ Adding number conversion cast (unumber) 0 in (number~) main::$2 ← (number) 0 *
Adding number conversion cast (unumber) main::$2 in (number~) main::$2 ← (unumber)(number) 0 * (const byte) SIZEOF_STRUCT_SETTING
Adding number conversion cast (unumber) 0 in (byte) main::i#0 ← (number) 0
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (word[]) seq ← (word[]){ (word)(number) 1, (word)(number) 2, (word)(number) 3 }
Added casts to value list in (struct Setting[]) settings ← (struct Setting[]){ (struct Setting){ (byte)(number) 3, (word*~) $0 } }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (byte) main::i#0 ← (unumber)(number) 0
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (word*) 1024
@ -103,6 +99,7 @@ Simplifying constant integer cast 2
Simplifying constant integer cast 3
Simplifying constant integer cast 0
Simplifying constant integer cast 3
Simplifying constant integer cast (word*~) $0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
@ -118,31 +115,28 @@ Alias (struct Setting*) main::setting#1 = (struct Setting*) main::setting#2
Successful SSA optimization Pass2AliasElimination
Identical Phi Values (struct Setting*) main::setting#1 (struct Setting*) main::setting#0
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) main::$1 [11] if((byte) main::i#2<*((byte*) main::$4)) goto main::@2
Simple Condition (bool~) main::$1 [10] if((byte) main::i#2<*((byte*) main::$4)) goto main::@2
Successful SSA optimization Pass2ConditionalJumpSimplification
Rewriting array member address-of to pointer addition [2] (word*~) $0 ← (word[]) seq + (byte~) $1
Rewriting array member address-of to pointer addition [5] (struct Setting*) main::setting#0 ← (struct Setting[]) settings + (byte~) main::$2
Rewriting array member address-of to pointer addition [1] (word*~) $0 ← (const word[]) seq + (byte~) $1
Rewriting array member address-of to pointer addition [4] (struct Setting*) main::setting#0 ← (struct Setting[]) settings + (byte~) main::$2
Successful SSA optimization PassNArrayElementAddressOfRewriting
Constant right-side identified [1] (byte~) $1 ← (byte) 0 * (const byte) SIZEOF_WORD
Constant right-side identified [4] (byte~) main::$2 ← (byte) 0 * (const byte) SIZEOF_STRUCT_SETTING
Constant right-side identified [0] (byte~) $1 ← (byte) 0 * (const byte) SIZEOF_WORD
Constant right-side identified [3] (byte~) main::$2 ← (byte) 0 * (const byte) SIZEOF_STRUCT_SETTING
Successful SSA optimization Pass2ConstantRValueConsolidation
Identified constant from value list (word[]) { (word) 1, (word) 2, (word) 3 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const word[]) seq = { 1, 2, 3 }
Constant (const byte) $1 = 0*SIZEOF_WORD
Constant (const byte) main::$2 = 0*SIZEOF_STRUCT_SETTING
Constant (const byte) main::i#0 = 0
Successful SSA optimization Pass2ConstantIdentification
Converting *(pointer+n) to pointer[n] [11] if((byte) main::i#2<*((byte*) main::$4)) goto main::@2 -- *((byte*)main::setting#0 + OFFSET_STRUCT_SETTING_LEN)
Converting *(pointer+n) to pointer[n] [15] *((const word*) SCREEN + (byte~) main::$3) ← *(*((word**) main::$5) + (byte~) main::$3) -- *((word**)main::setting#0 + OFFSET_STRUCT_SETTING_BUF)
Converting *(pointer+n) to pointer[n] [10] if((byte) main::i#2<*((byte*) main::$4)) goto main::@2 -- *((byte*)main::setting#0 + OFFSET_STRUCT_SETTING_LEN)
Converting *(pointer+n) to pointer[n] [14] *((const word*) SCREEN + (byte~) main::$3) ← *(*((word**) main::$5) + (byte~) main::$3) -- *((word**)main::setting#0 + OFFSET_STRUCT_SETTING_BUF)
Successful SSA optimization Pass2InlineDerefIdx
Simplifying constant evaluating to zero (byte) 0*(const byte) SIZEOF_STRUCT_SETTING in
Simplifying constant evaluating to zero (byte) 0*(const byte) SIZEOF_WORD in
Successful SSA optimization PassNSimplifyConstantZero
Simplifying expression containing zero seq in [2] (word*~) $0 ← (const word[]) seq + (const byte) $1
Simplifying expression containing zero settings in [5] (struct Setting*) main::setting#0 ← (struct Setting[]) settings + (const byte) main::$2
Simplifying expression containing zero (byte*)main::setting#0 in [9] (byte*) main::$4 ← (byte*)(struct Setting*) main::setting#0 + (const byte) OFFSET_STRUCT_SETTING_LEN
Simplifying expression containing zero (byte*)main::setting#0 in [11] if((byte) main::i#2<*((byte*)(struct Setting*) main::setting#0 + (const byte) OFFSET_STRUCT_SETTING_LEN)) goto main::@2
Simplifying expression containing zero seq in [1] (word*~) $0 ← (const word[]) seq + (const byte) $1
Simplifying expression containing zero settings in [4] (struct Setting*) main::setting#0 ← (struct Setting[]) settings + (const byte) main::$2
Simplifying expression containing zero (byte*)main::setting#0 in [8] (byte*) main::$4 ← (byte*)(struct Setting*) main::setting#0 + (const byte) OFFSET_STRUCT_SETTING_LEN
Simplifying expression containing zero (byte*)main::setting#0 in [10] if((byte) main::i#2<*((byte*)(struct Setting*) main::setting#0 + (const byte) OFFSET_STRUCT_SETTING_LEN)) goto main::@2
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused variable (byte*) main::$4 and assignment [4] (byte*) main::$4 ← (byte*)(struct Setting*) main::setting#0
Eliminating unused variable (word**) main::$5 and assignment [7] (word**) main::$5 ← (word**)(struct Setting*) main::setting#0 + (const byte) OFFSET_STRUCT_SETTING_BUF

View File

@ -9,7 +9,7 @@ Rewriting struct pointer member access *((struct Person*) print_person::person).
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
(struct Person[]) persons ← { { (number) 1, (const string) $0 }, { (number) 8, (const string) $1 } }
(struct Person[]) persons ← { (struct Person){ (byte)(number) 1, (const string) $0 }, (struct Person){ (byte)(number) 8, (const string) $1 } }
to:@1
(void()) main()
@ -138,8 +138,6 @@ Adding number conversion cast (unumber) 0 in *((const byte*) SCREEN + (byte) idx
Adding number conversion cast (unumber) 1 in *((const byte*) SCREEN + (byte) idx#6) ← *((byte[4]) print_person::$3 + (number) 1)
Adding number conversion cast (unumber) 2 in *((const byte*) SCREEN + (byte) idx#7) ← *((byte[4]) print_person::$4 + (number) 2)
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (struct Person[]) persons ← (struct Person[]){ (struct Person){ (byte)(number) 1, (const string) $0 }, (struct Person){ (byte)(number) 8, (const string) $1 } }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (byte) idx#3 ← (unumber)(number) 0
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024

View File

@ -10,7 +10,7 @@ Culled Empty Block (label) print_person::@6
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
(struct Person[2]) persons ← { { (number) 4, (const string) $0 }, { (number) 7, (const string) $1 } }
(struct Person[2]) persons ← { (struct Person){ (byte)(number) 4, (const string) $0 }, (struct Person){ (byte)(number) 7, (const string) $1 } }
to:@1
(void()) main()
@ -165,8 +165,6 @@ Adding number conversion cast (unumber) 0 in (byte) idx#3 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) print_person::i#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (bool~) print_person::$3 ← (number) 0 != *(*((byte**) print_person::$1) + (byte) print_person::i#2)
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (struct Person[2]) persons ← (struct Person[2]){ (struct Person){ (byte)(number) 4, (const string) $0 }, (struct Person){ (byte)(number) 7, (const string) $1 } }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (byte) idx#3 ← (unumber)(number) 0
Inlining cast (byte) print_person::i#0 ← (unumber)(number) 0
Successful SSA optimization Pass2InlineCast

View File

@ -11,7 +11,7 @@ Culled Empty Block (label) main::@2
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
(struct Point[4]) points ← { { (number) 1, (number) $83f }, { (number) 3, (number) $107e } }
(struct Point[4]) points ← { (struct Point){ (byte)(number) 1, (signed word)(number) $83f }, (struct Point){ (byte)(number) 3, (signed word)(number) $107e } }
to:@1
(void()) main()
@ -135,8 +135,6 @@ SYMBOL TABLE SSA
Adding number conversion cast (unumber) 0 in (byte) idx#2 ← (number) 0
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (struct Point[4]) points ← (struct Point[4]){ (struct Point){ (byte)(number) 1, (signed word)(number) $83f }, (struct Point){ (byte)(number) 3, (signed word)(number) $107e } }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (byte) idx#2 ← (unumber)(number) 0
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024

View File

@ -11,7 +11,7 @@ Culled Empty Block (label) print_person::@6
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
(struct Person[]) persons ← { { (number) 4, (const string) $0 }, { (number) 7, (const string) $1 } }
(struct Person[]) persons ← { (struct Person){ (byte)(number) 4, (const string) $0 }, (struct Person){ (byte)(number) 7, (const string) $1 } }
to:@1
(void()) main()
@ -160,8 +160,6 @@ Adding number conversion cast (unumber) 0 in (byte) idx#3 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) print_person::i#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (bool~) print_person::$3 ← (number) 0 != *((byte[$10]) print_person::$1 + (byte) print_person::i#2)
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (struct Person[]) persons ← (struct Person[]){ (struct Person){ (byte)(number) 4, (const string) $0 }, (struct Person){ (byte)(number) 7, (const string) $1 } }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (byte) idx#3 ← (unumber)(number) 0
Inlining cast (byte) print_person::i#0 ← (unumber)(number) 0
Successful SSA optimization Pass2InlineCast

View File

@ -6,7 +6,7 @@ Rewriting struct pointer member access *((struct Person*) main::person).name
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
(struct Person[2]) persons ← { { (number) 7, (const string) $0, (number) $141 }, { (number) 9, (const string) $1, (number) $7b } }
(struct Person[2]) persons ← { (struct Person){ (byte)(number) 7, (const string) $0, (word)(number) $141 }, (struct Person){ (byte)(number) 9, (const string) $1, (word)(number) $7b } }
to:@1
(void()) main()
@ -55,8 +55,6 @@ Adding number conversion cast (unumber) 0 in *((const byte*) main::SCREEN + (num
Adding number conversion cast (unumber) 2 in *((const byte*) main::SCREEN + (number) 1) ← *((byte[$d]) main::$1 + (number) 2)
Adding number conversion cast (unumber) 1 in *((const byte*) main::SCREEN + (number) 1) ← *((byte[$d]) main::$1 + (unumber)(number) 2)
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (struct Person[2]) persons ← (struct Person[2]){ (struct Person){ (byte)(number) 7, (const string) $0, (word)(number) $141 }, (struct Person){ (byte)(number) 9, (const string) $1, (word)(number) $7b } }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 7
Simplifying constant integer cast $141

View File

@ -14,23 +14,23 @@ main: scope:[main] from @1
[5] call print_cls
to:main::@1
main::@1: scope:[main] from main main::@7
[6] (byte*) print_line_cursor#29 ← phi( main/(byte*) 1024 main::@7/(byte*) print_line_cursor#23 )
[6] (byte*) print_line_cursor#28 ← phi( main/(byte*) 1024 main::@7/(byte*) print_line_cursor#23 )
[6] (byte) main::s#7 ← phi( main/(byte) 0 main::@7/(byte) main::s#10 )
[6] (byte*) print_char_cursor#82 ← phi( main/(byte*) 1024 main::@7/(byte*) print_char_cursor#72 )
[6] (byte*) print_char_cursor#81 ← phi( main/(byte*) 1024 main::@7/(byte*) print_char_cursor#72 )
[6] (byte) main::i#2 ← phi( main/(byte) 0 main::@7/(byte) main::i#1 )
[7] (byte~) main::$8 ← (byte) main::i#2 << (byte) 1
[8] (signed word) main::w1#0 ← *((const signed word[]) swords + (byte~) main::$8)
to:main::@2
main::@2: scope:[main] from main::@1 main::@6
[9] (byte*) print_line_cursor#27 ← phi( main::@1/(byte*) print_line_cursor#29 main::@6/(byte*) print_line_cursor#23 )
[9] (byte*) print_line_cursor#26 ← phi( main::@1/(byte*) print_line_cursor#28 main::@6/(byte*) print_line_cursor#23 )
[9] (byte) main::s#5 ← phi( main::@1/(byte) main::s#7 main::@6/(byte) main::s#10 )
[9] (byte*) print_char_cursor#71 ← phi( main::@1/(byte*) print_char_cursor#82 main::@6/(byte*) print_char_cursor#72 )
[9] (byte*) print_char_cursor#71 ← phi( main::@1/(byte*) print_char_cursor#81 main::@6/(byte*) print_char_cursor#72 )
[9] (byte) main::j#2 ← phi( main::@1/(byte) 0 main::@6/(byte) main::j#1 )
[10] (byte~) main::$9 ← (byte) main::j#2 << (byte) 1
[11] (signed word) main::w2#0 ← *((const signed word[]) swords + (byte~) main::$9)
to:main::@3
main::@3: scope:[main] from main::@2 main::@4
[12] (byte*) print_line_cursor#19 ← phi( main::@2/(byte*) print_line_cursor#27 main::@4/(byte*) print_line_cursor#23 )
[12] (byte*) print_line_cursor#19 ← phi( main::@2/(byte*) print_line_cursor#26 main::@4/(byte*) print_line_cursor#23 )
[12] (byte) main::s#3 ← phi( main::@2/(byte) main::s#5 main::@4/(byte) main::s#10 )
[12] (byte*) print_char_cursor#64 ← phi( main::@2/(byte*) print_char_cursor#71 main::@4/(byte*) print_char_cursor#72 )
[12] (byte) main::op#2 ← phi( main::@2/(byte) 0 main::@4/(byte) main::op#1 )
@ -48,12 +48,12 @@ main::@5: scope:[main] from main::@9
[20] call print_ln
to:main::@10
main::@10: scope:[main] from main::@5
[21] (byte*~) print_char_cursor#116 ← (byte*) print_line_cursor#1
[21] (byte*~) print_char_cursor#115 ← (byte*) print_line_cursor#1
to:main::@4
main::@4: scope:[main] from main::@10 main::@9
[22] (byte*) print_line_cursor#23 ← phi( main::@9/(byte*) print_line_cursor#19 main::@10/(byte*) print_line_cursor#1 )
[22] (byte) main::s#10 ← phi( main::@9/(byte) main::s#1 main::@10/(byte) 0 )
[22] (byte*) print_char_cursor#72 ← phi( main::@9/(byte*) print_char_cursor#15 main::@10/(byte*~) print_char_cursor#116 )
[22] (byte*) print_char_cursor#72 ← phi( main::@9/(byte*) print_char_cursor#15 main::@10/(byte*~) print_char_cursor#115 )
[23] (byte) main::op#1 ← ++ (byte) main::op#2
[24] if((byte) main::op#1!=(byte) 6) goto main::@3
to:main::@6

File diff suppressed because it is too large Load Diff

View File

@ -130,7 +130,7 @@
(byte) print_char::ch#5 reg byte a 8.0
(byte*) print_char_cursor
(byte*) print_char_cursor#1 print_char_cursor zp[2]:8 10001.0
(byte*~) print_char_cursor#116 print_char_cursor zp[2]:8 2002.0
(byte*~) print_char_cursor#115 print_char_cursor zp[2]:8 2002.0
(byte*) print_char_cursor#15 print_char_cursor zp[2]:8 297.62162162162167
(byte*) print_char_cursor#2 print_char_cursor zp[2]:8 5001.166666666666
(byte*) print_char_cursor#43 print_char_cursor zp[2]:8 7.0
@ -138,7 +138,7 @@
(byte*) print_char_cursor#64 print_char_cursor zp[2]:8 36.800000000000004
(byte*) print_char_cursor#71 print_char_cursor zp[2]:8 71.0
(byte*) print_char_cursor#72 print_char_cursor zp[2]:8 445.0
(byte*) print_char_cursor#82 print_char_cursor zp[2]:8 7.333333333333333
(byte*) print_char_cursor#81 print_char_cursor zp[2]:8 7.333333333333333
(void()) print_cls()
(label) print_cls::@return
(const byte[]) print_hextab = (string) "0123456789abcdef"z
@ -146,8 +146,8 @@
(byte*) print_line_cursor#1 print_line_cursor zp[2]:13 6401.0
(byte*) print_line_cursor#19 print_line_cursor zp[2]:13 233.8888888888889
(byte*) print_line_cursor#23 print_line_cursor zp[2]:13 445.0
(byte*) print_line_cursor#27 print_line_cursor zp[2]:13 71.0
(byte*) print_line_cursor#29 print_line_cursor zp[2]:13 7.333333333333333
(byte*) print_line_cursor#26 print_line_cursor zp[2]:13 71.0
(byte*) print_line_cursor#28 print_line_cursor zp[2]:13 7.333333333333333
(byte*) print_line_cursor#9 print_line_cursor zp[2]:13 20004.0
(void()) print_ln()
(label) print_ln::@1
@ -187,10 +187,10 @@ zp[1]:4 [ main::s#3 main::s#5 main::s#7 main::s#10 main::s#1 ]
zp[2]:5 [ compare::ops#7 print_str::str#2 print_str::str#1 print_str::str#0 ]
zp[1]:7 [ compare::r#10 compare::r#12 compare::r#13 compare::r#14 compare::r#15 compare::r#16 compare::r#17 ]
reg byte a [ print_char::ch#5 print_char::ch#4 print_char::ch#2 print_char::ch#3 ]
zp[2]:8 [ print_char_cursor#43 print_char_cursor#64 print_char_cursor#71 print_char_cursor#82 print_char_cursor#72 print_char_cursor#15 print_char_cursor#116 print_char_cursor#58 print_char_cursor#2 print_char_cursor#1 ]
zp[2]:8 [ print_char_cursor#43 print_char_cursor#64 print_char_cursor#71 print_char_cursor#81 print_char_cursor#72 print_char_cursor#15 print_char_cursor#115 print_char_cursor#58 print_char_cursor#2 print_char_cursor#1 ]
zp[2]:10 [ print_sword::w#5 print_sword::w#0 print_sword::w#3 print_sword::w#1 print_sword::w#2 compare::w1#0 print_word::w#0 ]
zp[1]:12 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
zp[2]:13 [ memset::dst#2 memset::dst#1 print_line_cursor#9 print_line_cursor#19 print_line_cursor#27 print_line_cursor#29 print_line_cursor#23 print_line_cursor#1 ]
zp[2]:13 [ memset::dst#2 memset::dst#1 print_line_cursor#9 print_line_cursor#19 print_line_cursor#26 print_line_cursor#28 print_line_cursor#23 print_line_cursor#1 ]
reg byte a [ main::$8 ]
zp[2]:15 [ main::w1#0 ]
reg byte a [ main::$9 ]

Some files were not shown because too many files have changed in this diff Show More