1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2025-04-06 15:41:05 +00:00

Added support for converting non-boolean conditions to boolean. Fixed problem with ranged for iterating signed bytes. Closes #135

This commit is contained in:
jespergravgaard 2019-06-03 00:44:46 +02:00
parent 45471f6848
commit 526bfbb60c
208 changed files with 6322 additions and 2182 deletions

View File

@ -173,6 +173,7 @@ public class Compiler {
new Pass1FixLValuesLoHi(program).execute();
new Pass1AssertNoLValueIntermediate(program).execute();
new Pass1PointerSizeofFix(program).execute();
new PassNAddBooleanCasts(program).execute();
new PassNAddTypeConversionAssignment(program).execute();
new Pass1EarlyConstantIdentification(program).execute();
new PassNStatementIndices(program).step();
@ -260,6 +261,8 @@ public class Compiler {
optimizations.add(new Pass2DuplicateRValueIdentification(program));
optimizations.add(new Pass2ConditionalJumpSimplification(program));
optimizations.add(new Pass2ConditionalAndOrRewriting(program));
optimizations.add(new PassNAddBooleanCasts(program));
optimizations.add(new Pass2ConditionalJumpSequenceImprovement(program));
optimizations.add(new Pass2ConstantRValueConsolidation(program));
optimizations.add(new Pass2ConstantIdentification(program));
@ -268,6 +271,7 @@ public class Compiler {
optimizations.add(new Pass2ConstantIfs(program));
optimizations.add(new Pass2ConstantStringConsolidation(program));
optimizations.add(new Pass2RangeResolving(program));
//optimizations.add(new Pass2BooleanizeConditions(program));
optimizations.add(new Pass2ComparisonOptimization(program));
optimizations.add(new Pass2InlineDerefIdx(program));
optimizations.add(new Pass2DeInlineWordDerefIdx(program));

View File

@ -18,7 +18,7 @@ import java.util.ListIterator;
public class ProgramExpressionIterator {
/**
* Execute a handler on all values in the entire program (both in the control flow graph and the symbol table.)
* Execute a handler on all expressions (unary or binary) in the entire program (both in the control flow graph and the symbol table.)
*
* @param program The program
* @param handler The handler to execute

View File

@ -24,6 +24,12 @@ public interface ProgramExpressionUnary extends ProgramExpression {
*/
RValue getOperand();
/**
* Set the operand of the unary expression.
* @param rValue The new operand
*/
void setOperand(RValue rValue);
/** Unary expression assignment rvalue. */
class ProgramExpressionUnaryAssignmentRValue implements ProgramExpressionUnary {
private final StatementAssignment assignment;
@ -42,6 +48,11 @@ public interface ProgramExpressionUnary extends ProgramExpression {
return assignment.getrValue2();
}
@Override
public void setOperand(RValue rValue) {
assignment.setrValue2(rValue);
}
@Override
public void set(Value value) {
assignment.setrValue2((RValue) value);
@ -73,6 +84,11 @@ public interface ProgramExpressionUnary extends ProgramExpression {
return getConstantUnary().getOperand();
}
@Override
public void setOperand(RValue rValue) {
getConstantUnary().setOperand((ConstantValue) rValue);
}
@Override
public void set(Value value) {
programValue.set(value);
@ -104,6 +120,11 @@ public interface ProgramExpressionUnary extends ProgramExpression {
return getConstantUnary().getValue();
}
@Override
public void setOperand(RValue rValue) {
getConstantUnary().setValue((ConstantValue) rValue);
}
@Override
public void set(Value value) {
programValue.set(value);
@ -135,6 +156,11 @@ public interface ProgramExpressionUnary extends ProgramExpression {
return getConstantUnary().getValue();
}
@Override
public void setOperand(RValue rValue) {
getConstantUnary().setValue(rValue);
}
@Override
public void set(Value value) {
programValue.set(value);

View File

@ -3,6 +3,7 @@ package dk.camelot64.kickc.model.operators;
import dk.camelot64.kickc.model.CompileError;
import dk.camelot64.kickc.model.symbols.ProgramScope;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.values.ConstantBool;
import dk.camelot64.kickc.model.values.ConstantInteger;
import dk.camelot64.kickc.model.values.ConstantLiteral;
import dk.camelot64.kickc.model.values.ConstantPointer;
@ -17,9 +18,9 @@ public class OperatorCastBool extends OperatorCast {
@Override
public ConstantLiteral calculateLiteral(ConstantLiteral value, ProgramScope scope) {
if(value instanceof ConstantInteger) {
return new ConstantInteger(0x1 & ((ConstantInteger) value).getValue());
return new ConstantBool(((ConstantInteger) value).getInteger()!=0L);
} else if(value instanceof ConstantPointer) {
return new ConstantInteger(0x1 & ((ConstantPointer) value).getLocation());
return new ConstantBool(((ConstantPointer) value).getLocation()!=0L);
}
throw new CompileError("Calculation not implemented " + getOperator() + " " + value );
}

View File

@ -23,7 +23,7 @@ public class OperatorLogicNot extends OperatorUnary {
@Override
public SymbolType inferType(SymbolType operandType) {
return operandType;
return SymbolType.BOOLEAN;
}
}

View File

@ -947,8 +947,8 @@ public class Pass0GenerateStatementSequence extends KickCBaseVisitor<Object> {
RValue rangeLastValue = (RValue) visit(rangeLastCtx);
RValue rangeFirstValue = (RValue) visit(rangeFirstCtx);
if(varType != null) {
if(rangeFirstValue instanceof ConstantInteger) ((ConstantInteger) rangeFirstValue).setType(SymbolType.NUMBER);
if(rangeLastValue instanceof ConstantInteger) ((ConstantInteger) rangeLastValue).setType(SymbolType.NUMBER);
if(rangeFirstValue instanceof ConstantInteger) ((ConstantInteger) rangeFirstValue).setType(varType);
if(rangeLastValue instanceof ConstantInteger) ((ConstantInteger) rangeLastValue).setType(varType);
}
Statement stmtInit = new StatementAssignment(lValue.getRef(), rangeFirstValue, new StatementSource(ctx), Comment.NO_COMMENTS);
sequence.addStatement(stmtInit);

View File

@ -39,7 +39,7 @@ public class Pass2ComparisonOptimization extends Pass2SsaOptimization {
if(statement instanceof StatementConditionalJump) {
StatementConditionalJump conditionalJump = (StatementConditionalJump) statement;
Operator operator = conditionalJump.getOperator();
if(conditionalJump.getrValue2() instanceof ConstantValue) {
if(operator!=null && conditionalJump.getrValue2() instanceof ConstantValue) {
SymbolType valueType = SymbolTypeInference.inferType(getScope(), conditionalJump.getrValue1());
ConstantValue constantValue = (ConstantValue) conditionalJump.getrValue2();
ConstantLiteral constantLiteral = null;

View File

@ -1,12 +1,13 @@
package dk.camelot64.kickc.passes;
import dk.camelot64.kickc.model.*;
import dk.camelot64.kickc.model.values.LValue;
import dk.camelot64.kickc.model.values.RValue;
import dk.camelot64.kickc.model.values.VariableRef;
import dk.camelot64.kickc.model.ControlFlowBlock;
import dk.camelot64.kickc.model.Program;
import dk.camelot64.kickc.model.statements.Statement;
import dk.camelot64.kickc.model.statements.StatementAssignment;
import dk.camelot64.kickc.model.statements.StatementConditionalJump;
import dk.camelot64.kickc.model.values.LValue;
import dk.camelot64.kickc.model.values.RValue;
import dk.camelot64.kickc.model.values.VariableRef;
import java.util.ArrayList;
import java.util.List;
@ -35,42 +36,41 @@ public class Pass2ConditionalJumpSimplification extends Pass2SsaOptimization {
final List<VariableRef> simpleConditionVars = new ArrayList<>();
ControlFlowGraphBaseVisitor<Void> visitor = new ControlFlowGraphBaseVisitor<Void>() {
@Override
public Void visitConditionalJump(StatementConditionalJump conditionalJump) {
if(conditionalJump.getrValue1() == null && conditionalJump.getOperator() == null) {
RValue conditionRValue = conditionalJump.getrValue2();
if(conditionRValue instanceof VariableRef && usages.get(conditionRValue).size() == 1) {
VariableRef conditionVar = (VariableRef) conditionRValue;
StatementAssignment conditionAssignment = assignments.get(conditionVar);
if(conditionAssignment!=null && conditionAssignment.getOperator() != null) {
switch(conditionAssignment.getOperator().getOperator()) {
case "==":
case "<>":
case "!=":
case "<":
case ">":
case "<=":
case "=<":
case ">=":
case "=>":
conditionalJump.setrValue1(conditionAssignment.getrValue1());
conditionalJump.setOperator(conditionAssignment.getOperator());
conditionalJump.setrValue2(conditionAssignment.getrValue2());
simpleConditionVars.add(conditionVar);
getLog().append("Simple Condition " + conditionVar.toString(getProgram()) + " " + conditionalJump.toString(getProgram(), false));
break;
default:
for(ControlFlowBlock block : getGraph().getAllBlocks()) {
for(Statement statement : block.getStatements()) {
if(statement instanceof StatementConditionalJump) {
StatementConditionalJump conditionalJump = (StatementConditionalJump) statement;
if(conditionalJump.getrValue1() == null && conditionalJump.getOperator() == null) {
RValue conditionRValue = conditionalJump.getrValue2();
if(conditionRValue instanceof VariableRef && usages.get(conditionRValue).size() == 1) {
VariableRef conditionVar = (VariableRef) conditionRValue;
StatementAssignment conditionAssignment = assignments.get(conditionVar);
if(conditionAssignment != null && conditionAssignment.getOperator() != null) {
switch(conditionAssignment.getOperator().getOperator()) {
case "==":
case "<>":
case "!=":
case "<":
case ">":
case "<=":
case "=<":
case ">=":
case "=>":
conditionalJump.setrValue1(conditionAssignment.getrValue1());
conditionalJump.setOperator(conditionAssignment.getOperator());
conditionalJump.setrValue2(conditionAssignment.getrValue2());
simpleConditionVars.add(conditionVar);
getLog().append("Simple Condition " + conditionVar.toString(getProgram()) + " " + conditionalJump.toString(getProgram(), false));
break;
default:
}
}
}
}
}
return null;
}
};
visitor.visitGraph(getGraph());
}
return simpleConditionVars;
}
}

View File

@ -0,0 +1,79 @@
package dk.camelot64.kickc.passes;
import dk.camelot64.kickc.model.Comment;
import dk.camelot64.kickc.model.ControlFlowBlock;
import dk.camelot64.kickc.model.Program;
import dk.camelot64.kickc.model.iterator.ProgramExpressionIterator;
import dk.camelot64.kickc.model.iterator.ProgramExpressionUnary;
import dk.camelot64.kickc.model.operators.Operators;
import dk.camelot64.kickc.model.statements.Statement;
import dk.camelot64.kickc.model.statements.StatementAssignment;
import dk.camelot64.kickc.model.statements.StatementConditionalJump;
import dk.camelot64.kickc.model.symbols.Scope;
import dk.camelot64.kickc.model.symbols.VariableIntermediate;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.types.SymbolTypeInference;
import dk.camelot64.kickc.model.types.SymbolTypePointer;
import dk.camelot64.kickc.model.values.ConstantInteger;
import dk.camelot64.kickc.model.values.RValue;
import java.util.ListIterator;
/**
* Add a cast to boolean everywhere an integer/pointer is used where a boolean is expected.
*/
public class PassNAddBooleanCasts extends Pass2SsaOptimization {
public PassNAddBooleanCasts(Program program) {
super(program);
}
@Override
public boolean step() {
for(ControlFlowBlock currentBlock : getGraph().getAllBlocks()) {
ListIterator<Statement> stmtIt = currentBlock.getStatements().listIterator();
while(stmtIt.hasNext()) {
Statement currentStmt = stmtIt.next();
if(currentStmt instanceof StatementConditionalJump) {
StatementConditionalJump conditionalJump = (StatementConditionalJump) currentStmt;
if(conditionalJump.getOperator()==null) {
RValue rValue2 = conditionalJump.getrValue2();
SymbolType type = SymbolTypeInference.inferType(getScope(), rValue2);
if(SymbolType.isInteger(type) || type instanceof SymbolTypePointer) {
// Found integer condition - add boolean cast
getLog().append("Warning! Adding boolean cast to non-boolean condition "+rValue2.toString(getProgram()));
VariableIntermediate tmpVar = addBooleanCast(rValue2, currentStmt, stmtIt, currentBlock);
conditionalJump.setrValue2(tmpVar.getRef());
}
}
}
}
}
ProgramExpressionIterator.execute(getProgram(), (programExpression, currentStmt, stmtIt, currentBlock) -> {
if(Operators.LOGIC_NOT.equals(programExpression.getOperator())) {
ProgramExpressionUnary unaryExpression = (ProgramExpressionUnary) programExpression;
RValue operand = unaryExpression.getOperand();
SymbolType operandType = SymbolTypeInference.inferType(getScope(), operand);
if(SymbolType.isInteger(operandType) || operandType instanceof SymbolTypePointer) {
getLog().append("Warning! Adding boolean cast to non-boolean sub-expression "+operand.toString(getProgram()));
VariableIntermediate tmpVar = addBooleanCast(operand, currentStmt, stmtIt, currentBlock);
unaryExpression.setOperand(tmpVar.getRef());
}
}
});
return false;
}
public VariableIntermediate addBooleanCast(RValue rValue, Statement currentStmt, ListIterator<Statement> stmtIt, ControlFlowBlock currentBlock) {
Scope currentScope = getScope().getScope(currentBlock.getScope());
stmtIt.previous();
VariableIntermediate tmpVar = currentScope.addVariableIntermediate();
tmpVar.setTypeInferred(SymbolType.BOOLEAN);
// Go straight to xxx!=0 instead of casting to bool
stmtIt.add(new StatementAssignment(tmpVar.getRef(), new ConstantInteger(0L, SymbolType.NUMBER), Operators.NEQ, rValue, currentStmt.getSource(), Comment.NO_COMMENTS));
stmtIt.next();
return tmpVar;
}
}

View File

@ -36,6 +36,31 @@ public class TestPrograms {
}
@Test
public void testConditionInteger4() throws IOException, URISyntaxException {
compileAndCompare("condition-integer-4");
}
@Test
public void testConditionInteger3() throws IOException, URISyntaxException {
compileAndCompare("condition-integer-3");
}
@Test
public void testConditionInteger2() throws IOException, URISyntaxException {
compileAndCompare("condition-integer-2");
}
@Test
public void testConditionInteger1() throws IOException, URISyntaxException {
compileAndCompare("condition-integer-1");
}
@Test
public void testConditionInteger0() throws IOException, URISyntaxException {
compileAndCompare("condition-integer-0");
}
@Test
public void testStringUnknownEncoding() throws IOException, URISyntaxException {
assertError("string-encoding-unknown", "Unknown string encoding");
@ -2025,7 +2050,7 @@ public class TestPrograms {
@Test
public void testConditionTypeMismatch() throws IOException, URISyntaxException {
assertError("condition-type-mismatch", "Type mismatch non-boolean condition");
compileAndCompare("condition-type-mismatch");
}
@BeforeClass

View File

@ -0,0 +1,23 @@
// Tests using integer conditions in if()
// This should produce '+ ++ ++' at the top of the screen
const byte* SCREEN = 0x0400;
void main() {
byte idx = 0;
// Hardcoded 0
if(0) { SCREEN[idx++] = '0'; }
// Hardcoded non-0
if(999) SCREEN[idx++] = '+';
SCREEN[idx++] = ' ';
// loop byte
for( byte i:0..2) {
if(i) SCREEN[idx++] = '+';
}
SCREEN[idx++] = ' ';
// loop word
for( word i:0..2) {
if(i) SCREEN[idx++] = '+';
}
}

View File

@ -0,0 +1,23 @@
// Tests using integer conditions in if()
// This should produce '0 0 0' at the top of the screen
const byte* SCREEN = 0x0400;
void main() {
byte idx = 0;
// Hardcoded 0
if(!0) SCREEN[idx++] = '0';
// Hardcoded non-0
if(!999) SCREEN[idx++] = '+';
SCREEN[idx++] = ' ';
// loop byte
for( byte i:0..2) {
if(!i) SCREEN[idx++] = '0';
}
SCREEN[idx++] = ' ';
// loop word
for( word i:0..2) {
if(!i) SCREEN[idx++] = '0';
}
}

View File

@ -0,0 +1,25 @@
// Tests using integer conditions in while() / for() / do..while
// This should produce 'ba ba ba' at the top of the screen
const byte* SCREEN = 0x0400;
byte idx = 0;
void main() {
// for()
for( byte i=2;i;i--) {
SCREEN[idx++] = i;
}
SCREEN[idx++] = ' ';
// while()
byte j=3;
while( j-- ) {
SCREEN[idx++] = j;
}
SCREEN[idx++] = ' ';
// do...while()
byte k = 2;
do {
SCREEN[idx++] = k;
} while(k--);
}

View File

@ -0,0 +1,12 @@
// Tests using integer conditions in ternary operator
// This should produce '++0++' at the top of the screen
const byte* SCREEN = 0x0400;
void main() {
byte idx = 0;
for( signed byte i: -2..2) {
byte j = i?'+':'0';
SCREEN[idx++] = j;
}
}

View File

@ -0,0 +1,19 @@
// Tests using integer conditions in && and || operator
// This should produce '01010101', '00110011', '00010001', '01110111' at the top of the screen
const byte* SCREEN = 0x0400;
void main() {
byte idx = 0;
for( byte i:0..7) {
if(i&1)
(SCREEN+40*0)[idx] = '+';
if(i&2)
(SCREEN+40*1)[idx] = '+';
if(i&1 && i&2)
(SCREEN+40*2)[idx] = '+';
if(i&1 || i&2)
(SCREEN+40*3)[idx] = '+';
idx++;
}
}

View File

@ -8,7 +8,7 @@ CONTROL FLOW GRAPH SSA
to:@1
main: scope:[main] from @1
(byte*) main::cur_item#0 ← (byte[SZ#0]) items#0
(byte) main::sub#0 ← (number) 0
(byte) main::sub#0 ← (byte) 0
to:main::@1
main::@1: scope:[main] from main main::@1
(byte*) main::cur_item#1 ← phi( main/(byte*) main::cur_item#0 main::@1/(byte*) main::cur_item#1 )
@ -50,16 +50,12 @@ SYMBOL TABLE SSA
(byte) main::sub#2
Adding number conversion cast (unumber) $f in (byte) SZ#0 ← (number) $f
Adding number conversion cast (unumber) 0 in (byte) main::sub#0 ← (number) 0
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte) SZ#0 ← (unumber)(number) $f
Inlining cast (byte) main::sub#0 ← (unumber)(number) 0
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast $f
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) $f
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Self Phi Eliminated (byte*) main::cur_item#1
Successful SSA optimization Pass2SelfPhiElimination

View File

@ -12,13 +12,13 @@ CONTROL FLOW GRAPH SSA
main: scope:[main] from @1
(byte*) main::cur_item#0 ← (byte[$0]) items#0
(number~) main::$0 ← (byte) ITEM_COUNT#0 - (number) 1
(byte) main::item#0 ← (number) 0
(byte) main::item#0 ← (byte) 0
to:main::@1
main::@1: scope:[main] from main main::@3
(byte*) main::cur_item#4 ← phi( main/(byte*) main::cur_item#0 main::@3/(byte*) main::cur_item#1 )
(byte) main::item#4 ← phi( main/(byte) main::item#0 main::@3/(byte) main::item#1 )
(number~) main::$1 ← (byte) ITEM_SIZE#0 - (number) 1
(byte) main::sub#0 ← (number) 0
(byte) main::sub#0 ← (byte) 0
to:main::@2
main::@2: scope:[main] from main::@1 main::@2
(byte*) main::cur_item#2 ← phi( main::@1/(byte*) main::cur_item#4 main::@2/(byte*) main::cur_item#2 )
@ -93,10 +93,8 @@ Adding number conversion cast (unumber) 3 in (byte) ITEM_COUNT#0 ← (number) 3
Adding number conversion cast (unumber) 5 in (byte) ITEM_SIZE#0 ← (number) 5
Adding number conversion cast (unumber) 1 in (number~) main::$0 ← (byte) ITEM_COUNT#0 - (number) 1
Adding number conversion cast (unumber) main::$0 in (number~) main::$0 ← (byte) ITEM_COUNT#0 - (unumber)(number) 1
Adding number conversion cast (unumber) 0 in (byte) main::item#0 ← (number) 0
Adding number conversion cast (unumber) 1 in (number~) main::$1 ← (byte) ITEM_SIZE#0 - (number) 1
Adding number conversion cast (unumber) main::$1 in (number~) main::$1 ← (byte) ITEM_SIZE#0 - (unumber)(number) 1
Adding number conversion cast (unumber) 0 in (byte) main::sub#0 ← (number) 0
Adding number conversion cast (unumber) $10 in (number~) main::$2 ← (byte) main::item#2 * (number) $10
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
@ -105,8 +103,6 @@ Adding number conversion cast (byte) to elements in (byte[$0]) items#0 ← { (by
Successful SSA optimization PassNAddArrayNumberTypeConversions
Inlining cast (byte) ITEM_COUNT#0 ← (unumber)(number) 3
Inlining cast (byte) ITEM_SIZE#0 ← (unumber)(number) 5
Inlining cast (byte) main::item#0 ← (unumber)(number) 0
Inlining cast (byte) main::sub#0 ← (unumber)(number) 0
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast 3
Simplifying constant integer cast 5
@ -126,17 +122,13 @@ 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 $10
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 3
Finalized unsigned number type (byte) 5
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $10
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in (unumber~) main::$0 ← (byte) ITEM_COUNT#0 - (byte) 1

View File

@ -135,7 +135,7 @@ plot::@return: scope:[plot] from plot
to:@return
init_plot_tables: scope:[init_plot_tables] from main::@5
(byte) init_plot_tables::bits#0 ← (number) $80
(byte) init_plot_tables::x#0 ← (number) 0
(byte) init_plot_tables::x#0 ← (byte) 0
to:init_plot_tables::@1
init_plot_tables::@1: scope:[init_plot_tables] from init_plot_tables init_plot_tables::@2
(byte) init_plot_tables::bits#3 ← phi( init_plot_tables/(byte) init_plot_tables::bits#0 init_plot_tables::@2/(byte) init_plot_tables::bits#4 )
@ -164,7 +164,7 @@ init_plot_tables::@3: scope:[init_plot_tables] from init_plot_tables::@1
to:init_plot_tables::@2
init_plot_tables::@4: scope:[init_plot_tables] from init_plot_tables::@2
(byte*) init_plot_tables::yoffs#0 ← ((byte*)) (number) 0
(byte) init_plot_tables::y#0 ← (number) 0
(byte) init_plot_tables::y#0 ← (byte) 0
to:init_plot_tables::@5
init_plot_tables::@5: scope:[init_plot_tables] from init_plot_tables::@4 init_plot_tables::@6
(byte*) init_plot_tables::yoffs#2 ← phi( init_plot_tables::@4/(byte*) init_plot_tables::yoffs#0 init_plot_tables::@6/(byte*) init_plot_tables::yoffs#4 )
@ -407,14 +407,12 @@ Adding number conversion cast (unumber) 8 in (byte) plots_cnt#0 ← (number) 8
Adding number conversion cast (unumber) 0 in (byte) plots::i#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (word) plot::plotter_y#0 ← (number) 0
Adding number conversion cast (unumber) $80 in (byte) init_plot_tables::bits#0 ← (number) $80
Adding number conversion cast (unumber) 0 in (byte) init_plot_tables::x#0 ← (number) 0
Adding number conversion cast (unumber) $f8 in (number~) init_plot_tables::$0 ← (byte) init_plot_tables::x#2 & (number) $f8
Adding number conversion cast (unumber) init_plot_tables::$0 in (number~) init_plot_tables::$0 ← (byte) init_plot_tables::x#2 & (unumber)(number) $f8
Adding number conversion cast (unumber) 2 in (number~) init_plot_tables::$2 ← (byte) init_plot_tables::bits#3 / (number) 2
Adding number conversion cast (unumber) init_plot_tables::$2 in (number~) init_plot_tables::$2 ← (byte) init_plot_tables::bits#3 / (unumber)(number) 2
Adding number conversion cast (unumber) 0 in (bool~) init_plot_tables::$3 ← (byte) init_plot_tables::bits#1 == (number) 0
Adding number conversion cast (unumber) $80 in (byte) init_plot_tables::bits#2 ← (number) $80
Adding number conversion cast (unumber) 0 in (byte) init_plot_tables::y#0 ← (number) 0
Adding number conversion cast (unumber) 7 in (number~) init_plot_tables::$6 ← (byte) init_plot_tables::y#2 & (number) 7
Adding number conversion cast (unumber) init_plot_tables::$6 in (number~) init_plot_tables::$6 ← (byte) init_plot_tables::y#2 & (unumber)(number) 7
Adding number conversion cast (unumber) init_plot_tables::$8 in (number~) init_plot_tables::$8 ← (unumber~) init_plot_tables::$6 | (byte~) init_plot_tables::$7
@ -450,10 +448,8 @@ Inlining cast (byte) plots::i#0 ← (unumber)(number) 0
Inlining cast (byte*) plot::plotter_x#0 ← (byte*)(number) 0
Inlining cast (word) plot::plotter_y#0 ← (unumber)(number) 0
Inlining cast (byte) init_plot_tables::bits#0 ← (unumber)(number) $80
Inlining cast (byte) init_plot_tables::x#0 ← (unumber)(number) 0
Inlining cast (byte) init_plot_tables::bits#2 ← (unumber)(number) $80
Inlining cast (byte*) init_plot_tables::yoffs#0 ← (byte*)(number) 0
Inlining cast (byte) init_plot_tables::y#0 ← (unumber)(number) 0
Inlining cast (unumber~) init_plot_tables::$16 ← (unumber)(number~) init_plot_tables::$13
Inlining cast *((byte*) init_screen::b#2) ← (unumber)(number) 0
Inlining cast *((byte*) init_screen::c#2) ← (unumber)(number) $14
@ -495,13 +491,11 @@ Simplifying constant integer cast 0
Simplifying constant pointer cast (byte*) 0
Simplifying constant integer cast 0
Simplifying constant integer cast $80
Simplifying constant integer cast 0
Simplifying constant integer cast $f8
Simplifying constant integer cast 2
Simplifying constant integer cast 0
Simplifying constant integer cast $80
Simplifying constant pointer cast (byte*) 0
Simplifying constant integer cast 0
Simplifying constant integer cast 7
Simplifying constant integer cast 7
Simplifying constant integer cast 7
@ -523,12 +517,10 @@ Finalized unsigned number type (byte) 8
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $80
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $f8
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $80
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 7
Finalized unsigned number type (byte) 7
Finalized unsigned number type (byte) 7

View File

@ -9,7 +9,7 @@ main: scope:[main] from @1
(byte*) main::SCREEN#0 ← ((byte*)) (number) $400
(byte~) main::$0 ← ~ (byte) 1
*((byte*) main::SCREEN#0) ← (byte~) main::$0
(byte) main::c#0 ← (number) 1
(byte) main::c#0 ← (byte) 1
to:main::@1
main::@1: scope:[main] from main main::@1
(byte) main::c#2 ← phi( main/(byte) main::c#0 main::@1/(byte) main::c#1 )
@ -47,16 +47,10 @@ SYMBOL TABLE SSA
(byte) main::c#1
(byte) main::c#2
Adding number conversion cast (unumber) 1 in (byte) main::c#0 ← (number) 1
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) main::SCREEN#0 ← (byte*)(number) $400
Inlining cast (byte) main::c#0 ← (unumber)(number) 1
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 1
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 1
Successful SSA optimization PassNFinalizeNumberTypeConversions
Simple Condition (bool~) main::$2 [9] if((byte) main::c#1!=rangelast(1,$1a)) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant right-side identified [1] (byte~) main::$0 ← ~ (byte) 1

View File

@ -10,7 +10,7 @@ CONTROL FLOW GRAPH SSA
to:@2
main: scope:[main] from @2
(byte*) main::screen#0 ← ((byte*)) (number) $400
(byte) main::i#0 ← (number) 0
(byte) main::i#0 ← (byte) 0
to:main::@1
main::@1: scope:[main] from main main::@3
(byte) main::i#2 ← phi( main/(byte) main::i#0 main::@3/(byte) main::i#1 )
@ -108,7 +108,6 @@ SYMBOL TABLE SSA
(byte*) main::screen
(byte*) main::screen#0
Adding number conversion cast (unumber) 0 in (byte) main::i#0 ← (number) 0
Adding number conversion cast (unumber) 1 in (number~) main::$0 ← (byte) main::i#2 & (number) 1
Adding number conversion cast (unumber) main::$0 in (number~) main::$0 ← (byte) main::i#2 & (unumber)(number) 1
Adding number conversion cast (unumber) 0 in (bool~) main::$1 ← (unumber~) main::$0 == (number) 0
@ -117,16 +116,13 @@ Adding number conversion cast (unumber) isSet::$0 in (number~) isSet::$0 ← (by
Adding number conversion cast (unumber) 0 in (bool~) isSet::$1 ← (unumber~) isSet::$0 != (number) 0
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) main::screen#0 ← (byte*)(number) $400
Inlining cast (byte) main::i#0 ← (unumber)(number) 0
Successful SSA optimization Pass2InlineCast
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 8
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 8

View File

@ -37,7 +37,7 @@ main::@return: scope:[main] from main::@4
to:@return
bool_and: scope:[bool_and] from main
(byte*) bool_and::screen#0 ← ((byte*)) (number) $400
(byte) bool_and::i#0 ← (number) 0
(byte) bool_and::i#0 ← (byte) 0
to:bool_and::@1
bool_and::@1: scope:[bool_and] from bool_and bool_and::@3
(byte) bool_and::i#2 ← phi( bool_and/(byte) bool_and::i#0 bool_and::@3/(byte) bool_and::i#1 )
@ -66,7 +66,7 @@ bool_and::@return: scope:[bool_and] from bool_and::@3
to:@return
bool_or: scope:[bool_or] from main::@1
(byte*) bool_or::screen#0 ← ((byte*)) (number) $428
(byte) bool_or::i#0 ← (number) 0
(byte) bool_or::i#0 ← (byte) 0
to:bool_or::@1
bool_or::@1: scope:[bool_or] from bool_or bool_or::@3
(byte) bool_or::i#2 ← phi( bool_or/(byte) bool_or::i#0 bool_or::@3/(byte) bool_or::i#1 )
@ -95,7 +95,7 @@ bool_or::@return: scope:[bool_or] from bool_or::@3
to:@return
bool_not: scope:[bool_not] from main::@2
(byte*) bool_not::screen#0 ← ((byte*)) (number) $450
(byte) bool_not::i#0 ← (number) 0
(byte) bool_not::i#0 ← (byte) 0
to:bool_not::@1
bool_not::@1: scope:[bool_not] from bool_not bool_not::@3
(byte) bool_not::i#2 ← phi( bool_not/(byte) bool_not::i#0 bool_not::@3/(byte) bool_not::i#1 )
@ -125,7 +125,7 @@ bool_not::@return: scope:[bool_not] from bool_not::@3
to:@return
bool_complex: scope:[bool_complex] from main::@3
(byte*) bool_complex::screen#0 ← ((byte*)) (number) $478
(byte) bool_complex::i#0 ← (number) 0
(byte) bool_complex::i#0 ← (byte) 0
to:bool_complex::@1
bool_complex::@1: scope:[bool_complex] from bool_complex bool_complex::@3
(byte) bool_complex::i#2 ← phi( bool_complex/(byte) bool_complex::i#0 bool_complex::@3/(byte) bool_complex::i#1 )
@ -264,22 +264,18 @@ SYMBOL TABLE SSA
(label) main::@4
(label) main::@return
Adding number conversion cast (unumber) 0 in (byte) bool_and::i#0 ← (number) 0
Adding number conversion cast (unumber) $a in (bool~) bool_and::$0 ← (byte) bool_and::i#2 < (number) $a
Adding number conversion cast (unumber) 1 in (number~) bool_and::$1 ← (byte) bool_and::i#2 & (number) 1
Adding number conversion cast (unumber) bool_and::$1 in (number~) bool_and::$1 ← (byte) bool_and::i#2 & (unumber)(number) 1
Adding number conversion cast (unumber) 0 in (bool~) bool_and::$2 ← (unumber~) bool_and::$1 == (number) 0
Adding number conversion cast (unumber) 0 in (byte) bool_or::i#0 ← (number) 0
Adding number conversion cast (unumber) $a in (bool~) bool_or::$0 ← (byte) bool_or::i#2 < (number) $a
Adding number conversion cast (unumber) 1 in (number~) bool_or::$1 ← (byte) bool_or::i#2 & (number) 1
Adding number conversion cast (unumber) bool_or::$1 in (number~) bool_or::$1 ← (byte) bool_or::i#2 & (unumber)(number) 1
Adding number conversion cast (unumber) 0 in (bool~) bool_or::$2 ← (unumber~) bool_or::$1 == (number) 0
Adding number conversion cast (unumber) 0 in (byte) bool_not::i#0 ← (number) 0
Adding number conversion cast (unumber) $a in (bool~) bool_not::$0 ← (byte) bool_not::i#2 < (number) $a
Adding number conversion cast (unumber) 1 in (number~) bool_not::$1 ← (byte) bool_not::i#2 & (number) 1
Adding number conversion cast (unumber) bool_not::$1 in (number~) bool_not::$1 ← (byte) bool_not::i#2 & (unumber)(number) 1
Adding number conversion cast (unumber) 0 in (bool~) bool_not::$2 ← (unumber~) bool_not::$1 == (number) 0
Adding number conversion cast (unumber) 0 in (byte) bool_complex::i#0 ← (number) 0
Adding number conversion cast (unumber) $a in (bool~) bool_complex::$0 ← (byte) bool_complex::i#2 < (number) $a
Adding number conversion cast (unumber) 1 in (number~) bool_complex::$1 ← (byte) bool_complex::i#2 & (number) 1
Adding number conversion cast (unumber) bool_complex::$1 in (number~) bool_complex::$1 ← (byte) bool_complex::i#2 & (unumber)(number) 1
@ -290,31 +286,23 @@ Adding number conversion cast (unumber) bool_complex::$5 in (number~) bool_compl
Adding number conversion cast (unumber) 0 in (bool~) bool_complex::$6 ← (unumber~) bool_complex::$5 == (number) 0
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) bool_and::screen#0 ← (byte*)(number) $400
Inlining cast (byte) bool_and::i#0 ← (unumber)(number) 0
Inlining cast (byte*) bool_or::screen#0 ← (byte*)(number) $428
Inlining cast (byte) bool_or::i#0 ← (unumber)(number) 0
Inlining cast (byte*) bool_not::screen#0 ← (byte*)(number) $450
Inlining cast (byte) bool_not::i#0 ← (unumber)(number) 0
Inlining cast (byte*) bool_complex::screen#0 ← (byte*)(number) $478
Inlining cast (byte) bool_complex::i#0 ← (unumber)(number) 0
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 0
Simplifying constant integer cast $a
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant pointer cast (byte*) 1064
Simplifying constant integer cast 0
Simplifying constant integer cast $a
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant pointer cast (byte*) 1104
Simplifying constant integer cast 0
Simplifying constant integer cast $a
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant pointer cast (byte*) 1144
Simplifying constant integer cast 0
Simplifying constant integer cast $a
Simplifying constant integer cast 1
Simplifying constant integer cast 0
@ -322,19 +310,15 @@ Simplifying constant integer cast $a
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) $a
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $a
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $a
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $a
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $a
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0

View File

@ -37,7 +37,7 @@ main::@return: scope:[main] from main::@4
to:@return
bool_and: scope:[bool_and] from main
(byte*) bool_and::screen#0 ← ((byte*)) (number) $400
(byte) bool_and::i#0 ← (number) 0
(byte) bool_and::i#0 ← (byte) 0
to:bool_and::@1
bool_and::@1: scope:[bool_and] from bool_and bool_and::@3
(byte) bool_and::i#2 ← phi( bool_and/(byte) bool_and::i#0 bool_and::@3/(byte) bool_and::i#1 )
@ -69,7 +69,7 @@ bool_and::@return: scope:[bool_and] from bool_and::@3
to:@return
bool_or: scope:[bool_or] from main::@1
(byte*) bool_or::screen#0 ← ((byte*)) (number) $428
(byte) bool_or::i#0 ← (number) 0
(byte) bool_or::i#0 ← (byte) 0
to:bool_or::@1
bool_or::@1: scope:[bool_or] from bool_or bool_or::@3
(byte) bool_or::i#2 ← phi( bool_or/(byte) bool_or::i#0 bool_or::@3/(byte) bool_or::i#1 )
@ -101,7 +101,7 @@ bool_or::@return: scope:[bool_or] from bool_or::@3
to:@return
bool_not: scope:[bool_not] from main::@2
(byte*) bool_not::screen#0 ← ((byte*)) (number) $450
(byte) bool_not::i#0 ← (number) 0
(byte) bool_not::i#0 ← (byte) 0
to:bool_not::@1
bool_not::@1: scope:[bool_not] from bool_not bool_not::@3
(byte) bool_not::i#2 ← phi( bool_not/(byte) bool_not::i#0 bool_not::@3/(byte) bool_not::i#1 )
@ -134,7 +134,7 @@ bool_not::@return: scope:[bool_not] from bool_not::@3
to:@return
bool_complex: scope:[bool_complex] from main::@3
(byte*) bool_complex::screen#0 ← ((byte*)) (number) $478
(byte) bool_complex::i#0 ← (number) 0
(byte) bool_complex::i#0 ← (byte) 0
to:bool_complex::@1
bool_complex::@1: scope:[bool_complex] from bool_complex bool_complex::@3
(byte) bool_complex::i#2 ← phi( bool_complex/(byte) bool_complex::i#0 bool_complex::@3/(byte) bool_complex::i#1 )
@ -300,70 +300,54 @@ SYMBOL TABLE SSA
(label) main::@4
(label) main::@return
Adding number conversion cast (unumber) 0 in (byte) bool_and::i#0 ← (number) 0
Adding number conversion cast (unumber) $a in (bool~) bool_and::$0 ← (byte) bool_and::i#2 < (number) $a
Adding number conversion cast (unumber) 1 in (number~) bool_and::$1 ← (byte) bool_and::i#2 & (number) 1
Adding number conversion cast (unumber) bool_and::$1 in (number~) bool_and::$1 ← (byte) bool_and::i#2 & (unumber)(number) 1
Adding number conversion cast (unumber) 0 in (bool~) bool_and::$2 ← (unumber~) bool_and::$1 == (number) 0
Adding number conversion cast (unumber) 0 in (byte) bool_or::i#0 ← (number) 0
Adding number conversion cast (unumber) $a in (bool~) bool_or::$0 ← (byte) bool_or::i#2 < (number) $a
Adding number conversion cast (unumber) 1 in (number~) bool_or::$1 ← (byte) bool_or::i#2 & (number) 1
Adding number conversion cast (unumber) bool_or::$1 in (number~) bool_or::$1 ← (byte) bool_or::i#2 & (unumber)(number) 1
Adding number conversion cast (unumber) 0 in (bool~) bool_or::$2 ← (unumber~) bool_or::$1 == (number) 0
Adding number conversion cast (unumber) 0 in (byte) bool_not::i#0 ← (number) 0
Adding number conversion cast (unumber) $a in (bool~) bool_not::$0 ← (byte) bool_not::i#2 < (number) $a
Adding number conversion cast (unumber) 1 in (number~) bool_not::$1 ← (byte) bool_not::i#2 & (number) 1
Adding number conversion cast (unumber) bool_not::$1 in (number~) bool_not::$1 ← (byte) bool_not::i#2 & (unumber)(number) 1
Adding number conversion cast (unumber) 0 in (bool~) bool_not::$2 ← (unumber~) bool_not::$1 == (number) 0
Adding number conversion cast (unumber) 0 in (byte) bool_complex::i#0 ← (number) 0
Adding number conversion cast (unumber) $a in (bool~) bool_complex::$0 ← (byte) bool_complex::i#2 < (number) $a
Adding number conversion cast (unumber) 1 in (number~) bool_complex::$1 ← (byte) bool_complex::i#2 & (number) 1
Adding number conversion cast (unumber) bool_complex::$1 in (number~) bool_complex::$1 ← (byte) bool_complex::i#2 & (unumber)(number) 1
Adding number conversion cast (unumber) 0 in (bool~) bool_complex::$2 ← (unumber~) bool_complex::$1 == (number) 0
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) bool_and::screen#0 ← (byte*)(number) $400
Inlining cast (byte) bool_and::i#0 ← (unumber)(number) 0
Inlining cast (byte*) bool_or::screen#0 ← (byte*)(number) $428
Inlining cast (byte) bool_or::i#0 ← (unumber)(number) 0
Inlining cast (byte*) bool_not::screen#0 ← (byte*)(number) $450
Inlining cast (byte) bool_not::i#0 ← (unumber)(number) 0
Inlining cast (byte*) bool_complex::screen#0 ← (byte*)(number) $478
Inlining cast (byte) bool_complex::i#0 ← (unumber)(number) 0
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 0
Simplifying constant integer cast $a
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant pointer cast (byte*) 1064
Simplifying constant integer cast 0
Simplifying constant integer cast $a
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant pointer cast (byte*) 1104
Simplifying constant integer cast 0
Simplifying constant integer cast $a
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant pointer cast (byte*) 1144
Simplifying constant integer cast 0
Simplifying constant integer cast $a
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) $a
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $a
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $a
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $a
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $a
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0

View File

@ -223,7 +223,7 @@ main::@17: scope:[main] from main
(number~) main::$23 ← (number~) main::$22 / (number) 4
(number~) main::$24 ← (byte~) main::$19 | (number~) main::$23
*((byte*) VIC_MEMORY#0) ← (number~) main::$24
(byte) main::j#0 ← (number) 0
(byte) main::j#0 ← (byte) 0
to:main::@1
main::@1: scope:[main] from main::@1 main::@17
(byte) main::j#2 ← phi( main::@1/(byte) main::j#1 main::@17/(byte) main::j#0 )
@ -281,12 +281,12 @@ gfx_init::@return: scope:[gfx_init] from gfx_init::@2
to:@return
gfx_init_screen0: scope:[gfx_init_screen0] from gfx_init
(byte*) gfx_init_screen0::ch#0 ← (byte*) SCREEN#0
(byte) gfx_init_screen0::cy#0 ← (number) 0
(byte) gfx_init_screen0::cy#0 ← (byte) 0
to:gfx_init_screen0::@1
gfx_init_screen0::@1: scope:[gfx_init_screen0] from gfx_init_screen0 gfx_init_screen0::@3
(byte*) gfx_init_screen0::ch#3 ← phi( gfx_init_screen0/(byte*) gfx_init_screen0::ch#0 gfx_init_screen0::@3/(byte*) gfx_init_screen0::ch#4 )
(byte) gfx_init_screen0::cy#4 ← phi( gfx_init_screen0/(byte) gfx_init_screen0::cy#0 gfx_init_screen0::@3/(byte) gfx_init_screen0::cy#1 )
(byte) gfx_init_screen0::cx#0 ← (number) 0
(byte) gfx_init_screen0::cx#0 ← (byte) 0
to:gfx_init_screen0::@2
gfx_init_screen0::@2: scope:[gfx_init_screen0] from gfx_init_screen0::@1 gfx_init_screen0::@2
(byte*) gfx_init_screen0::ch#2 ← phi( gfx_init_screen0::@1/(byte*) gfx_init_screen0::ch#3 gfx_init_screen0::@2/(byte*) gfx_init_screen0::ch#1 )
@ -330,14 +330,14 @@ gfx_init_plane_charset8::@9: scope:[gfx_init_plane_charset8] from gfx_init_plan
(byte*) gfx_init_plane_charset8::chargen#0 ← (byte*~) gfx_init_plane_charset8::$6
*((byte*) PROCPORT#0) ← (byte) PROCPORT_RAM_CHARROM#0
(byte) gfx_init_plane_charset8::col#0 ← (number) 0
(byte) gfx_init_plane_charset8::ch#0 ← (number) 0
(byte) gfx_init_plane_charset8::ch#0 ← (byte) 0
to:gfx_init_plane_charset8::@1
gfx_init_plane_charset8::@1: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@7 gfx_init_plane_charset8::@9
(byte) gfx_init_plane_charset8::ch#8 ← phi( gfx_init_plane_charset8::@7/(byte) gfx_init_plane_charset8::ch#1 gfx_init_plane_charset8::@9/(byte) gfx_init_plane_charset8::ch#0 )
(byte) gfx_init_plane_charset8::col#6 ← phi( gfx_init_plane_charset8::@7/(byte) gfx_init_plane_charset8::col#8 gfx_init_plane_charset8::@9/(byte) gfx_init_plane_charset8::col#0 )
(byte*) gfx_init_plane_charset8::gfxa#6 ← phi( gfx_init_plane_charset8::@7/(byte*) gfx_init_plane_charset8::gfxa#8 gfx_init_plane_charset8::@9/(byte*) gfx_init_plane_charset8::gfxa#0 )
(byte*) gfx_init_plane_charset8::chargen#3 ← phi( gfx_init_plane_charset8::@7/(byte*) gfx_init_plane_charset8::chargen#5 gfx_init_plane_charset8::@9/(byte*) gfx_init_plane_charset8::chargen#0 )
(byte) gfx_init_plane_charset8::cr#0 ← (number) 0
(byte) gfx_init_plane_charset8::cr#0 ← (byte) 0
to:gfx_init_plane_charset8::@2
gfx_init_plane_charset8::@2: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@1 gfx_init_plane_charset8::@6
(byte) gfx_init_plane_charset8::ch#7 ← phi( gfx_init_plane_charset8::@1/(byte) gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::@6/(byte) gfx_init_plane_charset8::ch#3 )
@ -347,7 +347,7 @@ gfx_init_plane_charset8::@2: scope:[gfx_init_plane_charset8] from gfx_init_plan
(byte*) gfx_init_plane_charset8::chargen#2 ← phi( gfx_init_plane_charset8::@1/(byte*) gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::@6/(byte*) gfx_init_plane_charset8::chargen#4 )
(byte) gfx_init_plane_charset8::bits#0 ← *((byte*) gfx_init_plane_charset8::chargen#2)
(byte*) gfx_init_plane_charset8::chargen#1 ← ++ (byte*) gfx_init_plane_charset8::chargen#2
(byte) gfx_init_plane_charset8::cp#0 ← (number) 0
(byte) gfx_init_plane_charset8::cp#0 ← (byte) 0
to:gfx_init_plane_charset8::@3
gfx_init_plane_charset8::@3: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@2 gfx_init_plane_charset8::@4
(byte) gfx_init_plane_charset8::ch#5 ← phi( gfx_init_plane_charset8::@2/(byte) gfx_init_plane_charset8::ch#7 gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::ch#4 )
@ -741,7 +741,6 @@ Adding number conversion cast (unumber) main::$22 in (number~) main::$22 ← > (
Adding number conversion cast (unumber) 4 in (number~) main::$23 ← (unumber~) main::$22 / (number) 4
Adding number conversion cast (unumber) main::$23 in (number~) main::$23 ← (unumber~) main::$22 / (unumber)(number) 4
Adding number conversion cast (unumber) main::$24 in (number~) main::$24 ← (byte~) main::$19 | (unumber~) main::$23
Adding number conversion cast (unumber) 0 in (byte) main::j#0 ← (number) 0
Adding number conversion cast (unumber) 3 in (number~) main::$28 ← (byte~) main::$27 | (number) 3
Adding number conversion cast (unumber) main::$28 in (number~) main::$28 ← (byte~) main::$27 | (unumber)(number) 3
Adding number conversion cast (unumber) 0 in *((byte*) BORDERCOL#0) ← (number) 0
@ -752,8 +751,6 @@ Adding number conversion cast (unumber) main::$33 in (number~) main::$33 ← (by
Adding number conversion cast (unumber) $10 in (number~) main::$34 ← (byte) main::rst#1 * (number) $10
Adding number conversion cast (unumber) main::$34 in (number~) main::$34 ← (byte) main::rst#1 * (unumber)(number) $10
Adding number conversion cast (unumber) $f2 in (bool~) main::$35 ← (byte) main::rst#1 != (number) $f2
Adding number conversion cast (unumber) 0 in (byte) gfx_init_screen0::cy#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) gfx_init_screen0::cx#0 ← (number) 0
Adding number conversion cast (unumber) $f in (number~) gfx_init_screen0::$0 ← (byte) gfx_init_screen0::cy#2 & (number) $f
Adding number conversion cast (unumber) gfx_init_screen0::$0 in (number~) gfx_init_screen0::$0 ← (byte) gfx_init_screen0::cy#2 & (unumber)(number) $f
Adding number conversion cast (unumber) $10 in (number~) gfx_init_screen0::$1 ← (unumber~) gfx_init_screen0::$0 * (number) $10
@ -768,9 +765,6 @@ Adding number conversion cast (unumber) $4000 in (number~) gfx_init_plane_charse
Adding number conversion cast (unumber) gfx_init_plane_charset8::$5 in (number~) gfx_init_plane_charset8::$5 ← (unumber)(number) $4000 + (unumber~) gfx_init_plane_charset8::$4
Adding number conversion cast (unumber) 1 in (byte*~) gfx_init_plane_charset8::$6 ← (byte*) CHARGEN#0 + (number) 1
Adding number conversion cast (unumber) 0 in (byte) gfx_init_plane_charset8::col#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) gfx_init_plane_charset8::ch#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) gfx_init_plane_charset8::cr#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) gfx_init_plane_charset8::cp#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) gfx_init_plane_charset8::c#0 ← (number) 0
Adding number conversion cast (unumber) $80 in (number~) gfx_init_plane_charset8::$10 ← (byte) gfx_init_plane_charset8::bits#2 & (number) $80
Adding number conversion cast (unumber) gfx_init_plane_charset8::$10 in (number~) gfx_init_plane_charset8::$10 ← (byte) gfx_init_plane_charset8::bits#2 & (unumber)(number) $80
@ -833,18 +827,12 @@ Inlining cast (byte~) main::$14 ← (byte)(unumber~) main::$13
Inlining cast (word~) main::$16 ← (word)(byte*) SCREEN#0
Inlining cast (byte~) main::$19 ← (byte)(unumber~) main::$18
Inlining cast (word~) main::$20 ← (word)(byte*) SCREEN#0
Inlining cast (byte) main::j#0 ← (unumber)(number) 0
Inlining cast *((byte*) BORDERCOL#0) ← (unumber)(number) 0
Inlining cast (byte) main::rst#0 ← (unumber)(number) $42
Inlining cast (byte) gfx_init_screen0::cy#0 ← (unumber)(number) 0
Inlining cast (byte) gfx_init_screen0::cx#0 ← (unumber)(number) 0
Inlining cast (byte~) gfx_init_plane_charset8::$1 ← (byte)(byte*~) gfx_init_plane_charset8::$0
Inlining cast (word~) gfx_init_plane_charset8::$3 ← (word)(byte*) CHARSET8#0
Inlining cast (byte*) gfx_init_plane_charset8::gfxa#0 ← (byte*)(unumber~) gfx_init_plane_charset8::$5
Inlining cast (byte) gfx_init_plane_charset8::col#0 ← (unumber)(number) 0
Inlining cast (byte) gfx_init_plane_charset8::ch#0 ← (unumber)(number) 0
Inlining cast (byte) gfx_init_plane_charset8::cr#0 ← (unumber)(number) 0
Inlining cast (byte) gfx_init_plane_charset8::cp#0 ← (unumber)(number) 0
Inlining cast (byte) gfx_init_plane_charset8::c#0 ← (unumber)(number) 0
Inlining cast (byte~) gfx_init_plane_charset8::$8 ← (byte)(number~) gfx_init_plane_charset8::$7
Successful SSA optimization Pass2InlineCast
@ -905,15 +893,12 @@ Simplifying constant integer cast $3fff
Simplifying constant integer cast $40
Simplifying constant integer cast $3fff
Simplifying constant integer cast 4
Simplifying constant integer cast 0
Simplifying constant integer cast 3
Simplifying constant integer cast 0
Simplifying constant integer cast $42
Simplifying constant integer cast 7
Simplifying constant integer cast $10
Simplifying constant integer cast $f2
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $f
Simplifying constant integer cast $10
Simplifying constant integer cast $f
@ -923,9 +908,6 @@ Simplifying constant integer cast $4000
Simplifying constant integer cast 1
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 $80
Simplifying constant integer cast 0
Simplifying constant integer cast 2
@ -959,15 +941,12 @@ Finalized unsigned number type (word) $3fff
Finalized unsigned number type (byte) $40
Finalized unsigned number type (word) $3fff
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 3
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $42
Finalized unsigned number type (byte) 7
Finalized unsigned number type (byte) $10
Finalized unsigned number type (byte) $f2
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $f
Finalized unsigned number type (byte) $10
Finalized unsigned number type (byte) $f
@ -977,9 +956,6 @@ Finalized unsigned number type (word) $4000
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $80
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 2

View File

@ -205,7 +205,7 @@ gfx_init_chunky: {
lda #>$4000
sta gfxb+1
b1:
lda #0
lda #<0
sta x
sta x+1
b2:

View File

@ -66,7 +66,7 @@ gfx_init_chunky::@1: scope:[gfx_init_chunky] from gfx_init_chunky gfx_init_chun
to:gfx_init_chunky::@2
gfx_init_chunky::@2: scope:[gfx_init_chunky] from gfx_init_chunky::@1 gfx_init_chunky::@3
[41] (byte) gfx_init_chunky::gfxbCpuBank#4 ← phi( gfx_init_chunky::@1/(byte) gfx_init_chunky::gfxbCpuBank#7 gfx_init_chunky::@3/(byte) gfx_init_chunky::gfxbCpuBank#8 )
[41] (word) gfx_init_chunky::x#2 ← phi( gfx_init_chunky::@1/(byte) 0 gfx_init_chunky::@3/(word) gfx_init_chunky::x#1 )
[41] (word) gfx_init_chunky::x#2 ← phi( gfx_init_chunky::@1/(word) 0 gfx_init_chunky::@3/(word) gfx_init_chunky::x#1 )
[41] (byte*) gfx_init_chunky::gfxb#3 ← phi( gfx_init_chunky::@1/(byte*) gfx_init_chunky::gfxb#5 gfx_init_chunky::@3/(byte*) gfx_init_chunky::gfxb#1 )
[42] if((byte*) gfx_init_chunky::gfxb#3!=(word) $8000) goto gfx_init_chunky::@3
to:gfx_init_chunky::@4

View File

@ -205,7 +205,7 @@ main::@17: scope:[main] from main
(number~) main::$22 ← (number~) main::$21 / (number) 4
(number~) main::$23 ← (byte~) main::$18 | (number~) main::$22
*((byte*) VIC_MEMORY#0) ← (number~) main::$23
(byte) main::j#0 ← (number) 0
(byte) main::j#0 ← (byte) 0
to:main::@1
main::@1: scope:[main] from main::@1 main::@17
(byte) main::j#2 ← phi( main::@1/(byte) main::j#1 main::@17/(byte) main::j#0 )
@ -261,13 +261,13 @@ gfx_init_chunky::@7: scope:[gfx_init_chunky] from gfx_init_chunky
(byte) gfx_init_chunky::gfxbCpuBank#3 ← phi( gfx_init_chunky/(byte) gfx_init_chunky::gfxbCpuBank#0 )
(byte) gfx_init_chunky::gfxbCpuBank#1 ← ++ (byte) gfx_init_chunky::gfxbCpuBank#3
(byte*) gfx_init_chunky::gfxb#0 ← ((byte*)) (number) $4000
(byte) gfx_init_chunky::y#0 ← (number) 0
(byte) gfx_init_chunky::y#0 ← (byte) 0
to:gfx_init_chunky::@1
gfx_init_chunky::@1: scope:[gfx_init_chunky] from gfx_init_chunky::@5 gfx_init_chunky::@7
(byte) gfx_init_chunky::gfxbCpuBank#7 ← phi( gfx_init_chunky::@5/(byte) gfx_init_chunky::gfxbCpuBank#9 gfx_init_chunky::@7/(byte) gfx_init_chunky::gfxbCpuBank#1 )
(byte) gfx_init_chunky::y#6 ← phi( gfx_init_chunky::@5/(byte) gfx_init_chunky::y#1 gfx_init_chunky::@7/(byte) gfx_init_chunky::y#0 )
(byte*) gfx_init_chunky::gfxb#5 ← phi( gfx_init_chunky::@5/(byte*) gfx_init_chunky::gfxb#6 gfx_init_chunky::@7/(byte*) gfx_init_chunky::gfxb#0 )
(word) gfx_init_chunky::x#0 ← (number) 0
(word) gfx_init_chunky::x#0 ← (word) 0
to:gfx_init_chunky::@2
gfx_init_chunky::@2: scope:[gfx_init_chunky] from gfx_init_chunky::@1 gfx_init_chunky::@3
(byte) gfx_init_chunky::gfxbCpuBank#6 ← phi( gfx_init_chunky::@1/(byte) gfx_init_chunky::gfxbCpuBank#7 gfx_init_chunky::@3/(byte) gfx_init_chunky::gfxbCpuBank#8 )
@ -556,7 +556,6 @@ Adding number conversion cast (unumber) main::$21 in (number~) main::$21 ← > (
Adding number conversion cast (unumber) 4 in (number~) main::$22 ← (unumber~) main::$21 / (number) 4
Adding number conversion cast (unumber) main::$22 in (number~) main::$22 ← (unumber~) main::$21 / (unumber)(number) 4
Adding number conversion cast (unumber) main::$23 in (number~) main::$23 ← (byte~) main::$18 | (unumber~) main::$22
Adding number conversion cast (unumber) 0 in (byte) main::j#0 ← (number) 0
Adding number conversion cast (unumber) 3 in (number~) main::$27 ← (byte~) main::$26 | (number) 3
Adding number conversion cast (unumber) main::$27 in (number~) main::$27 ← (byte~) main::$26 | (unumber)(number) 3
Adding number conversion cast (unumber) 0 in *((byte*) BORDERCOL#0) ← (number) 0
@ -568,8 +567,6 @@ Adding number conversion cast (unumber) $10 in (number~) main::$33 ← (byte) ma
Adding number conversion cast (unumber) main::$33 in (number~) main::$33 ← (byte) main::rst#1 * (unumber)(number) $10
Adding number conversion cast (unumber) $f2 in (bool~) main::$34 ← (byte) main::rst#1 != (number) $f2
Adding number conversion cast (unumber) $4000 in (byte*~) gfx_init_chunky::$0 ← (byte*) CHUNKY#0 / (number) $4000
Adding number conversion cast (unumber) 0 in (byte) gfx_init_chunky::y#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (word) gfx_init_chunky::x#0 ← (number) 0
Adding number conversion cast (unumber) $8000 in (bool~) gfx_init_chunky::$6 ← (byte*) gfx_init_chunky::gfxb#3 == (number) $8000
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) PROCPORT_DDR#0 ← (byte*)(number) 0
@ -615,13 +612,10 @@ Inlining cast (byte~) main::$13 ← (byte)(unumber~) main::$12
Inlining cast (word~) main::$15 ← (word)(byte*) CHUNKY#0
Inlining cast (byte~) main::$18 ← (byte)(unumber~) main::$17
Inlining cast (word~) main::$19 ← (word)(byte*) CHUNKY#0
Inlining cast (byte) main::j#0 ← (unumber)(number) 0
Inlining cast *((byte*) BORDERCOL#0) ← (unumber)(number) 0
Inlining cast (byte) main::rst#0 ← (unumber)(number) $42
Inlining cast (byte~) gfx_init_chunky::$1 ← (byte)(byte*~) gfx_init_chunky::$0
Inlining cast (byte*) gfx_init_chunky::gfxb#0 ← (byte*)(number) $4000
Inlining cast (byte) gfx_init_chunky::y#0 ← (unumber)(number) 0
Inlining cast (word) gfx_init_chunky::x#0 ← (unumber)(number) 0
Inlining cast (byte~) gfx_init_chunky::$10 ← (byte)(word~) gfx_init_chunky::$9
Inlining cast (byte*) gfx_init_chunky::gfxb#2 ← (byte*)(number) $4000
Inlining cast (byte~) gfx_init_chunky::$4 ← (byte)(number~) gfx_init_chunky::$3
@ -671,7 +665,6 @@ Simplifying constant integer cast $3fff
Simplifying constant integer cast $40
Simplifying constant integer cast $3fff
Simplifying constant integer cast 4
Simplifying constant integer cast 0
Simplifying constant integer cast 3
Simplifying constant integer cast 0
Simplifying constant integer cast $42
@ -680,8 +673,6 @@ Simplifying constant integer cast $10
Simplifying constant integer cast $f2
Simplifying constant integer cast $4000
Simplifying constant pointer cast (byte*) 16384
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $8000
Simplifying constant pointer cast (byte*) 16384
Successful SSA optimization PassNCastSimplification
@ -710,7 +701,6 @@ Finalized unsigned number type (word) $3fff
Finalized unsigned number type (byte) $40
Finalized unsigned number type (word) $3fff
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 3
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $42
@ -718,8 +708,6 @@ Finalized unsigned number type (byte) 7
Finalized unsigned number type (byte) $10
Finalized unsigned number type (byte) $f2
Finalized unsigned number type (word) $4000
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (word) $8000
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in (unumber~) main::$7 ← (byte~) main::$6 | (byte) 3
@ -948,7 +936,7 @@ Constant inlined main::$12 = (word)(const byte*) CHUNKY#0/(word) $4000
Constant inlined main::$13 = (byte)(word)(const byte*) CHUNKY#0/(word) $4000
Constant inlined main::$14 = (byte) 3^(byte)(word)(const byte*) CHUNKY#0/(word) $4000
Constant inlined gfx_init_chunky::y#0 = (byte) 0
Constant inlined gfx_init_chunky::x#0 = (byte) 0
Constant inlined gfx_init_chunky::x#0 = (word) 0
Constant inlined main::$30 = (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0
Constant inlined main::$10 = >(const byte*) CHUNKY#0
Constant inlined main::$11 = (word)(const byte*) CHUNKY#0
@ -1102,7 +1090,7 @@ gfx_init_chunky::@1: scope:[gfx_init_chunky] from gfx_init_chunky gfx_init_chun
to:gfx_init_chunky::@2
gfx_init_chunky::@2: scope:[gfx_init_chunky] from gfx_init_chunky::@1 gfx_init_chunky::@3
[41] (byte) gfx_init_chunky::gfxbCpuBank#4 ← phi( gfx_init_chunky::@1/(byte) gfx_init_chunky::gfxbCpuBank#7 gfx_init_chunky::@3/(byte) gfx_init_chunky::gfxbCpuBank#8 )
[41] (word) gfx_init_chunky::x#2 ← phi( gfx_init_chunky::@1/(byte) 0 gfx_init_chunky::@3/(word) gfx_init_chunky::x#1 )
[41] (word) gfx_init_chunky::x#2 ← phi( gfx_init_chunky::@1/(word) 0 gfx_init_chunky::@3/(word) gfx_init_chunky::x#1 )
[41] (byte*) gfx_init_chunky::gfxb#3 ← phi( gfx_init_chunky::@1/(byte*) gfx_init_chunky::gfxb#5 gfx_init_chunky::@3/(byte*) gfx_init_chunky::gfxb#1 )
[42] if((byte*) gfx_init_chunky::gfxb#3!=(word) $8000) goto gfx_init_chunky::@3
to:gfx_init_chunky::@4
@ -1575,10 +1563,10 @@ gfx_init_chunky: {
//SEG67 [41] phi from gfx_init_chunky::@1 to gfx_init_chunky::@2 [phi:gfx_init_chunky::@1->gfx_init_chunky::@2]
b2_from_b1:
//SEG68 [41] phi (byte) gfx_init_chunky::gfxbCpuBank#4 = (byte) gfx_init_chunky::gfxbCpuBank#7 [phi:gfx_init_chunky::@1->gfx_init_chunky::@2#0] -- register_copy
//SEG69 [41] phi (word) gfx_init_chunky::x#2 = (byte) 0 [phi:gfx_init_chunky::@1->gfx_init_chunky::@2#1] -- vwuz1=vbuc1
lda #0
//SEG69 [41] phi (word) gfx_init_chunky::x#2 = (word) 0 [phi:gfx_init_chunky::@1->gfx_init_chunky::@2#1] -- vwuz1=vwuc1
lda #<0
sta x
lda #0
lda #>0
sta x+1
//SEG70 [41] phi (byte*) gfx_init_chunky::gfxb#3 = (byte*) gfx_init_chunky::gfxb#5 [phi:gfx_init_chunky::@1->gfx_init_chunky::@2#2] -- register_copy
jmp b2
@ -2109,10 +2097,10 @@ gfx_init_chunky: {
//SEG67 [41] phi from gfx_init_chunky::@1 to gfx_init_chunky::@2 [phi:gfx_init_chunky::@1->gfx_init_chunky::@2]
b2_from_b1:
//SEG68 [41] phi (byte) gfx_init_chunky::gfxbCpuBank#4 = (byte) gfx_init_chunky::gfxbCpuBank#7 [phi:gfx_init_chunky::@1->gfx_init_chunky::@2#0] -- register_copy
//SEG69 [41] phi (word) gfx_init_chunky::x#2 = (byte) 0 [phi:gfx_init_chunky::@1->gfx_init_chunky::@2#1] -- vwuz1=vbuc1
lda #0
//SEG69 [41] phi (word) gfx_init_chunky::x#2 = (word) 0 [phi:gfx_init_chunky::@1->gfx_init_chunky::@2#1] -- vwuz1=vwuc1
lda #<0
sta x
lda #0
lda #>0
sta x+1
//SEG70 [41] phi (byte*) gfx_init_chunky::gfxb#3 = (byte*) gfx_init_chunky::gfxb#5 [phi:gfx_init_chunky::@1->gfx_init_chunky::@2#2] -- register_copy
jmp b2
@ -2259,7 +2247,7 @@ Removing instruction jmp breturn
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda #0
Removing instruction lda #0
Removing instruction lda #>0
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Replacing label b1_from_b1 with b1
Replacing label b3_from_b2 with b3
@ -2718,8 +2706,8 @@ gfx_init_chunky: {
b1:
//SEG67 [41] phi from gfx_init_chunky::@1 to gfx_init_chunky::@2 [phi:gfx_init_chunky::@1->gfx_init_chunky::@2]
//SEG68 [41] phi (byte) gfx_init_chunky::gfxbCpuBank#4 = (byte) gfx_init_chunky::gfxbCpuBank#7 [phi:gfx_init_chunky::@1->gfx_init_chunky::@2#0] -- register_copy
//SEG69 [41] phi (word) gfx_init_chunky::x#2 = (byte) 0 [phi:gfx_init_chunky::@1->gfx_init_chunky::@2#1] -- vwuz1=vbuc1
lda #0
//SEG69 [41] phi (word) gfx_init_chunky::x#2 = (word) 0 [phi:gfx_init_chunky::@1->gfx_init_chunky::@2#1] -- vwuz1=vwuc1
lda #<0
sta x
sta x+1
//SEG70 [41] phi (byte*) gfx_init_chunky::gfxb#3 = (byte*) gfx_init_chunky::gfxb#5 [phi:gfx_init_chunky::@1->gfx_init_chunky::@2#2] -- register_copy

View File

@ -203,7 +203,7 @@ main: scope:[main] from @6
(byte~) main::$14 ← (byte~) main::$13 | (byte) DTV_BLIT_DEST_FWD#0
*((byte*) DTV_BLITTER_CONTROL#0) ← (byte~) main::$14
*((byte*) DTV_BLITTER_CONTROL2#0) ← (byte) DTV_BLIT_DEST_CONT#0
(byte) main::r#0 ← (number) 0
(byte) main::r#0 ← (byte) 0
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 )
@ -383,7 +383,6 @@ Adding number conversion cast (unumber) 0 in *((byte*) DTV_BLITTER_DEST_MOD_LO#0
Adding number conversion cast (unumber) 0 in *((byte*) DTV_BLITTER_DEST_MOD_HI#0) ← (number) 0
Adding number conversion cast (unumber) $10 in *((byte*) DTV_BLITTER_DEST_STEP#0) ← (number) $10
Adding number conversion cast (unumber) 0 in *((byte*) DTV_BLITTER_LEN_HI#0) ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) main::r#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (bool~) main::$16 ← (byte~) main::$15 != (number) 0
Successful SSA optimization PassNAddNumberTypeConversions
Adding number conversion cast (byte) to elements in (byte[]) SRCB#0 ← { (byte)(number) $80 }
@ -444,7 +443,6 @@ Inlining cast *((byte*) DTV_BLITTER_DEST_MOD_LO#0) ← (unumber)(number) 0
Inlining cast *((byte*) DTV_BLITTER_DEST_MOD_HI#0) ← (unumber)(number) 0
Inlining cast *((byte*) DTV_BLITTER_DEST_STEP#0) ← (unumber)(number) $10
Inlining cast *((byte*) DTV_BLITTER_LEN_HI#0) ← (unumber)(number) 0
Inlining cast (byte) main::r#0 ← (unumber)(number) 0
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 53311
Simplifying constant integer cast 1
@ -504,7 +502,6 @@ Simplifying constant integer cast 0
Simplifying constant integer cast $10
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 1
@ -531,7 +528,6 @@ Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $10
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias (byte) main::r#2 = (byte) main::r#3
Successful SSA optimization Pass2AliasElimination

View File

@ -142,7 +142,7 @@ main::@4: scope:[main] from main::@1 main::@4
to:main::@6
main::@6: scope:[main] from main::@4
*((byte*) BGCOL#0) ← (number) 0
(byte) main::r#0 ← (number) $31
(byte) main::r#0 ← (byte) $31
to:main::@10
main::@10: scope:[main] from main::@10 main::@6
(byte) main::r#2 ← phi( main::@10/(byte) main::r#1 main::@6/(byte) main::r#0 )
@ -153,7 +153,7 @@ main::@10: scope:[main] from main::@10 main::@6
if((bool~) main::$3) goto main::@10
to:main::@11
main::@11: scope:[main] from main::@10
(byte) main::c#0 ← (number) 0
(byte) main::c#0 ← (byte) 0
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 )
@ -227,8 +227,6 @@ Adding number conversion cast (unumber) 4 in (byte) DTV_HIGHCOLOR#0 ← (number)
Adding number conversion cast (unumber) $20 in (byte) DTV_BADLINE_OFF#0 ← (number) $20
Adding number conversion cast (unumber) $40 in (bool~) main::$2 ← *((byte*) RASTER#0) != (number) $40
Adding number conversion cast (unumber) 0 in *((byte*) BGCOL#0) ← (number) 0
Adding number conversion cast (unumber) $31 in (byte) main::r#0 ← (number) $31
Adding number conversion cast (unumber) 0 in (byte) main::c#0 ← (number) 0
Successful SSA optimization PassNAddNumberTypeConversions
Adding number conversion cast (byte) to elements in (byte[$10]) main::palette#0 ← { (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 PassNAddArrayNumberTypeConversions
@ -242,8 +240,6 @@ Inlining cast (byte) DTV_HIGHCOLOR#0 ← (unumber)(number) 4
Inlining cast (byte) DTV_BADLINE_OFF#0 ← (unumber)(number) $20
Inlining cast (byte*) DTV_PALETTE#0 ← (byte*)(number) $d200
Inlining cast *((byte*) BGCOL#0) ← (unumber)(number) 0
Inlining cast (byte) main::r#0 ← (unumber)(number) $31
Inlining cast (byte) main::c#0 ← (unumber)(number) 0
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 53266
Simplifying constant pointer cast (byte*) 53281
@ -272,8 +268,6 @@ Simplifying constant integer cast $e
Simplifying constant integer cast $f
Simplifying constant integer cast $40
Simplifying constant integer cast 0
Simplifying constant integer cast $31
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 2
@ -281,8 +275,6 @@ Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) $20
Finalized unsigned number type (byte) $40
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $31
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Simple Condition (bool~) main::$2 [17] if(*((byte*) RASTER#0)!=(byte) $40) goto main::@4
Simple Condition (bool~) main::$3 [25] if((byte) main::r#1!=rangelast($31,$ff)) goto main::@10

View File

@ -1848,7 +1848,7 @@ gfx_init_plane_8bppchunky: {
lda #>$4000
sta gfxb+1
b1:
lda #0
lda #<0
sta x
sta x+1
b2:

View File

@ -1164,7 +1164,7 @@ gfx_init_plane_8bppchunky::@1: scope:[gfx_init_plane_8bppchunky] from gfx_init_
to:gfx_init_plane_8bppchunky::@2
gfx_init_plane_8bppchunky::@2: scope:[gfx_init_plane_8bppchunky] from gfx_init_plane_8bppchunky::@1 gfx_init_plane_8bppchunky::@3
[581] (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 ← phi( gfx_init_plane_8bppchunky::@1/(byte) gfx_init_plane_8bppchunky::gfxbCpuBank#7 gfx_init_plane_8bppchunky::@3/(byte) gfx_init_plane_8bppchunky::gfxbCpuBank#8 )
[581] (word) gfx_init_plane_8bppchunky::x#2 ← phi( gfx_init_plane_8bppchunky::@1/(byte) 0 gfx_init_plane_8bppchunky::@3/(word) gfx_init_plane_8bppchunky::x#1 )
[581] (word) gfx_init_plane_8bppchunky::x#2 ← phi( gfx_init_plane_8bppchunky::@1/(word) 0 gfx_init_plane_8bppchunky::@3/(word) gfx_init_plane_8bppchunky::x#1 )
[581] (byte*) gfx_init_plane_8bppchunky::gfxb#3 ← phi( gfx_init_plane_8bppchunky::@1/(byte*) gfx_init_plane_8bppchunky::gfxb#5 gfx_init_plane_8bppchunky::@3/(byte*) gfx_init_plane_8bppchunky::gfxb#1 )
[582] if((byte*) gfx_init_plane_8bppchunky::gfxb#3!=(word) $8000) goto gfx_init_plane_8bppchunky::@3
to:gfx_init_plane_8bppchunky::@4

View File

@ -647,7 +647,7 @@ keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matri
keyboard_event_scan: scope:[keyboard_event_scan] from form_control::@3 gfx_mode::@36
(byte) keyboard_events_size#99 ← phi( form_control::@3/(byte) keyboard_events_size#48 gfx_mode::@36/(byte) keyboard_events_size#44 )
(byte) keyboard_event_scan::keycode#0 ← (number) 0
(byte) keyboard_event_scan::row#0 ← (number) 0
(byte) keyboard_event_scan::row#0 ← (byte) 0
to:keyboard_event_scan::@8
keyboard_event_scan::@8: scope:[keyboard_event_scan] from keyboard_event_scan keyboard_event_scan::@10
(byte) keyboard_events_size#90 ← phi( keyboard_event_scan/(byte) keyboard_events_size#99 keyboard_event_scan::@10/(byte) keyboard_events_size#100 )
@ -672,7 +672,7 @@ keyboard_event_scan::@9: scope:[keyboard_event_scan] from keyboard_event_scan::
(byte) keyboard_event_scan::keycode#12 ← phi( keyboard_event_scan::@25/(byte) keyboard_event_scan::keycode#7 )
(byte) keyboard_event_scan::row#9 ← phi( keyboard_event_scan::@25/(byte) keyboard_event_scan::row#3 )
(byte) keyboard_event_scan::row_scan#5 ← phi( keyboard_event_scan::@25/(byte) keyboard_event_scan::row_scan#0 )
(byte) keyboard_event_scan::col#0 ← (number) 0
(byte) keyboard_event_scan::col#0 ← (byte) 0
to:keyboard_event_scan::@11
keyboard_event_scan::@21: scope:[keyboard_event_scan] from keyboard_event_scan::@25
(byte) keyboard_events_size#109 ← phi( keyboard_event_scan::@25/(byte) keyboard_events_size#77 )
@ -903,7 +903,7 @@ keyboard_event_get::@return: scope:[keyboard_event_get] from keyboard_event_get
bitmap_init: scope:[bitmap_init] from gfx_init_vic_bitmap
(byte*) bitmap_init::bitmap#2 ← phi( gfx_init_vic_bitmap/(byte*) bitmap_init::bitmap#0 )
(byte) bitmap_init::bits#0 ← (number) $80
(byte) bitmap_init::x#0 ← (number) 0
(byte) bitmap_init::x#0 ← (byte) 0
to:bitmap_init::@1
bitmap_init::@1: scope:[bitmap_init] from bitmap_init bitmap_init::@2
(byte) bitmap_init::bits#3 ← phi( bitmap_init/(byte) bitmap_init::bits#0 bitmap_init::@2/(byte) bitmap_init::bits#4 )
@ -935,7 +935,7 @@ bitmap_init::@3: scope:[bitmap_init] from bitmap_init::@1
to:bitmap_init::@2
bitmap_init::@4: scope:[bitmap_init] from bitmap_init::@2
(byte*) bitmap_init::yoffs#0 ← ((byte*)) (number) 0
(byte) bitmap_init::y#0 ← (number) 0
(byte) bitmap_init::y#0 ← (byte) 0
to:bitmap_init::@5
bitmap_init::@5: scope:[bitmap_init] from bitmap_init::@4 bitmap_init::@6
(byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@4/(byte*) bitmap_init::yoffs#0 bitmap_init::@6/(byte*) bitmap_init::yoffs#4 )
@ -971,12 +971,12 @@ bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@6
bitmap_clear: scope:[bitmap_clear] from gfx_init_vic_bitmap::@3
(byte*~) bitmap_clear::$0 ← ((byte*)) { *((byte[$100]) bitmap_plot_xhi#0 + (number) 0), *((byte[$100]) bitmap_plot_xlo#0 + (number) 0) }
(byte*) bitmap_clear::bitmap#0 ← (byte*~) bitmap_clear::$0
(byte) bitmap_clear::y#0 ← (number) 0
(byte) bitmap_clear::y#0 ← (byte) 0
to:bitmap_clear::@1
bitmap_clear::@1: scope:[bitmap_clear] from bitmap_clear bitmap_clear::@3
(byte) bitmap_clear::y#4 ← phi( bitmap_clear/(byte) bitmap_clear::y#0 bitmap_clear::@3/(byte) bitmap_clear::y#1 )
(byte*) bitmap_clear::bitmap#3 ← phi( bitmap_clear/(byte*) bitmap_clear::bitmap#0 bitmap_clear::@3/(byte*) bitmap_clear::bitmap#4 )
(byte) bitmap_clear::x#0 ← (number) 0
(byte) bitmap_clear::x#0 ← (byte) 0
to:bitmap_clear::@2
bitmap_clear::@2: scope:[bitmap_clear] from bitmap_clear::@1 bitmap_clear::@2
(byte) bitmap_clear::y#3 ← phi( bitmap_clear::@1/(byte) bitmap_clear::y#4 bitmap_clear::@2/(byte) bitmap_clear::y#3 )
@ -2340,7 +2340,7 @@ gfx_mode::@50: scope:[gfx_mode] from gfx_mode::@49
(byte*~) gfx_mode::$63 ← (byte*) get_vic_screen::return#11
(byte*) gfx_mode::vic_colors#0 ← (byte*~) gfx_mode::$63
(byte*) gfx_mode::col#0 ← (byte*) COLS#0
(byte) gfx_mode::cy#0 ← (number) 0
(byte) gfx_mode::cy#0 ← (byte) 0
to:gfx_mode::@21
gfx_mode::@20: scope:[gfx_mode] from gfx_mode::@8
(byte) keyboard_modifiers#112 ← phi( gfx_mode::@8/(byte) keyboard_modifiers#113 )
@ -2355,7 +2355,7 @@ gfx_mode::@21: scope:[gfx_mode] from gfx_mode::@23 gfx_mode::@50
(byte) gfx_mode::cy#4 ← phi( gfx_mode::@23/(byte) gfx_mode::cy#1 gfx_mode::@50/(byte) gfx_mode::cy#0 )
(byte*) gfx_mode::col#3 ← phi( gfx_mode::@23/(byte*) gfx_mode::col#4 gfx_mode::@50/(byte*) gfx_mode::col#0 )
(byte*) gfx_mode::vic_colors#3 ← phi( gfx_mode::@23/(byte*) gfx_mode::vic_colors#4 gfx_mode::@50/(byte*) gfx_mode::vic_colors#0 )
(byte) gfx_mode::cx#0 ← (number) 0
(byte) gfx_mode::cx#0 ← (byte) 0
to:gfx_mode::@22
gfx_mode::@22: scope:[gfx_mode] from gfx_mode::@21 gfx_mode::@22
(byte) keyboard_modifiers#96 ← phi( gfx_mode::@21/(byte) keyboard_modifiers#98 gfx_mode::@22/(byte) keyboard_modifiers#96 )
@ -2403,12 +2403,12 @@ gfx_mode::@24: scope:[gfx_mode] from gfx_mode::@23
gfx_mode::@10: scope:[gfx_mode] from gfx_mode::@24
(byte) keyboard_modifiers#78 ← phi( gfx_mode::@24/(byte) keyboard_modifiers#85 )
(byte) keyboard_events_size#82 ← phi( gfx_mode::@24/(byte) keyboard_events_size#94 )
(byte) gfx_mode::i#0 ← (number) 0
(byte) gfx_mode::i#0 ← (byte) 0
to:gfx_mode::@29
gfx_mode::@25: scope:[gfx_mode] from gfx_mode::@24
(byte) keyboard_modifiers#77 ← phi( gfx_mode::@24/(byte) keyboard_modifiers#85 )
(byte) keyboard_events_size#81 ← phi( gfx_mode::@24/(byte) keyboard_events_size#94 )
(byte) gfx_mode::j#0 ← (number) 0
(byte) gfx_mode::j#0 ← (byte) 0
to:gfx_mode::@26
gfx_mode::@26: scope:[gfx_mode] from gfx_mode::@25 gfx_mode::@26
(byte) keyboard_modifiers#57 ← phi( gfx_mode::@25/(byte) keyboard_modifiers#77 gfx_mode::@26/(byte) keyboard_modifiers#57 )
@ -2524,13 +2524,13 @@ gfx_init_charset: scope:[gfx_init_charset] from gfx_init::@5
*((byte*) PROCPORT#0) ← (number) $32
(byte*) gfx_init_charset::chargen#0 ← (byte*) CHARGEN#0
(byte*) gfx_init_charset::charset#0 ← (byte*) VIC_CHARSET_ROM#0
(byte) gfx_init_charset::c#0 ← (number) 0
(byte) gfx_init_charset::c#0 ← (byte) 0
to:gfx_init_charset::@1
gfx_init_charset::@1: scope:[gfx_init_charset] from gfx_init_charset gfx_init_charset::@3
(byte) gfx_init_charset::c#4 ← phi( gfx_init_charset/(byte) gfx_init_charset::c#0 gfx_init_charset::@3/(byte) gfx_init_charset::c#1 )
(byte*) gfx_init_charset::charset#3 ← phi( gfx_init_charset/(byte*) gfx_init_charset::charset#0 gfx_init_charset::@3/(byte*) gfx_init_charset::charset#4 )
(byte*) gfx_init_charset::chargen#3 ← phi( gfx_init_charset/(byte*) gfx_init_charset::chargen#0 gfx_init_charset::@3/(byte*) gfx_init_charset::chargen#4 )
(byte) gfx_init_charset::l#0 ← (number) 0
(byte) gfx_init_charset::l#0 ← (byte) 0
to:gfx_init_charset::@2
gfx_init_charset::@2: scope:[gfx_init_charset] from gfx_init_charset::@1 gfx_init_charset::@2
(byte) gfx_init_charset::c#3 ← phi( gfx_init_charset::@1/(byte) gfx_init_charset::c#4 gfx_init_charset::@2/(byte) gfx_init_charset::c#3 )
@ -2560,12 +2560,12 @@ gfx_init_charset::@return: scope:[gfx_init_charset] from gfx_init_charset::@4
to:@return
gfx_init_screen0: scope:[gfx_init_screen0] from gfx_init
(byte*) gfx_init_screen0::ch#0 ← (byte*) VIC_SCREEN0#0
(byte) gfx_init_screen0::cy#0 ← (number) 0
(byte) gfx_init_screen0::cy#0 ← (byte) 0
to:gfx_init_screen0::@1
gfx_init_screen0::@1: scope:[gfx_init_screen0] from gfx_init_screen0 gfx_init_screen0::@3
(byte*) gfx_init_screen0::ch#3 ← phi( gfx_init_screen0/(byte*) gfx_init_screen0::ch#0 gfx_init_screen0::@3/(byte*) gfx_init_screen0::ch#4 )
(byte) gfx_init_screen0::cy#4 ← phi( gfx_init_screen0/(byte) gfx_init_screen0::cy#0 gfx_init_screen0::@3/(byte) gfx_init_screen0::cy#1 )
(byte) gfx_init_screen0::cx#0 ← (number) 0
(byte) gfx_init_screen0::cx#0 ← (byte) 0
to:gfx_init_screen0::@2
gfx_init_screen0::@2: scope:[gfx_init_screen0] from gfx_init_screen0::@1 gfx_init_screen0::@2
(byte*) gfx_init_screen0::ch#2 ← phi( gfx_init_screen0::@1/(byte*) gfx_init_screen0::ch#3 gfx_init_screen0::@2/(byte*) gfx_init_screen0::ch#1 )
@ -2593,12 +2593,12 @@ gfx_init_screen0::@return: scope:[gfx_init_screen0] from gfx_init_screen0::@3
to:@return
gfx_init_screen1: scope:[gfx_init_screen1] from gfx_init::@1
(byte*) gfx_init_screen1::ch#0 ← (byte*) VIC_SCREEN1#0
(byte) gfx_init_screen1::cy#0 ← (number) 0
(byte) gfx_init_screen1::cy#0 ← (byte) 0
to:gfx_init_screen1::@1
gfx_init_screen1::@1: scope:[gfx_init_screen1] from gfx_init_screen1 gfx_init_screen1::@3
(byte*) gfx_init_screen1::ch#3 ← phi( gfx_init_screen1/(byte*) gfx_init_screen1::ch#0 gfx_init_screen1::@3/(byte*) gfx_init_screen1::ch#4 )
(byte) gfx_init_screen1::cy#4 ← phi( gfx_init_screen1/(byte) gfx_init_screen1::cy#0 gfx_init_screen1::@3/(byte) gfx_init_screen1::cy#1 )
(byte) gfx_init_screen1::cx#0 ← (number) 0
(byte) gfx_init_screen1::cx#0 ← (byte) 0
to:gfx_init_screen1::@2
gfx_init_screen1::@2: scope:[gfx_init_screen1] from gfx_init_screen1::@1 gfx_init_screen1::@2
(byte*) gfx_init_screen1::ch#2 ← phi( gfx_init_screen1::@1/(byte*) gfx_init_screen1::ch#3 gfx_init_screen1::@2/(byte*) gfx_init_screen1::ch#1 )
@ -2624,12 +2624,12 @@ gfx_init_screen1::@return: scope:[gfx_init_screen1] from gfx_init_screen1::@3
to:@return
gfx_init_screen2: scope:[gfx_init_screen2] from gfx_init::@2
(byte*) gfx_init_screen2::ch#0 ← (byte*) VIC_SCREEN2#0
(byte) gfx_init_screen2::cy#0 ← (number) 0
(byte) gfx_init_screen2::cy#0 ← (byte) 0
to:gfx_init_screen2::@1
gfx_init_screen2::@1: scope:[gfx_init_screen2] from gfx_init_screen2 gfx_init_screen2::@3
(byte*) gfx_init_screen2::ch#3 ← phi( gfx_init_screen2/(byte*) gfx_init_screen2::ch#0 gfx_init_screen2::@3/(byte*) gfx_init_screen2::ch#4 )
(byte) gfx_init_screen2::cy#4 ← phi( gfx_init_screen2/(byte) gfx_init_screen2::cy#0 gfx_init_screen2::@3/(byte) gfx_init_screen2::cy#1 )
(byte) gfx_init_screen2::cx#0 ← (number) 0
(byte) gfx_init_screen2::cx#0 ← (byte) 0
to:gfx_init_screen2::@2
gfx_init_screen2::@2: scope:[gfx_init_screen2] from gfx_init_screen2::@1 gfx_init_screen2::@2
(byte*) gfx_init_screen2::ch#2 ← phi( gfx_init_screen2::@1/(byte*) gfx_init_screen2::ch#3 gfx_init_screen2::@2/(byte*) gfx_init_screen2::ch#1 )
@ -2660,12 +2660,12 @@ gfx_init_screen2::@return: scope:[gfx_init_screen2] from gfx_init_screen2::@3
to:@return
gfx_init_screen3: scope:[gfx_init_screen3] from gfx_init::@3
(byte*) gfx_init_screen3::ch#0 ← (byte*) VIC_SCREEN3#0
(byte) gfx_init_screen3::cy#0 ← (number) 0
(byte) gfx_init_screen3::cy#0 ← (byte) 0
to:gfx_init_screen3::@1
gfx_init_screen3::@1: scope:[gfx_init_screen3] from gfx_init_screen3 gfx_init_screen3::@3
(byte*) gfx_init_screen3::ch#3 ← phi( gfx_init_screen3/(byte*) gfx_init_screen3::ch#0 gfx_init_screen3::@3/(byte*) gfx_init_screen3::ch#4 )
(byte) gfx_init_screen3::cy#4 ← phi( gfx_init_screen3/(byte) gfx_init_screen3::cy#0 gfx_init_screen3::@3/(byte) gfx_init_screen3::cy#1 )
(byte) gfx_init_screen3::cx#0 ← (number) 0
(byte) gfx_init_screen3::cx#0 ← (byte) 0
to:gfx_init_screen3::@2
gfx_init_screen3::@2: scope:[gfx_init_screen3] from gfx_init_screen3::@1 gfx_init_screen3::@2
(byte*) gfx_init_screen3::ch#2 ← phi( gfx_init_screen3::@1/(byte*) gfx_init_screen3::ch#3 gfx_init_screen3::@2/(byte*) gfx_init_screen3::ch#1 )
@ -2693,12 +2693,12 @@ gfx_init_screen3::@return: scope:[gfx_init_screen3] from gfx_init_screen3::@3
to:@return
gfx_init_screen4: scope:[gfx_init_screen4] from gfx_init::@4
(byte*) gfx_init_screen4::ch#0 ← (byte*) VIC_SCREEN4#0
(byte) gfx_init_screen4::cy#0 ← (number) 0
(byte) gfx_init_screen4::cy#0 ← (byte) 0
to:gfx_init_screen4::@1
gfx_init_screen4::@1: scope:[gfx_init_screen4] from gfx_init_screen4 gfx_init_screen4::@3
(byte) gfx_init_screen4::cy#4 ← phi( gfx_init_screen4/(byte) gfx_init_screen4::cy#0 gfx_init_screen4::@3/(byte) gfx_init_screen4::cy#1 )
(byte*) gfx_init_screen4::ch#3 ← phi( gfx_init_screen4/(byte*) gfx_init_screen4::ch#0 gfx_init_screen4::@3/(byte*) gfx_init_screen4::ch#4 )
(byte) gfx_init_screen4::cx#0 ← (number) 0
(byte) gfx_init_screen4::cx#0 ← (byte) 0
to:gfx_init_screen4::@2
gfx_init_screen4::@2: scope:[gfx_init_screen4] from gfx_init_screen4::@1 gfx_init_screen4::@2
(byte) gfx_init_screen4::cy#3 ← phi( gfx_init_screen4::@1/(byte) gfx_init_screen4::cy#4 gfx_init_screen4::@2/(byte) gfx_init_screen4::cy#3 )
@ -2763,13 +2763,13 @@ gfx_init_plane_8bppchunky::@7: scope:[gfx_init_plane_8bppchunky] from gfx_init_
(byte) gfx_init_plane_8bppchunky::gfxbCpuBank#3 ← phi( gfx_init_plane_8bppchunky/(byte) gfx_init_plane_8bppchunky::gfxbCpuBank#0 )
(byte) gfx_init_plane_8bppchunky::gfxbCpuBank#1 ← ++ (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#3
(byte*) gfx_init_plane_8bppchunky::gfxb#0 ← ((byte*)) (number) $4000
(byte) gfx_init_plane_8bppchunky::y#0 ← (number) 0
(byte) gfx_init_plane_8bppchunky::y#0 ← (byte) 0
to:gfx_init_plane_8bppchunky::@1
gfx_init_plane_8bppchunky::@1: scope:[gfx_init_plane_8bppchunky] from gfx_init_plane_8bppchunky::@5 gfx_init_plane_8bppchunky::@7
(byte) gfx_init_plane_8bppchunky::gfxbCpuBank#7 ← phi( gfx_init_plane_8bppchunky::@5/(byte) gfx_init_plane_8bppchunky::gfxbCpuBank#9 gfx_init_plane_8bppchunky::@7/(byte) gfx_init_plane_8bppchunky::gfxbCpuBank#1 )
(byte) gfx_init_plane_8bppchunky::y#6 ← phi( gfx_init_plane_8bppchunky::@5/(byte) gfx_init_plane_8bppchunky::y#1 gfx_init_plane_8bppchunky::@7/(byte) gfx_init_plane_8bppchunky::y#0 )
(byte*) gfx_init_plane_8bppchunky::gfxb#5 ← phi( gfx_init_plane_8bppchunky::@5/(byte*) gfx_init_plane_8bppchunky::gfxb#6 gfx_init_plane_8bppchunky::@7/(byte*) gfx_init_plane_8bppchunky::gfxb#0 )
(word) gfx_init_plane_8bppchunky::x#0 ← (number) 0
(word) gfx_init_plane_8bppchunky::x#0 ← (word) 0
to:gfx_init_plane_8bppchunky::@2
gfx_init_plane_8bppchunky::@2: scope:[gfx_init_plane_8bppchunky] from gfx_init_plane_8bppchunky::@1 gfx_init_plane_8bppchunky::@3
(byte) gfx_init_plane_8bppchunky::gfxbCpuBank#6 ← phi( gfx_init_plane_8bppchunky::@1/(byte) gfx_init_plane_8bppchunky::gfxbCpuBank#7 gfx_init_plane_8bppchunky::@3/(byte) gfx_init_plane_8bppchunky::gfxbCpuBank#8 )
@ -2840,12 +2840,12 @@ gfx_init_plane_horisontal::@9: scope:[gfx_init_plane_horisontal] from gfx_init_
(number~) gfx_init_plane_horisontal::$3 ← (dword) PLANE_HORISONTAL#0 & (number) $3fff
(number~) gfx_init_plane_horisontal::$4 ← (number) $4000 + (number~) gfx_init_plane_horisontal::$3
(byte*) gfx_init_plane_horisontal::gfxa#0 ← ((byte*)) (number~) gfx_init_plane_horisontal::$4
(byte) gfx_init_plane_horisontal::ay#0 ← (number) 0
(byte) gfx_init_plane_horisontal::ay#0 ← (byte) 0
to:gfx_init_plane_horisontal::@1
gfx_init_plane_horisontal::@1: scope:[gfx_init_plane_horisontal] from gfx_init_plane_horisontal::@7 gfx_init_plane_horisontal::@9
(byte*) gfx_init_plane_horisontal::gfxa#6 ← phi( gfx_init_plane_horisontal::@7/(byte*) gfx_init_plane_horisontal::gfxa#8 gfx_init_plane_horisontal::@9/(byte*) gfx_init_plane_horisontal::gfxa#0 )
(byte) gfx_init_plane_horisontal::ay#4 ← phi( gfx_init_plane_horisontal::@7/(byte) gfx_init_plane_horisontal::ay#1 gfx_init_plane_horisontal::@9/(byte) gfx_init_plane_horisontal::ay#0 )
(byte) gfx_init_plane_horisontal::ax#0 ← (number) 0
(byte) gfx_init_plane_horisontal::ax#0 ← (byte) 0
to:gfx_init_plane_horisontal::@2
gfx_init_plane_horisontal::@2: scope:[gfx_init_plane_horisontal] from gfx_init_plane_horisontal::@1 gfx_init_plane_horisontal::@4
(byte) gfx_init_plane_horisontal::ax#5 ← phi( gfx_init_plane_horisontal::@1/(byte) gfx_init_plane_horisontal::ax#0 gfx_init_plane_horisontal::@4/(byte) gfx_init_plane_horisontal::ax#1 )
@ -2909,12 +2909,12 @@ gfx_init_plane_horisontal2::@5: scope:[gfx_init_plane_horisontal2] from gfx_ini
(number~) gfx_init_plane_horisontal2::$4 ← (number) $4000 + (number~) gfx_init_plane_horisontal2::$3
(byte*) gfx_init_plane_horisontal2::gfxa#0 ← ((byte*)) (number~) gfx_init_plane_horisontal2::$4
(byte[]) gfx_init_plane_horisontal2::row_bitmask#0 ← { (number) 0, (number) $55, (number) $aa, (number) $ff }
(byte) gfx_init_plane_horisontal2::ay#0 ← (number) 0
(byte) gfx_init_plane_horisontal2::ay#0 ← (byte) 0
to:gfx_init_plane_horisontal2::@1
gfx_init_plane_horisontal2::@1: scope:[gfx_init_plane_horisontal2] from gfx_init_plane_horisontal2::@3 gfx_init_plane_horisontal2::@5
(byte*) gfx_init_plane_horisontal2::gfxa#3 ← phi( gfx_init_plane_horisontal2::@3/(byte*) gfx_init_plane_horisontal2::gfxa#4 gfx_init_plane_horisontal2::@5/(byte*) gfx_init_plane_horisontal2::gfxa#0 )
(byte) gfx_init_plane_horisontal2::ay#4 ← phi( gfx_init_plane_horisontal2::@3/(byte) gfx_init_plane_horisontal2::ay#1 gfx_init_plane_horisontal2::@5/(byte) gfx_init_plane_horisontal2::ay#0 )
(byte) gfx_init_plane_horisontal2::ax#0 ← (number) 0
(byte) gfx_init_plane_horisontal2::ax#0 ← (byte) 0
to:gfx_init_plane_horisontal2::@2
gfx_init_plane_horisontal2::@2: scope:[gfx_init_plane_horisontal2] from gfx_init_plane_horisontal2::@1 gfx_init_plane_horisontal2::@2
(byte) gfx_init_plane_horisontal2::ax#2 ← phi( gfx_init_plane_horisontal2::@1/(byte) gfx_init_plane_horisontal2::ax#0 gfx_init_plane_horisontal2::@2/(byte) gfx_init_plane_horisontal2::ax#1 )
@ -2960,12 +2960,12 @@ gfx_init_plane_vertical::@5: scope:[gfx_init_plane_vertical] from gfx_init_plan
(number~) gfx_init_plane_vertical::$3 ← (dword) PLANE_VERTICAL#0 & (number) $3fff
(number~) gfx_init_plane_vertical::$4 ← (number) $4000 + (number~) gfx_init_plane_vertical::$3
(byte*) gfx_init_plane_vertical::gfxb#0 ← ((byte*)) (number~) gfx_init_plane_vertical::$4
(byte) gfx_init_plane_vertical::by#0 ← (number) 0
(byte) gfx_init_plane_vertical::by#0 ← (byte) 0
to:gfx_init_plane_vertical::@1
gfx_init_plane_vertical::@1: scope:[gfx_init_plane_vertical] from gfx_init_plane_vertical::@3 gfx_init_plane_vertical::@5
(byte) gfx_init_plane_vertical::by#4 ← phi( gfx_init_plane_vertical::@3/(byte) gfx_init_plane_vertical::by#1 gfx_init_plane_vertical::@5/(byte) gfx_init_plane_vertical::by#0 )
(byte*) gfx_init_plane_vertical::gfxb#3 ← phi( gfx_init_plane_vertical::@3/(byte*) gfx_init_plane_vertical::gfxb#4 gfx_init_plane_vertical::@5/(byte*) gfx_init_plane_vertical::gfxb#0 )
(byte) gfx_init_plane_vertical::bx#0 ← (number) 0
(byte) gfx_init_plane_vertical::bx#0 ← (byte) 0
to:gfx_init_plane_vertical::@2
gfx_init_plane_vertical::@2: scope:[gfx_init_plane_vertical] from gfx_init_plane_vertical::@1 gfx_init_plane_vertical::@2
(byte) gfx_init_plane_vertical::by#3 ← phi( gfx_init_plane_vertical::@1/(byte) gfx_init_plane_vertical::by#4 gfx_init_plane_vertical::@2/(byte) gfx_init_plane_vertical::by#3 )
@ -3011,14 +3011,14 @@ gfx_init_plane_charset8::@9: scope:[gfx_init_plane_charset8] from gfx_init_plan
(byte*) gfx_init_plane_charset8::chargen#0 ← (byte*) CHARGEN#0
*((byte*) PROCPORT#0) ← (byte) PROCPORT_RAM_CHARROM#0
(byte) gfx_init_plane_charset8::col#0 ← (number) 0
(byte) gfx_init_plane_charset8::ch#0 ← (number) 0
(byte) gfx_init_plane_charset8::ch#0 ← (byte) 0
to:gfx_init_plane_charset8::@1
gfx_init_plane_charset8::@1: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@7 gfx_init_plane_charset8::@9
(byte) gfx_init_plane_charset8::ch#8 ← phi( gfx_init_plane_charset8::@7/(byte) gfx_init_plane_charset8::ch#1 gfx_init_plane_charset8::@9/(byte) gfx_init_plane_charset8::ch#0 )
(byte) gfx_init_plane_charset8::col#6 ← phi( gfx_init_plane_charset8::@7/(byte) gfx_init_plane_charset8::col#8 gfx_init_plane_charset8::@9/(byte) gfx_init_plane_charset8::col#0 )
(byte*) gfx_init_plane_charset8::gfxa#6 ← phi( gfx_init_plane_charset8::@7/(byte*) gfx_init_plane_charset8::gfxa#8 gfx_init_plane_charset8::@9/(byte*) gfx_init_plane_charset8::gfxa#0 )
(byte*) gfx_init_plane_charset8::chargen#3 ← phi( gfx_init_plane_charset8::@7/(byte*) gfx_init_plane_charset8::chargen#5 gfx_init_plane_charset8::@9/(byte*) gfx_init_plane_charset8::chargen#0 )
(byte) gfx_init_plane_charset8::cr#0 ← (number) 0
(byte) gfx_init_plane_charset8::cr#0 ← (byte) 0
to:gfx_init_plane_charset8::@2
gfx_init_plane_charset8::@2: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@1 gfx_init_plane_charset8::@6
(byte) gfx_init_plane_charset8::ch#7 ← phi( gfx_init_plane_charset8::@1/(byte) gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::@6/(byte) gfx_init_plane_charset8::ch#3 )
@ -3028,7 +3028,7 @@ gfx_init_plane_charset8::@2: scope:[gfx_init_plane_charset8] from gfx_init_plan
(byte*) gfx_init_plane_charset8::chargen#2 ← phi( gfx_init_plane_charset8::@1/(byte*) gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::@6/(byte*) gfx_init_plane_charset8::chargen#4 )
(byte) gfx_init_plane_charset8::bits#0 ← *((byte*) gfx_init_plane_charset8::chargen#2)
(byte*) gfx_init_plane_charset8::chargen#1 ← ++ (byte*) gfx_init_plane_charset8::chargen#2
(byte) gfx_init_plane_charset8::cp#0 ← (number) 0
(byte) gfx_init_plane_charset8::cp#0 ← (byte) 0
to:gfx_init_plane_charset8::@3
gfx_init_plane_charset8::@3: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@2 gfx_init_plane_charset8::@4
(byte) gfx_init_plane_charset8::ch#5 ← phi( gfx_init_plane_charset8::@2/(byte) gfx_init_plane_charset8::ch#7 gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::ch#4 )
@ -3152,13 +3152,13 @@ gfx_init_plane_fill::@5: scope:[gfx_init_plane_fill] from gfx_init_plane_fill
(number~) gfx_init_plane_fill::$5 ← (word~) gfx_init_plane_fill::$4 & (number) $3fff
(number~) gfx_init_plane_fill::$6 ← (number) $4000 + (number~) gfx_init_plane_fill::$5
(byte*) gfx_init_plane_fill::gfxb#0 ← ((byte*)) (number~) gfx_init_plane_fill::$6
(byte) gfx_init_plane_fill::by#0 ← (number) 0
(byte) gfx_init_plane_fill::by#0 ← (byte) 0
to:gfx_init_plane_fill::@1
gfx_init_plane_fill::@1: scope:[gfx_init_plane_fill] from gfx_init_plane_fill::@3 gfx_init_plane_fill::@5
(byte) gfx_init_plane_fill::by#4 ← phi( gfx_init_plane_fill::@3/(byte) gfx_init_plane_fill::by#1 gfx_init_plane_fill::@5/(byte) gfx_init_plane_fill::by#0 )
(byte*) gfx_init_plane_fill::gfxb#3 ← phi( gfx_init_plane_fill::@3/(byte*) gfx_init_plane_fill::gfxb#4 gfx_init_plane_fill::@5/(byte*) gfx_init_plane_fill::gfxb#0 )
(byte) gfx_init_plane_fill::fill#4 ← phi( gfx_init_plane_fill::@3/(byte) gfx_init_plane_fill::fill#5 gfx_init_plane_fill::@5/(byte) gfx_init_plane_fill::fill#6 )
(byte) gfx_init_plane_fill::bx#0 ← (number) 0
(byte) gfx_init_plane_fill::bx#0 ← (byte) 0
to:gfx_init_plane_fill::@2
gfx_init_plane_fill::@2: scope:[gfx_init_plane_fill] from gfx_init_plane_fill::@1 gfx_init_plane_fill::@2
(byte) gfx_init_plane_fill::by#3 ← phi( gfx_init_plane_fill::@1/(byte) gfx_init_plane_fill::by#4 gfx_init_plane_fill::@2/(byte) gfx_init_plane_fill::by#3 )
@ -3345,7 +3345,7 @@ form_mode::@29: scope:[form_mode] from form_mode::@28
(byte~) form_mode::$33 ← > (byte*) FORM_SCREEN#0
*((byte*) DTV_PLANEA_START_MI#0) ← (byte~) form_mode::$33
*((byte*) DTV_PLANEA_START_HI#0) ← (number) 0
(byte) form_mode::i#0 ← (number) 0
(byte) form_mode::i#0 ← (byte) 0
to:form_mode::@1
form_mode::@1: scope:[form_mode] from form_mode::@1 form_mode::@29
(byte) form_field_idx#45 ← phi( form_mode::@1/(byte) form_field_idx#45 form_mode::@29/(byte) form_field_idx#49 )
@ -3517,7 +3517,7 @@ form_mode::@33: scope:[form_mode] from form_mode::@32
form_set_screen: scope:[form_set_screen] from form_mode::@26
(byte*) form_set_screen::screen#1 ← phi( form_mode::@26/(byte*) form_set_screen::screen#0 )
(byte*) form_set_screen::line#0 ← (byte*) form_set_screen::screen#1
(byte) form_set_screen::y#0 ← (number) 0
(byte) form_set_screen::y#0 ← (byte) 0
to:form_set_screen::@1
form_set_screen::@1: scope:[form_set_screen] from form_set_screen form_set_screen::@1
(byte) form_set_screen::y#2 ← phi( form_set_screen/(byte) form_set_screen::y#0 form_set_screen::@1/(byte) form_set_screen::y#1 )
@ -6859,8 +6859,6 @@ Adding number conversion cast (unumber) 2 in (byte) KEY_MODIFIER_RSHIFT#0 ← (n
Adding number conversion cast (unumber) 4 in (byte) KEY_MODIFIER_CTRL#0 ← (number) 4
Adding number conversion cast (unumber) 8 in (byte) KEY_MODIFIER_COMMODORE#0 ← (number) 8
Adding number conversion cast (unumber) 0 in (byte) keyboard_event_scan::keycode#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) keyboard_event_scan::row#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) keyboard_event_scan::col#0 ← (number) 0
Adding number conversion cast (unumber) 8 in (number~) keyboard_event_scan::$14 ← (byte) keyboard_event_scan::keycode#3 + (number) 8
Adding number conversion cast (unumber) keyboard_event_scan::$14 in (number~) keyboard_event_scan::$14 ← (byte) keyboard_event_scan::keycode#3 + (unumber)(number) 8
Adding number conversion cast (unumber) 0 in (bool~) keyboard_event_scan::$17 ← (byte~) keyboard_event_scan::$16 != (number) 0
@ -6879,13 +6877,11 @@ Adding number conversion cast (unumber) keyboard_event_pressed::$1 in (number~)
Adding number conversion cast (unumber) 0 in (bool~) keyboard_event_get::$0 ← (byte) keyboard_events_size#22 == (number) 0
Adding number conversion cast (unumber) $ff in (byte) keyboard_event_get::return#0 ← (number) $ff
Adding number conversion cast (unumber) $80 in (byte) bitmap_init::bits#0 ← (number) $80
Adding number conversion cast (unumber) 0 in (byte) bitmap_init::x#0 ← (number) 0
Adding number conversion cast (unumber) $f8 in (number~) bitmap_init::$0 ← (byte) bitmap_init::x#2 & (number) $f8
Adding number conversion cast (unumber) bitmap_init::$0 in (number~) bitmap_init::$0 ← (byte) bitmap_init::x#2 & (unumber)(number) $f8
Adding number conversion cast (unumber) 1 in (byte~) bitmap_init::$2 ← (byte) bitmap_init::bits#3 >> (number) 1
Adding number conversion cast (unumber) 0 in (bool~) bitmap_init::$3 ← (byte) bitmap_init::bits#1 == (number) 0
Adding number conversion cast (unumber) $80 in (byte) bitmap_init::bits#2 ← (number) $80
Adding number conversion cast (unumber) 0 in (byte) bitmap_init::y#0 ← (number) 0
Adding number conversion cast (unumber) 7 in (number~) bitmap_init::$6 ← (byte) bitmap_init::y#2 & (number) 7
Adding number conversion cast (unumber) bitmap_init::$6 in (number~) bitmap_init::$6 ← (byte) bitmap_init::y#2 & (unumber)(number) 7
Adding number conversion cast (unumber) bitmap_init::$8 in (number~) bitmap_init::$8 ← (unumber~) bitmap_init::$6 | (byte~) bitmap_init::$7
@ -6895,8 +6891,6 @@ Adding number conversion cast (unumber) 7 in (bool~) bitmap_init::$11 ← (unumb
Adding number conversion cast (unumber) bitmap_init::$13 in (byte*~) bitmap_init::$14 ← (byte*) bitmap_init::yoffs#3 + (number~) bitmap_init::$13
Adding number conversion cast (unumber) 0 in (var) bitmap_clear::$3 ← (byte)*((byte[$100]) bitmap_plot_xhi#0 + (number) 0) w= (byte)*((byte[$100]) bitmap_plot_xlo#0 + (number) 0)
Adding number conversion cast (unumber) 0 in (var) bitmap_clear::$3 ← (byte)*((byte[$100]) bitmap_plot_xhi#0 + (unumber)(number) 0) w= (byte)*((byte[$100]) bitmap_plot_xlo#0 + (number) 0)
Adding number conversion cast (unumber) 0 in (byte) bitmap_clear::y#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) bitmap_clear::x#0 ← (number) 0
Adding number conversion cast (unumber) 0 in *((byte*) bitmap_clear::bitmap#2) ← (number) 0
Adding number conversion cast (unumber) 1 in (byte~) bitmap_line_xdyi::$0 ← (byte) bitmap_line_xdyi::yd#2 >> (number) 1
Adding number conversion cast (unumber) 1 in (number~) bitmap_line_xdyi::$6 ← (byte) bitmap_line_xdyi::x1#2 + (number) 1
@ -7048,8 +7042,6 @@ Adding number conversion cast (unumber) gfx_mode::$60 in (number~) gfx_mode::$60
Adding number conversion cast (unumber) 4 in (number~) gfx_mode::$61 ← (unumber~) gfx_mode::$60 / (number) 4
Adding number conversion cast (unumber) gfx_mode::$61 in (number~) gfx_mode::$61 ← (unumber~) gfx_mode::$60 / (unumber)(number) 4
Adding number conversion cast (unumber) gfx_mode::$62 in (number~) gfx_mode::$62 ← (byte~) gfx_mode::$56 | (unumber~) gfx_mode::$61
Adding number conversion cast (unumber) 0 in (byte) gfx_mode::cy#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) gfx_mode::cx#0 ← (number) 0
Adding number conversion cast (unumber) 0 in *((byte*) BORDERCOL#0) ← (number) 0
Adding number conversion cast (unumber) $10 in (number~) gfx_mode::$64 ← *((byte*) form_vic_bg0_hi#0) * (number) $10
Adding number conversion cast (unumber) gfx_mode::$64 in (number~) gfx_mode::$64 ← *((byte*) form_vic_bg0_hi#0) * (unumber)(number) $10
@ -7064,15 +7056,9 @@ Adding number conversion cast (unumber) $10 in (number~) gfx_mode::$70 ← *((by
Adding number conversion cast (unumber) gfx_mode::$70 in (number~) gfx_mode::$70 ← *((byte*) form_vic_bg3_hi#0) * (unumber)(number) $10
Adding number conversion cast (unumber) gfx_mode::$71 in (number~) gfx_mode::$71 ← (unumber~) gfx_mode::$70 | *((byte*) form_vic_bg3_lo#0)
Adding number conversion cast (unumber) 0 in (bool~) gfx_mode::$72 ← *((byte*) form_dtv_palet#0) == (number) 0
Adding number conversion cast (unumber) 0 in (byte) gfx_mode::i#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) gfx_mode::j#0 ← (number) 0
Adding number conversion cast (unumber) $ff in (bool~) gfx_mode::$86 ← *((byte*) RASTER#0) != (number) $ff
Adding number conversion cast (unumber) $32 in *((byte*) PROCPORT#0) ← (number) $32
Adding number conversion cast (unumber) 0 in (byte) gfx_init_charset::c#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) gfx_init_charset::l#0 ← (number) 0
Adding number conversion cast (unumber) $37 in *((byte*) PROCPORT#0) ← (number) $37
Adding number conversion cast (unumber) 0 in (byte) gfx_init_screen0::cy#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) gfx_init_screen0::cx#0 ← (number) 0
Adding number conversion cast (unumber) $f in (number~) gfx_init_screen0::$0 ← (byte) gfx_init_screen0::cy#2 & (number) $f
Adding number conversion cast (unumber) gfx_init_screen0::$0 in (number~) gfx_init_screen0::$0 ← (byte) gfx_init_screen0::cy#2 & (unumber)(number) $f
Adding number conversion cast (unumber) $10 in (number~) gfx_init_screen0::$1 ← (unumber~) gfx_init_screen0::$0 * (number) $10
@ -7080,12 +7066,8 @@ Adding number conversion cast (unumber) gfx_init_screen0::$1 in (number~) gfx_in
Adding number conversion cast (unumber) $f in (number~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx#2 & (number) $f
Adding number conversion cast (unumber) gfx_init_screen0::$2 in (number~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx#2 & (unumber)(number) $f
Adding number conversion cast (unumber) gfx_init_screen0::$3 in (number~) gfx_init_screen0::$3 ← (unumber~) gfx_init_screen0::$1 | (unumber~) gfx_init_screen0::$2
Adding number conversion cast (unumber) 0 in (byte) gfx_init_screen1::cy#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) gfx_init_screen1::cx#0 ← (number) 0
Adding number conversion cast (unumber) $f in (number~) gfx_init_screen1::$1 ← (byte~) gfx_init_screen1::$0 & (number) $f
Adding number conversion cast (unumber) gfx_init_screen1::$1 in (number~) gfx_init_screen1::$1 ← (byte~) gfx_init_screen1::$0 & (unumber)(number) $f
Adding number conversion cast (unumber) 0 in (byte) gfx_init_screen2::cy#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) gfx_init_screen2::cx#0 ← (number) 0
Adding number conversion cast (unumber) $f in (number~) gfx_init_screen2::$1 ← (byte~) gfx_init_screen2::$0 & (number) $f
Adding number conversion cast (unumber) gfx_init_screen2::$1 in (number~) gfx_init_screen2::$1 ← (byte~) gfx_init_screen2::$0 & (unumber)(number) $f
Adding number conversion cast (unumber) $f in (number~) gfx_init_screen2::$2 ← (number) $f - (byte) gfx_init_screen2::col#0
@ -7093,8 +7075,6 @@ Adding number conversion cast (unumber) gfx_init_screen2::$2 in (number~) gfx_in
Adding number conversion cast (unumber) $10 in (number~) gfx_init_screen2::$3 ← (byte) gfx_init_screen2::col#0 * (number) $10
Adding number conversion cast (unumber) gfx_init_screen2::$3 in (number~) gfx_init_screen2::$3 ← (byte) gfx_init_screen2::col#0 * (unumber)(number) $10
Adding number conversion cast (unumber) gfx_init_screen2::$4 in (number~) gfx_init_screen2::$4 ← (unumber~) gfx_init_screen2::$3 | (byte) gfx_init_screen2::col2#0
Adding number conversion cast (unumber) 0 in (byte) gfx_init_screen3::cy#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) gfx_init_screen3::cx#0 ← (number) 0
Adding number conversion cast (unumber) 3 in (number~) gfx_init_screen3::$0 ← (byte) gfx_init_screen3::cx#2 & (number) 3
Adding number conversion cast (unumber) gfx_init_screen3::$0 in (number~) gfx_init_screen3::$0 ← (byte) gfx_init_screen3::cx#2 & (unumber)(number) 3
Adding number conversion cast (unumber) $10 in (number~) gfx_init_screen3::$1 ← (unumber~) gfx_init_screen3::$0 * (number) $10
@ -7102,8 +7082,6 @@ Adding number conversion cast (unumber) gfx_init_screen3::$1 in (number~) gfx_in
Adding number conversion cast (unumber) 3 in (number~) gfx_init_screen3::$2 ← (byte) gfx_init_screen3::cy#2 & (number) 3
Adding number conversion cast (unumber) gfx_init_screen3::$2 in (number~) gfx_init_screen3::$2 ← (byte) gfx_init_screen3::cy#2 & (unumber)(number) 3
Adding number conversion cast (unumber) gfx_init_screen3::$3 in (number~) gfx_init_screen3::$3 ← (unumber~) gfx_init_screen3::$1 | (unumber~) gfx_init_screen3::$2
Adding number conversion cast (unumber) 0 in (byte) gfx_init_screen4::cy#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) gfx_init_screen4::cx#0 ← (number) 0
Adding number conversion cast (unumber) 0 in *((byte*) gfx_init_screen4::ch#2) ← (number) 0
Adding number conversion cast (unumber) 9 in (byte) gfx_init_vic_bitmap::lines_cnt#0 ← (number) 9
Adding number conversion cast (unumber) 0 in (byte) gfx_init_vic_bitmap::l#0 ← (number) 0
@ -7113,8 +7091,6 @@ Adding number conversion cast (unumber) 1 in (number~) gfx_init_vic_bitmap::$3
Adding number conversion cast (unumber) gfx_init_vic_bitmap::$3 in (number~) gfx_init_vic_bitmap::$3 ← (byte) gfx_init_vic_bitmap::l#2 + (unumber)(number) 1
Adding number conversion cast (unumber) $4000 in (number~) gfx_init_plane_8bppchunky::$0 ← (dword) PLANE_8BPP_CHUNKY#0 / (number) $4000
Adding number conversion cast (unumber) gfx_init_plane_8bppchunky::$0 in (number~) gfx_init_plane_8bppchunky::$0 ← (dword) PLANE_8BPP_CHUNKY#0 / (unumber)(number) $4000
Adding number conversion cast (unumber) 0 in (byte) gfx_init_plane_8bppchunky::y#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (word) gfx_init_plane_8bppchunky::x#0 ← (number) 0
Adding number conversion cast (unumber) $8000 in (bool~) gfx_init_plane_8bppchunky::$6 ← (byte*) gfx_init_plane_8bppchunky::gfxb#3 == (number) $8000
Adding number conversion cast (unumber) $4000 in (number~) gfx_init_plane_horisontal::$0 ← (dword) PLANE_HORISONTAL#0 / (number) $4000
Adding number conversion cast (unumber) gfx_init_plane_horisontal::$0 in (number~) gfx_init_plane_horisontal::$0 ← (dword) PLANE_HORISONTAL#0 / (unumber)(number) $4000
@ -7122,8 +7098,6 @@ Adding number conversion cast (unumber) $3fff in (number~) gfx_init_plane_horiso
Adding number conversion cast (unumber) gfx_init_plane_horisontal::$3 in (number~) gfx_init_plane_horisontal::$3 ← (dword) PLANE_HORISONTAL#0 & (unumber)(number) $3fff
Adding number conversion cast (unumber) $4000 in (number~) gfx_init_plane_horisontal::$4 ← (number) $4000 + (unumber~) gfx_init_plane_horisontal::$3
Adding number conversion cast (unumber) gfx_init_plane_horisontal::$4 in (number~) gfx_init_plane_horisontal::$4 ← (unumber)(number) $4000 + (unumber~) gfx_init_plane_horisontal::$3
Adding number conversion cast (unumber) 0 in (byte) gfx_init_plane_horisontal::ay#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) gfx_init_plane_horisontal::ax#0 ← (number) 0
Adding number conversion cast (unumber) 4 in (number~) gfx_init_plane_horisontal::$8 ← (byte) gfx_init_plane_horisontal::ay#2 & (number) 4
Adding number conversion cast (unumber) gfx_init_plane_horisontal::$8 in (number~) gfx_init_plane_horisontal::$8 ← (byte) gfx_init_plane_horisontal::ay#2 & (unumber)(number) 4
Adding number conversion cast (unumber) 0 in (bool~) gfx_init_plane_horisontal::$9 ← (unumber~) gfx_init_plane_horisontal::$8 == (number) 0
@ -7135,8 +7109,6 @@ Adding number conversion cast (unumber) $3fff in (number~) gfx_init_plane_horiso
Adding number conversion cast (unumber) gfx_init_plane_horisontal2::$3 in (number~) gfx_init_plane_horisontal2::$3 ← (dword) PLANE_HORISONTAL2#0 & (unumber)(number) $3fff
Adding number conversion cast (unumber) $4000 in (number~) gfx_init_plane_horisontal2::$4 ← (number) $4000 + (unumber~) gfx_init_plane_horisontal2::$3
Adding number conversion cast (unumber) gfx_init_plane_horisontal2::$4 in (number~) gfx_init_plane_horisontal2::$4 ← (unumber)(number) $4000 + (unumber~) gfx_init_plane_horisontal2::$3
Adding number conversion cast (unumber) 0 in (byte) gfx_init_plane_horisontal2::ay#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) gfx_init_plane_horisontal2::ax#0 ← (number) 0
Adding number conversion cast (unumber) 2 in (number~) gfx_init_plane_horisontal2::$8 ← (byte) gfx_init_plane_horisontal2::ay#2 / (number) 2
Adding number conversion cast (unumber) gfx_init_plane_horisontal2::$8 in (number~) gfx_init_plane_horisontal2::$8 ← (byte) gfx_init_plane_horisontal2::ay#2 / (unumber)(number) 2
Adding number conversion cast (unumber) 3 in (number~) gfx_init_plane_horisontal2::$9 ← (unumber~) gfx_init_plane_horisontal2::$8 & (number) 3
@ -7147,8 +7119,6 @@ Adding number conversion cast (unumber) $3fff in (number~) gfx_init_plane_vertic
Adding number conversion cast (unumber) gfx_init_plane_vertical::$3 in (number~) gfx_init_plane_vertical::$3 ← (dword) PLANE_VERTICAL#0 & (unumber)(number) $3fff
Adding number conversion cast (unumber) $4000 in (number~) gfx_init_plane_vertical::$4 ← (number) $4000 + (unumber~) gfx_init_plane_vertical::$3
Adding number conversion cast (unumber) gfx_init_plane_vertical::$4 in (number~) gfx_init_plane_vertical::$4 ← (unumber)(number) $4000 + (unumber~) gfx_init_plane_vertical::$3
Adding number conversion cast (unumber) 0 in (byte) gfx_init_plane_vertical::by#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) gfx_init_plane_vertical::bx#0 ← (number) 0
Adding number conversion cast (unumber) $f in *((byte*) gfx_init_plane_vertical::gfxb#2) ← (number) $f
Adding number conversion cast (unumber) $4000 in (number~) gfx_init_plane_charset8::$0 ← (dword) PLANE_CHARSET8#0 / (number) $4000
Adding number conversion cast (unumber) gfx_init_plane_charset8::$0 in (number~) gfx_init_plane_charset8::$0 ← (dword) PLANE_CHARSET8#0 / (unumber)(number) $4000
@ -7157,9 +7127,6 @@ Adding number conversion cast (unumber) gfx_init_plane_charset8::$3 in (number~)
Adding number conversion cast (unumber) $4000 in (number~) gfx_init_plane_charset8::$4 ← (number) $4000 + (unumber~) gfx_init_plane_charset8::$3
Adding number conversion cast (unumber) gfx_init_plane_charset8::$4 in (number~) gfx_init_plane_charset8::$4 ← (unumber)(number) $4000 + (unumber~) gfx_init_plane_charset8::$3
Adding number conversion cast (unumber) 0 in (byte) gfx_init_plane_charset8::col#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) gfx_init_plane_charset8::ch#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) gfx_init_plane_charset8::cr#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) gfx_init_plane_charset8::cp#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) gfx_init_plane_charset8::c#0 ← (number) 0
Adding number conversion cast (unumber) $80 in (number~) gfx_init_plane_charset8::$8 ← (byte) gfx_init_plane_charset8::bits#2 & (number) $80
Adding number conversion cast (unumber) gfx_init_plane_charset8::$8 in (number~) gfx_init_plane_charset8::$8 ← (byte) gfx_init_plane_charset8::bits#2 & (unumber)(number) $80
@ -7177,8 +7144,6 @@ Adding number conversion cast (unumber) $3fff in (number~) gfx_init_plane_fill::
Adding number conversion cast (unumber) gfx_init_plane_fill::$5 in (number~) gfx_init_plane_fill::$5 ← (word~) gfx_init_plane_fill::$4 & (unumber)(number) $3fff
Adding number conversion cast (unumber) $4000 in (number~) gfx_init_plane_fill::$6 ← (number) $4000 + (unumber~) gfx_init_plane_fill::$5
Adding number conversion cast (unumber) gfx_init_plane_fill::$6 in (number~) gfx_init_plane_fill::$6 ← (unumber)(number) $4000 + (unumber~) gfx_init_plane_fill::$5
Adding number conversion cast (unumber) 0 in (byte) gfx_init_plane_fill::by#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) gfx_init_plane_fill::bx#0 ← (number) 0
Adding number conversion cast (unumber) $10000 in (number~) form_mode::$10 ← (dword~) form_mode::$9 / (number) $10000
Adding number conversion cast (unumber) form_mode::$10 in (number~) form_mode::$10 ← (dword~) form_mode::$9 / (unumber)(number) $10000
Adding number conversion cast (unumber) $400 in (number~) form_mode::$12 ← (dword) DTV_COLOR_BANK_DEFAULT#0 / (number) $400
@ -7203,7 +7168,6 @@ Adding number conversion cast (unumber) $400 in (number~) form_mode::$29 ← (un
Adding number conversion cast (unumber) form_mode::$29 in (number~) form_mode::$29 ← (unumber~) form_mode::$28 / (unumber)(number) $400
Adding number conversion cast (unumber) form_mode::$30 in (number~) form_mode::$30 ← (unumber~) form_mode::$26 | (unumber~) form_mode::$29
Adding number conversion cast (unumber) 0 in *((byte*) DTV_PLANEA_START_HI#0) ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) form_mode::i#0 ← (number) 0
Adding number conversion cast (unumber) 0 in *((byte*) BGCOL#0) ← (number) 0
Adding number conversion cast (unumber) 0 in *((byte*) BORDERCOL#0) ← (number) 0
Adding number conversion cast (unumber) $ff in (bool~) form_mode::$35 ← *((byte*) RASTER#0) != (number) $ff
@ -7212,7 +7176,6 @@ Adding number conversion cast (unumber) 0 in (byte) form_field_idx#4 ← (number
Adding number conversion cast (snumber) $28 in (signed byte) FORM_CURSOR_BLINK#0 ← (number) $28
Adding number conversion cast (snumber) 2 in (number~) $37 ← (signed byte) FORM_CURSOR_BLINK#0 / (number) 2
Adding number conversion cast (snumber) $37 in (number~) $37 ← (signed byte) FORM_CURSOR_BLINK#0 / (snumber)(number) 2
Adding number conversion cast (unumber) 0 in (byte) form_set_screen::y#0 ← (number) 0
Adding number conversion cast (unumber) $28 in (byte*~) form_set_screen::$2 ← (byte*) form_set_screen::line#2 + (number) $28
Adding number conversion cast (unumber) 0 in (byte) form_render_values::idx#0 ← (number) 0
Adding number conversion cast (snumber) 0 in (bool~) form_control::$1 ← (signed byte) form_cursor_count#5 < (number) 0
@ -7334,18 +7297,12 @@ Inlining cast (byte) KEY_MODIFIER_RSHIFT#0 ← (unumber)(number) 2
Inlining cast (byte) KEY_MODIFIER_CTRL#0 ← (unumber)(number) 4
Inlining cast (byte) KEY_MODIFIER_COMMODORE#0 ← (unumber)(number) 8
Inlining cast (byte) keyboard_event_scan::keycode#0 ← (unumber)(number) 0
Inlining cast (byte) keyboard_event_scan::row#0 ← (unumber)(number) 0
Inlining cast (byte) keyboard_event_scan::col#0 ← (unumber)(number) 0
Inlining cast (byte) keyboard_modifiers#1 ← (unumber)(number) 0
Inlining cast (byte) keyboard_event_get::return#0 ← (unumber)(number) $ff
Inlining cast (byte) bitmap_init::bits#0 ← (unumber)(number) $80
Inlining cast (byte) bitmap_init::x#0 ← (unumber)(number) 0
Inlining cast (byte) bitmap_init::bits#2 ← (unumber)(number) $80
Inlining cast (byte*) bitmap_init::yoffs#0 ← (byte*)(number) 0
Inlining cast (byte) bitmap_init::y#0 ← (unumber)(number) 0
Inlining cast (unumber~) bitmap_init::$16 ← (unumber)(number~) bitmap_init::$13
Inlining cast (byte) bitmap_clear::y#0 ← (unumber)(number) 0
Inlining cast (byte) bitmap_clear::x#0 ← (unumber)(number) 0
Inlining cast *((byte*) bitmap_clear::bitmap#2) ← (unumber)(number) 0
Inlining cast (byte*) bitmap_plot::plotter#0 ← (byte*)(word~) bitmap_plot::$0
Inlining cast (byte*) VIC_SCREEN0#0 ← (byte*)(number) $4000
@ -7392,67 +7349,38 @@ Inlining cast (byte~) gfx_mode::$50 ← (byte)(unumber~) gfx_mode::$49
Inlining cast (word~) gfx_mode::$53 ← (word)(byte*~) gfx_mode::$52
Inlining cast (byte~) gfx_mode::$56 ← (byte)(unumber~) gfx_mode::$55
Inlining cast (word~) gfx_mode::$58 ← (word)(byte*~) gfx_mode::$57
Inlining cast (byte) gfx_mode::cy#0 ← (unumber)(number) 0
Inlining cast (byte) gfx_mode::cx#0 ← (unumber)(number) 0
Inlining cast *((byte*) BORDERCOL#0) ← (unumber)(number) 0
Inlining cast (byte) gfx_mode::i#0 ← (unumber)(number) 0
Inlining cast (byte) gfx_mode::j#0 ← (unumber)(number) 0
Inlining cast *((byte*) PROCPORT#0) ← (unumber)(number) $32
Inlining cast (byte) gfx_init_charset::c#0 ← (unumber)(number) 0
Inlining cast (byte) gfx_init_charset::l#0 ← (unumber)(number) 0
Inlining cast *((byte*) PROCPORT#0) ← (unumber)(number) $37
Inlining cast (byte) gfx_init_screen0::cy#0 ← (unumber)(number) 0
Inlining cast (byte) gfx_init_screen0::cx#0 ← (unumber)(number) 0
Inlining cast (byte) gfx_init_screen1::cy#0 ← (unumber)(number) 0
Inlining cast (byte) gfx_init_screen1::cx#0 ← (unumber)(number) 0
Inlining cast (byte) gfx_init_screen2::cy#0 ← (unumber)(number) 0
Inlining cast (byte) gfx_init_screen2::cx#0 ← (unumber)(number) 0
Inlining cast (byte) gfx_init_screen3::cy#0 ← (unumber)(number) 0
Inlining cast (byte) gfx_init_screen3::cx#0 ← (unumber)(number) 0
Inlining cast (byte) gfx_init_screen4::cy#0 ← (unumber)(number) 0
Inlining cast (byte) gfx_init_screen4::cx#0 ← (unumber)(number) 0
Inlining cast *((byte*) gfx_init_screen4::ch#2) ← (unumber)(number) 0
Inlining cast (byte) gfx_init_vic_bitmap::lines_cnt#0 ← (unumber)(number) 9
Inlining cast (byte) gfx_init_vic_bitmap::l#0 ← (unumber)(number) 0
Inlining cast (byte~) gfx_init_plane_8bppchunky::$1 ← (byte)(unumber~) gfx_init_plane_8bppchunky::$0
Inlining cast (byte*) gfx_init_plane_8bppchunky::gfxb#0 ← (byte*)(number) $4000
Inlining cast (byte) gfx_init_plane_8bppchunky::y#0 ← (unumber)(number) 0
Inlining cast (word) gfx_init_plane_8bppchunky::x#0 ← (unumber)(number) 0
Inlining cast (byte~) gfx_init_plane_8bppchunky::$10 ← (byte)(word~) gfx_init_plane_8bppchunky::$9
Inlining cast (byte*) gfx_init_plane_8bppchunky::gfxb#2 ← (byte*)(number) $4000
Inlining cast (byte~) gfx_init_plane_8bppchunky::$4 ← (byte)(number~) gfx_init_plane_8bppchunky::$3
Inlining cast (byte~) gfx_init_plane_horisontal::$1 ← (byte)(unumber~) gfx_init_plane_horisontal::$0
Inlining cast (byte*) gfx_init_plane_horisontal::gfxa#0 ← (byte*)(unumber~) gfx_init_plane_horisontal::$4
Inlining cast (byte) gfx_init_plane_horisontal::ay#0 ← (unumber)(number) 0
Inlining cast (byte) gfx_init_plane_horisontal::ax#0 ← (unumber)(number) 0
Inlining cast *((byte*) gfx_init_plane_horisontal::gfxa#3) ← (unumber)(number) 0
Inlining cast *((byte*) gfx_init_plane_horisontal::gfxa#4) ← (unumber)(number) $ff
Inlining cast (byte~) gfx_init_plane_horisontal::$6 ← (byte)(number~) gfx_init_plane_horisontal::$5
Inlining cast (byte~) gfx_init_plane_horisontal2::$1 ← (byte)(unumber~) gfx_init_plane_horisontal2::$0
Inlining cast (byte*) gfx_init_plane_horisontal2::gfxa#0 ← (byte*)(unumber~) gfx_init_plane_horisontal2::$4
Inlining cast (byte) gfx_init_plane_horisontal2::ay#0 ← (unumber)(number) 0
Inlining cast (byte) gfx_init_plane_horisontal2::ax#0 ← (unumber)(number) 0
Inlining cast (byte~) gfx_init_plane_horisontal2::$6 ← (byte)(number~) gfx_init_plane_horisontal2::$5
Inlining cast (byte~) gfx_init_plane_vertical::$1 ← (byte)(unumber~) gfx_init_plane_vertical::$0
Inlining cast (byte*) gfx_init_plane_vertical::gfxb#0 ← (byte*)(unumber~) gfx_init_plane_vertical::$4
Inlining cast (byte) gfx_init_plane_vertical::by#0 ← (unumber)(number) 0
Inlining cast (byte) gfx_init_plane_vertical::bx#0 ← (unumber)(number) 0
Inlining cast *((byte*) gfx_init_plane_vertical::gfxb#2) ← (unumber)(number) $f
Inlining cast (byte~) gfx_init_plane_vertical::$6 ← (byte)(number~) gfx_init_plane_vertical::$5
Inlining cast (byte~) gfx_init_plane_charset8::$1 ← (byte)(unumber~) gfx_init_plane_charset8::$0
Inlining cast (byte*) gfx_init_plane_charset8::gfxa#0 ← (byte*)(unumber~) gfx_init_plane_charset8::$4
Inlining cast (byte) gfx_init_plane_charset8::col#0 ← (unumber)(number) 0
Inlining cast (byte) gfx_init_plane_charset8::ch#0 ← (unumber)(number) 0
Inlining cast (byte) gfx_init_plane_charset8::cr#0 ← (unumber)(number) 0
Inlining cast (byte) gfx_init_plane_charset8::cp#0 ← (unumber)(number) 0
Inlining cast (byte) gfx_init_plane_charset8::c#0 ← (unumber)(number) 0
Inlining cast (byte~) gfx_init_plane_charset8::$6 ← (byte)(number~) gfx_init_plane_charset8::$5
Inlining cast (byte) gfx_init_plane_fill::fill#0 ← (unumber)(number) $1b
Inlining cast (byte) gfx_init_plane_fill::fill#1 ← (unumber)(number) 0
Inlining cast (byte) gfx_init_plane_fill::fill#2 ← (unumber)(number) $ff
Inlining cast (byte*) gfx_init_plane_fill::gfxb#0 ← (byte*)(unumber~) gfx_init_plane_fill::$6
Inlining cast (byte) gfx_init_plane_fill::by#0 ← (unumber)(number) 0
Inlining cast (byte) gfx_init_plane_fill::bx#0 ← (unumber)(number) 0
Inlining cast (byte~) gfx_init_plane_fill::$8 ← (byte)(number~) gfx_init_plane_fill::$7
Inlining cast (dword~) form_mode::$9 ← (dword)(byte*) FORM_CHARSET#0
Inlining cast (byte~) form_mode::$11 ← (byte)(unumber~) form_mode::$10
@ -7466,12 +7394,10 @@ Inlining cast (word~) form_mode::$24 ← (word)(byte*) FORM_SCREEN#0
Inlining cast (word~) form_mode::$27 ← (word)(byte*) FORM_CHARSET#0
Inlining cast (byte~) form_mode::$31 ← (byte)(unumber~) form_mode::$30
Inlining cast *((byte*) DTV_PLANEA_START_HI#0) ← (unumber)(number) 0
Inlining cast (byte) form_mode::i#0 ← (unumber)(number) 0
Inlining cast *((byte*) BGCOL#0) ← (unumber)(number) 0
Inlining cast *((byte*) BORDERCOL#0) ← (unumber)(number) 0
Inlining cast (byte) form_field_idx#4 ← (unumber)(number) 0
Inlining cast (signed byte) FORM_CURSOR_BLINK#0 ← (snumber)(number) $28
Inlining cast (byte) form_set_screen::y#0 ← (unumber)(number) 0
Inlining cast (byte) form_render_values::idx#0 ← (unumber)(number) 0
Inlining cast (byte) form_control::return#1 ← (unumber)(number) 0
Inlining cast (byte) form_field_idx#8 ← (unumber)(number) 0
@ -7587,8 +7513,6 @@ Simplifying constant integer cast 2
Simplifying constant integer cast 4
Simplifying constant integer cast 8
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 8
Simplifying constant integer cast 0
Simplifying constant integer cast 8
@ -7604,13 +7528,11 @@ Simplifying constant integer cast 7
Simplifying constant integer cast 0
Simplifying constant integer cast $ff
Simplifying constant integer cast $80
Simplifying constant integer cast 0
Simplifying constant integer cast $f8
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast $80
Simplifying constant pointer cast (byte*) 0
Simplifying constant integer cast 0
Simplifying constant integer cast 7
Simplifying constant integer cast 7
Simplifying constant integer cast 7
@ -7619,8 +7541,6 @@ Simplifying constant integer cast 0
Simplifying constant integer cast *((byte[$100]) bitmap_plot_xlo#0 + (unumber)(number) 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 *((byte[$100]) bitmap_plot_xhi#0 + (byte) bitmap_plot::x#4)
Simplifying constant integer cast *((byte[$100]) bitmap_plot_xlo#0 + (byte) bitmap_plot::x#4)
Simplifying constant integer cast *((byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#4)
@ -8307,42 +8227,26 @@ Simplifying constant integer cast $40
Simplifying constant integer cast $3fff
Simplifying constant integer cast 4
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $10
Simplifying constant integer cast $10
Simplifying constant integer cast $10
Simplifying constant integer cast $10
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $ff
Simplifying constant integer cast $32
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $37
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $f
Simplifying constant integer cast $10
Simplifying constant integer cast $f
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $f
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $f
Simplifying constant integer cast $f
Simplifying constant integer cast $10
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 3
Simplifying constant integer cast $10
Simplifying constant integer cast 3
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $ff
Simplifying constant integer cast $ff
Simplifying constant integer cast 0
@ -8368,15 +8272,11 @@ Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast $4000
Simplifying constant pointer cast (byte*) 16384
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $8000
Simplifying constant pointer cast (byte*) 16384
Simplifying constant integer cast $4000
Simplifying constant integer cast $3fff
Simplifying constant integer cast $4000
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 4
Simplifying constant integer cast 0
Simplifying constant integer cast 0
@ -8388,24 +8288,17 @@ Simplifying constant integer cast 0
Simplifying constant integer cast $55
Simplifying constant integer cast $aa
Simplifying constant integer cast $ff
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 2
Simplifying constant integer cast 3
Simplifying constant integer cast $4000
Simplifying constant integer cast $3fff
Simplifying constant integer cast $4000
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $f
Simplifying constant integer cast $4000
Simplifying constant integer cast $3fff
Simplifying constant integer cast $4000
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 $80
Simplifying constant integer cast 0
Simplifying constant integer cast 2
@ -8415,8 +8308,6 @@ Simplifying constant integer cast $ff
Simplifying constant integer cast 4
Simplifying constant integer cast $3fff
Simplifying constant integer cast $4000
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $10000
Simplifying constant integer cast $400
Simplifying constant integer cast $400
@ -8432,13 +8323,11 @@ Simplifying constant integer cast $400
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $ff
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $28
Simplifying constant integer cast 2
Simplifying constant integer cast 0
Simplifying constant integer cast $28
Simplifying constant integer cast *((byte[$19]) form_line_hi#0 + (byte) form_field_ptr::y#0)
Simplifying constant integer cast *((byte[$19]) form_line_lo#0 + (byte) form_field_ptr::y#0)
@ -8496,8 +8385,6 @@ Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) 8
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 8
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 8
@ -8513,20 +8400,16 @@ Finalized unsigned number type (byte) 7
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $ff
Finalized unsigned number type (byte) $80
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $f8
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $80
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 7
Finalized unsigned number type (byte) 7
Finalized unsigned number type (byte) 7
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 1
@ -8652,54 +8535,34 @@ Finalized unsigned number type (byte) $40
Finalized unsigned number type (word) $3fff
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $10
Finalized unsigned number type (byte) $10
Finalized unsigned number type (byte) $10
Finalized unsigned number type (byte) $10
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $ff
Finalized unsigned number type (byte) $32
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $37
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $f
Finalized unsigned number type (byte) $10
Finalized unsigned number type (byte) $f
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $f
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $f
Finalized unsigned number type (byte) $f
Finalized unsigned number type (byte) $10
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 3
Finalized unsigned number type (byte) $10
Finalized unsigned number type (byte) 3
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 9
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 1
Finalized unsigned number type (word) $4000
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (word) $8000
Finalized unsigned number type (word) $4000
Finalized unsigned number type (word) $3fff
Finalized unsigned number type (word) $4000
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
@ -8707,24 +8570,17 @@ Finalized unsigned number type (byte) $ff
Finalized unsigned number type (word) $4000
Finalized unsigned number type (word) $3fff
Finalized unsigned number type (word) $4000
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) 3
Finalized unsigned number type (word) $4000
Finalized unsigned number type (word) $3fff
Finalized unsigned number type (word) $4000
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $f
Finalized unsigned number type (word) $4000
Finalized unsigned number type (word) $3fff
Finalized unsigned number type (word) $4000
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $80
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 2
@ -8734,8 +8590,6 @@ Finalized unsigned number type (byte) $ff
Finalized unsigned number type (byte) 4
Finalized unsigned number type (word) $3fff
Finalized unsigned number type (word) $4000
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (dword) $10000
Finalized unsigned number type (word) $400
Finalized unsigned number type (word) $400
@ -8751,13 +8605,11 @@ Finalized unsigned number type (word) $400
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $ff
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized signed number type (signed byte) $28
Finalized signed number type (signed byte) 2
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) 0
Finalized signed number type (signed byte) 0
@ -10831,7 +10683,7 @@ Constant inlined gfx_init_plane_charset8::chargen#0 = (const byte*) CHARGEN#0
Constant inlined gfx_init_screen2::cx#0 = (byte) 0
Constant inlined gfx_init_plane_fill::fill#1 = (byte) 0
Constant inlined gfx_init_plane_fill::fill#2 = (byte) $ff
Constant inlined gfx_init_plane_8bppchunky::x#0 = (byte) 0
Constant inlined gfx_init_plane_8bppchunky::x#0 = (word) 0
Constant inlined gfx_init_screen2::cy#0 = (byte) 0
Constant inlined keyboard_event_scan::keycode#0 = (byte) 0
Constant inlined gfx_init_vic_bitmap::l#0 = (byte) 0
@ -13188,7 +13040,7 @@ gfx_init_plane_8bppchunky::@1: scope:[gfx_init_plane_8bppchunky] from gfx_init_
to:gfx_init_plane_8bppchunky::@2
gfx_init_plane_8bppchunky::@2: scope:[gfx_init_plane_8bppchunky] from gfx_init_plane_8bppchunky::@1 gfx_init_plane_8bppchunky::@3
[581] (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 ← phi( gfx_init_plane_8bppchunky::@1/(byte) gfx_init_plane_8bppchunky::gfxbCpuBank#7 gfx_init_plane_8bppchunky::@3/(byte) gfx_init_plane_8bppchunky::gfxbCpuBank#8 )
[581] (word) gfx_init_plane_8bppchunky::x#2 ← phi( gfx_init_plane_8bppchunky::@1/(byte) 0 gfx_init_plane_8bppchunky::@3/(word) gfx_init_plane_8bppchunky::x#1 )
[581] (word) gfx_init_plane_8bppchunky::x#2 ← phi( gfx_init_plane_8bppchunky::@1/(word) 0 gfx_init_plane_8bppchunky::@3/(word) gfx_init_plane_8bppchunky::x#1 )
[581] (byte*) gfx_init_plane_8bppchunky::gfxb#3 ← phi( gfx_init_plane_8bppchunky::@1/(byte*) gfx_init_plane_8bppchunky::gfxb#5 gfx_init_plane_8bppchunky::@3/(byte*) gfx_init_plane_8bppchunky::gfxb#1 )
[582] if((byte*) gfx_init_plane_8bppchunky::gfxb#3!=(word) $8000) goto gfx_init_plane_8bppchunky::@3
to:gfx_init_plane_8bppchunky::@4
@ -19500,10 +19352,10 @@ gfx_init_plane_8bppchunky: {
//SEG1203 [581] phi from gfx_init_plane_8bppchunky::@1 to gfx_init_plane_8bppchunky::@2 [phi:gfx_init_plane_8bppchunky::@1->gfx_init_plane_8bppchunky::@2]
b2_from_b1:
//SEG1204 [581] phi (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 = (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#7 [phi:gfx_init_plane_8bppchunky::@1->gfx_init_plane_8bppchunky::@2#0] -- register_copy
//SEG1205 [581] phi (word) gfx_init_plane_8bppchunky::x#2 = (byte) 0 [phi:gfx_init_plane_8bppchunky::@1->gfx_init_plane_8bppchunky::@2#1] -- vwuz1=vbuc1
lda #0
//SEG1205 [581] phi (word) gfx_init_plane_8bppchunky::x#2 = (word) 0 [phi:gfx_init_plane_8bppchunky::@1->gfx_init_plane_8bppchunky::@2#1] -- vwuz1=vwuc1
lda #<0
sta x
lda #0
lda #>0
sta x+1
//SEG1206 [581] phi (byte*) gfx_init_plane_8bppchunky::gfxb#3 = (byte*) gfx_init_plane_8bppchunky::gfxb#5 [phi:gfx_init_plane_8bppchunky::@1->gfx_init_plane_8bppchunky::@2#2] -- register_copy
jmp b2
@ -26442,10 +26294,10 @@ gfx_init_plane_8bppchunky: {
//SEG1203 [581] phi from gfx_init_plane_8bppchunky::@1 to gfx_init_plane_8bppchunky::@2 [phi:gfx_init_plane_8bppchunky::@1->gfx_init_plane_8bppchunky::@2]
b2_from_b1:
//SEG1204 [581] phi (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 = (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#7 [phi:gfx_init_plane_8bppchunky::@1->gfx_init_plane_8bppchunky::@2#0] -- register_copy
//SEG1205 [581] phi (word) gfx_init_plane_8bppchunky::x#2 = (byte) 0 [phi:gfx_init_plane_8bppchunky::@1->gfx_init_plane_8bppchunky::@2#1] -- vwuz1=vbuc1
lda #0
//SEG1205 [581] phi (word) gfx_init_plane_8bppchunky::x#2 = (word) 0 [phi:gfx_init_plane_8bppchunky::@1->gfx_init_plane_8bppchunky::@2#1] -- vwuz1=vwuc1
lda #<0
sta x
lda #0
lda #>0
sta x+1
//SEG1206 [581] phi (byte*) gfx_init_plane_8bppchunky::gfxb#3 = (byte*) gfx_init_plane_8bppchunky::gfxb#5 [phi:gfx_init_plane_8bppchunky::@1->gfx_init_plane_8bppchunky::@2#2] -- register_copy
jmp b2
@ -28256,7 +28108,7 @@ Removing instruction ldy form_field_ptr.x
Removing instruction ldy form_field_ptr.x
Replacing instruction ldy #0 with TAY
Removing instruction lda #0
Removing instruction lda #0
Removing instruction lda #>0
Removing instruction ldy l
Removing instruction ldy l
Removing instruction ldy l
@ -33650,8 +33502,8 @@ gfx_init_plane_8bppchunky: {
b1:
//SEG1203 [581] phi from gfx_init_plane_8bppchunky::@1 to gfx_init_plane_8bppchunky::@2 [phi:gfx_init_plane_8bppchunky::@1->gfx_init_plane_8bppchunky::@2]
//SEG1204 [581] phi (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 = (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#7 [phi:gfx_init_plane_8bppchunky::@1->gfx_init_plane_8bppchunky::@2#0] -- register_copy
//SEG1205 [581] phi (word) gfx_init_plane_8bppchunky::x#2 = (byte) 0 [phi:gfx_init_plane_8bppchunky::@1->gfx_init_plane_8bppchunky::@2#1] -- vwuz1=vbuc1
lda #0
//SEG1205 [581] phi (word) gfx_init_plane_8bppchunky::x#2 = (word) 0 [phi:gfx_init_plane_8bppchunky::@1->gfx_init_plane_8bppchunky::@2#1] -- vwuz1=vwuc1
lda #<0
sta x
sta x+1
//SEG1206 [581] phi (byte*) gfx_init_plane_8bppchunky::gfxb#3 = (byte*) gfx_init_plane_8bppchunky::gfxb#5 [phi:gfx_init_plane_8bppchunky::@1->gfx_init_plane_8bppchunky::@2#2] -- register_copy

View File

@ -316,7 +316,7 @@ mode_8bppchunkybmm: {
lda #>$4000
sta gfxb+1
b3:
lda #0
lda #<0
sta x
sta x+1
b4:

View File

@ -241,7 +241,7 @@ mode_8bppchunkybmm::@3: scope:[mode_8bppchunkybmm] from mode_8bppchunkybmm::@2
to:mode_8bppchunkybmm::@4
mode_8bppchunkybmm::@4: scope:[mode_8bppchunkybmm] from mode_8bppchunkybmm::@3 mode_8bppchunkybmm::@5
[136] (byte) mode_8bppchunkybmm::gfxbCpuBank#4 ← phi( mode_8bppchunkybmm::@3/(byte) mode_8bppchunkybmm::gfxbCpuBank#7 mode_8bppchunkybmm::@5/(byte) mode_8bppchunkybmm::gfxbCpuBank#8 )
[136] (word) mode_8bppchunkybmm::x#2 ← phi( mode_8bppchunkybmm::@3/(byte) 0 mode_8bppchunkybmm::@5/(word) mode_8bppchunkybmm::x#1 )
[136] (word) mode_8bppchunkybmm::x#2 ← phi( mode_8bppchunkybmm::@3/(word) 0 mode_8bppchunkybmm::@5/(word) mode_8bppchunkybmm::x#1 )
[136] (byte*) mode_8bppchunkybmm::gfxb#3 ← phi( mode_8bppchunkybmm::@3/(byte*) mode_8bppchunkybmm::gfxb#5 mode_8bppchunkybmm::@5/(byte*) mode_8bppchunkybmm::gfxb#1 )
[137] if((byte*) mode_8bppchunkybmm::gfxb#3!=(word) $8000) goto mode_8bppchunkybmm::@5
to:mode_8bppchunkybmm::@6

File diff suppressed because it is too large Load Diff

View File

@ -8,7 +8,7 @@ CONTROL FLOW GRAPH SSA
main: scope:[main] from @1
(signed byte[]) main::sbs#0 ← { (number) -1, (number) -2, (number) -3, (number) -4 }
(byte*) main::SCREEN#0 ← ((byte*)) (number) $400
(byte) main::i#0 ← (number) 0
(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 )
@ -47,12 +47,9 @@ SYMBOL TABLE SSA
(signed byte[]) main::sbs
(signed byte[]) main::sbs#0
Adding number conversion cast (unumber) 0 in (byte) main::i#0 ← (number) 0
Successful SSA optimization PassNAddNumberTypeConversions
Adding number conversion cast (signed byte) to elements in (signed byte[]) main::sbs#0 ← { (signed byte)(number) -1, (signed byte)(number) -2, (signed byte)(number) -3, (signed byte)(number) -4 }
Successful SSA optimization PassNAddArrayNumberTypeConversions
Inlining cast (byte*) main::SCREEN#0 ← (byte*)(number) $400
Inlining cast (byte) main::i#0 ← (unumber)(number) 0
Inlining cast (byte~) main::$0 ← (byte)*((signed byte[]) main::sbs#0 + (byte) main::i#2)
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast -1
@ -60,10 +57,7 @@ Simplifying constant integer cast -2
Simplifying constant integer cast -3
Simplifying constant integer cast -4
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::$1 [8] if((byte) main::i#1!=rangelast(0,3)) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant right-side identified [0] (signed byte[]) main::sbs#0 ← { (signed byte) -1, (signed byte) -2, (signed byte) -3, (signed byte) -4 }

View File

@ -22,7 +22,7 @@ main: scope:[main] from @2
(byte*) SCREEN4#5 ← phi( @2/(byte*) SCREEN4#6 )
(byte*) SCREEN3#5 ← phi( @2/(byte*) SCREEN3#6 )
(byte*) SCREEN2#2 ← phi( @2/(byte*) SCREEN2#3 )
(byte) main::b#0 ← (number) 0
(byte) main::b#0 ← (byte) 0
to:main::@1
main::@1: scope:[main] from main main::@1
(byte*) SCREEN4#4 ← phi( main/(byte*) SCREEN4#5 main::@1/(byte*) SCREEN4#4 )
@ -54,7 +54,7 @@ main::@return: scope:[main] from main::@3
w: scope:[w] from main::@2
(byte*) SCREEN4#2 ← phi( main::@2/(byte*) SCREEN4#3 )
(byte*) SCREEN3#2 ← phi( main::@2/(byte*) SCREEN3#3 )
(byte) w::i#0 ← (number) 0
(byte) w::i#0 ← (byte) 0
to:w::@1
w::@1: scope:[w] from w w::@1
(byte*) SCREEN4#1 ← phi( w/(byte*) SCREEN4#2 w::@1/(byte*) SCREEN4#1 )
@ -163,10 +163,8 @@ SYMBOL TABLE SSA
Adding number conversion cast (unumber) $0 in (byte*~) $1 ← (byte*) SCREEN#0 + (number~) $0
Adding number conversion cast (unumber) $2 in (byte*~) $3 ← (byte*) SCREEN#0 + (number~) $2
Adding number conversion cast (unumber) $4 in (byte*~) $5 ← (byte*) SCREEN#0 + (number~) $4
Adding number conversion cast (unumber) 0 in (byte) main::b#0 ← (number) 0
Adding number conversion cast (unumber) $c8 in (number~) main::$1 ← (number) $c8 - (byte) main::b#2
Adding number conversion cast (unumber) main::$1 in (number~) main::$1 ← (unumber)(number) $c8 - (byte) main::b#2
Adding number conversion cast (unumber) 0 in (byte) w::i#0 ← (number) 0
Adding number conversion cast (unumber) $514 in (word) w::w1#0 ← (number) $514
Adding number conversion cast (unumber) $4e2 in (word) w::w2#0 ← (number) $4e2
Adding number conversion cast (unumber) w::$2 in (number~) w::$3 ← (number~) w::$2 + (byte) w::i#2
@ -176,25 +174,19 @@ Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400
Inlining cast (unumber~) $6 ← (unumber)(number~) $0
Inlining cast (unumber~) $7 ← (unumber)(number~) $2
Inlining cast (unumber~) $8 ← (unumber)(number~) $4
Inlining cast (byte) main::b#0 ← (unumber)(number) 0
Inlining cast (signed byte~) main::$2 ← (signed byte)(byte) main::b#2
Inlining cast (byte~) main::$4 ← (byte)(signed byte) main::sb#0
Inlining cast (byte) w::i#0 ← (unumber)(number) 0
Inlining cast (word) w::w1#0 ← (unumber)(number) $514
Inlining cast (word) w::w2#0 ← (unumber)(number) $4e2
Inlining cast (byte~) w::$1 ← (byte)(word~) w::$0
Inlining cast (unumber~) w::$5 ← (unumber)(number~) w::$2
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 0
Simplifying constant integer cast $c8
Simplifying constant integer cast 0
Simplifying constant integer cast $514
Simplifying constant integer cast $4e2
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $c8
Finalized unsigned number type (byte) 0
Finalized unsigned number type (word) $514
Finalized unsigned number type (word) $4e2
Successful SSA optimization PassNFinalizeNumberTypeConversions

View File

@ -17,14 +17,14 @@ main: scope:[main] from @1
(byte*) main::CHAR_A#0 ← (byte*~) main::$0
*((byte*) PROCPORT#0) ← (number) $32
(byte*) main::sc#0 ← (byte*) SCREEN#0
(byte) main::y#0 ← (number) 0
(byte) main::y#0 ← (byte) 0
to:main::@1
main::@1: scope:[main] from main main::@5
(byte*) main::sc#7 ← phi( main/(byte*) main::sc#0 main::@5/(byte*) main::sc#2 )
(byte) main::y#2 ← phi( main/(byte) main::y#0 main::@5/(byte) main::y#1 )
(byte*) main::CHAR_A#1 ← phi( main/(byte*) main::CHAR_A#0 main::@5/(byte*) main::CHAR_A#2 )
(byte) main::bits#0 ← *((byte*) main::CHAR_A#1 + (byte) main::y#2)
(byte) main::x#0 ← (number) 0
(byte) main::x#0 ← (byte) 0
to:main::@2
main::@2: scope:[main] from main::@1 main::@3
(byte*) main::CHAR_A#4 ← phi( main::@1/(byte*) main::CHAR_A#1 main::@3/(byte*) main::CHAR_A#3 )
@ -155,8 +155,6 @@ SYMBOL TABLE SSA
Adding number conversion cast (unumber) 8 in (byte*~) main::$0 ← (byte*) CHARGEN#0 + (number) 8
Adding number conversion cast (unumber) $32 in *((byte*) PROCPORT#0) ← (number) $32
Adding number conversion cast (unumber) 0 in (byte) main::y#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) main::x#0 ← (number) 0
Adding number conversion cast (unumber) $80 in (number~) main::$1 ← (byte) main::bits#2 & (number) $80
Adding number conversion cast (unumber) main::$1 in (number~) main::$1 ← (byte) main::bits#2 & (unumber)(number) $80
Adding number conversion cast (unumber) 0 in (bool~) main::$2 ← (unumber~) main::$1 != (number) 0
@ -169,8 +167,6 @@ Inlining cast (byte*) PROCPORT#0 ← (byte*)(number) 1
Inlining cast (byte*) CHARGEN#0 ← (byte*)(number) $d000
Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400
Inlining cast *((byte*) PROCPORT#0) ← (unumber)(number) $32
Inlining cast (byte) main::y#0 ← (unumber)(number) 0
Inlining cast (byte) main::x#0 ← (unumber)(number) 0
Inlining cast *((byte*) PROCPORT#0) ← (unumber)(number) $37
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1
@ -178,8 +174,6 @@ Simplifying constant pointer cast (byte*) 53248
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 8
Simplifying constant integer cast $32
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $80
Simplifying constant integer cast 0
Simplifying constant integer cast 2
@ -188,8 +182,6 @@ Simplifying constant integer cast $37
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 8
Finalized unsigned number type (byte) $32
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $80
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 2

View File

@ -9,14 +9,14 @@ main: scope:[main] from @1
(byte*) main::screen#0 ← ((byte*)) (number) $400
(byte*) main::colors#0 ← ((byte*)) (number) $d800
(byte) main::color#0 ← (number) 1
(byte) main::row#0 ← (number) 0
(byte) main::row#0 ← (byte) 0
to:main::@1
main::@1: scope:[main] from main main::@3
(byte) main::row#4 ← phi( main/(byte) main::row#0 main::@3/(byte) main::row#1 )
(byte*) main::colors#4 ← phi( main/(byte*) main::colors#0 main::@3/(byte*) main::colors#1 )
(byte) main::color#5 ← phi( main/(byte) main::color#0 main::@3/(byte) main::color#2 )
(byte*) main::screen#4 ← phi( main/(byte*) main::screen#0 main::@3/(byte*) main::screen#1 )
(byte) main::column#0 ← (number) 0
(byte) main::column#0 ← (byte) 0
to:main::@2
main::@2: scope:[main] from main::@1 main::@2
(byte) main::row#3 ← phi( main::@1/(byte) main::row#4 main::@2/(byte) main::row#3 )
@ -104,8 +104,6 @@ SYMBOL TABLE SSA
(byte*) main::screen#4
Adding number conversion cast (unumber) 1 in (byte) main::color#0 ← (number) 1
Adding number conversion cast (unumber) 0 in (byte) main::row#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) main::column#0 ← (number) 0
Adding number conversion cast (unumber) $a0 in *((byte*) main::screen#2 + (byte) main::column#2) ← (number) $a0
Adding number conversion cast (unumber) 1 in (number~) main::$0 ← (byte) main::color#3 ^ (number) 1
Adding number conversion cast (unumber) main::$0 in (number~) main::$0 ← (byte) main::color#3 ^ (unumber)(number) 1
@ -117,15 +115,11 @@ Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) main::screen#0 ← (byte*)(number) $400
Inlining cast (byte*) main::colors#0 ← (byte*)(number) $d800
Inlining cast (byte) main::color#0 ← (unumber)(number) 1
Inlining cast (byte) main::row#0 ← (unumber)(number) 0
Inlining cast (byte) main::column#0 ← (unumber)(number) 0
Inlining cast *((byte*) main::screen#2 + (byte) main::column#2) ← (unumber)(number) $a0
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Simplifying constant pointer cast (byte*) 55296
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $a0
Simplifying constant integer cast 1
Simplifying constant integer cast 1
@ -133,8 +127,6 @@ Simplifying constant integer cast $28
Simplifying constant integer cast $28
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $a0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 1

View File

@ -153,7 +153,7 @@ sprites_init: scope:[sprites_init] from main::@4
(number~) sprites_init::$0 ← (number) $f * (number) 8
(number~) sprites_init::$1 ← (number) $18 + (number~) sprites_init::$0
(byte) sprites_init::xpos#0 ← (number~) sprites_init::$1
(byte) sprites_init::s#0 ← (number) 0
(byte) sprites_init::s#0 ← (byte) 0
to:sprites_init::@1
sprites_init::@1: scope:[sprites_init] from sprites_init sprites_init::@1
(byte) sprites_init::xpos#2 ← phi( sprites_init/(byte) sprites_init::xpos#0 sprites_init::@1/(byte) sprites_init::xpos#1 )
@ -455,7 +455,7 @@ main::@6: scope:[main] from main::@4
*((byte*) SPRITES_ENABLE#0) ← (number) $ff
(byte) main::xpos#0 ← (number) $18
(byte) main::ypos#0 ← (number) $32
(byte) main::s#0 ← (number) 4
(byte) main::s#0 ← (byte) 4
to:main::@1
main::@1: scope:[main] from main::@5 main::@6
(byte) sin_idx#22 ← phi( main::@5/(byte) sin_idx#19 main::@6/(byte) sin_idx#23 )
@ -535,7 +535,7 @@ loop::@4: scope:[loop] from loop::@1 loop::@4
loop::@5: scope:[loop] from loop::@4
(byte) sin_idx#8 ← phi( loop::@4/(byte) sin_idx#13 )
(byte) loop::idx#0 ← (byte) sin_idx#8
(byte) loop::s#0 ← (number) 4
(byte) loop::s#0 ← (byte) 4
to:loop::@6
loop::@6: scope:[loop] from loop::@5 loop::@6
(byte) sin_idx#14 ← phi( loop::@5/(byte) sin_idx#8 loop::@6/(byte) sin_idx#14 )
@ -1014,7 +1014,6 @@ Adding number conversion cast (unumber) 0 in (byte) render_screen_showing#0 ←
Adding number conversion cast (unumber) $f in *((byte*) SPRITES_ENABLE#0) ← (number) $f
Adding number conversion cast (unumber) 0 in *((byte*) SPRITES_MC#0) ← (number) 0
Adding number conversion cast (unumber) sprites_init::$1 in (byte) sprites_init::xpos#0 ← (number~) sprites_init::$1
Adding number conversion cast (unumber) 0 in (byte) sprites_init::s#0 ← (number) 0
Adding number conversion cast (unumber) 2 in (number~) sprites_init::$2 ← (byte) sprites_init::s#2 * (number) 2
Adding number conversion cast (unumber) sprites_init::$2 in (number~) sprites_init::$2 ← (byte) sprites_init::s#2 * (unumber)(number) 2
Adding number conversion cast (unumber) $18 in (number~) sprites_init::$3 ← (byte) sprites_init::xpos#2 + (number) $18
@ -1075,7 +1074,6 @@ Adding number conversion cast (unumber) main::toD0181_$8#0 in (number~) main::to
Adding number conversion cast (unumber) $ff in *((byte*) SPRITES_ENABLE#0) ← (number) $ff
Adding number conversion cast (unumber) $18 in (byte) main::xpos#0 ← (number) $18
Adding number conversion cast (unumber) $32 in (byte) main::ypos#0 ← (number) $32
Adding number conversion cast (unumber) 4 in (byte) main::s#0 ← (number) 4
Adding number conversion cast (unumber) 2 in (number~) main::$5 ← (byte) main::s#2 * (number) 2
Adding number conversion cast (unumber) main::$5 in (number~) main::$5 ← (byte) main::s#2 * (unumber)(number) 2
Adding number conversion cast (unumber) 3 in (number~) main::$6 ← (byte) main::s#2 - (number) 3
@ -1085,7 +1083,6 @@ Adding number conversion cast (unumber) main::toSpritePtr2_$1#0 in (number~) mai
Adding number conversion cast (unumber) $18 in (byte) main::xpos#1 ← (byte) main::xpos#3 + (number) $18
Adding number conversion cast (unumber) $18 in (byte) main::ypos#1 ← (byte) main::ypos#3 + (number) $18
Adding number conversion cast (unumber) $ff in (bool~) loop::$0 ← *((byte*) RASTER#0) != (number) $ff
Adding number conversion cast (unumber) 4 in (byte) loop::s#0 ← (number) 4
Adding number conversion cast (unumber) 2 in (number~) loop::$1 ← (byte) loop::s#2 * (number) 2
Adding number conversion cast (unumber) loop::$1 in (number~) loop::$1 ← (byte) loop::s#2 * (unumber)(number) 2
Adding number conversion cast (unumber) $a in (byte) loop::idx#1 ← (byte) loop::idx#2 + (number) $a
@ -1122,7 +1119,6 @@ Inlining cast (byte) render_screen_showing#0 ← (unumber)(number) 0
Inlining cast *((byte*) SPRITES_ENABLE#0) ← (unumber)(number) $f
Inlining cast *((byte*) SPRITES_MC#0) ← (unumber)(number) 0
Inlining cast (byte) sprites_init::xpos#0 ← (unumber)(number~) sprites_init::$1
Inlining cast (byte) sprites_init::s#0 ← (unumber)(number) 0
Inlining cast (byte) SPRITES_FIRST_YPOS#0 ← (unumber)(number) $31
Inlining cast (word~) toSpritePtr1_$0#0 ← (word)(byte*) toSpritePtr1_sprite#1
Inlining cast (byte~) toSpritePtr1_$2#0 ← (byte)(unumber~) toSpritePtr1_$1#0
@ -1140,10 +1136,8 @@ Inlining cast (word~) main::toD0181_$4#0 ← (word)(byte*) main::toD0181_gfx#1
Inlining cast *((byte*) SPRITES_ENABLE#0) ← (unumber)(number) $ff
Inlining cast (byte) main::xpos#0 ← (unumber)(number) $18
Inlining cast (byte) main::ypos#0 ← (unumber)(number) $32
Inlining cast (byte) main::s#0 ← (unumber)(number) 4
Inlining cast (word~) main::toSpritePtr2_$0#0 ← (word)(byte*) main::toSpritePtr2_sprite#1
Inlining cast (byte~) main::toSpritePtr2_$2#0 ← (byte)(unumber~) main::toSpritePtr2_$1#0
Inlining cast (byte) loop::s#0 ← (unumber)(number) 4
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 0
Simplifying constant integer cast 7
@ -1176,7 +1170,6 @@ Simplifying constant pointer cast (byte*) 10240
Simplifying constant integer cast 0
Simplifying constant integer cast $f
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 2
Simplifying constant integer cast $18
Simplifying constant integer cast $31
@ -1223,14 +1216,12 @@ Simplifying constant integer cast $f
Simplifying constant integer cast $ff
Simplifying constant integer cast $18
Simplifying constant integer cast $32
Simplifying constant integer cast 4
Simplifying constant integer cast 2
Simplifying constant integer cast 3
Simplifying constant integer cast $40
Simplifying constant integer cast $18
Simplifying constant integer cast $18
Simplifying constant integer cast $ff
Simplifying constant integer cast 4
Simplifying constant integer cast 2
Simplifying constant integer cast $a
Successful SSA optimization PassNCastSimplification
@ -1243,7 +1234,6 @@ Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $f
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) $18
Finalized unsigned number type (byte) $31
@ -1288,14 +1278,12 @@ Finalized unsigned number type (byte) $f
Finalized unsigned number type (byte) $ff
Finalized unsigned number type (byte) $18
Finalized unsigned number type (byte) $32
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) 3
Finalized unsigned number type (byte) $40
Finalized unsigned number type (byte) $18
Finalized unsigned number type (byte) $18
Finalized unsigned number type (byte) $ff
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) $a
Successful SSA optimization PassNFinalizeNumberTypeConversions

View File

@ -296,7 +296,7 @@ keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matri
keyboard_event_scan: scope:[keyboard_event_scan] from main::@35
(byte) keyboard_events_size#53 ← phi( main::@35/(byte) keyboard_events_size#26 )
(byte) keyboard_event_scan::keycode#0 ← (number) 0
(byte) keyboard_event_scan::row#0 ← (number) 0
(byte) keyboard_event_scan::row#0 ← (byte) 0
to:keyboard_event_scan::@8
keyboard_event_scan::@8: scope:[keyboard_event_scan] from keyboard_event_scan keyboard_event_scan::@10
(byte) keyboard_events_size#46 ← phi( keyboard_event_scan/(byte) keyboard_events_size#53 keyboard_event_scan::@10/(byte) keyboard_events_size#54 )
@ -321,7 +321,7 @@ keyboard_event_scan::@9: scope:[keyboard_event_scan] from keyboard_event_scan::
(byte) keyboard_event_scan::keycode#12 ← phi( keyboard_event_scan::@25/(byte) keyboard_event_scan::keycode#7 )
(byte) keyboard_event_scan::row#9 ← phi( keyboard_event_scan::@25/(byte) keyboard_event_scan::row#3 )
(byte) keyboard_event_scan::row_scan#5 ← phi( keyboard_event_scan::@25/(byte) keyboard_event_scan::row_scan#0 )
(byte) keyboard_event_scan::col#0 ← (number) 0
(byte) keyboard_event_scan::col#0 ← (byte) 0
to:keyboard_event_scan::@11
keyboard_event_scan::@21: scope:[keyboard_event_scan] from keyboard_event_scan::@25
(byte) keyboard_events_size#61 ← phi( keyboard_event_scan::@25/(byte) keyboard_events_size#37 )
@ -652,7 +652,7 @@ render_init::@5: scope:[render_init] from render_init::@4
(byte*~) render_init::$11 ← (byte*~) render_init::$10 + (number) $10
(byte*) render_init::li_2#0 ← (byte*~) render_init::$11
(number~) render_init::$12 ← (byte) PLAYFIELD_LINES#0 - (number) 1
(byte) render_init::i#0 ← (number) 0
(byte) render_init::i#0 ← (byte) 0
to:render_init::@1
render_init::@1: scope:[render_init] from render_init::@1 render_init::@5
(byte*) render_init::li_2#2 ← phi( render_init::@1/(byte*) render_init::li_2#1 render_init::@5/(byte*) render_init::li_2#0 )
@ -932,7 +932,7 @@ render_screen_original: scope:[render_screen_original] from render_init::@3 ren
(byte*~) render_screen_original::$3 ← (byte*) PLAYFIELD_COLORS_ORIGINAL#0 + (number~) render_screen_original::$2
(byte*) render_screen_original::ocols#0 ← (byte*~) render_screen_original::$3
(byte*) render_screen_original::cols#0 ← (byte*) COLS#0
(byte) render_screen_original::y#0 ← (number) 0
(byte) render_screen_original::y#0 ← (byte) 0
to:render_screen_original::@1
render_screen_original::@1: scope:[render_screen_original] from render_screen_original render_screen_original::@7
(byte) render_screen_original::y#6 ← phi( render_screen_original/(byte) render_screen_original::y#0 render_screen_original::@7/(byte) render_screen_original::y#1 )
@ -1007,7 +1007,7 @@ render_playfield: scope:[render_playfield] from main::@23 main::@31
(number~) render_playfield::$0 ← (byte) PLAYFIELD_COLS#0 * (number) 2
(byte) render_playfield::i#0 ← (number~) render_playfield::$0
(number~) render_playfield::$1 ← (byte) PLAYFIELD_LINES#0 - (number) 1
(byte) render_playfield::l#0 ← (number) 2
(byte) render_playfield::l#0 ← (byte) 2
to:render_playfield::@1
render_playfield::@1: scope:[render_playfield] from render_playfield render_playfield::@3
(byte) render_playfield::i#3 ← phi( render_playfield/(byte) render_playfield::i#0 render_playfield::@3/(byte) render_playfield::i#4 )
@ -1017,7 +1017,7 @@ render_playfield::@1: scope:[render_playfield] from render_playfield render_pla
(byte~) render_playfield::$6 ← (byte~) render_playfield::$2 * (const byte) SIZEOF_POINTER
(byte*) render_playfield::screen_line#0 ← *((byte*[PLAYFIELD_LINES#0]) screen_lines_1#0 + (byte~) render_playfield::$6)
(number~) render_playfield::$3 ← (byte) PLAYFIELD_COLS#0 - (number) 1
(byte) render_playfield::c#0 ← (number) 0
(byte) render_playfield::c#0 ← (byte) 0
to:render_playfield::@2
render_playfield::@2: scope:[render_playfield] from render_playfield::@1 render_playfield::@2
(byte) render_screen_render#32 ← phi( render_playfield::@1/(byte) render_screen_render#13 render_playfield::@2/(byte) render_screen_render#32 )
@ -1051,7 +1051,7 @@ render_moving: scope:[render_moving] from main::@32 main::@39
(byte) current_ypos#13 ← phi( main::@32/(byte) current_ypos#30 main::@39/(byte) current_ypos#31 )
(byte) render_moving::i#0 ← (number) 0
(byte) render_moving::ypos#0 ← (byte) current_ypos#13
(byte) render_moving::l#0 ← (number) 0
(byte) render_moving::l#0 ← (byte) 0
to:render_moving::@1
render_moving::@1: scope:[render_moving] from render_moving render_moving::@3
(byte) current_piece_char#52 ← phi( render_moving/(byte) current_piece_char#68 render_moving::@3/(byte) current_piece_char#69 )
@ -1076,7 +1076,7 @@ render_moving::@2: scope:[render_moving] from render_moving::@1
(byte~) render_moving::$6 ← (byte~) render_moving::$1 * (const byte) SIZEOF_POINTER
(byte*) render_moving::screen_line#0 ← *((byte*[PLAYFIELD_LINES#0]) screen_lines_1#0 + (byte~) render_moving::$6)
(byte) render_moving::xpos#0 ← (byte) current_xpos#16
(byte) render_moving::c#0 ← (number) 0
(byte) render_moving::c#0 ← (byte) 0
to:render_moving::@4
render_moving::@8: scope:[render_moving] from render_moving::@1
(byte) current_piece_char#85 ← phi( render_moving::@1/(byte) current_piece_char#52 )
@ -1179,14 +1179,14 @@ render_next::@2: scope:[render_next] from render_next::@1 render_next::@3
(byte~) render_next::$9 ← (byte) next_piece_idx#12 * (const byte) SIZEOF_WORD
(byte*) render_next::next_piece_gfx#0 ← ((byte*)) *((word[]) PIECES#0 + (byte~) render_next::$9)
(byte) render_next::next_piece_char#0 ← *((byte[]) PIECES_NEXT_CHARS#0 + (byte) next_piece_idx#12)
(byte) render_next::l#0 ← (number) 0
(byte) render_next::l#0 ← (byte) 0
to:render_next::@5
render_next::@5: scope:[render_next] from render_next::@11 render_next::@2
(byte) render_next::l#7 ← phi( render_next::@11/(byte) render_next::l#1 render_next::@2/(byte) render_next::l#0 )
(byte*) render_next::screen_next_area#10 ← phi( render_next::@11/(byte*) render_next::screen_next_area#4 render_next::@2/(byte*) render_next::screen_next_area#11 )
(byte) render_next::next_piece_char#3 ← phi( render_next::@11/(byte) render_next::next_piece_char#5 render_next::@2/(byte) render_next::next_piece_char#0 )
(byte*) render_next::next_piece_gfx#3 ← phi( render_next::@11/(byte*) render_next::next_piece_gfx#5 render_next::@2/(byte*) render_next::next_piece_gfx#0 )
(byte) render_next::c#0 ← (number) 0
(byte) render_next::c#0 ← (byte) 0
to:render_next::@6
render_next::@6: scope:[render_next] from render_next::@5 render_next::@8
(byte) render_next::l#6 ← phi( render_next::@5/(byte) render_next::l#7 render_next::@8/(byte) render_next::l#3 )
@ -1278,7 +1278,7 @@ sprites_init: scope:[sprites_init] from main::@26
(number~) sprites_init::$0 ← (number) $f * (number) 8
(number~) sprites_init::$1 ← (number) $18 + (number~) sprites_init::$0
(byte) sprites_init::xpos#0 ← (number~) sprites_init::$1
(byte) sprites_init::s#0 ← (number) 0
(byte) sprites_init::s#0 ← (byte) 0
to:sprites_init::@1
sprites_init::@1: scope:[sprites_init] from sprites_init sprites_init::@1
(byte) sprites_init::xpos#2 ← phi( sprites_init/(byte) sprites_init::xpos#0 sprites_init::@1/(byte) sprites_init::xpos#1 )
@ -1618,7 +1618,7 @@ play_init: scope:[play_init] from main::@28
(byte) play_init::idx#0 ← (number) 0
(byte*) play_init::pli#0 ← (byte[$3]) playfield#0
(number~) play_init::$1 ← (byte) PLAYFIELD_LINES#0 - (number) 1
(byte) play_init::j#0 ← (number) 0
(byte) play_init::j#0 ← (byte) 0
to:play_init::@1
play_init::@1: scope:[play_init] from play_init play_init::@1
(byte) level#28 ← phi( play_init/(byte) level#44 play_init::@1/(byte) level#28 )
@ -1639,7 +1639,7 @@ play_init::@2: scope:[play_init] from play_init::@1
(byte~) play_init::$0 ← (byte) PLAYFIELD_COLS#0 * (byte) PLAYFIELD_LINES#0
*((byte[$29]) playfield_lines_idx#0 + (byte) PLAYFIELD_LINES#0) ← (byte~) play_init::$0
(byte) current_movedown_slow#1 ← *((byte[]) MOVEDOWN_SLOW_SPEEDS#0 + (byte) level#13)
(byte) play_init::b#0 ← (number) 0
(byte) play_init::b#0 ← (byte) 0
to:play_init::@3
play_init::@3: scope:[play_init] from play_init::@2 play_init::@3
(byte) current_movedown_slow#29 ← phi( play_init::@2/(byte) current_movedown_slow#1 play_init::@3/(byte) current_movedown_slow#29 )
@ -2443,7 +2443,7 @@ play_collision: scope:[play_collision] from play_move_down::@9 play_move_leftri
(byte*) play_collision::piece_gfx#0 ← (byte*~) play_collision::$0
(byte) play_collision::i#0 ← (number) 0
(byte) play_collision::yp#0 ← (byte) play_collision::ypos#5
(byte) play_collision::l#0 ← (number) 0
(byte) play_collision::l#0 ← (byte) 0
to:play_collision::@1
play_collision::@1: scope:[play_collision] from play_collision play_collision::@17
(byte) play_collision::l#6 ← phi( play_collision/(byte) play_collision::l#0 play_collision::@17/(byte) play_collision::l#1 )
@ -2454,7 +2454,7 @@ play_collision::@1: scope:[play_collision] from play_collision play_collision::
(byte~) play_collision::$14 ← (byte) play_collision::yp#2 * (const byte) SIZEOF_POINTER
(byte*) play_collision::playfield_line#0 ← *((byte*[PLAYFIELD_LINES#0]) playfield_lines#0 + (byte~) play_collision::$14)
(byte) play_collision::xp#0 ← (byte) play_collision::xpos#5
(byte) play_collision::c#0 ← (number) 0
(byte) play_collision::c#0 ← (byte) 0
to:play_collision::@2
play_collision::@2: scope:[play_collision] from play_collision::@1 play_collision::@3
(byte*) play_collision::playfield_line#5 ← phi( play_collision::@1/(byte*) play_collision::playfield_line#0 play_collision::@3/(byte*) play_collision::playfield_line#6 )
@ -2575,7 +2575,7 @@ play_lock_current: scope:[play_lock_current] from play_move_down::@10
(byte) current_ypos#23 ← phi( play_move_down::@10/(byte) current_ypos#44 )
(byte) play_lock_current::i#0 ← (number) 0
(byte) play_lock_current::yp#0 ← (byte) current_ypos#23
(byte) play_lock_current::l#0 ← (number) 0
(byte) play_lock_current::l#0 ← (byte) 0
to:play_lock_current::@1
play_lock_current::@1: scope:[play_lock_current] from play_lock_current play_lock_current::@5
(byte) play_lock_current::l#6 ← phi( play_lock_current/(byte) play_lock_current::l#0 play_lock_current::@5/(byte) play_lock_current::l#1 )
@ -2587,7 +2587,7 @@ play_lock_current::@1: scope:[play_lock_current] from play_lock_current play_lo
(byte~) play_lock_current::$4 ← (byte) play_lock_current::yp#2 * (const byte) SIZEOF_POINTER
(byte*) play_lock_current::playfield_line#0 ← *((byte*[PLAYFIELD_LINES#0]) playfield_lines#0 + (byte~) play_lock_current::$4)
(byte) play_lock_current::xp#0 ← (byte) current_xpos#29
(byte) play_lock_current::c#0 ← (number) 0
(byte) play_lock_current::c#0 ← (byte) 0
to:play_lock_current::@2
play_lock_current::@2: scope:[play_lock_current] from play_lock_current::@1 play_lock_current::@3
(byte) current_xpos#86 ← phi( play_lock_current::@1/(byte) current_xpos#29 play_lock_current::@3/(byte) current_xpos#68 )
@ -2782,7 +2782,7 @@ play_remove_lines: scope:[play_remove_lines] from play_move_down::@19
(byte) play_remove_lines::w#0 ← (number~) play_remove_lines::$3
(byte) play_remove_lines::removed#0 ← (number) 0
(number~) play_remove_lines::$4 ← (byte) PLAYFIELD_LINES#0 - (number) 1
(byte) play_remove_lines::y#0 ← (number) 0
(byte) play_remove_lines::y#0 ← (byte) 0
to:play_remove_lines::@1
play_remove_lines::@1: scope:[play_remove_lines] from play_remove_lines play_remove_lines::@7
(byte) play_remove_lines::removed#11 ← phi( play_remove_lines/(byte) play_remove_lines::removed#0 play_remove_lines::@7/(byte) play_remove_lines::removed#8 )
@ -2791,7 +2791,7 @@ play_remove_lines::@1: scope:[play_remove_lines] from play_remove_lines play_re
(byte) play_remove_lines::r#3 ← phi( play_remove_lines/(byte) play_remove_lines::r#0 play_remove_lines::@7/(byte) play_remove_lines::r#5 )
(byte) play_remove_lines::full#0 ← (number) 1
(number~) play_remove_lines::$5 ← (byte) PLAYFIELD_COLS#0 - (number) 1
(byte) play_remove_lines::x#0 ← (number) 0
(byte) play_remove_lines::x#0 ← (byte) 0
to:play_remove_lines::@2
play_remove_lines::@2: scope:[play_remove_lines] from play_remove_lines::@1 play_remove_lines::@3
(byte) play_remove_lines::removed#9 ← phi( play_remove_lines::@1/(byte) play_remove_lines::removed#11 play_remove_lines::@3/(byte) play_remove_lines::removed#6 )
@ -2975,7 +2975,7 @@ play_increase_level::@3: scope:[play_increase_level] from play_increase_level::
(byte) current_movedown_slow#66 ← phi( play_increase_level::@2/(byte) current_movedown_slow#73 play_increase_level::@6/(byte) current_movedown_slow#74 )
(byte) level#65 ← phi( play_increase_level::@2/(byte) level#77 play_increase_level::@6/(byte) level#78 )
asm { sed }
(byte) play_increase_level::b#0 ← (number) 0
(byte) play_increase_level::b#0 ← (byte) 0
to:play_increase_level::@7
play_increase_level::@6: scope:[play_increase_level] from play_increase_level::@2
(byte) current_movedown_slow#74 ← phi( play_increase_level::@2/(byte) current_movedown_slow#73 )
@ -7152,8 +7152,6 @@ Adding number conversion cast (unumber) 2 in (byte) KEY_MODIFIER_RSHIFT#0 ← (n
Adding number conversion cast (unumber) 4 in (byte) KEY_MODIFIER_CTRL#0 ← (number) 4
Adding number conversion cast (unumber) 8 in (byte) KEY_MODIFIER_COMMODORE#0 ← (number) 8
Adding number conversion cast (unumber) 0 in (byte) keyboard_event_scan::keycode#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) keyboard_event_scan::row#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) keyboard_event_scan::col#0 ← (number) 0
Adding number conversion cast (unumber) 8 in (number~) keyboard_event_scan::$14 ← (byte) keyboard_event_scan::keycode#3 + (number) 8
Adding number conversion cast (unumber) keyboard_event_scan::$14 in (number~) keyboard_event_scan::$14 ← (byte) keyboard_event_scan::keycode#3 + (unumber)(number) 8
Adding number conversion cast (unumber) 0 in (bool~) keyboard_event_scan::$17 ← (byte~) keyboard_event_scan::$16 != (number) 0
@ -7198,7 +7196,6 @@ Adding number conversion cast (unumber) render_init::$9 in (byte*~) render_init:
Adding number conversion cast (unumber) $10 in (byte*~) render_init::$11 ← (byte*~) render_init::$10 + (number) $10
Adding number conversion cast (unumber) 1 in (number~) render_init::$12 ← (byte) PLAYFIELD_LINES#0 - (number) 1
Adding number conversion cast (unumber) render_init::$12 in (number~) render_init::$12 ← (byte) PLAYFIELD_LINES#0 - (unumber)(number) 1
Adding number conversion cast (unumber) 0 in (byte) render_init::i#0 ← (number) 0
Adding number conversion cast (unumber) $28 in (byte*) render_init::li_1#1 ← (byte*) render_init::li_1#2 + (number) $28
Adding number conversion cast (unumber) $28 in (byte*) render_init::li_2#1 ← (byte*) render_init::li_2#2 + (number) $28
Adding number conversion cast (unumber) 0 in (byte) render_screen_show#1 ← (number) 0
@ -7255,7 +7252,6 @@ Adding number conversion cast (unumber) 4 in (byte~) render_bcd::$5 ← (byte) r
Adding number conversion cast (unumber) 0 in (byte) render_screen_original::SPACE#0 ← (number) 0
Adding number conversion cast (unumber) render_screen_original::$0 in (byte*~) render_screen_original::$1 ← (byte*) PLAYFIELD_SCREEN_ORIGINAL#0 + (number~) render_screen_original::$0
Adding number conversion cast (unumber) render_screen_original::$2 in (byte*~) render_screen_original::$3 ← (byte*) PLAYFIELD_COLORS_ORIGINAL#0 + (number~) render_screen_original::$2
Adding number conversion cast (unumber) 0 in (byte) render_screen_original::y#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) render_screen_original::x#0 ← (number) 0
Adding number conversion cast (unumber) 4 in (bool~) render_screen_original::$4 ← (byte) render_screen_original::x#1 != (number) 4
Adding number conversion cast (unumber) $24 in (bool~) render_screen_original::$5 ← (byte) render_screen_original::x#2 != (number) $24
@ -7264,27 +7260,20 @@ Adding number conversion cast (unumber) 2 in (number~) render_playfield::$0 ←
Adding number conversion cast (unumber) render_playfield::$0 in (number~) render_playfield::$0 ← (byte) PLAYFIELD_COLS#0 * (unumber)(number) 2
Adding number conversion cast (unumber) 1 in (number~) render_playfield::$1 ← (byte) PLAYFIELD_LINES#0 - (number) 1
Adding number conversion cast (unumber) render_playfield::$1 in (number~) render_playfield::$1 ← (byte) PLAYFIELD_LINES#0 - (unumber)(number) 1
Adding number conversion cast (unumber) 2 in (byte) render_playfield::l#0 ← (number) 2
Adding number conversion cast (unumber) 1 in (number~) render_playfield::$3 ← (byte) PLAYFIELD_COLS#0 - (number) 1
Adding number conversion cast (unumber) render_playfield::$3 in (number~) render_playfield::$3 ← (byte) PLAYFIELD_COLS#0 - (unumber)(number) 1
Adding number conversion cast (unumber) 0 in (byte) render_playfield::c#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) render_moving::i#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) render_moving::l#0 ← (number) 0
Adding number conversion cast (unumber) 1 in (bool~) render_moving::$0 ← (byte) render_moving::ypos#2 > (number) 1
Adding number conversion cast (unumber) 0 in (byte) render_moving::c#0 ← (number) 0
Adding number conversion cast (unumber) 4 in (byte) render_moving::i#1 ← (byte) render_moving::i#3 + (number) 4
Adding number conversion cast (unumber) 0 in (bool~) render_moving::$2 ← (byte) render_moving::current_cell#0 != (number) 0
Adding number conversion cast (unumber) render_next::$2 in (word) render_next::next_area_offset#0 ← (number~) render_next::$2
Adding number conversion cast (unumber) 0 in (bool~) render_next::$3 ← (byte) render_screen_render#15 == (number) 0
Adding number conversion cast (unumber) 0 in (byte) render_next::l#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) render_next::c#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (bool~) render_next::$6 ← (byte) render_next::cell#0 != (number) 0
Adding number conversion cast (unumber) 0 in *((byte*) render_next::screen_next_area#6) ← (number) 0
Adding number conversion cast (unumber) $24 in (byte*) render_next::screen_next_area#4 ← (byte*) render_next::screen_next_area#8 + (number) $24
Adding number conversion cast (unumber) $f in *((byte*) SPRITES_ENABLE#0) ← (number) $f
Adding number conversion cast (unumber) 0 in *((byte*) SPRITES_MC#0) ← (number) 0
Adding number conversion cast (unumber) sprites_init::$1 in (byte) sprites_init::xpos#0 ← (number~) sprites_init::$1
Adding number conversion cast (unumber) 0 in (byte) sprites_init::s#0 ← (number) 0
Adding number conversion cast (unumber) 2 in (number~) sprites_init::$2 ← (byte) sprites_init::s#2 * (number) 2
Adding number conversion cast (unumber) sprites_init::$2 in (number~) sprites_init::$2 ← (byte) sprites_init::s#2 * (unumber)(number) 2
Adding number conversion cast (unumber) $18 in (number~) sprites_init::$3 ← (byte) sprites_init::xpos#2 + (number) $18
@ -7336,8 +7325,6 @@ Adding number conversion cast (unumber) 0 in (byte) current_movedown_counter#0
Adding number conversion cast (unumber) 0 in (byte) play_init::idx#0 ← (number) 0
Adding number conversion cast (unumber) 1 in (number~) play_init::$1 ← (byte) PLAYFIELD_LINES#0 - (number) 1
Adding number conversion cast (unumber) play_init::$1 in (number~) play_init::$1 ← (byte) PLAYFIELD_LINES#0 - (unumber)(number) 1
Adding number conversion cast (unumber) 0 in (byte) play_init::j#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) play_init::b#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) play_movement::render#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (bool~) play_movement::$1 ← (byte) game_over#1 != (number) 0
Adding number conversion cast (unumber) 0 in (byte) play_move_down::movedown#0 ← (number) 0
@ -7373,16 +7360,12 @@ Adding number conversion cast (unumber) 2 in (byte) COLLISION_BOTTOM#0 ← (numb
Adding number conversion cast (unumber) 4 in (byte) COLLISION_LEFT#0 ← (number) 4
Adding number conversion cast (unumber) 8 in (byte) COLLISION_RIGHT#0 ← (number) 8
Adding number conversion cast (unumber) 0 in (byte) play_collision::i#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) play_collision::l#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) play_collision::c#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (bool~) play_collision::$1 ← *((byte*) play_collision::piece_gfx#1 + (byte) play_collision::i#2) != (number) 0
Adding number conversion cast (unumber) $80 in (number~) play_collision::$5 ← (byte) play_collision::xp#3 & (number) $80
Adding number conversion cast (unumber) play_collision::$5 in (number~) play_collision::$5 ← (byte) play_collision::xp#3 & (unumber)(number) $80
Adding number conversion cast (unumber) 0 in (bool~) play_collision::$6 ← (unumber~) play_collision::$5 != (number) 0
Adding number conversion cast (unumber) 0 in (bool~) play_collision::$10 ← *((byte*) play_collision::playfield_line#1 + (byte) play_collision::xp#5) != (number) 0
Adding number conversion cast (unumber) 0 in (byte) play_lock_current::i#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) play_lock_current::l#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) play_lock_current::c#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (bool~) play_lock_current::$0 ← *((byte*) current_piece_gfx#22 + (byte) play_lock_current::i#2) != (number) 0
Adding number conversion cast (unumber) 0 in (byte) current_orientation#8 ← (number) 0
Adding number conversion cast (unumber) 7 in (byte) play_spawn_current::piece_idx#0 ← (number) 7
@ -7397,11 +7380,9 @@ Adding number conversion cast (unumber) play_remove_lines::$3 in (number~) play_
Adding number conversion cast (unumber) 0 in (byte) play_remove_lines::removed#0 ← (number) 0
Adding number conversion cast (unumber) 1 in (number~) play_remove_lines::$4 ← (byte) PLAYFIELD_LINES#0 - (number) 1
Adding number conversion cast (unumber) play_remove_lines::$4 in (number~) play_remove_lines::$4 ← (byte) PLAYFIELD_LINES#0 - (unumber)(number) 1
Adding number conversion cast (unumber) 0 in (byte) play_remove_lines::y#0 ← (number) 0
Adding number conversion cast (unumber) 1 in (byte) play_remove_lines::full#0 ← (number) 1
Adding number conversion cast (unumber) 1 in (number~) play_remove_lines::$5 ← (byte) PLAYFIELD_COLS#0 - (number) 1
Adding number conversion cast (unumber) play_remove_lines::$5 in (number~) play_remove_lines::$5 ← (byte) PLAYFIELD_COLS#0 - (unumber)(number) 1
Adding number conversion cast (unumber) 0 in (byte) play_remove_lines::x#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (bool~) play_remove_lines::$6 ← (byte) play_remove_lines::c#0 == (number) 0
Adding number conversion cast (unumber) 0 in (byte) play_remove_lines::full#1 ← (number) 0
Adding number conversion cast (unumber) 1 in (bool~) play_remove_lines::$9 ← (byte) play_remove_lines::full#2 == (number) 1
@ -7417,7 +7398,6 @@ Adding number conversion cast (unumber) 1 in (byte) current_movedown_slow#9 ←
Adding number conversion cast (unumber) $f in (number~) play_increase_level::$1 ← (byte) level_bcd#7 & (number) $f
Adding number conversion cast (unumber) play_increase_level::$1 in (number~) play_increase_level::$1 ← (byte) level_bcd#7 & (unumber)(number) $f
Adding number conversion cast (unumber) $a in (bool~) play_increase_level::$2 ← (unumber~) play_increase_level::$1 == (number) $a
Adding number conversion cast (unumber) 0 in (byte) play_increase_level::b#0 ← (number) 0
Adding number conversion cast (unumber) 6 in (byte) level_bcd#8 ← (byte) level_bcd#21 + (number) 6
Adding number conversion cast (unumber) $ff in (bool~) main::$10 ← *((byte*) RASTER#0) != (number) $ff
Adding number conversion cast (unumber) 0 in (byte) main::render#0 ← (number) 0
@ -7506,8 +7486,6 @@ Inlining cast (byte) KEY_MODIFIER_RSHIFT#0 ← (unumber)(number) 2
Inlining cast (byte) KEY_MODIFIER_CTRL#0 ← (unumber)(number) 4
Inlining cast (byte) KEY_MODIFIER_COMMODORE#0 ← (unumber)(number) 8
Inlining cast (byte) keyboard_event_scan::keycode#0 ← (unumber)(number) 0
Inlining cast (byte) keyboard_event_scan::row#0 ← (unumber)(number) 0
Inlining cast (byte) keyboard_event_scan::col#0 ← (unumber)(number) 0
Inlining cast (byte) keyboard_modifiers#1 ← (unumber)(number) 0
Inlining cast (byte) keyboard_event_get::return#0 ← (unumber)(number) $ff
Inlining cast (word*) SID_VOICE3_FREQ#0 ← (word*)(number) $d40e
@ -7535,7 +7513,6 @@ Inlining cast *((byte*) CIA2_PORT_A_DDR#0) ← (unumber)(number) 3
Inlining cast (word~) render_init::vicSelectGfxBank1_toDd001_$0#0 ← (word)(byte*) render_init::vicSelectGfxBank1_toDd001_gfx#1
Inlining cast (unumber~) render_init::$16 ← (unumber)(number~) render_init::$6
Inlining cast (unumber~) render_init::$17 ← (unumber)(number~) render_init::$9
Inlining cast (byte) render_init::i#0 ← (unumber)(number) 0
Inlining cast (byte) render_screen_show#1 ← (unumber)(number) 0
Inlining cast (byte) render_screen_render#1 ← (unumber)(number) $20
Inlining cast (byte) render_show::d018val#0 ← (unumber)(number) 0
@ -7557,22 +7534,14 @@ Inlining cast (byte) render_bcd::ZERO_CHAR#0 ← (unumber)(number) $35
Inlining cast (byte) render_screen_original::SPACE#0 ← (unumber)(number) 0
Inlining cast (unumber~) render_screen_original::$8 ← (unumber)(number~) render_screen_original::$0
Inlining cast (unumber~) render_screen_original::$9 ← (unumber)(number~) render_screen_original::$2
Inlining cast (byte) render_screen_original::y#0 ← (unumber)(number) 0
Inlining cast (byte) render_screen_original::x#0 ← (unumber)(number) 0
Inlining cast (byte) render_playfield::l#0 ← (unumber)(number) 2
Inlining cast (byte) render_playfield::c#0 ← (unumber)(number) 0
Inlining cast (byte) render_moving::i#0 ← (unumber)(number) 0
Inlining cast (byte) render_moving::l#0 ← (unumber)(number) 0
Inlining cast (byte) render_moving::c#0 ← (unumber)(number) 0
Inlining cast (word) render_next::next_area_offset#0 ← (unumber)(number~) render_next::$2
Inlining cast (byte*) render_next::next_piece_gfx#0 ← (byte*)*((word[]) PIECES#0 + (byte~) render_next::$9)
Inlining cast (byte) render_next::l#0 ← (unumber)(number) 0
Inlining cast (byte) render_next::c#0 ← (unumber)(number) 0
Inlining cast *((byte*) render_next::screen_next_area#6) ← (unumber)(number) 0
Inlining cast *((byte*) SPRITES_ENABLE#0) ← (unumber)(number) $f
Inlining cast *((byte*) SPRITES_MC#0) ← (unumber)(number) 0
Inlining cast (byte) sprites_init::xpos#0 ← (unumber)(number~) sprites_init::$1
Inlining cast (byte) sprites_init::s#0 ← (unumber)(number) 0
Inlining cast (byte) SPRITES_FIRST_YPOS#0 ← (unumber)(number) $31
Inlining cast (word~) toSpritePtr1_$0#0 ← (word)(byte*) toSpritePtr1_sprite#1
Inlining cast (byte~) toSpritePtr1_$2#0 ← (byte)(unumber~) toSpritePtr1_$1#0
@ -7594,8 +7563,6 @@ Inlining cast (byte) current_movedown_slow#0 ← (unumber)(number) $30
Inlining cast (byte) current_movedown_fast#0 ← (unumber)(number) $a
Inlining cast (byte) current_movedown_counter#0 ← (unumber)(number) 0
Inlining cast (byte) play_init::idx#0 ← (unumber)(number) 0
Inlining cast (byte) play_init::j#0 ← (unumber)(number) 0
Inlining cast (byte) play_init::b#0 ← (unumber)(number) 0
Inlining cast (byte) play_movement::render#0 ← (unumber)(number) 0
Inlining cast (byte) play_move_down::movedown#0 ← (unumber)(number) 0
Inlining cast (byte) play_move_down::return#1 ← (unumber)(number) 0
@ -7614,23 +7581,16 @@ Inlining cast (byte) COLLISION_BOTTOM#0 ← (unumber)(number) 2
Inlining cast (byte) COLLISION_LEFT#0 ← (unumber)(number) 4
Inlining cast (byte) COLLISION_RIGHT#0 ← (unumber)(number) 8
Inlining cast (byte) play_collision::i#0 ← (unumber)(number) 0
Inlining cast (byte) play_collision::l#0 ← (unumber)(number) 0
Inlining cast (byte) play_collision::c#0 ← (unumber)(number) 0
Inlining cast (byte) play_lock_current::i#0 ← (unumber)(number) 0
Inlining cast (byte) play_lock_current::l#0 ← (unumber)(number) 0
Inlining cast (byte) play_lock_current::c#0 ← (unumber)(number) 0
Inlining cast (byte*) current_piece#5 ← (byte*)*((word[]) PIECES#0 + (byte~) play_spawn_current::$7)
Inlining cast (byte) current_orientation#8 ← (unumber)(number) 0
Inlining cast (byte) play_spawn_current::piece_idx#0 ← (unumber)(number) 7
Inlining cast (byte) game_over#5 ← (unumber)(number) 1
Inlining cast (byte) play_remove_lines::removed#0 ← (unumber)(number) 0
Inlining cast (byte) play_remove_lines::y#0 ← (unumber)(number) 0
Inlining cast (byte) play_remove_lines::full#0 ← (unumber)(number) 1
Inlining cast (byte) play_remove_lines::x#0 ← (unumber)(number) 0
Inlining cast (byte) play_remove_lines::full#1 ← (unumber)(number) 0
Inlining cast *((byte[$3]) playfield#0 + (byte) play_remove_lines::w#7) ← (unumber)(number) 0
Inlining cast (byte) current_movedown_slow#9 ← (unumber)(number) 1
Inlining cast (byte) play_increase_level::b#0 ← (unumber)(number) 0
Inlining cast (byte) main::render#0 ← (unumber)(number) 0
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 0
@ -7712,8 +7672,6 @@ Simplifying constant integer cast 2
Simplifying constant integer cast 4
Simplifying constant integer cast 8
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 8
Simplifying constant integer cast 0
Simplifying constant integer cast 8
@ -7758,7 +7716,6 @@ Simplifying constant integer cast 0
Simplifying constant integer cast $10
Simplifying constant integer cast $10
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast $28
Simplifying constant integer cast $28
Simplifying constant integer cast 0
@ -7794,30 +7751,22 @@ Simplifying constant integer cast $f
Simplifying constant integer cast 4
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 4
Simplifying constant integer cast $24
Simplifying constant integer cast $28
Simplifying constant integer cast 2
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 1
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 4
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 $24
Simplifying constant integer cast $f
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 2
Simplifying constant integer cast $18
Simplifying constant integer cast $31
@ -8377,8 +8326,6 @@ 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 1
Simplifying constant integer cast 0
Simplifying constant integer cast 1
@ -8402,16 +8349,12 @@ Simplifying constant integer cast 4
Simplifying constant integer cast 8
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $80
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 7
Simplifying constant integer cast 1
Simplifying constant integer cast 7
@ -8420,12 +8363,10 @@ Simplifying constant integer cast 1
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 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast $ff
Simplifying constant integer cast 0
@ -8436,7 +8377,6 @@ Simplifying constant integer cast $1d
Simplifying constant integer cast 1
Simplifying constant integer cast $f
Simplifying constant integer cast $a
Simplifying constant integer cast 0
Simplifying constant integer cast 6
Simplifying constant integer cast $ff
Simplifying constant integer cast 0
@ -8479,8 +8419,6 @@ Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) 8
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 8
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 8
@ -8516,7 +8454,6 @@ Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $10
Finalized unsigned number type (byte) $10
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) 0
@ -8552,30 +8489,22 @@ Finalized unsigned number type (byte) $f
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) $24
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $24
Finalized unsigned number type (byte) $f
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) $18
Finalized unsigned number type (byte) $31
@ -8623,8 +8552,6 @@ Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
@ -8648,16 +8575,12 @@ Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) 8
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $80
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 7
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 7
@ -8666,12 +8589,10 @@ Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) $ff
Finalized unsigned number type (byte) 0
@ -8682,7 +8603,6 @@ Finalized unsigned number type (byte) $1d
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) $f
Finalized unsigned number type (byte) $a
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 6
Finalized unsigned number type (byte) $ff
Finalized unsigned number type (byte) 0

View File

@ -0,0 +1,56 @@
// Tests using integer conditions in if()
// This should produce '+ ++ ++' at the top of the screen
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
.label SCREEN = $400
main: {
.label i1 = 2
lda #'+'
sta SCREEN
lda #' '
sta SCREEN+1
ldy #2
ldx #0
// loop byte
b3:
cpx #0
beq b4
lda #'+'
sta SCREEN,y
iny
b4:
inx
cpx #3
bne b3
lda #' '
sta SCREEN,y
iny
lda #<0
sta i1
sta i1+1
// loop word
b7:
lda i1
cmp #<0
bne !+
lda i1+1
cmp #>0
beq b8
!:
lda #'+'
sta SCREEN,y
iny
b8:
inc i1
bne !+
inc i1+1
!:
lda i1+1
cmp #>3
bne b7
lda i1
cmp #<3
bne b7
rts
}

View File

@ -0,0 +1,53 @@
@begin: scope:[] from
[0] phi()
to:@1
@1: scope:[] from @begin
[1] phi()
[2] call main
to:@end
@end: scope:[] from @1
[3] phi()
main: scope:[main] from @1
[4] phi()
to:main::@2
main::@2: scope:[main] from main
[5] *((const byte*) SCREEN#0) ← (byte) '+'
to:main::@1
main::@1: scope:[main] from main::@2
[6] *((const byte*) SCREEN#0+(byte) 1) ← (byte) ' '
to:main::@3
main::@3: scope:[main] from main::@1 main::@4
[7] (byte) main::idx#10 ← phi( main::@1/(byte) 2 main::@4/(byte) main::idx#11 )
[7] (byte) main::i#2 ← phi( main::@1/(byte) 0 main::@4/(byte) main::i#1 )
[8] if((byte) 0==(byte) main::i#2) goto main::@4
to:main::@5
main::@5: scope:[main] from main::@3
[9] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) '+'
[10] (byte) main::idx#4 ← ++ (byte) main::idx#10
to:main::@4
main::@4: scope:[main] from main::@3 main::@5
[11] (byte) main::idx#11 ← phi( main::@3/(byte) main::idx#10 main::@5/(byte) main::idx#4 )
[12] (byte) main::i#1 ← ++ (byte) main::i#2
[13] if((byte) main::i#1!=(byte) 3) goto main::@3
to:main::@6
main::@6: scope:[main] from main::@4
[14] *((const byte*) SCREEN#0 + (byte) main::idx#11) ← (byte) ' '
[15] (byte) main::idx#5 ← ++ (byte) main::idx#11
to:main::@7
main::@7: scope:[main] from main::@6 main::@8
[16] (byte) main::idx#12 ← phi( main::@8/(byte) main::idx#17 main::@6/(byte) main::idx#5 )
[16] (word) main::i1#2 ← phi( main::@8/(word) main::i1#1 main::@6/(word) 0 )
[17] if((byte) 0==(word) main::i1#2) goto main::@8
to:main::@9
main::@9: scope:[main] from main::@7
[18] *((const byte*) SCREEN#0 + (byte) main::idx#12) ← (byte) '+'
[19] (byte) main::idx#6 ← ++ (byte) main::idx#12
to:main::@8
main::@8: scope:[main] from main::@7 main::@9
[20] (byte) main::idx#17 ← phi( main::@9/(byte) main::idx#6 main::@7/(byte) main::idx#12 )
[21] (word) main::i1#1 ← ++ (word) main::i1#2
[22] if((word) main::i1#1!=(byte) 3) goto main::@7
to:main::@return
main::@return: scope:[main] from main::@8
[23] return
to:@return

View File

@ -0,0 +1,928 @@
Warning! Adding boolean cast to non-boolean sub-expression (number) 0
Warning! Adding boolean cast to non-boolean sub-expression (number) $3e7
Warning! Adding boolean cast to non-boolean sub-expression (byte) main::i
Warning! Adding boolean cast to non-boolean sub-expression (word) main::i1
Adding pointer type conversion cast (byte*) SCREEN in (byte*) SCREEN ← (number) $400
Culled Empty Block (label) main::@12
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
(byte*) SCREEN#0 ← ((byte*)) (number) $400
to:@1
main: scope:[main] from @1
(byte) main::idx#0 ← (number) 0
(bool~) main::$6 ← (number) 0 != (number) 0
(bool~) main::$0 ← ! (bool~) main::$6
if((bool~) main::$0) goto main::@1
to:main::@3
main::@1: scope:[main] from main main::@3
(byte) main::idx#13 ← phi( main/(byte) main::idx#0 main::@3/(byte) main::idx#1 )
(bool~) main::$7 ← (number) 0 != (number) $3e7
(bool~) main::$1 ← ! (bool~) main::$7
if((bool~) main::$1) goto main::@2
to:main::@4
main::@3: scope:[main] from main
(byte) main::idx#7 ← phi( main/(byte) main::idx#0 )
*((byte*) SCREEN#0 + (byte) main::idx#7) ← (byte) '0'
(byte) main::idx#1 ← ++ (byte) main::idx#7
to:main::@1
main::@2: scope:[main] from main::@1 main::@4
(byte) main::idx#8 ← phi( main::@1/(byte) main::idx#13 main::@4/(byte) main::idx#3 )
*((byte*) SCREEN#0 + (byte) main::idx#8) ← (byte) ' '
(byte) main::idx#2 ← ++ (byte) main::idx#8
(byte) main::i#0 ← (byte) 0
to:main::@5
main::@4: scope:[main] from main::@1
(byte) main::idx#9 ← phi( main::@1/(byte) main::idx#13 )
*((byte*) SCREEN#0 + (byte) main::idx#9) ← (byte) '+'
(byte) main::idx#3 ← ++ (byte) main::idx#9
to:main::@2
main::@5: scope:[main] from main::@2 main::@6
(byte) main::idx#14 ← phi( main::@2/(byte) main::idx#2 main::@6/(byte) main::idx#15 )
(byte) main::i#2 ← phi( main::@2/(byte) main::i#0 main::@6/(byte) main::i#1 )
(bool~) main::$8 ← (number) 0 != (byte) main::i#2
(bool~) main::$2 ← ! (bool~) main::$8
if((bool~) main::$2) goto main::@6
to:main::@7
main::@6: scope:[main] from main::@5 main::@7
(byte) main::idx#15 ← phi( main::@5/(byte) main::idx#14 main::@7/(byte) main::idx#4 )
(byte) main::i#3 ← phi( main::@5/(byte) main::i#2 main::@7/(byte) main::i#4 )
(byte) main::i#1 ← (byte) main::i#3 + rangenext(0,2)
(bool~) main::$3 ← (byte) main::i#1 != rangelast(0,2)
if((bool~) main::$3) goto main::@5
to:main::@8
main::@7: scope:[main] from main::@5
(byte) main::i#4 ← phi( main::@5/(byte) main::i#2 )
(byte) main::idx#10 ← phi( main::@5/(byte) main::idx#14 )
*((byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) '+'
(byte) main::idx#4 ← ++ (byte) main::idx#10
to:main::@6
main::@8: scope:[main] from main::@6
(byte) main::idx#11 ← phi( main::@6/(byte) main::idx#15 )
*((byte*) SCREEN#0 + (byte) main::idx#11) ← (byte) ' '
(byte) main::idx#5 ← ++ (byte) main::idx#11
(word) main::i1#0 ← (word) 0
to:main::@9
main::@9: scope:[main] from main::@10 main::@8
(byte) main::idx#16 ← phi( main::@10/(byte) main::idx#17 main::@8/(byte) main::idx#5 )
(word) main::i1#2 ← phi( main::@10/(word) main::i1#1 main::@8/(word) main::i1#0 )
(bool~) main::$9 ← (number) 0 != (word) main::i1#2
(bool~) main::$4 ← ! (bool~) main::$9
if((bool~) main::$4) goto main::@10
to:main::@11
main::@10: scope:[main] from main::@11 main::@9
(byte) main::idx#17 ← phi( main::@11/(byte) main::idx#6 main::@9/(byte) main::idx#16 )
(word) main::i1#3 ← phi( main::@11/(word) main::i1#4 main::@9/(word) main::i1#2 )
(word) main::i1#1 ← (word) main::i1#3 + rangenext(0,2)
(bool~) main::$5 ← (word) main::i1#1 != rangelast(0,2)
if((bool~) main::$5) goto main::@9
to:main::@return
main::@11: scope:[main] from main::@9
(word) main::i1#4 ← phi( main::@9/(word) main::i1#2 )
(byte) main::idx#12 ← phi( main::@9/(byte) main::idx#16 )
*((byte*) SCREEN#0 + (byte) main::idx#12) ← (byte) '+'
(byte) main::idx#6 ← ++ (byte) main::idx#12
to:main::@10
main::@return: scope:[main] from main::@10
return
to:@return
@1: scope:[] from @begin
call main
to:@2
@2: scope:[] from @1
to:@end
@end: scope:[] from @2
SYMBOL TABLE SSA
(label) @1
(label) @2
(label) @begin
(label) @end
(byte*) SCREEN
(byte*) SCREEN#0
(void()) main()
(bool~) main::$0
(bool~) main::$1
(bool~) main::$2
(bool~) main::$3
(bool~) main::$4
(bool~) main::$5
(bool~) main::$6
(bool~) main::$7
(bool~) main::$8
(bool~) main::$9
(label) main::@1
(label) main::@10
(label) main::@11
(label) main::@2
(label) main::@3
(label) main::@4
(label) main::@5
(label) main::@6
(label) main::@7
(label) main::@8
(label) main::@9
(label) main::@return
(byte) main::i
(byte) main::i#0
(byte) main::i#1
(byte) main::i#2
(byte) main::i#3
(byte) main::i#4
(word) main::i1
(word) main::i1#0
(word) main::i1#1
(word) main::i1#2
(word) main::i1#3
(word) main::i1#4
(byte) main::idx
(byte) main::idx#0
(byte) main::idx#1
(byte) main::idx#10
(byte) main::idx#11
(byte) main::idx#12
(byte) main::idx#13
(byte) main::idx#14
(byte) main::idx#15
(byte) main::idx#16
(byte) main::idx#17
(byte) main::idx#2
(byte) main::idx#3
(byte) main::idx#4
(byte) main::idx#5
(byte) main::idx#6
(byte) main::idx#7
(byte) main::idx#8
(byte) main::idx#9
Adding number conversion cast (unumber) 0 in (byte) main::idx#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (bool~) main::$8 ← (number) 0 != (byte) main::i#2
Adding number conversion cast (unumber) 0 in (bool~) main::$9 ← (number) 0 != (word) main::i1#2
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400
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 0
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inversing boolean not [3] (bool~) main::$0 ← (number) 0 == (number) 0 from [2] (bool~) main::$6 ← (number) 0 != (number) 0
Inversing boolean not [7] (bool~) main::$1 ← (number) 0 == (number) $3e7 from [6] (bool~) main::$7 ← (number) 0 != (number) $3e7
Inversing boolean not [21] (bool~) main::$2 ← (byte) 0 == (byte) main::i#2 from [20] (bool~) main::$8 ← (byte) 0 != (byte) main::i#2
Inversing boolean not [36] (bool~) main::$4 ← (byte) 0 == (word) main::i1#2 from [35] (bool~) main::$9 ← (byte) 0 != (word) main::i1#2
Successful SSA optimization Pass2UnaryNotSimplification
Alias (byte) main::idx#0 = (byte) main::idx#7
Alias (byte) main::idx#13 = (byte) main::idx#9
Alias (byte) main::idx#10 = (byte) main::idx#14
Alias (byte) main::i#2 = (byte) main::i#4
Alias (byte) main::idx#11 = (byte) main::idx#15
Alias (byte) main::idx#12 = (byte) main::idx#16
Alias (word) main::i1#2 = (word) main::i1#4
Successful SSA optimization Pass2AliasElimination
Alias (byte) main::i#2 = (byte) main::i#3
Alias (word) main::i1#2 = (word) main::i1#3
Successful SSA optimization Pass2AliasElimination
Simple Condition (bool~) main::$0 [4] if((number) 0==(number) 0) goto main::@1
Simple Condition (bool~) main::$1 [8] if((number) 0==(number) $3e7) goto main::@2
Simple Condition (bool~) main::$2 [22] if((byte) 0==(byte) main::i#2) goto main::@6
Simple Condition (bool~) main::$3 [26] if((byte) main::i#1!=rangelast(0,2)) goto main::@5
Simple Condition (bool~) main::$4 [37] if((byte) 0==(word) main::i1#2) goto main::@10
Simple Condition (bool~) main::$5 [41] if((word) main::i1#1!=rangelast(0,2)) goto main::@9
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant (const byte*) SCREEN#0 = (byte*) 1024
Constant (const byte) main::idx#0 = 0
Constant (const byte) main::i#0 = 0
Constant (const word) main::i1#0 = 0
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [4] if((number) 0==(number) 0) goto main::@1
Removing PHI-reference to removed block (main::@1) in block main::@2
if() condition always false - eliminating [8] if((number) 0==(number) $3e7) goto main::@2
Successful SSA optimization Pass2ConstantIfs
Resolved ranged next value [24] main::i#1 ← ++ main::i#2 to ++
Resolved ranged comparison value [26] if(main::i#1!=rangelast(0,2)) goto main::@5 to (number) 3
Resolved ranged next value [39] main::i1#1 ← ++ main::i1#2 to ++
Resolved ranged comparison value [41] if(main::i1#1!=rangelast(0,2)) goto main::@9 to (number) 3
Simplifying expression containing zero SCREEN#0 in [10] *((const byte*) SCREEN#0 + (const byte) main::idx#0) ← (byte) '0'
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating variable (byte) main::idx#1 from unused block main::@3
Removing PHI-reference to removed block (main::@3) in block main::@1
Removing unused block main::@3
Successful SSA optimization Pass2EliminateUnusedBlocks
Adding number conversion cast (unumber) 3 in if((byte) main::i#1!=(number) 3) goto main::@5
Adding number conversion cast (unumber) 3 in if((word) main::i1#1!=(number) 3) goto main::@9
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant integer cast 3
Simplifying constant integer cast 3
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 3
Finalized unsigned number type (byte) 3
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias (byte) main::idx#3 = (byte) main::idx#8
Successful SSA optimization Pass2AliasElimination
Identical Phi Values (byte) main::idx#13 (const byte) main::idx#0
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [5] (byte) main::idx#3 ← ++ (const byte) main::idx#0
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#3 = ++main::idx#0
Successful SSA optimization Pass2ConstantIdentification
Simplifying expression containing zero SCREEN#0 in [4] *((const byte*) SCREEN#0 + (const byte) main::idx#0) ← (byte) '+'
Successful SSA optimization PassNSimplifyExpressionWithZero
Constant right-side identified [1] (byte) main::idx#2 ← ++ (const byte) main::idx#3
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#2 = ++main::idx#3
Successful SSA optimization Pass2ConstantIdentification
Inlining constant with var siblings (const byte) main::idx#0
Inlining constant with var siblings (const byte) main::i#0
Inlining constant with var siblings (const word) main::i1#0
Inlining constant with var siblings (const byte) main::idx#3
Inlining constant with var siblings (const byte) main::idx#2
Constant inlined main::i#0 = (byte) 0
Constant inlined main::i1#0 = (word) 0
Constant inlined main::idx#0 = (byte) 0
Constant inlined main::idx#2 = ++++(byte) 0
Constant inlined main::idx#3 = ++(byte) 0
Successful SSA optimization Pass2ConstantInlining
Consolidated array index constant in *(SCREEN#0+++0)
Successful SSA optimization Pass2ConstantAdditionElimination
Simplifying constant integer increment ++0
Simplifying constant integer increment ++0
Successful SSA optimization Pass2ConstantSimplification
Simplifying constant integer increment ++1
Successful SSA optimization Pass2ConstantSimplification
Added new block during phi lifting main::@13(between main::@6 and main::@5)
Added new block during phi lifting main::@14(between main::@5 and main::@6)
Added new block during phi lifting main::@15(between main::@10 and main::@9)
Added new block during phi lifting main::@16(between main::@9 and main::@10)
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 @end
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@1
CALL GRAPH
Calls in [] to main:2
Created 6 initial phi equivalence classes
Coalesced [13] main::idx#20 ← main::idx#4
Coalesced [19] main::idx#22 ← main::idx#5
Coalesced [24] main::idx#23 ← main::idx#6
Coalesced [29] main::i1#5 ← main::i1#1
Coalesced [30] main::idx#21 ← main::idx#17
Coalesced (already) [31] main::idx#24 ← main::idx#12
Coalesced [32] main::i#5 ← main::i#1
Coalesced [33] main::idx#18 ← main::idx#11
Coalesced (already) [34] main::idx#19 ← main::idx#10
Coalesced down to 4 phi equivalence classes
Culled Empty Block (label) @2
Culled Empty Block (label) main::@1
Culled Empty Block (label) main::@15
Culled Empty Block (label) main::@16
Culled Empty Block (label) main::@13
Culled Empty Block (label) main::@14
Renumbering block main::@2 to main::@1
Renumbering block main::@4 to main::@2
Renumbering block main::@5 to main::@3
Renumbering block main::@6 to main::@4
Renumbering block main::@7 to main::@5
Renumbering block main::@8 to main::@6
Renumbering block main::@9 to main::@7
Renumbering block main::@10 to main::@8
Renumbering block main::@11 to main::@9
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @1
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
FINAL CONTROL FLOW GRAPH
@begin: scope:[] from
[0] phi()
to:@1
@1: scope:[] from @begin
[1] phi()
[2] call main
to:@end
@end: scope:[] from @1
[3] phi()
main: scope:[main] from @1
[4] phi()
to:main::@2
main::@2: scope:[main] from main
[5] *((const byte*) SCREEN#0) ← (byte) '+'
to:main::@1
main::@1: scope:[main] from main::@2
[6] *((const byte*) SCREEN#0+(byte) 1) ← (byte) ' '
to:main::@3
main::@3: scope:[main] from main::@1 main::@4
[7] (byte) main::idx#10 ← phi( main::@1/(byte) 2 main::@4/(byte) main::idx#11 )
[7] (byte) main::i#2 ← phi( main::@1/(byte) 0 main::@4/(byte) main::i#1 )
[8] if((byte) 0==(byte) main::i#2) goto main::@4
to:main::@5
main::@5: scope:[main] from main::@3
[9] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) '+'
[10] (byte) main::idx#4 ← ++ (byte) main::idx#10
to:main::@4
main::@4: scope:[main] from main::@3 main::@5
[11] (byte) main::idx#11 ← phi( main::@3/(byte) main::idx#10 main::@5/(byte) main::idx#4 )
[12] (byte) main::i#1 ← ++ (byte) main::i#2
[13] if((byte) main::i#1!=(byte) 3) goto main::@3
to:main::@6
main::@6: scope:[main] from main::@4
[14] *((const byte*) SCREEN#0 + (byte) main::idx#11) ← (byte) ' '
[15] (byte) main::idx#5 ← ++ (byte) main::idx#11
to:main::@7
main::@7: scope:[main] from main::@6 main::@8
[16] (byte) main::idx#12 ← phi( main::@8/(byte) main::idx#17 main::@6/(byte) main::idx#5 )
[16] (word) main::i1#2 ← phi( main::@8/(word) main::i1#1 main::@6/(word) 0 )
[17] if((byte) 0==(word) main::i1#2) goto main::@8
to:main::@9
main::@9: scope:[main] from main::@7
[18] *((const byte*) SCREEN#0 + (byte) main::idx#12) ← (byte) '+'
[19] (byte) main::idx#6 ← ++ (byte) main::idx#12
to:main::@8
main::@8: scope:[main] from main::@7 main::@9
[20] (byte) main::idx#17 ← phi( main::@9/(byte) main::idx#6 main::@7/(byte) main::idx#12 )
[21] (word) main::i1#1 ← ++ (word) main::i1#2
[22] if((word) main::i1#1!=(byte) 3) goto main::@7
to:main::@return
main::@return: scope:[main] from main::@8
[23] return
to:@return
VARIABLE REGISTER WEIGHTS
(byte*) SCREEN
(void()) main()
(byte) main::i
(byte) main::i#1 16.5
(byte) main::i#2 6.6000000000000005
(word) main::i1
(word) main::i1#1 16.5
(word) main::i1#2 6.6000000000000005
(byte) main::idx
(byte) main::idx#10 14.666666666666666
(byte) main::idx#11 9.25
(byte) main::idx#12 15.333333333333332
(byte) main::idx#17 11.0
(byte) main::idx#4 22.0
(byte) main::idx#5 4.0
(byte) main::idx#6 22.0
Initial phi equivalence classes
[ main::i#2 main::i#1 ]
[ main::idx#10 main::idx#11 main::idx#4 ]
[ main::i1#2 main::i1#1 ]
[ main::idx#12 main::idx#17 main::idx#5 main::idx#6 ]
Complete equivalence classes
[ main::i#2 main::i#1 ]
[ main::idx#10 main::idx#11 main::idx#4 ]
[ main::i1#2 main::i1#1 ]
[ main::idx#12 main::idx#17 main::idx#5 main::idx#6 ]
Allocated zp ZP_BYTE:2 [ main::i#2 main::i#1 ]
Allocated zp ZP_BYTE:3 [ main::idx#10 main::idx#11 main::idx#4 ]
Allocated zp ZP_WORD:4 [ main::i1#2 main::i1#1 ]
Allocated zp ZP_BYTE:6 [ main::idx#12 main::idx#17 main::idx#5 main::idx#6 ]
INITIAL ASM
//SEG0 File Comments
// Tests using integer conditions in if()
// This should produce '+ ++ ++' at the top of the screen
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG2 Global Constants & labels
.label SCREEN = $400
//SEG3 @begin
bbegin:
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
b1_from_bbegin:
jmp b1
//SEG5 @1
b1:
//SEG6 [2] call main
//SEG7 [4] phi from @1 to main [phi:@1->main]
main_from_b1:
jsr main
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
bend_from_b1:
jmp bend
//SEG9 @end
bend:
//SEG10 main
main: {
.label i = 2
.label idx = 3
.label idx_5 = 6
.label i1 = 4
.label idx_6 = 6
.label idx_12 = 6
.label idx_17 = 6
jmp b2
//SEG11 main::@2
b2:
//SEG12 [5] *((const byte*) SCREEN#0) ← (byte) '+' -- _deref_pbuc1=vbuc2
lda #'+'
sta SCREEN
jmp b1
//SEG13 main::@1
b1:
//SEG14 [6] *((const byte*) SCREEN#0+(byte) 1) ← (byte) ' ' -- _deref_pbuc1=vbuc2
lda #' '
sta SCREEN+1
//SEG15 [7] phi from main::@1 to main::@3 [phi:main::@1->main::@3]
b3_from_b1:
//SEG16 [7] phi (byte) main::idx#10 = (byte) 2 [phi:main::@1->main::@3#0] -- vbuz1=vbuc1
lda #2
sta idx
//SEG17 [7] phi (byte) main::i#2 = (byte) 0 [phi:main::@1->main::@3#1] -- vbuz1=vbuc1
lda #0
sta i
jmp b3
// loop byte
//SEG18 [7] phi from main::@4 to main::@3 [phi:main::@4->main::@3]
b3_from_b4:
//SEG19 [7] phi (byte) main::idx#10 = (byte) main::idx#11 [phi:main::@4->main::@3#0] -- register_copy
//SEG20 [7] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@4->main::@3#1] -- register_copy
jmp b3
//SEG21 main::@3
b3:
//SEG22 [8] if((byte) 0==(byte) main::i#2) goto main::@4 -- vbuc1_eq_vbuz1_then_la1
lda #0
cmp i
beq b4_from_b3
jmp b5
//SEG23 main::@5
b5:
//SEG24 [9] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) '+' -- pbuc1_derefidx_vbuz1=vbuc2
lda #'+'
ldy idx
sta SCREEN,y
//SEG25 [10] (byte) main::idx#4 ← ++ (byte) main::idx#10 -- vbuz1=_inc_vbuz1
inc idx
//SEG26 [11] phi from main::@3 main::@5 to main::@4 [phi:main::@3/main::@5->main::@4]
b4_from_b3:
b4_from_b5:
//SEG27 [11] phi (byte) main::idx#11 = (byte) main::idx#10 [phi:main::@3/main::@5->main::@4#0] -- register_copy
jmp b4
//SEG28 main::@4
b4:
//SEG29 [12] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1
inc i
//SEG30 [13] if((byte) main::i#1!=(byte) 3) goto main::@3 -- vbuz1_neq_vbuc1_then_la1
lda #3
cmp i
bne b3_from_b4
jmp b6
//SEG31 main::@6
b6:
//SEG32 [14] *((const byte*) SCREEN#0 + (byte) main::idx#11) ← (byte) ' ' -- pbuc1_derefidx_vbuz1=vbuc2
lda #' '
ldy idx
sta SCREEN,y
//SEG33 [15] (byte) main::idx#5 ← ++ (byte) main::idx#11 -- vbuz1=_inc_vbuz2
ldy idx
iny
sty idx_5
//SEG34 [16] phi from main::@6 to main::@7 [phi:main::@6->main::@7]
b7_from_b6:
//SEG35 [16] phi (byte) main::idx#12 = (byte) main::idx#5 [phi:main::@6->main::@7#0] -- register_copy
//SEG36 [16] phi (word) main::i1#2 = (word) 0 [phi:main::@6->main::@7#1] -- vwuz1=vwuc1
lda #<0
sta i1
lda #>0
sta i1+1
jmp b7
// loop word
//SEG37 [16] phi from main::@8 to main::@7 [phi:main::@8->main::@7]
b7_from_b8:
//SEG38 [16] phi (byte) main::idx#12 = (byte) main::idx#17 [phi:main::@8->main::@7#0] -- register_copy
//SEG39 [16] phi (word) main::i1#2 = (word) main::i1#1 [phi:main::@8->main::@7#1] -- register_copy
jmp b7
//SEG40 main::@7
b7:
//SEG41 [17] if((byte) 0==(word) main::i1#2) goto main::@8 -- vwuc1_eq_vwuz1_then_la1
lda i1
cmp #<0
bne !+
lda i1+1
cmp #>0
beq b8_from_b7
!:
jmp b9
//SEG42 main::@9
b9:
//SEG43 [18] *((const byte*) SCREEN#0 + (byte) main::idx#12) ← (byte) '+' -- pbuc1_derefidx_vbuz1=vbuc2
lda #'+'
ldy idx_12
sta SCREEN,y
//SEG44 [19] (byte) main::idx#6 ← ++ (byte) main::idx#12 -- vbuz1=_inc_vbuz1
inc idx_6
//SEG45 [20] phi from main::@7 main::@9 to main::@8 [phi:main::@7/main::@9->main::@8]
b8_from_b7:
b8_from_b9:
//SEG46 [20] phi (byte) main::idx#17 = (byte) main::idx#12 [phi:main::@7/main::@9->main::@8#0] -- register_copy
jmp b8
//SEG47 main::@8
b8:
//SEG48 [21] (word) main::i1#1 ← ++ (word) main::i1#2 -- vwuz1=_inc_vwuz1
inc i1
bne !+
inc i1+1
!:
//SEG49 [22] if((word) main::i1#1!=(byte) 3) goto main::@7 -- vwuz1_neq_vwuc1_then_la1
lda i1+1
cmp #>3
bne b7_from_b8
lda i1
cmp #<3
bne b7_from_b8
jmp breturn
//SEG50 main::@return
breturn:
//SEG51 [23] return
rts
}
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [5] *((const byte*) SCREEN#0) ← (byte) '+' [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [6] *((const byte*) SCREEN#0+(byte) 1) ← (byte) ' ' [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [9] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) '+' [ main::i#2 main::idx#10 ] ( main:2 [ main::i#2 main::idx#10 ] ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ main::i#2 main::i#1 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:3 [ main::idx#10 main::idx#11 main::idx#4 ]
Statement [14] *((const byte*) SCREEN#0 + (byte) main::idx#11) ← (byte) ' ' [ main::idx#11 ] ( main:2 [ main::idx#11 ] ) always clobbers reg byte a
Statement [17] if((byte) 0==(word) main::i1#2) goto main::@8 [ main::i1#2 main::idx#12 ] ( main:2 [ main::i1#2 main::idx#12 ] ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:6 [ main::idx#12 main::idx#17 main::idx#5 main::idx#6 ]
Statement [18] *((const byte*) SCREEN#0 + (byte) main::idx#12) ← (byte) '+' [ main::i1#2 main::idx#12 ] ( main:2 [ main::i1#2 main::idx#12 ] ) always clobbers reg byte a
Statement [22] if((word) main::i1#1!=(byte) 3) goto main::@7 [ main::i1#1 main::idx#17 ] ( main:2 [ main::i1#1 main::idx#17 ] ) always clobbers reg byte a
Statement [5] *((const byte*) SCREEN#0) ← (byte) '+' [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [6] *((const byte*) SCREEN#0+(byte) 1) ← (byte) ' ' [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [9] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) '+' [ main::i#2 main::idx#10 ] ( main:2 [ main::i#2 main::idx#10 ] ) always clobbers reg byte a
Statement [14] *((const byte*) SCREEN#0 + (byte) main::idx#11) ← (byte) ' ' [ main::idx#11 ] ( main:2 [ main::idx#11 ] ) always clobbers reg byte a
Statement [17] if((byte) 0==(word) main::i1#2) goto main::@8 [ main::i1#2 main::idx#12 ] ( main:2 [ main::i1#2 main::idx#12 ] ) always clobbers reg byte a
Statement [18] *((const byte*) SCREEN#0 + (byte) main::idx#12) ← (byte) '+' [ main::i1#2 main::idx#12 ] ( main:2 [ main::i1#2 main::idx#12 ] ) always clobbers reg byte a
Statement [22] if((word) main::i1#1!=(byte) 3) goto main::@7 [ main::i1#1 main::idx#17 ] ( main:2 [ main::i1#1 main::idx#17 ] ) always clobbers reg byte a
Potential registers zp ZP_BYTE:2 [ main::i#2 main::i#1 ] : zp ZP_BYTE:2 , reg byte x , reg byte y ,
Potential registers zp ZP_BYTE:3 [ main::idx#10 main::idx#11 main::idx#4 ] : zp ZP_BYTE:3 , reg byte x , reg byte y ,
Potential registers zp ZP_WORD:4 [ main::i1#2 main::i1#1 ] : zp ZP_WORD:4 ,
Potential registers zp ZP_BYTE:6 [ main::idx#12 main::idx#17 main::idx#5 main::idx#6 ] : zp ZP_BYTE:6 , reg byte x , reg byte y ,
REGISTER UPLIFT SCOPES
Uplift Scope [main] 52.33: zp ZP_BYTE:6 [ main::idx#12 main::idx#17 main::idx#5 main::idx#6 ] 45.92: zp ZP_BYTE:3 [ main::idx#10 main::idx#11 main::idx#4 ] 23.1: zp ZP_BYTE:2 [ main::i#2 main::i#1 ] 23.1: zp ZP_WORD:4 [ main::i1#2 main::i1#1 ]
Uplift Scope []
Uplifting [main] best 1227 combination reg byte y [ main::idx#12 main::idx#17 main::idx#5 main::idx#6 ] reg byte y [ main::idx#10 main::idx#11 main::idx#4 ] reg byte x [ main::i#2 main::i#1 ] zp ZP_WORD:4 [ main::i1#2 main::i1#1 ]
Uplifting [] best 1227 combination
Allocated (was zp ZP_WORD:4) zp ZP_WORD:2 [ main::i1#2 main::i1#1 ]
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 File Comments
// Tests using integer conditions in if()
// This should produce '+ ++ ++' at the top of the screen
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG2 Global Constants & labels
.label SCREEN = $400
//SEG3 @begin
bbegin:
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
b1_from_bbegin:
jmp b1
//SEG5 @1
b1:
//SEG6 [2] call main
//SEG7 [4] phi from @1 to main [phi:@1->main]
main_from_b1:
jsr main
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
bend_from_b1:
jmp bend
//SEG9 @end
bend:
//SEG10 main
main: {
.label i1 = 2
jmp b2
//SEG11 main::@2
b2:
//SEG12 [5] *((const byte*) SCREEN#0) ← (byte) '+' -- _deref_pbuc1=vbuc2
lda #'+'
sta SCREEN
jmp b1
//SEG13 main::@1
b1:
//SEG14 [6] *((const byte*) SCREEN#0+(byte) 1) ← (byte) ' ' -- _deref_pbuc1=vbuc2
lda #' '
sta SCREEN+1
//SEG15 [7] phi from main::@1 to main::@3 [phi:main::@1->main::@3]
b3_from_b1:
//SEG16 [7] phi (byte) main::idx#10 = (byte) 2 [phi:main::@1->main::@3#0] -- vbuyy=vbuc1
ldy #2
//SEG17 [7] phi (byte) main::i#2 = (byte) 0 [phi:main::@1->main::@3#1] -- vbuxx=vbuc1
ldx #0
jmp b3
// loop byte
//SEG18 [7] phi from main::@4 to main::@3 [phi:main::@4->main::@3]
b3_from_b4:
//SEG19 [7] phi (byte) main::idx#10 = (byte) main::idx#11 [phi:main::@4->main::@3#0] -- register_copy
//SEG20 [7] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@4->main::@3#1] -- register_copy
jmp b3
//SEG21 main::@3
b3:
//SEG22 [8] if((byte) 0==(byte) main::i#2) goto main::@4 -- vbuc1_eq_vbuxx_then_la1
cpx #0
beq b4_from_b3
jmp b5
//SEG23 main::@5
b5:
//SEG24 [9] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) '+' -- pbuc1_derefidx_vbuyy=vbuc2
lda #'+'
sta SCREEN,y
//SEG25 [10] (byte) main::idx#4 ← ++ (byte) main::idx#10 -- vbuyy=_inc_vbuyy
iny
//SEG26 [11] phi from main::@3 main::@5 to main::@4 [phi:main::@3/main::@5->main::@4]
b4_from_b3:
b4_from_b5:
//SEG27 [11] phi (byte) main::idx#11 = (byte) main::idx#10 [phi:main::@3/main::@5->main::@4#0] -- register_copy
jmp b4
//SEG28 main::@4
b4:
//SEG29 [12] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx
inx
//SEG30 [13] if((byte) main::i#1!=(byte) 3) goto main::@3 -- vbuxx_neq_vbuc1_then_la1
cpx #3
bne b3_from_b4
jmp b6
//SEG31 main::@6
b6:
//SEG32 [14] *((const byte*) SCREEN#0 + (byte) main::idx#11) ← (byte) ' ' -- pbuc1_derefidx_vbuyy=vbuc2
lda #' '
sta SCREEN,y
//SEG33 [15] (byte) main::idx#5 ← ++ (byte) main::idx#11 -- vbuyy=_inc_vbuyy
iny
//SEG34 [16] phi from main::@6 to main::@7 [phi:main::@6->main::@7]
b7_from_b6:
//SEG35 [16] phi (byte) main::idx#12 = (byte) main::idx#5 [phi:main::@6->main::@7#0] -- register_copy
//SEG36 [16] phi (word) main::i1#2 = (word) 0 [phi:main::@6->main::@7#1] -- vwuz1=vwuc1
lda #<0
sta i1
lda #>0
sta i1+1
jmp b7
// loop word
//SEG37 [16] phi from main::@8 to main::@7 [phi:main::@8->main::@7]
b7_from_b8:
//SEG38 [16] phi (byte) main::idx#12 = (byte) main::idx#17 [phi:main::@8->main::@7#0] -- register_copy
//SEG39 [16] phi (word) main::i1#2 = (word) main::i1#1 [phi:main::@8->main::@7#1] -- register_copy
jmp b7
//SEG40 main::@7
b7:
//SEG41 [17] if((byte) 0==(word) main::i1#2) goto main::@8 -- vwuc1_eq_vwuz1_then_la1
lda i1
cmp #<0
bne !+
lda i1+1
cmp #>0
beq b8_from_b7
!:
jmp b9
//SEG42 main::@9
b9:
//SEG43 [18] *((const byte*) SCREEN#0 + (byte) main::idx#12) ← (byte) '+' -- pbuc1_derefidx_vbuyy=vbuc2
lda #'+'
sta SCREEN,y
//SEG44 [19] (byte) main::idx#6 ← ++ (byte) main::idx#12 -- vbuyy=_inc_vbuyy
iny
//SEG45 [20] phi from main::@7 main::@9 to main::@8 [phi:main::@7/main::@9->main::@8]
b8_from_b7:
b8_from_b9:
//SEG46 [20] phi (byte) main::idx#17 = (byte) main::idx#12 [phi:main::@7/main::@9->main::@8#0] -- register_copy
jmp b8
//SEG47 main::@8
b8:
//SEG48 [21] (word) main::i1#1 ← ++ (word) main::i1#2 -- vwuz1=_inc_vwuz1
inc i1
bne !+
inc i1+1
!:
//SEG49 [22] if((word) main::i1#1!=(byte) 3) goto main::@7 -- vwuz1_neq_vwuc1_then_la1
lda i1+1
cmp #>3
bne b7_from_b8
lda i1
cmp #<3
bne b7_from_b8
jmp breturn
//SEG50 main::@return
breturn:
//SEG51 [23] return
rts
}
ASSEMBLER OPTIMIZATIONS
Removing instruction jmp b1
Removing instruction jmp bend
Removing instruction jmp b2
Removing instruction jmp b1
Removing instruction jmp b3
Removing instruction jmp b5
Removing instruction jmp b4
Removing instruction jmp b6
Removing instruction jmp b7
Removing instruction jmp b9
Removing instruction jmp b8
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda #>0
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Replacing label b4_from_b3 with b4
Replacing label b3_from_b4 with b3
Replacing label b8_from_b7 with b8
Replacing label b7_from_b8 with b7
Replacing label b7_from_b8 with b7
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction main_from_b1:
Removing instruction bend_from_b1:
Removing instruction b3_from_b4:
Removing instruction b4_from_b3:
Removing instruction b4_from_b5:
Removing instruction b7_from_b8:
Removing instruction b8_from_b7:
Removing instruction b8_from_b9:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction bend:
Removing instruction b2:
Removing instruction b1:
Removing instruction b3_from_b1:
Removing instruction b5:
Removing instruction b6:
Removing instruction b7_from_b6:
Removing instruction b9:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction jmp b3
Removing instruction jmp b7
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @1
(label) @begin
(label) @end
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = (byte*) 1024
(void()) main()
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@4
(label) main::@5
(label) main::@6
(label) main::@7
(label) main::@8
(label) main::@9
(label) main::@return
(byte) main::i
(byte) main::i#1 reg byte x 16.5
(byte) main::i#2 reg byte x 6.6000000000000005
(word) main::i1
(word) main::i1#1 i1 zp ZP_WORD:2 16.5
(word) main::i1#2 i1 zp ZP_WORD:2 6.6000000000000005
(byte) main::idx
(byte) main::idx#10 reg byte y 14.666666666666666
(byte) main::idx#11 reg byte y 9.25
(byte) main::idx#12 reg byte y 15.333333333333332
(byte) main::idx#17 reg byte y 11.0
(byte) main::idx#4 reg byte y 22.0
(byte) main::idx#5 reg byte y 4.0
(byte) main::idx#6 reg byte y 22.0
reg byte x [ main::i#2 main::i#1 ]
reg byte y [ main::idx#10 main::idx#11 main::idx#4 ]
zp ZP_WORD:2 [ main::i1#2 main::i1#1 ]
reg byte y [ main::idx#12 main::idx#17 main::idx#5 main::idx#6 ]
FINAL ASSEMBLER
Score: 862
//SEG0 File Comments
// Tests using integer conditions in if()
// This should produce '+ ++ ++' at the top of the screen
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
//SEG2 Global Constants & labels
.label SCREEN = $400
//SEG3 @begin
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
//SEG5 @1
//SEG6 [2] call main
//SEG7 [4] phi from @1 to main [phi:@1->main]
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
//SEG9 @end
//SEG10 main
main: {
.label i1 = 2
//SEG11 main::@2
//SEG12 [5] *((const byte*) SCREEN#0) ← (byte) '+' -- _deref_pbuc1=vbuc2
lda #'+'
sta SCREEN
//SEG13 main::@1
//SEG14 [6] *((const byte*) SCREEN#0+(byte) 1) ← (byte) ' ' -- _deref_pbuc1=vbuc2
lda #' '
sta SCREEN+1
//SEG15 [7] phi from main::@1 to main::@3 [phi:main::@1->main::@3]
//SEG16 [7] phi (byte) main::idx#10 = (byte) 2 [phi:main::@1->main::@3#0] -- vbuyy=vbuc1
ldy #2
//SEG17 [7] phi (byte) main::i#2 = (byte) 0 [phi:main::@1->main::@3#1] -- vbuxx=vbuc1
ldx #0
// loop byte
//SEG18 [7] phi from main::@4 to main::@3 [phi:main::@4->main::@3]
//SEG19 [7] phi (byte) main::idx#10 = (byte) main::idx#11 [phi:main::@4->main::@3#0] -- register_copy
//SEG20 [7] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@4->main::@3#1] -- register_copy
//SEG21 main::@3
b3:
//SEG22 [8] if((byte) 0==(byte) main::i#2) goto main::@4 -- vbuc1_eq_vbuxx_then_la1
cpx #0
beq b4
//SEG23 main::@5
//SEG24 [9] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) '+' -- pbuc1_derefidx_vbuyy=vbuc2
lda #'+'
sta SCREEN,y
//SEG25 [10] (byte) main::idx#4 ← ++ (byte) main::idx#10 -- vbuyy=_inc_vbuyy
iny
//SEG26 [11] phi from main::@3 main::@5 to main::@4 [phi:main::@3/main::@5->main::@4]
//SEG27 [11] phi (byte) main::idx#11 = (byte) main::idx#10 [phi:main::@3/main::@5->main::@4#0] -- register_copy
//SEG28 main::@4
b4:
//SEG29 [12] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx
inx
//SEG30 [13] if((byte) main::i#1!=(byte) 3) goto main::@3 -- vbuxx_neq_vbuc1_then_la1
cpx #3
bne b3
//SEG31 main::@6
//SEG32 [14] *((const byte*) SCREEN#0 + (byte) main::idx#11) ← (byte) ' ' -- pbuc1_derefidx_vbuyy=vbuc2
lda #' '
sta SCREEN,y
//SEG33 [15] (byte) main::idx#5 ← ++ (byte) main::idx#11 -- vbuyy=_inc_vbuyy
iny
//SEG34 [16] phi from main::@6 to main::@7 [phi:main::@6->main::@7]
//SEG35 [16] phi (byte) main::idx#12 = (byte) main::idx#5 [phi:main::@6->main::@7#0] -- register_copy
//SEG36 [16] phi (word) main::i1#2 = (word) 0 [phi:main::@6->main::@7#1] -- vwuz1=vwuc1
lda #<0
sta i1
sta i1+1
// loop word
//SEG37 [16] phi from main::@8 to main::@7 [phi:main::@8->main::@7]
//SEG38 [16] phi (byte) main::idx#12 = (byte) main::idx#17 [phi:main::@8->main::@7#0] -- register_copy
//SEG39 [16] phi (word) main::i1#2 = (word) main::i1#1 [phi:main::@8->main::@7#1] -- register_copy
//SEG40 main::@7
b7:
//SEG41 [17] if((byte) 0==(word) main::i1#2) goto main::@8 -- vwuc1_eq_vwuz1_then_la1
lda i1
cmp #<0
bne !+
lda i1+1
cmp #>0
beq b8
!:
//SEG42 main::@9
//SEG43 [18] *((const byte*) SCREEN#0 + (byte) main::idx#12) ← (byte) '+' -- pbuc1_derefidx_vbuyy=vbuc2
lda #'+'
sta SCREEN,y
//SEG44 [19] (byte) main::idx#6 ← ++ (byte) main::idx#12 -- vbuyy=_inc_vbuyy
iny
//SEG45 [20] phi from main::@7 main::@9 to main::@8 [phi:main::@7/main::@9->main::@8]
//SEG46 [20] phi (byte) main::idx#17 = (byte) main::idx#12 [phi:main::@7/main::@9->main::@8#0] -- register_copy
//SEG47 main::@8
b8:
//SEG48 [21] (word) main::i1#1 ← ++ (word) main::i1#2 -- vwuz1=_inc_vwuz1
inc i1
bne !+
inc i1+1
!:
//SEG49 [22] if((word) main::i1#1!=(byte) 3) goto main::@7 -- vwuz1_neq_vwuc1_then_la1
lda i1+1
cmp #>3
bne b7
lda i1
cmp #<3
bne b7
//SEG50 main::@return
//SEG51 [23] return
rts
}

View File

@ -0,0 +1 @@
program

View File

@ -0,0 +1,55 @@
// Tests using integer conditions in if()
// This should produce '0 0 0' at the top of the screen
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
.label SCREEN = $400
main: {
.label i1 = 2
lda #'0'
sta SCREEN
lda #' '
sta SCREEN+1
ldy #2
ldx #0
// loop byte
b3:
cpx #0
bne b4
lda #'0'
sta SCREEN,y
iny
b4:
inx
cpx #3
bne b3
lda #' '
sta SCREEN,y
iny
lda #<0
sta i1
sta i1+1
// loop word
b7:
lda i1+1
cmp #>0
bne b8
lda i1
cmp #<0
bne b8
lda #'0'
sta SCREEN,y
iny
b8:
inc i1
bne !+
inc i1+1
!:
lda i1+1
cmp #>3
bne b7
lda i1
cmp #<3
bne b7
rts
}

View File

@ -0,0 +1,53 @@
@begin: scope:[] from
[0] phi()
to:@1
@1: scope:[] from @begin
[1] phi()
[2] call main
to:@end
@end: scope:[] from @1
[3] phi()
main: scope:[main] from @1
[4] phi()
to:main::@2
main::@2: scope:[main] from main
[5] *((const byte*) SCREEN#0) ← (byte) '0'
to:main::@1
main::@1: scope:[main] from main::@2
[6] *((const byte*) SCREEN#0+(byte) 1) ← (byte) ' '
to:main::@3
main::@3: scope:[main] from main::@1 main::@4
[7] (byte) main::idx#10 ← phi( main::@1/(byte) 2 main::@4/(byte) main::idx#11 )
[7] (byte) main::i#2 ← phi( main::@1/(byte) 0 main::@4/(byte) main::i#1 )
[8] if((byte) 0!=(byte) main::i#2) goto main::@4
to:main::@5
main::@5: scope:[main] from main::@3
[9] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) '0'
[10] (byte) main::idx#4 ← ++ (byte) main::idx#10
to:main::@4
main::@4: scope:[main] from main::@3 main::@5
[11] (byte) main::idx#11 ← phi( main::@3/(byte) main::idx#10 main::@5/(byte) main::idx#4 )
[12] (byte) main::i#1 ← ++ (byte) main::i#2
[13] if((byte) main::i#1!=(byte) 3) goto main::@3
to:main::@6
main::@6: scope:[main] from main::@4
[14] *((const byte*) SCREEN#0 + (byte) main::idx#11) ← (byte) ' '
[15] (byte) main::idx#5 ← ++ (byte) main::idx#11
to:main::@7
main::@7: scope:[main] from main::@6 main::@8
[16] (byte) main::idx#12 ← phi( main::@8/(byte) main::idx#17 main::@6/(byte) main::idx#5 )
[16] (word) main::i1#2 ← phi( main::@8/(word) main::i1#1 main::@6/(word) 0 )
[17] if((byte) 0!=(word) main::i1#2) goto main::@8
to:main::@9
main::@9: scope:[main] from main::@7
[18] *((const byte*) SCREEN#0 + (byte) main::idx#12) ← (byte) '0'
[19] (byte) main::idx#6 ← ++ (byte) main::idx#12
to:main::@8
main::@8: scope:[main] from main::@7 main::@9
[20] (byte) main::idx#17 ← phi( main::@9/(byte) main::idx#6 main::@7/(byte) main::idx#12 )
[21] (word) main::i1#1 ← ++ (word) main::i1#2
[22] if((word) main::i1#1!=(byte) 3) goto main::@7
to:main::@return
main::@return: scope:[main] from main::@8
[23] return
to:@return

View File

@ -0,0 +1,934 @@
Warning! Adding boolean cast to non-boolean sub-expression (number) 0
Warning! Adding boolean cast to non-boolean sub-expression (number) $3e7
Warning! Adding boolean cast to non-boolean sub-expression (byte) main::i
Warning! Adding boolean cast to non-boolean sub-expression (word) main::i1
Adding pointer type conversion cast (byte*) SCREEN in (byte*) SCREEN ← (number) $400
Culled Empty Block (label) main::@12
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
(byte*) SCREEN#0 ← ((byte*)) (number) $400
to:@1
main: scope:[main] from @1
(byte) main::idx#0 ← (number) 0
(bool~) main::$10 ← (number) 0 != (number) 0
(bool~) main::$0 ← ! (bool~) main::$10
(bool~) main::$1 ← ! (bool~) main::$0
if((bool~) main::$1) goto main::@1
to:main::@3
main::@1: scope:[main] from main main::@3
(byte) main::idx#13 ← phi( main/(byte) main::idx#0 main::@3/(byte) main::idx#1 )
(bool~) main::$11 ← (number) 0 != (number) $3e7
(bool~) main::$2 ← ! (bool~) main::$11
(bool~) main::$3 ← ! (bool~) main::$2
if((bool~) main::$3) goto main::@2
to:main::@4
main::@3: scope:[main] from main
(byte) main::idx#7 ← phi( main/(byte) main::idx#0 )
*((byte*) SCREEN#0 + (byte) main::idx#7) ← (byte) '0'
(byte) main::idx#1 ← ++ (byte) main::idx#7
to:main::@1
main::@2: scope:[main] from main::@1 main::@4
(byte) main::idx#8 ← phi( main::@1/(byte) main::idx#13 main::@4/(byte) main::idx#3 )
*((byte*) SCREEN#0 + (byte) main::idx#8) ← (byte) ' '
(byte) main::idx#2 ← ++ (byte) main::idx#8
(byte) main::i#0 ← (byte) 0
to:main::@5
main::@4: scope:[main] from main::@1
(byte) main::idx#9 ← phi( main::@1/(byte) main::idx#13 )
*((byte*) SCREEN#0 + (byte) main::idx#9) ← (byte) '+'
(byte) main::idx#3 ← ++ (byte) main::idx#9
to:main::@2
main::@5: scope:[main] from main::@2 main::@6
(byte) main::idx#14 ← phi( main::@2/(byte) main::idx#2 main::@6/(byte) main::idx#15 )
(byte) main::i#2 ← phi( main::@2/(byte) main::i#0 main::@6/(byte) main::i#1 )
(bool~) main::$12 ← (number) 0 != (byte) main::i#2
(bool~) main::$4 ← ! (bool~) main::$12
(bool~) main::$5 ← ! (bool~) main::$4
if((bool~) main::$5) goto main::@6
to:main::@7
main::@6: scope:[main] from main::@5 main::@7
(byte) main::idx#15 ← phi( main::@5/(byte) main::idx#14 main::@7/(byte) main::idx#4 )
(byte) main::i#3 ← phi( main::@5/(byte) main::i#2 main::@7/(byte) main::i#4 )
(byte) main::i#1 ← (byte) main::i#3 + rangenext(0,2)
(bool~) main::$6 ← (byte) main::i#1 != rangelast(0,2)
if((bool~) main::$6) goto main::@5
to:main::@8
main::@7: scope:[main] from main::@5
(byte) main::i#4 ← phi( main::@5/(byte) main::i#2 )
(byte) main::idx#10 ← phi( main::@5/(byte) main::idx#14 )
*((byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) '0'
(byte) main::idx#4 ← ++ (byte) main::idx#10
to:main::@6
main::@8: scope:[main] from main::@6
(byte) main::idx#11 ← phi( main::@6/(byte) main::idx#15 )
*((byte*) SCREEN#0 + (byte) main::idx#11) ← (byte) ' '
(byte) main::idx#5 ← ++ (byte) main::idx#11
(word) main::i1#0 ← (word) 0
to:main::@9
main::@9: scope:[main] from main::@10 main::@8
(byte) main::idx#16 ← phi( main::@10/(byte) main::idx#17 main::@8/(byte) main::idx#5 )
(word) main::i1#2 ← phi( main::@10/(word) main::i1#1 main::@8/(word) main::i1#0 )
(bool~) main::$13 ← (number) 0 != (word) main::i1#2
(bool~) main::$7 ← ! (bool~) main::$13
(bool~) main::$8 ← ! (bool~) main::$7
if((bool~) main::$8) goto main::@10
to:main::@11
main::@10: scope:[main] from main::@11 main::@9
(byte) main::idx#17 ← phi( main::@11/(byte) main::idx#6 main::@9/(byte) main::idx#16 )
(word) main::i1#3 ← phi( main::@11/(word) main::i1#4 main::@9/(word) main::i1#2 )
(word) main::i1#1 ← (word) main::i1#3 + rangenext(0,2)
(bool~) main::$9 ← (word) main::i1#1 != rangelast(0,2)
if((bool~) main::$9) goto main::@9
to:main::@return
main::@11: scope:[main] from main::@9
(word) main::i1#4 ← phi( main::@9/(word) main::i1#2 )
(byte) main::idx#12 ← phi( main::@9/(byte) main::idx#16 )
*((byte*) SCREEN#0 + (byte) main::idx#12) ← (byte) '0'
(byte) main::idx#6 ← ++ (byte) main::idx#12
to:main::@10
main::@return: scope:[main] from main::@10
return
to:@return
@1: scope:[] from @begin
call main
to:@2
@2: scope:[] from @1
to:@end
@end: scope:[] from @2
SYMBOL TABLE SSA
(label) @1
(label) @2
(label) @begin
(label) @end
(byte*) SCREEN
(byte*) SCREEN#0
(void()) main()
(bool~) main::$0
(bool~) main::$1
(bool~) main::$10
(bool~) main::$11
(bool~) main::$12
(bool~) main::$13
(bool~) main::$2
(bool~) main::$3
(bool~) main::$4
(bool~) main::$5
(bool~) main::$6
(bool~) main::$7
(bool~) main::$8
(bool~) main::$9
(label) main::@1
(label) main::@10
(label) main::@11
(label) main::@2
(label) main::@3
(label) main::@4
(label) main::@5
(label) main::@6
(label) main::@7
(label) main::@8
(label) main::@9
(label) main::@return
(byte) main::i
(byte) main::i#0
(byte) main::i#1
(byte) main::i#2
(byte) main::i#3
(byte) main::i#4
(word) main::i1
(word) main::i1#0
(word) main::i1#1
(word) main::i1#2
(word) main::i1#3
(word) main::i1#4
(byte) main::idx
(byte) main::idx#0
(byte) main::idx#1
(byte) main::idx#10
(byte) main::idx#11
(byte) main::idx#12
(byte) main::idx#13
(byte) main::idx#14
(byte) main::idx#15
(byte) main::idx#16
(byte) main::idx#17
(byte) main::idx#2
(byte) main::idx#3
(byte) main::idx#4
(byte) main::idx#5
(byte) main::idx#6
(byte) main::idx#7
(byte) main::idx#8
(byte) main::idx#9
Adding number conversion cast (unumber) 0 in (byte) main::idx#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (bool~) main::$12 ← (number) 0 != (byte) main::i#2
Adding number conversion cast (unumber) 0 in (bool~) main::$13 ← (number) 0 != (word) main::i1#2
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400
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 0
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inversing boolean not [3] (bool~) main::$0 ← (number) 0 == (number) 0 from [2] (bool~) main::$10 ← (number) 0 != (number) 0
Inversing boolean not [4] (bool~) main::$1 ← (number) 0 != (number) 0 from [3] (bool~) main::$0 ← (number) 0 == (number) 0
Inversing boolean not [8] (bool~) main::$2 ← (number) 0 == (number) $3e7 from [7] (bool~) main::$11 ← (number) 0 != (number) $3e7
Inversing boolean not [9] (bool~) main::$3 ← (number) 0 != (number) $3e7 from [8] (bool~) main::$2 ← (number) 0 == (number) $3e7
Inversing boolean not [23] (bool~) main::$4 ← (byte) 0 == (byte) main::i#2 from [22] (bool~) main::$12 ← (byte) 0 != (byte) main::i#2
Inversing boolean not [24] (bool~) main::$5 ← (byte) 0 != (byte) main::i#2 from [23] (bool~) main::$4 ← (byte) 0 == (byte) main::i#2
Inversing boolean not [39] (bool~) main::$7 ← (byte) 0 == (word) main::i1#2 from [38] (bool~) main::$13 ← (byte) 0 != (word) main::i1#2
Inversing boolean not [40] (bool~) main::$8 ← (byte) 0 != (word) main::i1#2 from [39] (bool~) main::$7 ← (byte) 0 == (word) main::i1#2
Successful SSA optimization Pass2UnaryNotSimplification
Alias (byte) main::idx#0 = (byte) main::idx#7
Alias (byte) main::idx#13 = (byte) main::idx#9
Alias (byte) main::idx#10 = (byte) main::idx#14
Alias (byte) main::i#2 = (byte) main::i#4
Alias (byte) main::idx#11 = (byte) main::idx#15
Alias (byte) main::idx#12 = (byte) main::idx#16
Alias (word) main::i1#2 = (word) main::i1#4
Successful SSA optimization Pass2AliasElimination
Alias (byte) main::i#2 = (byte) main::i#3
Alias (word) main::i1#2 = (word) main::i1#3
Successful SSA optimization Pass2AliasElimination
Simple Condition (bool~) main::$1 [5] if((number) 0!=(number) 0) goto main::@1
Simple Condition (bool~) main::$3 [10] if((number) 0!=(number) $3e7) goto main::@2
Simple Condition (bool~) main::$5 [25] if((byte) 0!=(byte) main::i#2) goto main::@6
Simple Condition (bool~) main::$6 [29] if((byte) main::i#1!=rangelast(0,2)) goto main::@5
Simple Condition (bool~) main::$8 [41] if((byte) 0!=(word) main::i1#2) goto main::@10
Simple Condition (bool~) main::$9 [45] if((word) main::i1#1!=rangelast(0,2)) goto main::@9
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant (const byte*) SCREEN#0 = (byte*) 1024
Constant (const byte) main::idx#0 = 0
Constant (const byte) main::i#0 = 0
Constant (const word) main::i1#0 = 0
Successful SSA optimization Pass2ConstantIdentification
Removing PHI-reference to removed block (main) in block main::@1
if() condition always false - eliminating [5] if((number) 0!=(number) 0) goto main::@1
if() condition always true - replacing block destination [10] if((number) 0!=(number) $3e7) goto main::@2
Successful SSA optimization Pass2ConstantIfs
Resolved ranged next value [27] main::i#1 ← ++ main::i#2 to ++
Resolved ranged comparison value [29] if(main::i#1!=rangelast(0,2)) goto main::@5 to (number) 3
Resolved ranged next value [43] main::i1#1 ← ++ main::i1#2 to ++
Resolved ranged comparison value [45] if(main::i1#1!=rangelast(0,2)) goto main::@9 to (number) 3
Simplifying expression containing zero SCREEN#0 in [12] *((const byte*) SCREEN#0 + (const byte) main::idx#0) ← (byte) '0'
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating variable (byte) main::idx#3 from unused block main::@4
Removing PHI-reference to removed block (main::@4) in block main::@2
Removing unused block main::@4
Successful SSA optimization Pass2EliminateUnusedBlocks
Adding number conversion cast (unumber) 3 in if((byte) main::i#1!=(number) 3) goto main::@5
Adding number conversion cast (unumber) 3 in if((word) main::i1#1!=(number) 3) goto main::@9
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant integer cast 3
Simplifying constant integer cast 3
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 3
Finalized unsigned number type (byte) 3
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias (byte) main::idx#1 = (byte) main::idx#13 (byte) main::idx#8
Successful SSA optimization Pass2AliasElimination
Constant right-side identified [2] (byte) main::idx#1 ← ++ (const byte) main::idx#0
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#1 = ++main::idx#0
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [2] (byte) main::idx#2 ← ++ (const byte) main::idx#1
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#2 = ++main::idx#1
Successful SSA optimization Pass2ConstantIdentification
Inlining constant with var siblings (const byte) main::idx#0
Inlining constant with var siblings (const byte) main::i#0
Inlining constant with var siblings (const word) main::i1#0
Inlining constant with var siblings (const byte) main::idx#1
Inlining constant with var siblings (const byte) main::idx#2
Constant inlined main::i#0 = (byte) 0
Constant inlined main::i1#0 = (word) 0
Constant inlined main::idx#0 = (byte) 0
Constant inlined main::idx#1 = ++(byte) 0
Constant inlined main::idx#2 = ++++(byte) 0
Successful SSA optimization Pass2ConstantInlining
Consolidated array index constant in *(SCREEN#0+++0)
Successful SSA optimization Pass2ConstantAdditionElimination
Simplifying constant integer increment ++0
Simplifying constant integer increment ++0
Successful SSA optimization Pass2ConstantSimplification
Simplifying constant integer increment ++1
Successful SSA optimization Pass2ConstantSimplification
Added new block during phi lifting main::@13(between main::@6 and main::@5)
Added new block during phi lifting main::@14(between main::@5 and main::@6)
Added new block during phi lifting main::@15(between main::@10 and main::@9)
Added new block during phi lifting main::@16(between main::@9 and main::@10)
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 @end
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@1
CALL GRAPH
Calls in [] to main:2
Created 6 initial phi equivalence classes
Coalesced [13] main::idx#20 ← main::idx#4
Coalesced [19] main::idx#22 ← main::idx#5
Coalesced [24] main::idx#23 ← main::idx#6
Coalesced [29] main::i1#5 ← main::i1#1
Coalesced [30] main::idx#21 ← main::idx#17
Coalesced (already) [31] main::idx#24 ← main::idx#12
Coalesced [32] main::i#5 ← main::i#1
Coalesced [33] main::idx#18 ← main::idx#11
Coalesced (already) [34] main::idx#19 ← main::idx#10
Coalesced down to 4 phi equivalence classes
Culled Empty Block (label) @2
Culled Empty Block (label) main::@1
Culled Empty Block (label) main::@15
Culled Empty Block (label) main::@16
Culled Empty Block (label) main::@13
Culled Empty Block (label) main::@14
Renumbering block main::@2 to main::@1
Renumbering block main::@3 to main::@2
Renumbering block main::@5 to main::@3
Renumbering block main::@6 to main::@4
Renumbering block main::@7 to main::@5
Renumbering block main::@8 to main::@6
Renumbering block main::@9 to main::@7
Renumbering block main::@10 to main::@8
Renumbering block main::@11 to main::@9
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @1
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
FINAL CONTROL FLOW GRAPH
@begin: scope:[] from
[0] phi()
to:@1
@1: scope:[] from @begin
[1] phi()
[2] call main
to:@end
@end: scope:[] from @1
[3] phi()
main: scope:[main] from @1
[4] phi()
to:main::@2
main::@2: scope:[main] from main
[5] *((const byte*) SCREEN#0) ← (byte) '0'
to:main::@1
main::@1: scope:[main] from main::@2
[6] *((const byte*) SCREEN#0+(byte) 1) ← (byte) ' '
to:main::@3
main::@3: scope:[main] from main::@1 main::@4
[7] (byte) main::idx#10 ← phi( main::@1/(byte) 2 main::@4/(byte) main::idx#11 )
[7] (byte) main::i#2 ← phi( main::@1/(byte) 0 main::@4/(byte) main::i#1 )
[8] if((byte) 0!=(byte) main::i#2) goto main::@4
to:main::@5
main::@5: scope:[main] from main::@3
[9] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) '0'
[10] (byte) main::idx#4 ← ++ (byte) main::idx#10
to:main::@4
main::@4: scope:[main] from main::@3 main::@5
[11] (byte) main::idx#11 ← phi( main::@3/(byte) main::idx#10 main::@5/(byte) main::idx#4 )
[12] (byte) main::i#1 ← ++ (byte) main::i#2
[13] if((byte) main::i#1!=(byte) 3) goto main::@3
to:main::@6
main::@6: scope:[main] from main::@4
[14] *((const byte*) SCREEN#0 + (byte) main::idx#11) ← (byte) ' '
[15] (byte) main::idx#5 ← ++ (byte) main::idx#11
to:main::@7
main::@7: scope:[main] from main::@6 main::@8
[16] (byte) main::idx#12 ← phi( main::@8/(byte) main::idx#17 main::@6/(byte) main::idx#5 )
[16] (word) main::i1#2 ← phi( main::@8/(word) main::i1#1 main::@6/(word) 0 )
[17] if((byte) 0!=(word) main::i1#2) goto main::@8
to:main::@9
main::@9: scope:[main] from main::@7
[18] *((const byte*) SCREEN#0 + (byte) main::idx#12) ← (byte) '0'
[19] (byte) main::idx#6 ← ++ (byte) main::idx#12
to:main::@8
main::@8: scope:[main] from main::@7 main::@9
[20] (byte) main::idx#17 ← phi( main::@9/(byte) main::idx#6 main::@7/(byte) main::idx#12 )
[21] (word) main::i1#1 ← ++ (word) main::i1#2
[22] if((word) main::i1#1!=(byte) 3) goto main::@7
to:main::@return
main::@return: scope:[main] from main::@8
[23] return
to:@return
VARIABLE REGISTER WEIGHTS
(byte*) SCREEN
(void()) main()
(byte) main::i
(byte) main::i#1 16.5
(byte) main::i#2 6.6000000000000005
(word) main::i1
(word) main::i1#1 16.5
(word) main::i1#2 6.6000000000000005
(byte) main::idx
(byte) main::idx#10 14.666666666666666
(byte) main::idx#11 9.25
(byte) main::idx#12 15.333333333333332
(byte) main::idx#17 11.0
(byte) main::idx#4 22.0
(byte) main::idx#5 4.0
(byte) main::idx#6 22.0
Initial phi equivalence classes
[ main::i#2 main::i#1 ]
[ main::idx#10 main::idx#11 main::idx#4 ]
[ main::i1#2 main::i1#1 ]
[ main::idx#12 main::idx#17 main::idx#5 main::idx#6 ]
Complete equivalence classes
[ main::i#2 main::i#1 ]
[ main::idx#10 main::idx#11 main::idx#4 ]
[ main::i1#2 main::i1#1 ]
[ main::idx#12 main::idx#17 main::idx#5 main::idx#6 ]
Allocated zp ZP_BYTE:2 [ main::i#2 main::i#1 ]
Allocated zp ZP_BYTE:3 [ main::idx#10 main::idx#11 main::idx#4 ]
Allocated zp ZP_WORD:4 [ main::i1#2 main::i1#1 ]
Allocated zp ZP_BYTE:6 [ main::idx#12 main::idx#17 main::idx#5 main::idx#6 ]
INITIAL ASM
//SEG0 File Comments
// Tests using integer conditions in if()
// This should produce '0 0 0' at the top of the screen
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG2 Global Constants & labels
.label SCREEN = $400
//SEG3 @begin
bbegin:
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
b1_from_bbegin:
jmp b1
//SEG5 @1
b1:
//SEG6 [2] call main
//SEG7 [4] phi from @1 to main [phi:@1->main]
main_from_b1:
jsr main
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
bend_from_b1:
jmp bend
//SEG9 @end
bend:
//SEG10 main
main: {
.label i = 2
.label idx = 3
.label idx_5 = 6
.label i1 = 4
.label idx_6 = 6
.label idx_12 = 6
.label idx_17 = 6
jmp b2
//SEG11 main::@2
b2:
//SEG12 [5] *((const byte*) SCREEN#0) ← (byte) '0' -- _deref_pbuc1=vbuc2
lda #'0'
sta SCREEN
jmp b1
//SEG13 main::@1
b1:
//SEG14 [6] *((const byte*) SCREEN#0+(byte) 1) ← (byte) ' ' -- _deref_pbuc1=vbuc2
lda #' '
sta SCREEN+1
//SEG15 [7] phi from main::@1 to main::@3 [phi:main::@1->main::@3]
b3_from_b1:
//SEG16 [7] phi (byte) main::idx#10 = (byte) 2 [phi:main::@1->main::@3#0] -- vbuz1=vbuc1
lda #2
sta idx
//SEG17 [7] phi (byte) main::i#2 = (byte) 0 [phi:main::@1->main::@3#1] -- vbuz1=vbuc1
lda #0
sta i
jmp b3
// loop byte
//SEG18 [7] phi from main::@4 to main::@3 [phi:main::@4->main::@3]
b3_from_b4:
//SEG19 [7] phi (byte) main::idx#10 = (byte) main::idx#11 [phi:main::@4->main::@3#0] -- register_copy
//SEG20 [7] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@4->main::@3#1] -- register_copy
jmp b3
//SEG21 main::@3
b3:
//SEG22 [8] if((byte) 0!=(byte) main::i#2) goto main::@4 -- vbuc1_neq_vbuz1_then_la1
lda #0
cmp i
bne b4_from_b3
jmp b5
//SEG23 main::@5
b5:
//SEG24 [9] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) '0' -- pbuc1_derefidx_vbuz1=vbuc2
lda #'0'
ldy idx
sta SCREEN,y
//SEG25 [10] (byte) main::idx#4 ← ++ (byte) main::idx#10 -- vbuz1=_inc_vbuz1
inc idx
//SEG26 [11] phi from main::@3 main::@5 to main::@4 [phi:main::@3/main::@5->main::@4]
b4_from_b3:
b4_from_b5:
//SEG27 [11] phi (byte) main::idx#11 = (byte) main::idx#10 [phi:main::@3/main::@5->main::@4#0] -- register_copy
jmp b4
//SEG28 main::@4
b4:
//SEG29 [12] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1
inc i
//SEG30 [13] if((byte) main::i#1!=(byte) 3) goto main::@3 -- vbuz1_neq_vbuc1_then_la1
lda #3
cmp i
bne b3_from_b4
jmp b6
//SEG31 main::@6
b6:
//SEG32 [14] *((const byte*) SCREEN#0 + (byte) main::idx#11) ← (byte) ' ' -- pbuc1_derefidx_vbuz1=vbuc2
lda #' '
ldy idx
sta SCREEN,y
//SEG33 [15] (byte) main::idx#5 ← ++ (byte) main::idx#11 -- vbuz1=_inc_vbuz2
ldy idx
iny
sty idx_5
//SEG34 [16] phi from main::@6 to main::@7 [phi:main::@6->main::@7]
b7_from_b6:
//SEG35 [16] phi (byte) main::idx#12 = (byte) main::idx#5 [phi:main::@6->main::@7#0] -- register_copy
//SEG36 [16] phi (word) main::i1#2 = (word) 0 [phi:main::@6->main::@7#1] -- vwuz1=vwuc1
lda #<0
sta i1
lda #>0
sta i1+1
jmp b7
// loop word
//SEG37 [16] phi from main::@8 to main::@7 [phi:main::@8->main::@7]
b7_from_b8:
//SEG38 [16] phi (byte) main::idx#12 = (byte) main::idx#17 [phi:main::@8->main::@7#0] -- register_copy
//SEG39 [16] phi (word) main::i1#2 = (word) main::i1#1 [phi:main::@8->main::@7#1] -- register_copy
jmp b7
//SEG40 main::@7
b7:
//SEG41 [17] if((byte) 0!=(word) main::i1#2) goto main::@8 -- vwuc1_neq_vwuz1_then_la1
lda i1+1
cmp #>0
bne b8_from_b7
lda i1
cmp #<0
bne b8_from_b7
jmp b9
//SEG42 main::@9
b9:
//SEG43 [18] *((const byte*) SCREEN#0 + (byte) main::idx#12) ← (byte) '0' -- pbuc1_derefidx_vbuz1=vbuc2
lda #'0'
ldy idx_12
sta SCREEN,y
//SEG44 [19] (byte) main::idx#6 ← ++ (byte) main::idx#12 -- vbuz1=_inc_vbuz1
inc idx_6
//SEG45 [20] phi from main::@7 main::@9 to main::@8 [phi:main::@7/main::@9->main::@8]
b8_from_b7:
b8_from_b9:
//SEG46 [20] phi (byte) main::idx#17 = (byte) main::idx#12 [phi:main::@7/main::@9->main::@8#0] -- register_copy
jmp b8
//SEG47 main::@8
b8:
//SEG48 [21] (word) main::i1#1 ← ++ (word) main::i1#2 -- vwuz1=_inc_vwuz1
inc i1
bne !+
inc i1+1
!:
//SEG49 [22] if((word) main::i1#1!=(byte) 3) goto main::@7 -- vwuz1_neq_vwuc1_then_la1
lda i1+1
cmp #>3
bne b7_from_b8
lda i1
cmp #<3
bne b7_from_b8
jmp breturn
//SEG50 main::@return
breturn:
//SEG51 [23] return
rts
}
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [5] *((const byte*) SCREEN#0) ← (byte) '0' [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [6] *((const byte*) SCREEN#0+(byte) 1) ← (byte) ' ' [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [9] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) '0' [ main::i#2 main::idx#10 ] ( main:2 [ main::i#2 main::idx#10 ] ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ main::i#2 main::i#1 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:3 [ main::idx#10 main::idx#11 main::idx#4 ]
Statement [14] *((const byte*) SCREEN#0 + (byte) main::idx#11) ← (byte) ' ' [ main::idx#11 ] ( main:2 [ main::idx#11 ] ) always clobbers reg byte a
Statement [17] if((byte) 0!=(word) main::i1#2) goto main::@8 [ main::i1#2 main::idx#12 ] ( main:2 [ main::i1#2 main::idx#12 ] ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:6 [ main::idx#12 main::idx#17 main::idx#5 main::idx#6 ]
Statement [18] *((const byte*) SCREEN#0 + (byte) main::idx#12) ← (byte) '0' [ main::i1#2 main::idx#12 ] ( main:2 [ main::i1#2 main::idx#12 ] ) always clobbers reg byte a
Statement [22] if((word) main::i1#1!=(byte) 3) goto main::@7 [ main::i1#1 main::idx#17 ] ( main:2 [ main::i1#1 main::idx#17 ] ) always clobbers reg byte a
Statement [5] *((const byte*) SCREEN#0) ← (byte) '0' [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [6] *((const byte*) SCREEN#0+(byte) 1) ← (byte) ' ' [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [9] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) '0' [ main::i#2 main::idx#10 ] ( main:2 [ main::i#2 main::idx#10 ] ) always clobbers reg byte a
Statement [14] *((const byte*) SCREEN#0 + (byte) main::idx#11) ← (byte) ' ' [ main::idx#11 ] ( main:2 [ main::idx#11 ] ) always clobbers reg byte a
Statement [17] if((byte) 0!=(word) main::i1#2) goto main::@8 [ main::i1#2 main::idx#12 ] ( main:2 [ main::i1#2 main::idx#12 ] ) always clobbers reg byte a
Statement [18] *((const byte*) SCREEN#0 + (byte) main::idx#12) ← (byte) '0' [ main::i1#2 main::idx#12 ] ( main:2 [ main::i1#2 main::idx#12 ] ) always clobbers reg byte a
Statement [22] if((word) main::i1#1!=(byte) 3) goto main::@7 [ main::i1#1 main::idx#17 ] ( main:2 [ main::i1#1 main::idx#17 ] ) always clobbers reg byte a
Potential registers zp ZP_BYTE:2 [ main::i#2 main::i#1 ] : zp ZP_BYTE:2 , reg byte x , reg byte y ,
Potential registers zp ZP_BYTE:3 [ main::idx#10 main::idx#11 main::idx#4 ] : zp ZP_BYTE:3 , reg byte x , reg byte y ,
Potential registers zp ZP_WORD:4 [ main::i1#2 main::i1#1 ] : zp ZP_WORD:4 ,
Potential registers zp ZP_BYTE:6 [ main::idx#12 main::idx#17 main::idx#5 main::idx#6 ] : zp ZP_BYTE:6 , reg byte x , reg byte y ,
REGISTER UPLIFT SCOPES
Uplift Scope [main] 52.33: zp ZP_BYTE:6 [ main::idx#12 main::idx#17 main::idx#5 main::idx#6 ] 45.92: zp ZP_BYTE:3 [ main::idx#10 main::idx#11 main::idx#4 ] 23.1: zp ZP_BYTE:2 [ main::i#2 main::i#1 ] 23.1: zp ZP_WORD:4 [ main::i1#2 main::i1#1 ]
Uplift Scope []
Uplifting [main] best 1227 combination reg byte y [ main::idx#12 main::idx#17 main::idx#5 main::idx#6 ] reg byte y [ main::idx#10 main::idx#11 main::idx#4 ] reg byte x [ main::i#2 main::i#1 ] zp ZP_WORD:4 [ main::i1#2 main::i1#1 ]
Uplifting [] best 1227 combination
Allocated (was zp ZP_WORD:4) zp ZP_WORD:2 [ main::i1#2 main::i1#1 ]
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 File Comments
// Tests using integer conditions in if()
// This should produce '0 0 0' at the top of the screen
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG2 Global Constants & labels
.label SCREEN = $400
//SEG3 @begin
bbegin:
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
b1_from_bbegin:
jmp b1
//SEG5 @1
b1:
//SEG6 [2] call main
//SEG7 [4] phi from @1 to main [phi:@1->main]
main_from_b1:
jsr main
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
bend_from_b1:
jmp bend
//SEG9 @end
bend:
//SEG10 main
main: {
.label i1 = 2
jmp b2
//SEG11 main::@2
b2:
//SEG12 [5] *((const byte*) SCREEN#0) ← (byte) '0' -- _deref_pbuc1=vbuc2
lda #'0'
sta SCREEN
jmp b1
//SEG13 main::@1
b1:
//SEG14 [6] *((const byte*) SCREEN#0+(byte) 1) ← (byte) ' ' -- _deref_pbuc1=vbuc2
lda #' '
sta SCREEN+1
//SEG15 [7] phi from main::@1 to main::@3 [phi:main::@1->main::@3]
b3_from_b1:
//SEG16 [7] phi (byte) main::idx#10 = (byte) 2 [phi:main::@1->main::@3#0] -- vbuyy=vbuc1
ldy #2
//SEG17 [7] phi (byte) main::i#2 = (byte) 0 [phi:main::@1->main::@3#1] -- vbuxx=vbuc1
ldx #0
jmp b3
// loop byte
//SEG18 [7] phi from main::@4 to main::@3 [phi:main::@4->main::@3]
b3_from_b4:
//SEG19 [7] phi (byte) main::idx#10 = (byte) main::idx#11 [phi:main::@4->main::@3#0] -- register_copy
//SEG20 [7] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@4->main::@3#1] -- register_copy
jmp b3
//SEG21 main::@3
b3:
//SEG22 [8] if((byte) 0!=(byte) main::i#2) goto main::@4 -- vbuc1_neq_vbuxx_then_la1
cpx #0
bne b4_from_b3
jmp b5
//SEG23 main::@5
b5:
//SEG24 [9] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) '0' -- pbuc1_derefidx_vbuyy=vbuc2
lda #'0'
sta SCREEN,y
//SEG25 [10] (byte) main::idx#4 ← ++ (byte) main::idx#10 -- vbuyy=_inc_vbuyy
iny
//SEG26 [11] phi from main::@3 main::@5 to main::@4 [phi:main::@3/main::@5->main::@4]
b4_from_b3:
b4_from_b5:
//SEG27 [11] phi (byte) main::idx#11 = (byte) main::idx#10 [phi:main::@3/main::@5->main::@4#0] -- register_copy
jmp b4
//SEG28 main::@4
b4:
//SEG29 [12] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx
inx
//SEG30 [13] if((byte) main::i#1!=(byte) 3) goto main::@3 -- vbuxx_neq_vbuc1_then_la1
cpx #3
bne b3_from_b4
jmp b6
//SEG31 main::@6
b6:
//SEG32 [14] *((const byte*) SCREEN#0 + (byte) main::idx#11) ← (byte) ' ' -- pbuc1_derefidx_vbuyy=vbuc2
lda #' '
sta SCREEN,y
//SEG33 [15] (byte) main::idx#5 ← ++ (byte) main::idx#11 -- vbuyy=_inc_vbuyy
iny
//SEG34 [16] phi from main::@6 to main::@7 [phi:main::@6->main::@7]
b7_from_b6:
//SEG35 [16] phi (byte) main::idx#12 = (byte) main::idx#5 [phi:main::@6->main::@7#0] -- register_copy
//SEG36 [16] phi (word) main::i1#2 = (word) 0 [phi:main::@6->main::@7#1] -- vwuz1=vwuc1
lda #<0
sta i1
lda #>0
sta i1+1
jmp b7
// loop word
//SEG37 [16] phi from main::@8 to main::@7 [phi:main::@8->main::@7]
b7_from_b8:
//SEG38 [16] phi (byte) main::idx#12 = (byte) main::idx#17 [phi:main::@8->main::@7#0] -- register_copy
//SEG39 [16] phi (word) main::i1#2 = (word) main::i1#1 [phi:main::@8->main::@7#1] -- register_copy
jmp b7
//SEG40 main::@7
b7:
//SEG41 [17] if((byte) 0!=(word) main::i1#2) goto main::@8 -- vwuc1_neq_vwuz1_then_la1
lda i1+1
cmp #>0
bne b8_from_b7
lda i1
cmp #<0
bne b8_from_b7
jmp b9
//SEG42 main::@9
b9:
//SEG43 [18] *((const byte*) SCREEN#0 + (byte) main::idx#12) ← (byte) '0' -- pbuc1_derefidx_vbuyy=vbuc2
lda #'0'
sta SCREEN,y
//SEG44 [19] (byte) main::idx#6 ← ++ (byte) main::idx#12 -- vbuyy=_inc_vbuyy
iny
//SEG45 [20] phi from main::@7 main::@9 to main::@8 [phi:main::@7/main::@9->main::@8]
b8_from_b7:
b8_from_b9:
//SEG46 [20] phi (byte) main::idx#17 = (byte) main::idx#12 [phi:main::@7/main::@9->main::@8#0] -- register_copy
jmp b8
//SEG47 main::@8
b8:
//SEG48 [21] (word) main::i1#1 ← ++ (word) main::i1#2 -- vwuz1=_inc_vwuz1
inc i1
bne !+
inc i1+1
!:
//SEG49 [22] if((word) main::i1#1!=(byte) 3) goto main::@7 -- vwuz1_neq_vwuc1_then_la1
lda i1+1
cmp #>3
bne b7_from_b8
lda i1
cmp #<3
bne b7_from_b8
jmp breturn
//SEG50 main::@return
breturn:
//SEG51 [23] return
rts
}
ASSEMBLER OPTIMIZATIONS
Removing instruction jmp b1
Removing instruction jmp bend
Removing instruction jmp b2
Removing instruction jmp b1
Removing instruction jmp b3
Removing instruction jmp b5
Removing instruction jmp b4
Removing instruction jmp b6
Removing instruction jmp b7
Removing instruction jmp b9
Removing instruction jmp b8
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda #>0
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Replacing label b4_from_b3 with b4
Replacing label b3_from_b4 with b3
Replacing label b8_from_b7 with b8
Replacing label b8_from_b7 with b8
Replacing label b7_from_b8 with b7
Replacing label b7_from_b8 with b7
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction main_from_b1:
Removing instruction bend_from_b1:
Removing instruction b3_from_b4:
Removing instruction b4_from_b3:
Removing instruction b4_from_b5:
Removing instruction b7_from_b8:
Removing instruction b8_from_b7:
Removing instruction b8_from_b9:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction bend:
Removing instruction b2:
Removing instruction b1:
Removing instruction b3_from_b1:
Removing instruction b5:
Removing instruction b6:
Removing instruction b7_from_b6:
Removing instruction b9:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction jmp b3
Removing instruction jmp b7
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @1
(label) @begin
(label) @end
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = (byte*) 1024
(void()) main()
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@4
(label) main::@5
(label) main::@6
(label) main::@7
(label) main::@8
(label) main::@9
(label) main::@return
(byte) main::i
(byte) main::i#1 reg byte x 16.5
(byte) main::i#2 reg byte x 6.6000000000000005
(word) main::i1
(word) main::i1#1 i1 zp ZP_WORD:2 16.5
(word) main::i1#2 i1 zp ZP_WORD:2 6.6000000000000005
(byte) main::idx
(byte) main::idx#10 reg byte y 14.666666666666666
(byte) main::idx#11 reg byte y 9.25
(byte) main::idx#12 reg byte y 15.333333333333332
(byte) main::idx#17 reg byte y 11.0
(byte) main::idx#4 reg byte y 22.0
(byte) main::idx#5 reg byte y 4.0
(byte) main::idx#6 reg byte y 22.0
reg byte x [ main::i#2 main::i#1 ]
reg byte y [ main::idx#10 main::idx#11 main::idx#4 ]
zp ZP_WORD:2 [ main::i1#2 main::i1#1 ]
reg byte y [ main::idx#12 main::idx#17 main::idx#5 main::idx#6 ]
FINAL ASSEMBLER
Score: 862
//SEG0 File Comments
// Tests using integer conditions in if()
// This should produce '0 0 0' at the top of the screen
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
//SEG2 Global Constants & labels
.label SCREEN = $400
//SEG3 @begin
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
//SEG5 @1
//SEG6 [2] call main
//SEG7 [4] phi from @1 to main [phi:@1->main]
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
//SEG9 @end
//SEG10 main
main: {
.label i1 = 2
//SEG11 main::@2
//SEG12 [5] *((const byte*) SCREEN#0) ← (byte) '0' -- _deref_pbuc1=vbuc2
lda #'0'
sta SCREEN
//SEG13 main::@1
//SEG14 [6] *((const byte*) SCREEN#0+(byte) 1) ← (byte) ' ' -- _deref_pbuc1=vbuc2
lda #' '
sta SCREEN+1
//SEG15 [7] phi from main::@1 to main::@3 [phi:main::@1->main::@3]
//SEG16 [7] phi (byte) main::idx#10 = (byte) 2 [phi:main::@1->main::@3#0] -- vbuyy=vbuc1
ldy #2
//SEG17 [7] phi (byte) main::i#2 = (byte) 0 [phi:main::@1->main::@3#1] -- vbuxx=vbuc1
ldx #0
// loop byte
//SEG18 [7] phi from main::@4 to main::@3 [phi:main::@4->main::@3]
//SEG19 [7] phi (byte) main::idx#10 = (byte) main::idx#11 [phi:main::@4->main::@3#0] -- register_copy
//SEG20 [7] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@4->main::@3#1] -- register_copy
//SEG21 main::@3
b3:
//SEG22 [8] if((byte) 0!=(byte) main::i#2) goto main::@4 -- vbuc1_neq_vbuxx_then_la1
cpx #0
bne b4
//SEG23 main::@5
//SEG24 [9] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) '0' -- pbuc1_derefidx_vbuyy=vbuc2
lda #'0'
sta SCREEN,y
//SEG25 [10] (byte) main::idx#4 ← ++ (byte) main::idx#10 -- vbuyy=_inc_vbuyy
iny
//SEG26 [11] phi from main::@3 main::@5 to main::@4 [phi:main::@3/main::@5->main::@4]
//SEG27 [11] phi (byte) main::idx#11 = (byte) main::idx#10 [phi:main::@3/main::@5->main::@4#0] -- register_copy
//SEG28 main::@4
b4:
//SEG29 [12] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx
inx
//SEG30 [13] if((byte) main::i#1!=(byte) 3) goto main::@3 -- vbuxx_neq_vbuc1_then_la1
cpx #3
bne b3
//SEG31 main::@6
//SEG32 [14] *((const byte*) SCREEN#0 + (byte) main::idx#11) ← (byte) ' ' -- pbuc1_derefidx_vbuyy=vbuc2
lda #' '
sta SCREEN,y
//SEG33 [15] (byte) main::idx#5 ← ++ (byte) main::idx#11 -- vbuyy=_inc_vbuyy
iny
//SEG34 [16] phi from main::@6 to main::@7 [phi:main::@6->main::@7]
//SEG35 [16] phi (byte) main::idx#12 = (byte) main::idx#5 [phi:main::@6->main::@7#0] -- register_copy
//SEG36 [16] phi (word) main::i1#2 = (word) 0 [phi:main::@6->main::@7#1] -- vwuz1=vwuc1
lda #<0
sta i1
sta i1+1
// loop word
//SEG37 [16] phi from main::@8 to main::@7 [phi:main::@8->main::@7]
//SEG38 [16] phi (byte) main::idx#12 = (byte) main::idx#17 [phi:main::@8->main::@7#0] -- register_copy
//SEG39 [16] phi (word) main::i1#2 = (word) main::i1#1 [phi:main::@8->main::@7#1] -- register_copy
//SEG40 main::@7
b7:
//SEG41 [17] if((byte) 0!=(word) main::i1#2) goto main::@8 -- vwuc1_neq_vwuz1_then_la1
lda i1+1
cmp #>0
bne b8
lda i1
cmp #<0
bne b8
//SEG42 main::@9
//SEG43 [18] *((const byte*) SCREEN#0 + (byte) main::idx#12) ← (byte) '0' -- pbuc1_derefidx_vbuyy=vbuc2
lda #'0'
sta SCREEN,y
//SEG44 [19] (byte) main::idx#6 ← ++ (byte) main::idx#12 -- vbuyy=_inc_vbuyy
iny
//SEG45 [20] phi from main::@7 main::@9 to main::@8 [phi:main::@7/main::@9->main::@8]
//SEG46 [20] phi (byte) main::idx#17 = (byte) main::idx#12 [phi:main::@7/main::@9->main::@8#0] -- register_copy
//SEG47 main::@8
b8:
//SEG48 [21] (word) main::i1#1 ← ++ (word) main::i1#2 -- vwuz1=_inc_vwuz1
inc i1
bne !+
inc i1+1
!:
//SEG49 [22] if((word) main::i1#1!=(byte) 3) goto main::@7 -- vwuz1_neq_vwuc1_then_la1
lda i1+1
cmp #>3
bne b7
lda i1
cmp #<3
bne b7
//SEG50 main::@return
//SEG51 [23] return
rts
}

View File

@ -0,0 +1 @@
program

View File

@ -0,0 +1,43 @@
// Tests using integer conditions in while() / for() / do..while
// This should produce 'ba ba ba' at the top of the screen
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
.label SCREEN = $400
main: {
ldy #0
ldx #2
// for()
b1:
txa
sta SCREEN,y
iny
dex
cpx #0
bne b1
lda #' '
sta SCREEN,y
iny
lda #3
b3:
sec
sbc #1
cmp #0
bne b4
lda #' '
sta SCREEN,y
iny
lda #2
b6:
sta SCREEN,y
iny
sec
sbc #1
cmp #0
bne b6
rts
b4:
sta SCREEN,y
iny
jmp b3
}

View File

@ -0,0 +1,49 @@
@begin: scope:[] from
[0] phi()
to:@1
@1: scope:[] from @begin
[1] phi()
[2] call main
to:@end
@end: scope:[] from @1
[3] phi()
main: scope:[main] from @1
[4] phi()
to:main::@1
main::@1: scope:[main] from main main::@1
[5] (byte) idx#8 ← phi( main/(byte) 0 main::@1/(byte) idx#1 )
[5] (byte) main::i#2 ← phi( main/(byte) 2 main::@1/(byte) main::i#1 )
[6] *((const byte*) SCREEN#0 + (byte) idx#8) ← (byte) main::i#2
[7] (byte) idx#1 ← ++ (byte) idx#8
[8] (byte) main::i#1 ← -- (byte) main::i#2
[9] if((byte) 0!=(byte) main::i#1) goto main::@1
to:main::@2
main::@2: scope:[main] from main::@1
[10] *((const byte*) SCREEN#0 + (byte) idx#1) ← (byte) ' '
[11] (byte) idx#2 ← ++ (byte) idx#1
to:main::@3
main::@3: scope:[main] from main::@2 main::@4
[12] (byte) idx#10 ← phi( main::@2/(byte) idx#2 main::@4/(byte) idx#3 )
[12] (byte) main::j#2 ← phi( main::@2/(byte) 3 main::@4/(byte) main::j#1 )
[13] (byte) main::j#1 ← -- (byte) main::j#2
[14] if((byte) 0!=(byte) main::j#1) goto main::@4
to:main::@5
main::@5: scope:[main] from main::@3
[15] *((const byte*) SCREEN#0 + (byte) idx#10) ← (byte) ' '
[16] (byte) idx#4 ← ++ (byte) idx#10
to:main::@6
main::@6: scope:[main] from main::@5 main::@6
[17] (byte) idx#12 ← phi( main::@5/(byte) idx#4 main::@6/(byte) idx#13 )
[17] (byte) main::k#2 ← phi( main::@5/(byte) 2 main::@6/(byte) main::k#1 )
[18] *((const byte*) SCREEN#0 + (byte) idx#12) ← (byte) main::k#2
[19] (byte) idx#13 ← ++ (byte) idx#12
[20] (byte) main::k#1 ← -- (byte) main::k#2
[21] if((byte) 0!=(byte) main::k#1) goto main::@6
to:main::@return
main::@return: scope:[main] from main::@6
[22] return
to:@return
main::@4: scope:[main] from main::@3
[23] *((const byte*) SCREEN#0 + (byte) idx#10) ← (byte) main::j#1
[24] (byte) idx#3 ← ++ (byte) idx#10
to:main::@3

View File

@ -0,0 +1,784 @@
Warning! Adding boolean cast to non-boolean condition (byte) main::i
Warning! Adding boolean cast to non-boolean condition (byte) main::j
Warning! Adding boolean cast to non-boolean condition (byte) main::k
Adding pointer type conversion cast (byte*) SCREEN in (byte*) SCREEN ← (number) $400
Culled Empty Block (label) main::@6
Culled Empty Block (label) main::@7
Culled Empty Block (label) main::@8
Culled Empty Block (label) main::@10
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
(byte*) SCREEN#0 ← ((byte*)) (number) $400
(byte) idx#0 ← (number) 0
to:@1
main: scope:[main] from @1
(byte) idx#15 ← phi( @1/(byte) idx#17 )
(byte) main::i#0 ← (number) 2
to:main::@1
main::@1: scope:[main] from main main::@1
(byte) idx#8 ← phi( main/(byte) idx#15 main::@1/(byte) idx#1 )
(byte) main::i#2 ← phi( main/(byte) main::i#0 main::@1/(byte) main::i#1 )
*((byte*) SCREEN#0 + (byte) idx#8) ← (byte) main::i#2
(byte) idx#1 ← ++ (byte) idx#8
(byte) main::i#1 ← -- (byte) main::i#2
(bool~) main::$0 ← (number) 0 != (byte) main::i#1
if((bool~) main::$0) goto main::@1
to:main::@2
main::@2: scope:[main] from main::@1
(byte) idx#9 ← phi( main::@1/(byte) idx#1 )
*((byte*) SCREEN#0 + (byte) idx#9) ← (byte) ' '
(byte) idx#2 ← ++ (byte) idx#9
(byte) main::j#0 ← (number) 3
to:main::@3
main::@3: scope:[main] from main::@2 main::@4
(byte) idx#16 ← phi( main::@2/(byte) idx#2 main::@4/(byte) idx#3 )
(byte) main::j#2 ← phi( main::@2/(byte) main::j#0 main::@4/(byte) main::j#3 )
(byte) main::j#1 ← -- (byte) main::j#2
(bool~) main::$1 ← (number) 0 != (byte) main::j#1
if((bool~) main::$1) goto main::@4
to:main::@5
main::@4: scope:[main] from main::@3
(byte) idx#10 ← phi( main::@3/(byte) idx#16 )
(byte) main::j#3 ← phi( main::@3/(byte) main::j#1 )
*((byte*) SCREEN#0 + (byte) idx#10) ← (byte) main::j#3
(byte) idx#3 ← ++ (byte) idx#10
to:main::@3
main::@5: scope:[main] from main::@3
(byte) idx#11 ← phi( main::@3/(byte) idx#16 )
*((byte*) SCREEN#0 + (byte) idx#11) ← (byte) ' '
(byte) idx#4 ← ++ (byte) idx#11
(byte) main::k#0 ← (number) 2
to:main::@9
main::@9: scope:[main] from main::@5 main::@9
(byte) idx#12 ← phi( main::@5/(byte) idx#4 main::@9/(byte) idx#5 )
(byte) main::k#2 ← phi( main::@5/(byte) main::k#0 main::@9/(byte) main::k#1 )
*((byte*) SCREEN#0 + (byte) idx#12) ← (byte) main::k#2
(byte) idx#5 ← ++ (byte) idx#12
(byte) main::k#1 ← -- (byte) main::k#2
(bool~) main::$2 ← (number) 0 != (byte) main::k#1
if((bool~) main::$2) goto main::@9
to:main::@return
main::@return: scope:[main] from main::@9
(byte) idx#13 ← phi( main::@9/(byte) idx#5 )
(byte) idx#6 ← (byte) idx#13
return
to:@return
@1: scope:[] from @begin
(byte) idx#17 ← phi( @begin/(byte) idx#0 )
call main
to:@2
@2: scope:[] from @1
(byte) idx#14 ← phi( @1/(byte) idx#6 )
(byte) idx#7 ← (byte) idx#14
to:@end
@end: scope:[] from @2
SYMBOL TABLE SSA
(label) @1
(label) @2
(label) @begin
(label) @end
(byte*) SCREEN
(byte*) SCREEN#0
(byte) idx
(byte) idx#0
(byte) idx#1
(byte) idx#10
(byte) idx#11
(byte) idx#12
(byte) idx#13
(byte) idx#14
(byte) idx#15
(byte) idx#16
(byte) idx#17
(byte) idx#2
(byte) idx#3
(byte) idx#4
(byte) idx#5
(byte) idx#6
(byte) idx#7
(byte) idx#8
(byte) idx#9
(void()) main()
(bool~) main::$0
(bool~) main::$1
(bool~) main::$2
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@4
(label) main::@5
(label) main::@9
(label) main::@return
(byte) main::i
(byte) main::i#0
(byte) main::i#1
(byte) main::i#2
(byte) main::j
(byte) main::j#0
(byte) main::j#1
(byte) main::j#2
(byte) main::j#3
(byte) main::k
(byte) main::k#0
(byte) main::k#1
(byte) main::k#2
Adding number conversion cast (unumber) 0 in (byte) idx#0 ← (number) 0
Adding number conversion cast (unumber) 2 in (byte) main::i#0 ← (number) 2
Adding number conversion cast (unumber) 0 in (bool~) main::$0 ← (number) 0 != (byte) main::i#1
Adding number conversion cast (unumber) 3 in (byte) main::j#0 ← (number) 3
Adding number conversion cast (unumber) 0 in (bool~) main::$1 ← (number) 0 != (byte) main::j#1
Adding number conversion cast (unumber) 2 in (byte) main::k#0 ← (number) 2
Adding number conversion cast (unumber) 0 in (bool~) main::$2 ← (number) 0 != (byte) main::k#1
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400
Inlining cast (byte) idx#0 ← (unumber)(number) 0
Inlining cast (byte) main::i#0 ← (unumber)(number) 2
Inlining cast (byte) main::j#0 ← (unumber)(number) 3
Inlining cast (byte) main::k#0 ← (unumber)(number) 2
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 0
Simplifying constant integer cast 2
Simplifying constant integer cast 0
Simplifying constant integer cast 3
Simplifying constant integer cast 0
Simplifying constant integer cast 2
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 3
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias (byte) idx#1 = (byte) idx#9
Alias (byte) main::j#1 = (byte) main::j#3
Alias (byte) idx#10 = (byte) idx#16 (byte) idx#11
Alias (byte) idx#13 = (byte) idx#5 (byte) idx#6
Alias (byte) idx#0 = (byte) idx#17
Alias (byte) idx#14 = (byte) idx#7
Successful SSA optimization Pass2AliasElimination
Identical Phi Values (byte) idx#15 (byte) idx#0
Identical Phi Values (byte) idx#14 (byte) idx#13
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) main::$0 [9] if((byte) 0!=(byte) main::i#1) goto main::@1
Simple Condition (bool~) main::$1 [17] if((byte) 0!=(byte) main::j#1) goto main::@4
Simple Condition (bool~) main::$2 [30] if((byte) 0!=(byte) main::k#1) goto main::@9
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant (const byte*) SCREEN#0 = (byte*) 1024
Constant (const byte) idx#0 = 0
Constant (const byte) main::i#0 = 2
Constant (const byte) main::j#0 = 3
Constant (const byte) main::k#0 = 2
Successful SSA optimization Pass2ConstantIdentification
Inlining constant with var siblings (const byte) main::i#0
Inlining constant with var siblings (const byte) main::j#0
Inlining constant with var siblings (const byte) main::k#0
Inlining constant with var siblings (const byte) idx#0
Constant inlined main::i#0 = (byte) 2
Constant inlined main::k#0 = (byte) 2
Constant inlined main::j#0 = (byte) 3
Constant inlined idx#0 = (byte) 0
Successful SSA optimization Pass2ConstantInlining
Added new block during phi lifting main::@11(between main::@1 and main::@1)
Added new block during phi lifting main::@12(between main::@9 and main::@9)
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 @end
Adding NOP phi() at start of main
CALL GRAPH
Calls in [] to main:2
Created 6 initial phi equivalence classes
Coalesced [13] idx#19 ← idx#2
Coalesced [19] idx#21 ← idx#4
Coalesced [26] main::k#3 ← main::k#1
Coalesced [27] idx#22 ← idx#13
Coalesced [30] main::j#4 ← main::j#1
Coalesced [31] idx#20 ← idx#3
Coalesced [32] main::i#3 ← main::i#1
Coalesced [33] idx#18 ← idx#1
Coalesced down to 6 phi equivalence classes
Culled Empty Block (label) @2
Culled Empty Block (label) main::@12
Culled Empty Block (label) main::@11
Renumbering block main::@9 to main::@6
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @1
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
FINAL CONTROL FLOW GRAPH
@begin: scope:[] from
[0] phi()
to:@1
@1: scope:[] from @begin
[1] phi()
[2] call main
to:@end
@end: scope:[] from @1
[3] phi()
main: scope:[main] from @1
[4] phi()
to:main::@1
main::@1: scope:[main] from main main::@1
[5] (byte) idx#8 ← phi( main/(byte) 0 main::@1/(byte) idx#1 )
[5] (byte) main::i#2 ← phi( main/(byte) 2 main::@1/(byte) main::i#1 )
[6] *((const byte*) SCREEN#0 + (byte) idx#8) ← (byte) main::i#2
[7] (byte) idx#1 ← ++ (byte) idx#8
[8] (byte) main::i#1 ← -- (byte) main::i#2
[9] if((byte) 0!=(byte) main::i#1) goto main::@1
to:main::@2
main::@2: scope:[main] from main::@1
[10] *((const byte*) SCREEN#0 + (byte) idx#1) ← (byte) ' '
[11] (byte) idx#2 ← ++ (byte) idx#1
to:main::@3
main::@3: scope:[main] from main::@2 main::@4
[12] (byte) idx#10 ← phi( main::@2/(byte) idx#2 main::@4/(byte) idx#3 )
[12] (byte) main::j#2 ← phi( main::@2/(byte) 3 main::@4/(byte) main::j#1 )
[13] (byte) main::j#1 ← -- (byte) main::j#2
[14] if((byte) 0!=(byte) main::j#1) goto main::@4
to:main::@5
main::@5: scope:[main] from main::@3
[15] *((const byte*) SCREEN#0 + (byte) idx#10) ← (byte) ' '
[16] (byte) idx#4 ← ++ (byte) idx#10
to:main::@6
main::@6: scope:[main] from main::@5 main::@6
[17] (byte) idx#12 ← phi( main::@5/(byte) idx#4 main::@6/(byte) idx#13 )
[17] (byte) main::k#2 ← phi( main::@5/(byte) 2 main::@6/(byte) main::k#1 )
[18] *((const byte*) SCREEN#0 + (byte) idx#12) ← (byte) main::k#2
[19] (byte) idx#13 ← ++ (byte) idx#12
[20] (byte) main::k#1 ← -- (byte) main::k#2
[21] if((byte) 0!=(byte) main::k#1) goto main::@6
to:main::@return
main::@return: scope:[main] from main::@6
[22] return
to:@return
main::@4: scope:[main] from main::@3
[23] *((const byte*) SCREEN#0 + (byte) idx#10) ← (byte) main::j#1
[24] (byte) idx#3 ← ++ (byte) idx#10
to:main::@3
VARIABLE REGISTER WEIGHTS
(byte*) SCREEN
(byte) idx
(byte) idx#1 6.5
(byte) idx#10 7.8
(byte) idx#12 17.5
(byte) idx#13 7.333333333333333
(byte) idx#2 4.0
(byte) idx#3 22.0
(byte) idx#4 4.0
(byte) idx#8 16.5
(void()) main()
(byte) main::i
(byte) main::i#1 16.5
(byte) main::i#2 11.0
(byte) main::j
(byte) main::j#1 11.0
(byte) main::j#2 22.0
(byte) main::k
(byte) main::k#1 16.5
(byte) main::k#2 11.0
Initial phi equivalence classes
[ main::i#2 main::i#1 ]
[ idx#8 idx#1 ]
[ main::j#2 main::j#1 ]
[ idx#10 idx#2 idx#3 ]
[ main::k#2 main::k#1 ]
[ idx#12 idx#4 idx#13 ]
Complete equivalence classes
[ main::i#2 main::i#1 ]
[ idx#8 idx#1 ]
[ main::j#2 main::j#1 ]
[ idx#10 idx#2 idx#3 ]
[ main::k#2 main::k#1 ]
[ idx#12 idx#4 idx#13 ]
Allocated zp ZP_BYTE:2 [ main::i#2 main::i#1 ]
Allocated zp ZP_BYTE:3 [ idx#8 idx#1 ]
Allocated zp ZP_BYTE:4 [ main::j#2 main::j#1 ]
Allocated zp ZP_BYTE:5 [ idx#10 idx#2 idx#3 ]
Allocated zp ZP_BYTE:6 [ main::k#2 main::k#1 ]
Allocated zp ZP_BYTE:7 [ idx#12 idx#4 idx#13 ]
INITIAL ASM
//SEG0 File Comments
// Tests using integer conditions in while() / for() / do..while
// This should produce 'ba ba ba' at the top of the screen
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG2 Global Constants & labels
.label SCREEN = $400
.label idx = 3
.label idx_2 = 5
.label idx_3 = 5
.label idx_4 = 7
.label idx_10 = 5
.label idx_12 = 7
.label idx_13 = 7
//SEG3 @begin
bbegin:
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
b1_from_bbegin:
jmp b1
//SEG5 @1
b1:
//SEG6 [2] call main
//SEG7 [4] phi from @1 to main [phi:@1->main]
main_from_b1:
jsr main
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
bend_from_b1:
jmp bend
//SEG9 @end
bend:
//SEG10 main
main: {
.label i = 2
.label j = 4
.label k = 6
//SEG11 [5] phi from main to main::@1 [phi:main->main::@1]
b1_from_main:
//SEG12 [5] phi (byte) idx#8 = (byte) 0 [phi:main->main::@1#0] -- vbuz1=vbuc1
lda #0
sta idx
//SEG13 [5] phi (byte) main::i#2 = (byte) 2 [phi:main->main::@1#1] -- vbuz1=vbuc1
lda #2
sta i
jmp b1
// for()
//SEG14 [5] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
b1_from_b1:
//SEG15 [5] phi (byte) idx#8 = (byte) idx#1 [phi:main::@1->main::@1#0] -- register_copy
//SEG16 [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@1->main::@1#1] -- register_copy
jmp b1
//SEG17 main::@1
b1:
//SEG18 [6] *((const byte*) SCREEN#0 + (byte) idx#8) ← (byte) main::i#2 -- pbuc1_derefidx_vbuz1=vbuz2
lda i
ldy idx
sta SCREEN,y
//SEG19 [7] (byte) idx#1 ← ++ (byte) idx#8 -- vbuz1=_inc_vbuz1
inc idx
//SEG20 [8] (byte) main::i#1 ← -- (byte) main::i#2 -- vbuz1=_dec_vbuz1
dec i
//SEG21 [9] if((byte) 0!=(byte) main::i#1) goto main::@1 -- vbuc1_neq_vbuz1_then_la1
lda #0
cmp i
bne b1_from_b1
jmp b2
//SEG22 main::@2
b2:
//SEG23 [10] *((const byte*) SCREEN#0 + (byte) idx#1) ← (byte) ' ' -- pbuc1_derefidx_vbuz1=vbuc2
lda #' '
ldy idx
sta SCREEN,y
//SEG24 [11] (byte) idx#2 ← ++ (byte) idx#1 -- vbuz1=_inc_vbuz2
ldy idx
iny
sty idx_2
//SEG25 [12] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
b3_from_b2:
//SEG26 [12] phi (byte) idx#10 = (byte) idx#2 [phi:main::@2->main::@3#0] -- register_copy
//SEG27 [12] phi (byte) main::j#2 = (byte) 3 [phi:main::@2->main::@3#1] -- vbuz1=vbuc1
lda #3
sta j
jmp b3
//SEG28 main::@3
b3:
//SEG29 [13] (byte) main::j#1 ← -- (byte) main::j#2 -- vbuz1=_dec_vbuz1
dec j
//SEG30 [14] if((byte) 0!=(byte) main::j#1) goto main::@4 -- vbuc1_neq_vbuz1_then_la1
lda #0
cmp j
bne b4
jmp b5
//SEG31 main::@5
b5:
//SEG32 [15] *((const byte*) SCREEN#0 + (byte) idx#10) ← (byte) ' ' -- pbuc1_derefidx_vbuz1=vbuc2
lda #' '
ldy idx_10
sta SCREEN,y
//SEG33 [16] (byte) idx#4 ← ++ (byte) idx#10 -- vbuz1=_inc_vbuz2
ldy idx_10
iny
sty idx_4
//SEG34 [17] phi from main::@5 to main::@6 [phi:main::@5->main::@6]
b6_from_b5:
//SEG35 [17] phi (byte) idx#12 = (byte) idx#4 [phi:main::@5->main::@6#0] -- register_copy
//SEG36 [17] phi (byte) main::k#2 = (byte) 2 [phi:main::@5->main::@6#1] -- vbuz1=vbuc1
lda #2
sta k
jmp b6
//SEG37 [17] phi from main::@6 to main::@6 [phi:main::@6->main::@6]
b6_from_b6:
//SEG38 [17] phi (byte) idx#12 = (byte) idx#13 [phi:main::@6->main::@6#0] -- register_copy
//SEG39 [17] phi (byte) main::k#2 = (byte) main::k#1 [phi:main::@6->main::@6#1] -- register_copy
jmp b6
//SEG40 main::@6
b6:
//SEG41 [18] *((const byte*) SCREEN#0 + (byte) idx#12) ← (byte) main::k#2 -- pbuc1_derefidx_vbuz1=vbuz2
lda k
ldy idx_12
sta SCREEN,y
//SEG42 [19] (byte) idx#13 ← ++ (byte) idx#12 -- vbuz1=_inc_vbuz1
inc idx_13
//SEG43 [20] (byte) main::k#1 ← -- (byte) main::k#2 -- vbuz1=_dec_vbuz1
dec k
//SEG44 [21] if((byte) 0!=(byte) main::k#1) goto main::@6 -- vbuc1_neq_vbuz1_then_la1
lda #0
cmp k
bne b6_from_b6
jmp breturn
//SEG45 main::@return
breturn:
//SEG46 [22] return
rts
//SEG47 main::@4
b4:
//SEG48 [23] *((const byte*) SCREEN#0 + (byte) idx#10) ← (byte) main::j#1 -- pbuc1_derefidx_vbuz1=vbuz2
lda j
ldy idx_10
sta SCREEN,y
//SEG49 [24] (byte) idx#3 ← ++ (byte) idx#10 -- vbuz1=_inc_vbuz1
inc idx_3
//SEG50 [12] phi from main::@4 to main::@3 [phi:main::@4->main::@3]
b3_from_b4:
//SEG51 [12] phi (byte) idx#10 = (byte) idx#3 [phi:main::@4->main::@3#0] -- register_copy
//SEG52 [12] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@4->main::@3#1] -- register_copy
jmp b3
}
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [10] *((const byte*) SCREEN#0 + (byte) idx#1) ← (byte) ' ' [ idx#1 ] ( main:2 [ idx#1 ] ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:3 [ idx#8 idx#1 ]
Statement [15] *((const byte*) SCREEN#0 + (byte) idx#10) ← (byte) ' ' [ idx#10 ] ( main:2 [ idx#10 ] ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:5 [ idx#10 idx#2 idx#3 ]
Statement [10] *((const byte*) SCREEN#0 + (byte) idx#1) ← (byte) ' ' [ idx#1 ] ( main:2 [ idx#1 ] ) always clobbers reg byte a
Statement [15] *((const byte*) SCREEN#0 + (byte) idx#10) ← (byte) ' ' [ idx#10 ] ( main:2 [ idx#10 ] ) always clobbers reg byte a
Potential registers zp ZP_BYTE:2 [ main::i#2 main::i#1 ] : zp ZP_BYTE:2 , reg byte a , reg byte x , reg byte y ,
Potential registers zp ZP_BYTE:3 [ idx#8 idx#1 ] : zp ZP_BYTE:3 , reg byte x , reg byte y ,
Potential registers zp ZP_BYTE:4 [ main::j#2 main::j#1 ] : zp ZP_BYTE:4 , reg byte a , reg byte x , reg byte y ,
Potential registers zp ZP_BYTE:5 [ idx#10 idx#2 idx#3 ] : zp ZP_BYTE:5 , reg byte x , reg byte y ,
Potential registers zp ZP_BYTE:6 [ main::k#2 main::k#1 ] : zp ZP_BYTE:6 , reg byte a , reg byte x , reg byte y ,
Potential registers zp ZP_BYTE:7 [ idx#12 idx#4 idx#13 ] : zp ZP_BYTE:7 , reg byte a , reg byte x , reg byte y ,
REGISTER UPLIFT SCOPES
Uplift Scope [main] 33: zp ZP_BYTE:4 [ main::j#2 main::j#1 ] 27.5: zp ZP_BYTE:2 [ main::i#2 main::i#1 ] 27.5: zp ZP_BYTE:6 [ main::k#2 main::k#1 ]
Uplift Scope [] 33.8: zp ZP_BYTE:5 [ idx#10 idx#2 idx#3 ] 28.83: zp ZP_BYTE:7 [ idx#12 idx#4 idx#13 ] 23: zp ZP_BYTE:3 [ idx#8 idx#1 ]
Uplifting [main] best 1079 combination reg byte a [ main::j#2 main::j#1 ] reg byte x [ main::i#2 main::i#1 ] reg byte a [ main::k#2 main::k#1 ]
Uplifting [] best 851 combination reg byte y [ idx#10 idx#2 idx#3 ] reg byte y [ idx#12 idx#4 idx#13 ] reg byte y [ idx#8 idx#1 ]
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 File Comments
// Tests using integer conditions in while() / for() / do..while
// This should produce 'ba ba ba' at the top of the screen
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG2 Global Constants & labels
.label SCREEN = $400
//SEG3 @begin
bbegin:
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
b1_from_bbegin:
jmp b1
//SEG5 @1
b1:
//SEG6 [2] call main
//SEG7 [4] phi from @1 to main [phi:@1->main]
main_from_b1:
jsr main
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
bend_from_b1:
jmp bend
//SEG9 @end
bend:
//SEG10 main
main: {
//SEG11 [5] phi from main to main::@1 [phi:main->main::@1]
b1_from_main:
//SEG12 [5] phi (byte) idx#8 = (byte) 0 [phi:main->main::@1#0] -- vbuyy=vbuc1
ldy #0
//SEG13 [5] phi (byte) main::i#2 = (byte) 2 [phi:main->main::@1#1] -- vbuxx=vbuc1
ldx #2
jmp b1
// for()
//SEG14 [5] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
b1_from_b1:
//SEG15 [5] phi (byte) idx#8 = (byte) idx#1 [phi:main::@1->main::@1#0] -- register_copy
//SEG16 [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@1->main::@1#1] -- register_copy
jmp b1
//SEG17 main::@1
b1:
//SEG18 [6] *((const byte*) SCREEN#0 + (byte) idx#8) ← (byte) main::i#2 -- pbuc1_derefidx_vbuyy=vbuxx
txa
sta SCREEN,y
//SEG19 [7] (byte) idx#1 ← ++ (byte) idx#8 -- vbuyy=_inc_vbuyy
iny
//SEG20 [8] (byte) main::i#1 ← -- (byte) main::i#2 -- vbuxx=_dec_vbuxx
dex
//SEG21 [9] if((byte) 0!=(byte) main::i#1) goto main::@1 -- vbuc1_neq_vbuxx_then_la1
cpx #0
bne b1_from_b1
jmp b2
//SEG22 main::@2
b2:
//SEG23 [10] *((const byte*) SCREEN#0 + (byte) idx#1) ← (byte) ' ' -- pbuc1_derefidx_vbuyy=vbuc2
lda #' '
sta SCREEN,y
//SEG24 [11] (byte) idx#2 ← ++ (byte) idx#1 -- vbuyy=_inc_vbuyy
iny
//SEG25 [12] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
b3_from_b2:
//SEG26 [12] phi (byte) idx#10 = (byte) idx#2 [phi:main::@2->main::@3#0] -- register_copy
//SEG27 [12] phi (byte) main::j#2 = (byte) 3 [phi:main::@2->main::@3#1] -- vbuaa=vbuc1
lda #3
jmp b3
//SEG28 main::@3
b3:
//SEG29 [13] (byte) main::j#1 ← -- (byte) main::j#2 -- vbuaa=_dec_vbuaa
sec
sbc #1
//SEG30 [14] if((byte) 0!=(byte) main::j#1) goto main::@4 -- vbuc1_neq_vbuaa_then_la1
cmp #0
bne b4
jmp b5
//SEG31 main::@5
b5:
//SEG32 [15] *((const byte*) SCREEN#0 + (byte) idx#10) ← (byte) ' ' -- pbuc1_derefidx_vbuyy=vbuc2
lda #' '
sta SCREEN,y
//SEG33 [16] (byte) idx#4 ← ++ (byte) idx#10 -- vbuyy=_inc_vbuyy
iny
//SEG34 [17] phi from main::@5 to main::@6 [phi:main::@5->main::@6]
b6_from_b5:
//SEG35 [17] phi (byte) idx#12 = (byte) idx#4 [phi:main::@5->main::@6#0] -- register_copy
//SEG36 [17] phi (byte) main::k#2 = (byte) 2 [phi:main::@5->main::@6#1] -- vbuaa=vbuc1
lda #2
jmp b6
//SEG37 [17] phi from main::@6 to main::@6 [phi:main::@6->main::@6]
b6_from_b6:
//SEG38 [17] phi (byte) idx#12 = (byte) idx#13 [phi:main::@6->main::@6#0] -- register_copy
//SEG39 [17] phi (byte) main::k#2 = (byte) main::k#1 [phi:main::@6->main::@6#1] -- register_copy
jmp b6
//SEG40 main::@6
b6:
//SEG41 [18] *((const byte*) SCREEN#0 + (byte) idx#12) ← (byte) main::k#2 -- pbuc1_derefidx_vbuyy=vbuaa
sta SCREEN,y
//SEG42 [19] (byte) idx#13 ← ++ (byte) idx#12 -- vbuyy=_inc_vbuyy
iny
//SEG43 [20] (byte) main::k#1 ← -- (byte) main::k#2 -- vbuaa=_dec_vbuaa
sec
sbc #1
//SEG44 [21] if((byte) 0!=(byte) main::k#1) goto main::@6 -- vbuc1_neq_vbuaa_then_la1
cmp #0
bne b6_from_b6
jmp breturn
//SEG45 main::@return
breturn:
//SEG46 [22] return
rts
//SEG47 main::@4
b4:
//SEG48 [23] *((const byte*) SCREEN#0 + (byte) idx#10) ← (byte) main::j#1 -- pbuc1_derefidx_vbuyy=vbuaa
sta SCREEN,y
//SEG49 [24] (byte) idx#3 ← ++ (byte) idx#10 -- vbuyy=_inc_vbuyy
iny
//SEG50 [12] phi from main::@4 to main::@3 [phi:main::@4->main::@3]
b3_from_b4:
//SEG51 [12] phi (byte) idx#10 = (byte) idx#3 [phi:main::@4->main::@3#0] -- register_copy
//SEG52 [12] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@4->main::@3#1] -- register_copy
jmp b3
}
ASSEMBLER OPTIMIZATIONS
Removing instruction jmp b1
Removing instruction jmp bend
Removing instruction jmp b1
Removing instruction jmp b2
Removing instruction jmp b3
Removing instruction jmp b5
Removing instruction jmp b6
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Replacing label b1_from_b1 with b1
Replacing label b6_from_b6 with b6
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction main_from_b1:
Removing instruction bend_from_b1:
Removing instruction b1_from_b1:
Removing instruction b6_from_b6:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction bend:
Removing instruction b1_from_main:
Removing instruction b2:
Removing instruction b3_from_b2:
Removing instruction b5:
Removing instruction b6_from_b5:
Removing instruction breturn:
Removing instruction b3_from_b4:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction jmp b1
Removing instruction jmp b6
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @1
(label) @begin
(label) @end
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = (byte*) 1024
(byte) idx
(byte) idx#1 reg byte y 6.5
(byte) idx#10 reg byte y 7.8
(byte) idx#12 reg byte y 17.5
(byte) idx#13 reg byte y 7.333333333333333
(byte) idx#2 reg byte y 4.0
(byte) idx#3 reg byte y 22.0
(byte) idx#4 reg byte y 4.0
(byte) idx#8 reg byte y 16.5
(void()) main()
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@4
(label) main::@5
(label) main::@6
(label) main::@return
(byte) main::i
(byte) main::i#1 reg byte x 16.5
(byte) main::i#2 reg byte x 11.0
(byte) main::j
(byte) main::j#1 reg byte a 11.0
(byte) main::j#2 reg byte a 22.0
(byte) main::k
(byte) main::k#1 reg byte a 16.5
(byte) main::k#2 reg byte a 11.0
reg byte x [ main::i#2 main::i#1 ]
reg byte y [ idx#8 idx#1 ]
reg byte a [ main::j#2 main::j#1 ]
reg byte y [ idx#10 idx#2 idx#3 ]
reg byte a [ main::k#2 main::k#1 ]
reg byte y [ idx#12 idx#4 idx#13 ]
FINAL ASSEMBLER
Score: 599
//SEG0 File Comments
// Tests using integer conditions in while() / for() / do..while
// This should produce 'ba ba ba' at the top of the screen
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
//SEG2 Global Constants & labels
.label SCREEN = $400
//SEG3 @begin
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
//SEG5 @1
//SEG6 [2] call main
//SEG7 [4] phi from @1 to main [phi:@1->main]
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
//SEG9 @end
//SEG10 main
main: {
//SEG11 [5] phi from main to main::@1 [phi:main->main::@1]
//SEG12 [5] phi (byte) idx#8 = (byte) 0 [phi:main->main::@1#0] -- vbuyy=vbuc1
ldy #0
//SEG13 [5] phi (byte) main::i#2 = (byte) 2 [phi:main->main::@1#1] -- vbuxx=vbuc1
ldx #2
// for()
//SEG14 [5] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
//SEG15 [5] phi (byte) idx#8 = (byte) idx#1 [phi:main::@1->main::@1#0] -- register_copy
//SEG16 [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@1->main::@1#1] -- register_copy
//SEG17 main::@1
b1:
//SEG18 [6] *((const byte*) SCREEN#0 + (byte) idx#8) ← (byte) main::i#2 -- pbuc1_derefidx_vbuyy=vbuxx
txa
sta SCREEN,y
//SEG19 [7] (byte) idx#1 ← ++ (byte) idx#8 -- vbuyy=_inc_vbuyy
iny
//SEG20 [8] (byte) main::i#1 ← -- (byte) main::i#2 -- vbuxx=_dec_vbuxx
dex
//SEG21 [9] if((byte) 0!=(byte) main::i#1) goto main::@1 -- vbuc1_neq_vbuxx_then_la1
cpx #0
bne b1
//SEG22 main::@2
//SEG23 [10] *((const byte*) SCREEN#0 + (byte) idx#1) ← (byte) ' ' -- pbuc1_derefidx_vbuyy=vbuc2
lda #' '
sta SCREEN,y
//SEG24 [11] (byte) idx#2 ← ++ (byte) idx#1 -- vbuyy=_inc_vbuyy
iny
//SEG25 [12] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
//SEG26 [12] phi (byte) idx#10 = (byte) idx#2 [phi:main::@2->main::@3#0] -- register_copy
//SEG27 [12] phi (byte) main::j#2 = (byte) 3 [phi:main::@2->main::@3#1] -- vbuaa=vbuc1
lda #3
//SEG28 main::@3
b3:
//SEG29 [13] (byte) main::j#1 ← -- (byte) main::j#2 -- vbuaa=_dec_vbuaa
sec
sbc #1
//SEG30 [14] if((byte) 0!=(byte) main::j#1) goto main::@4 -- vbuc1_neq_vbuaa_then_la1
cmp #0
bne b4
//SEG31 main::@5
//SEG32 [15] *((const byte*) SCREEN#0 + (byte) idx#10) ← (byte) ' ' -- pbuc1_derefidx_vbuyy=vbuc2
lda #' '
sta SCREEN,y
//SEG33 [16] (byte) idx#4 ← ++ (byte) idx#10 -- vbuyy=_inc_vbuyy
iny
//SEG34 [17] phi from main::@5 to main::@6 [phi:main::@5->main::@6]
//SEG35 [17] phi (byte) idx#12 = (byte) idx#4 [phi:main::@5->main::@6#0] -- register_copy
//SEG36 [17] phi (byte) main::k#2 = (byte) 2 [phi:main::@5->main::@6#1] -- vbuaa=vbuc1
lda #2
//SEG37 [17] phi from main::@6 to main::@6 [phi:main::@6->main::@6]
//SEG38 [17] phi (byte) idx#12 = (byte) idx#13 [phi:main::@6->main::@6#0] -- register_copy
//SEG39 [17] phi (byte) main::k#2 = (byte) main::k#1 [phi:main::@6->main::@6#1] -- register_copy
//SEG40 main::@6
b6:
//SEG41 [18] *((const byte*) SCREEN#0 + (byte) idx#12) ← (byte) main::k#2 -- pbuc1_derefidx_vbuyy=vbuaa
sta SCREEN,y
//SEG42 [19] (byte) idx#13 ← ++ (byte) idx#12 -- vbuyy=_inc_vbuyy
iny
//SEG43 [20] (byte) main::k#1 ← -- (byte) main::k#2 -- vbuaa=_dec_vbuaa
sec
sbc #1
//SEG44 [21] if((byte) 0!=(byte) main::k#1) goto main::@6 -- vbuc1_neq_vbuaa_then_la1
cmp #0
bne b6
//SEG45 main::@return
//SEG46 [22] return
rts
//SEG47 main::@4
b4:
//SEG48 [23] *((const byte*) SCREEN#0 + (byte) idx#10) ← (byte) main::j#1 -- pbuc1_derefidx_vbuyy=vbuaa
sta SCREEN,y
//SEG49 [24] (byte) idx#3 ← ++ (byte) idx#10 -- vbuyy=_inc_vbuyy
iny
//SEG50 [12] phi from main::@4 to main::@3 [phi:main::@4->main::@3]
//SEG51 [12] phi (byte) idx#10 = (byte) idx#3 [phi:main::@4->main::@3#0] -- register_copy
//SEG52 [12] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@4->main::@3#1] -- register_copy
jmp b3
}

View File

@ -0,0 +1 @@
program

View File

@ -0,0 +1,24 @@
// Tests using integer conditions in ternary operator
// This should produce '++0++' at the top of the screen
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
.label SCREEN = $400
main: {
ldx #0
ldy #-2
b1:
cpy #0
bne b2
lda #'0'
jmp b3
b2:
lda #'+'
b3:
sta SCREEN,x
inx
iny
cpy #3
bne b1
rts
}

View File

@ -0,0 +1,30 @@
@begin: scope:[] from
[0] phi()
to:@1
@1: scope:[] from @begin
[1] phi()
[2] call main
to:@end
@end: scope:[] from @1
[3] phi()
main: scope:[main] from @1
[4] phi()
to:main::@1
main::@1: scope:[main] from main main::@3
[5] (byte) main::idx#2 ← phi( main/(byte) 0 main::@3/(byte) main::idx#1 )
[5] (signed byte) main::i#2 ← phi( main/(signed byte) -2 main::@3/(signed byte) main::i#1 )
[6] if((signed byte) 0!=(signed byte) main::i#2) goto main::@2
to:main::@3
main::@2: scope:[main] from main::@1
[7] phi()
to:main::@3
main::@3: scope:[main] from main::@1 main::@2
[8] (byte) main::j#0 ← phi( main::@2/(byte) '+' main::@1/(byte) '0' )
[9] *((const byte*) SCREEN#0 + (byte) main::idx#2) ← (byte) main::j#0
[10] (byte) main::idx#1 ← ++ (byte) main::idx#2
[11] (signed byte) main::i#1 ← ++ (signed byte) main::i#2
[12] if((signed byte) main::i#1!=(signed byte) 3) goto main::@1
to:main::@return
main::@return: scope:[main] from main::@3
[13] return
to:@return

View File

@ -0,0 +1,507 @@
Warning! Adding boolean cast to non-boolean condition (signed byte) main::i
Adding pointer type conversion cast (byte*) SCREEN in (byte*) SCREEN ← (number) $400
Culled Empty Block (label) main::@5
Culled Empty Block (label) main::@6
Culled Empty Block (label) main::@7
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
(byte*) SCREEN#0 ← ((byte*)) (number) $400
to:@1
main: scope:[main] from @1
(byte) main::idx#0 ← (number) 0
(signed byte) main::i#0 ← (signed byte) -2
to:main::@1
main::@1: scope:[main] from main main::@4
(byte) main::idx#5 ← phi( main/(byte) main::idx#0 main::@4/(byte) main::idx#1 )
(signed byte) main::i#2 ← phi( main/(signed byte) main::i#0 main::@4/(signed byte) main::i#1 )
(bool~) main::$4 ← (number) 0 != (signed byte) main::i#2
if((bool~) main::$4) goto main::@2
to:main::@3
main::@2: scope:[main] from main::@1
(signed byte) main::i#4 ← phi( main::@1/(signed byte) main::i#2 )
(byte) main::idx#3 ← phi( main::@1/(byte) main::idx#5 )
(byte~) main::$1 ← (byte) '+'
to:main::@4
main::@3: scope:[main] from main::@1
(signed byte) main::i#5 ← phi( main::@1/(signed byte) main::i#2 )
(byte) main::idx#4 ← phi( main::@1/(byte) main::idx#5 )
(byte~) main::$0 ← (byte) '0'
to:main::@4
main::@4: scope:[main] from main::@2 main::@3
(signed byte) main::i#3 ← phi( main::@2/(signed byte) main::i#4 main::@3/(signed byte) main::i#5 )
(byte) main::idx#2 ← phi( main::@2/(byte) main::idx#3 main::@3/(byte) main::idx#4 )
(byte~) main::$2 ← phi( main::@2/(byte~) main::$1 main::@3/(byte~) main::$0 )
(byte) main::j#0 ← (byte~) main::$2
*((byte*) SCREEN#0 + (byte) main::idx#2) ← (byte) main::j#0
(byte) main::idx#1 ← ++ (byte) main::idx#2
(signed byte) main::i#1 ← (signed byte) main::i#3 + rangenext(-2,2)
(bool~) main::$3 ← (signed byte) main::i#1 != rangelast(-2,2)
if((bool~) main::$3) goto main::@1
to:main::@return
main::@return: scope:[main] from main::@4
return
to:@return
@1: scope:[] from @begin
call main
to:@2
@2: scope:[] from @1
to:@end
@end: scope:[] from @2
SYMBOL TABLE SSA
(label) @1
(label) @2
(label) @begin
(label) @end
(byte*) SCREEN
(byte*) SCREEN#0
(void()) main()
(byte~) main::$0
(byte~) main::$1
(byte~) main::$2
(bool~) main::$3
(bool~) main::$4
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@4
(label) main::@return
(signed byte) main::i
(signed byte) main::i#0
(signed byte) main::i#1
(signed byte) main::i#2
(signed byte) main::i#3
(signed byte) main::i#4
(signed byte) main::i#5
(byte) main::idx
(byte) main::idx#0
(byte) main::idx#1
(byte) main::idx#2
(byte) main::idx#3
(byte) main::idx#4
(byte) main::idx#5
(byte) main::j
(byte) main::j#0
Adding number conversion cast (unumber) 0 in (byte) main::idx#0 ← (number) 0
Adding number conversion cast (snumber) 0 in (bool~) main::$4 ← (number) 0 != (signed byte) main::i#2
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400
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 0
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
Finalized signed number type (signed byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias (byte) main::idx#3 = (byte) main::idx#5 (byte) main::idx#4
Alias (signed byte) main::i#2 = (signed byte) main::i#4 (signed byte) main::i#5
Alias (byte) main::j#0 = (byte~) main::$2
Successful SSA optimization Pass2AliasElimination
Alias (byte) main::idx#2 = (byte) main::idx#3
Alias (signed byte) main::i#2 = (signed byte) main::i#3
Successful SSA optimization Pass2AliasElimination
Simple Condition (bool~) main::$4 [5] if((signed byte) 0!=(signed byte) main::i#2) goto main::@2
Simple Condition (bool~) main::$3 [16] if((signed byte) main::i#1!=rangelast(-2,2)) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant (const byte*) SCREEN#0 = (byte*) 1024
Constant (const byte) main::idx#0 = 0
Constant (const signed byte) main::i#0 = -2
Constant (const byte) main::$1 = '+'
Constant (const byte) main::$0 = '0'
Successful SSA optimization Pass2ConstantIdentification
Resolved ranged next value [14] main::i#1 ← ++ main::i#2 to ++
Resolved ranged comparison value [16] if(main::i#1!=rangelast(-2,2)) goto main::@1 to (number) 3
Adding number conversion cast (snumber) 3 in if((signed byte) main::i#1!=(number) 3) goto main::@1
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant integer cast 3
Successful SSA optimization PassNCastSimplification
Finalized signed number type (signed byte) 3
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inlining constant with var siblings (const byte) main::idx#0
Inlining constant with var siblings (const signed byte) main::i#0
Constant inlined main::i#0 = (signed byte) -2
Constant inlined main::idx#0 = (byte) 0
Constant inlined main::$1 = (byte) '+'
Constant inlined main::$0 = (byte) '0'
Successful SSA optimization Pass2ConstantInlining
Added new block during phi lifting main::@8(between main::@4 and main::@1)
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 @end
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@3
Adding NOP phi() at start of main::@2
CALL GRAPH
Calls in [] to main:2
Created 3 initial phi equivalence classes
Coalesced [15] main::i#6 ← main::i#1
Coalesced [16] main::idx#6 ← main::idx#1
Coalesced down to 3 phi equivalence classes
Culled Empty Block (label) @2
Culled Empty Block (label) main::@3
Culled Empty Block (label) main::@8
Renumbering block main::@4 to main::@3
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @1
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@2
FINAL CONTROL FLOW GRAPH
@begin: scope:[] from
[0] phi()
to:@1
@1: scope:[] from @begin
[1] phi()
[2] call main
to:@end
@end: scope:[] from @1
[3] phi()
main: scope:[main] from @1
[4] phi()
to:main::@1
main::@1: scope:[main] from main main::@3
[5] (byte) main::idx#2 ← phi( main/(byte) 0 main::@3/(byte) main::idx#1 )
[5] (signed byte) main::i#2 ← phi( main/(signed byte) -2 main::@3/(signed byte) main::i#1 )
[6] if((signed byte) 0!=(signed byte) main::i#2) goto main::@2
to:main::@3
main::@2: scope:[main] from main::@1
[7] phi()
to:main::@3
main::@3: scope:[main] from main::@1 main::@2
[8] (byte) main::j#0 ← phi( main::@2/(byte) '+' main::@1/(byte) '0' )
[9] *((const byte*) SCREEN#0 + (byte) main::idx#2) ← (byte) main::j#0
[10] (byte) main::idx#1 ← ++ (byte) main::idx#2
[11] (signed byte) main::i#1 ← ++ (signed byte) main::i#2
[12] if((signed byte) main::i#1!=(signed byte) 3) goto main::@1
to:main::@return
main::@return: scope:[main] from main::@3
[13] return
to:@return
VARIABLE REGISTER WEIGHTS
(byte*) SCREEN
(void()) main()
(signed byte) main::i
(signed byte) main::i#1 16.5
(signed byte) main::i#2 5.5
(byte) main::idx
(byte) main::idx#1 7.333333333333333
(byte) main::idx#2 6.6000000000000005
(byte) main::j
(byte) main::j#0 11.0
Initial phi equivalence classes
[ main::i#2 main::i#1 ]
[ main::idx#2 main::idx#1 ]
[ main::j#0 ]
Complete equivalence classes
[ main::i#2 main::i#1 ]
[ main::idx#2 main::idx#1 ]
[ main::j#0 ]
Allocated zp ZP_BYTE:2 [ main::i#2 main::i#1 ]
Allocated zp ZP_BYTE:3 [ main::idx#2 main::idx#1 ]
Allocated zp ZP_BYTE:4 [ main::j#0 ]
INITIAL ASM
//SEG0 File Comments
// Tests using integer conditions in ternary operator
// This should produce '++0++' at the top of the screen
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG2 Global Constants & labels
.label SCREEN = $400
//SEG3 @begin
bbegin:
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
b1_from_bbegin:
jmp b1
//SEG5 @1
b1:
//SEG6 [2] call main
//SEG7 [4] phi from @1 to main [phi:@1->main]
main_from_b1:
jsr main
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
bend_from_b1:
jmp bend
//SEG9 @end
bend:
//SEG10 main
main: {
.label j = 4
.label idx = 3
.label i = 2
//SEG11 [5] phi from main to main::@1 [phi:main->main::@1]
b1_from_main:
//SEG12 [5] phi (byte) main::idx#2 = (byte) 0 [phi:main->main::@1#0] -- vbuz1=vbuc1
lda #0
sta idx
//SEG13 [5] phi (signed byte) main::i#2 = (signed byte) -2 [phi:main->main::@1#1] -- vbsz1=vbsc1
lda #-2
sta i
jmp b1
//SEG14 [5] phi from main::@3 to main::@1 [phi:main::@3->main::@1]
b1_from_b3:
//SEG15 [5] phi (byte) main::idx#2 = (byte) main::idx#1 [phi:main::@3->main::@1#0] -- register_copy
//SEG16 [5] phi (signed byte) main::i#2 = (signed byte) main::i#1 [phi:main::@3->main::@1#1] -- register_copy
jmp b1
//SEG17 main::@1
b1:
//SEG18 [6] if((signed byte) 0!=(signed byte) main::i#2) goto main::@2 -- vbsc1_neq_vbsz1_then_la1
lda #0
cmp i
bne b2_from_b1
//SEG19 [8] phi from main::@1 to main::@3 [phi:main::@1->main::@3]
b3_from_b1:
//SEG20 [8] phi (byte) main::j#0 = (byte) '0' [phi:main::@1->main::@3#0] -- vbuz1=vbuc1
lda #'0'
sta j
jmp b3
//SEG21 [7] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
b2_from_b1:
jmp b2
//SEG22 main::@2
b2:
//SEG23 [8] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
b3_from_b2:
//SEG24 [8] phi (byte) main::j#0 = (byte) '+' [phi:main::@2->main::@3#0] -- vbuz1=vbuc1
lda #'+'
sta j
jmp b3
//SEG25 main::@3
b3:
//SEG26 [9] *((const byte*) SCREEN#0 + (byte) main::idx#2) ← (byte) main::j#0 -- pbuc1_derefidx_vbuz1=vbuz2
lda j
ldy idx
sta SCREEN,y
//SEG27 [10] (byte) main::idx#1 ← ++ (byte) main::idx#2 -- vbuz1=_inc_vbuz1
inc idx
//SEG28 [11] (signed byte) main::i#1 ← ++ (signed byte) main::i#2 -- vbsz1=_inc_vbsz1
inc i
//SEG29 [12] if((signed byte) main::i#1!=(signed byte) 3) goto main::@1 -- vbsz1_neq_vbsc1_then_la1
lda #3
cmp i
bne b1_from_b3
jmp breturn
//SEG30 main::@return
breturn:
//SEG31 [13] return
rts
}
REGISTER UPLIFT POTENTIAL REGISTERS
Potential registers zp ZP_BYTE:2 [ main::i#2 main::i#1 ] : zp ZP_BYTE:2 , reg byte a , reg byte x , reg byte y ,
Potential registers zp ZP_BYTE:3 [ main::idx#2 main::idx#1 ] : zp ZP_BYTE:3 , reg byte a , reg byte x , reg byte y ,
Potential registers zp ZP_BYTE:4 [ main::j#0 ] : zp ZP_BYTE:4 , reg byte a , reg byte x , reg byte y ,
REGISTER UPLIFT SCOPES
Uplift Scope [main] 22: zp ZP_BYTE:2 [ main::i#2 main::i#1 ] 13.93: zp ZP_BYTE:3 [ main::idx#2 main::idx#1 ] 11: zp ZP_BYTE:4 [ main::j#0 ]
Uplift Scope []
Uplifting [main] best 458 combination reg byte y [ main::i#2 main::i#1 ] reg byte x [ main::idx#2 main::idx#1 ] reg byte a [ main::j#0 ]
Uplifting [] best 458 combination
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 File Comments
// Tests using integer conditions in ternary operator
// This should produce '++0++' at the top of the screen
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG2 Global Constants & labels
.label SCREEN = $400
//SEG3 @begin
bbegin:
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
b1_from_bbegin:
jmp b1
//SEG5 @1
b1:
//SEG6 [2] call main
//SEG7 [4] phi from @1 to main [phi:@1->main]
main_from_b1:
jsr main
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
bend_from_b1:
jmp bend
//SEG9 @end
bend:
//SEG10 main
main: {
//SEG11 [5] phi from main to main::@1 [phi:main->main::@1]
b1_from_main:
//SEG12 [5] phi (byte) main::idx#2 = (byte) 0 [phi:main->main::@1#0] -- vbuxx=vbuc1
ldx #0
//SEG13 [5] phi (signed byte) main::i#2 = (signed byte) -2 [phi:main->main::@1#1] -- vbsyy=vbsc1
ldy #-2
jmp b1
//SEG14 [5] phi from main::@3 to main::@1 [phi:main::@3->main::@1]
b1_from_b3:
//SEG15 [5] phi (byte) main::idx#2 = (byte) main::idx#1 [phi:main::@3->main::@1#0] -- register_copy
//SEG16 [5] phi (signed byte) main::i#2 = (signed byte) main::i#1 [phi:main::@3->main::@1#1] -- register_copy
jmp b1
//SEG17 main::@1
b1:
//SEG18 [6] if((signed byte) 0!=(signed byte) main::i#2) goto main::@2 -- vbsc1_neq_vbsyy_then_la1
cpy #0
bne b2_from_b1
//SEG19 [8] phi from main::@1 to main::@3 [phi:main::@1->main::@3]
b3_from_b1:
//SEG20 [8] phi (byte) main::j#0 = (byte) '0' [phi:main::@1->main::@3#0] -- vbuaa=vbuc1
lda #'0'
jmp b3
//SEG21 [7] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
b2_from_b1:
jmp b2
//SEG22 main::@2
b2:
//SEG23 [8] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
b3_from_b2:
//SEG24 [8] phi (byte) main::j#0 = (byte) '+' [phi:main::@2->main::@3#0] -- vbuaa=vbuc1
lda #'+'
jmp b3
//SEG25 main::@3
b3:
//SEG26 [9] *((const byte*) SCREEN#0 + (byte) main::idx#2) ← (byte) main::j#0 -- pbuc1_derefidx_vbuxx=vbuaa
sta SCREEN,x
//SEG27 [10] (byte) main::idx#1 ← ++ (byte) main::idx#2 -- vbuxx=_inc_vbuxx
inx
//SEG28 [11] (signed byte) main::i#1 ← ++ (signed byte) main::i#2 -- vbsyy=_inc_vbsyy
iny
//SEG29 [12] if((signed byte) main::i#1!=(signed byte) 3) goto main::@1 -- vbsyy_neq_vbsc1_then_la1
cpy #3
bne b1_from_b3
jmp breturn
//SEG30 main::@return
breturn:
//SEG31 [13] return
rts
}
ASSEMBLER OPTIMIZATIONS
Removing instruction jmp b1
Removing instruction jmp bend
Removing instruction jmp b1
Removing instruction jmp b2
Removing instruction jmp b3
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Replacing label b2_from_b1 with b2
Replacing label b1_from_b3 with b1
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction main_from_b1:
Removing instruction bend_from_b1:
Removing instruction b1_from_b3:
Removing instruction b2_from_b1:
Removing instruction b3_from_b2:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction bend:
Removing instruction b1_from_main:
Removing instruction b3_from_b1:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction jmp b1
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @1
(label) @begin
(label) @end
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = (byte*) 1024
(void()) main()
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@return
(signed byte) main::i
(signed byte) main::i#1 reg byte y 16.5
(signed byte) main::i#2 reg byte y 5.5
(byte) main::idx
(byte) main::idx#1 reg byte x 7.333333333333333
(byte) main::idx#2 reg byte x 6.6000000000000005
(byte) main::j
(byte) main::j#0 reg byte a 11.0
reg byte y [ main::i#2 main::i#1 ]
reg byte x [ main::idx#2 main::idx#1 ]
reg byte a [ main::j#0 ]
FINAL ASSEMBLER
Score: 296
//SEG0 File Comments
// Tests using integer conditions in ternary operator
// This should produce '++0++' at the top of the screen
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
//SEG2 Global Constants & labels
.label SCREEN = $400
//SEG3 @begin
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
//SEG5 @1
//SEG6 [2] call main
//SEG7 [4] phi from @1 to main [phi:@1->main]
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
//SEG9 @end
//SEG10 main
main: {
//SEG11 [5] phi from main to main::@1 [phi:main->main::@1]
//SEG12 [5] phi (byte) main::idx#2 = (byte) 0 [phi:main->main::@1#0] -- vbuxx=vbuc1
ldx #0
//SEG13 [5] phi (signed byte) main::i#2 = (signed byte) -2 [phi:main->main::@1#1] -- vbsyy=vbsc1
ldy #-2
//SEG14 [5] phi from main::@3 to main::@1 [phi:main::@3->main::@1]
//SEG15 [5] phi (byte) main::idx#2 = (byte) main::idx#1 [phi:main::@3->main::@1#0] -- register_copy
//SEG16 [5] phi (signed byte) main::i#2 = (signed byte) main::i#1 [phi:main::@3->main::@1#1] -- register_copy
//SEG17 main::@1
b1:
//SEG18 [6] if((signed byte) 0!=(signed byte) main::i#2) goto main::@2 -- vbsc1_neq_vbsyy_then_la1
cpy #0
bne b2
//SEG19 [8] phi from main::@1 to main::@3 [phi:main::@1->main::@3]
//SEG20 [8] phi (byte) main::j#0 = (byte) '0' [phi:main::@1->main::@3#0] -- vbuaa=vbuc1
lda #'0'
jmp b3
//SEG21 [7] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
//SEG22 main::@2
b2:
//SEG23 [8] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
//SEG24 [8] phi (byte) main::j#0 = (byte) '+' [phi:main::@2->main::@3#0] -- vbuaa=vbuc1
lda #'+'
//SEG25 main::@3
b3:
//SEG26 [9] *((const byte*) SCREEN#0 + (byte) main::idx#2) ← (byte) main::j#0 -- pbuc1_derefidx_vbuxx=vbuaa
sta SCREEN,x
//SEG27 [10] (byte) main::idx#1 ← ++ (byte) main::idx#2 -- vbuxx=_inc_vbuxx
inx
//SEG28 [11] (signed byte) main::i#1 ← ++ (signed byte) main::i#2 -- vbsyy=_inc_vbsyy
iny
//SEG29 [12] if((signed byte) main::i#1!=(signed byte) 3) goto main::@1 -- vbsyy_neq_vbsc1_then_la1
cpy #3
bne b1
//SEG30 main::@return
//SEG31 [13] return
rts
}

View File

@ -0,0 +1 @@
program

View File

@ -0,0 +1,63 @@
// Tests using integer conditions in && and || operator
// This should produce '01010101', '00110011', '00010001', '01110111' at the top of the screen
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
.label SCREEN = $400
main: {
.label _8 = 2
.label _9 = 3
.label _14 = 4
.label _15 = 5
ldx #0
ldy #0
b1:
tya
and #1
cmp #0
beq b2
lda #'+'
sta SCREEN,x
b2:
tya
and #2
cmp #0
beq b3
lda #'+'
sta SCREEN+$28*1,x
b3:
tya
and #1
sta _8
tya
and #2
sta _9
lda #0
cmp _8
beq b4
cmp _9
beq b4
lda #'+'
sta SCREEN+$28*2,x
b4:
tya
and #1
sta _14
tya
and #2
sta _15
lda #0
cmp _14
bne b9
cmp _15
beq b5
b9:
lda #'+'
sta SCREEN+$28*3,x
b5:
inx
iny
cpy #8
bne b1
rts
}

View File

@ -0,0 +1,58 @@
@begin: scope:[] from
[0] phi()
to:@1
@1: scope:[] from @begin
[1] phi()
[2] call main
to:@end
@end: scope:[] from @1
[3] phi()
main: scope:[main] from @1
[4] phi()
to:main::@1
main::@1: scope:[main] from main main::@5
[5] (byte) main::idx#10 ← phi( main/(byte) 0 main::@5/(byte) main::idx#1 )
[5] (byte) main::i#10 ← phi( main/(byte) 0 main::@5/(byte) main::i#1 )
[6] (byte~) main::$0 ← (byte) main::i#10 & (byte) 1
[7] if((byte) 0==(byte~) main::$0) goto main::@2
to:main::@6
main::@6: scope:[main] from main::@1
[8] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) '+'
to:main::@2
main::@2: scope:[main] from main::@1 main::@6
[9] (byte~) main::$4 ← (byte) main::i#10 & (byte) 2
[10] if((byte) 0==(byte~) main::$4) goto main::@3
to:main::@7
main::@7: scope:[main] from main::@2
[11] *((const byte*) SCREEN#0+(byte)(number) $28*(number) 1 + (byte) main::idx#10) ← (byte) '+'
to:main::@3
main::@3: scope:[main] from main::@2 main::@7
[12] (byte~) main::$8 ← (byte) main::i#10 & (byte) 1
[13] (byte~) main::$9 ← (byte) main::i#10 & (byte) 2
[14] if((byte) 0==(byte~) main::$8) goto main::@4
to:main::@10
main::@10: scope:[main] from main::@3
[15] if((byte) 0==(byte~) main::$9) goto main::@4
to:main::@8
main::@8: scope:[main] from main::@10
[16] *((const byte*) SCREEN#0+(byte)(number) $28*(number) 2 + (byte) main::idx#10) ← (byte) '+'
to:main::@4
main::@4: scope:[main] from main::@10 main::@3 main::@8
[17] (byte~) main::$14 ← (byte) main::i#10 & (byte) 1
[18] (byte~) main::$15 ← (byte) main::i#10 & (byte) 2
[19] if((byte) 0!=(byte~) main::$14) goto main::@9
to:main::@11
main::@11: scope:[main] from main::@4
[20] if((byte) 0==(byte~) main::$15) goto main::@5
to:main::@9
main::@9: scope:[main] from main::@11 main::@4
[21] *((const byte*) SCREEN#0+(byte)(number) $28*(number) 3 + (byte) main::idx#10) ← (byte) '+'
to:main::@5
main::@5: scope:[main] from main::@11 main::@9
[22] (byte) main::idx#1 ← ++ (byte) main::idx#10
[23] (byte) main::i#1 ← ++ (byte) main::i#10
[24] if((byte) main::i#1!=(byte) 8) goto main::@1
to:main::@return
main::@return: scope:[main] from main::@5
[25] return
to:@return

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
program

View File

@ -0,0 +1,10 @@
// Tests a condition type mismatch (not boolean)
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
main: {
.label screen = $400
lda #'a'
sta screen
rts
}

View File

@ -0,0 +1,18 @@
@begin: scope:[] from
[0] phi()
to:@1
@1: scope:[] from @begin
[1] phi()
[2] call main
to:@end
@end: scope:[] from @1
[3] phi()
main: scope:[main] from @1
[4] phi()
to:main::@1
main::@1: scope:[main] from main
[5] *((const byte*) main::screen#0) ← (byte) 'a'
to:main::@return
main::@return: scope:[main] from main::@1
[6] return
to:@return

View File

@ -0,0 +1,267 @@
Warning! Adding boolean cast to non-boolean sub-expression (byte) main::b
Adding pointer type conversion cast (byte*) main::screen in (byte*) main::screen ← (number) $400
Identified constant variable (byte) main::b
Identified constant variable (byte*) main::screen
Culled Empty Block (label) main::@1
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
to:@1
main: scope:[main] from @1
(byte) main::b#0 ← (number) $c
(bool~) main::$1 ← (number) 0 != (byte) main::b#0
(bool~) main::$0 ← ! (bool~) main::$1
if((bool~) main::$0) goto main::@return
to:main::@2
main::@2: scope:[main] from main
(byte*) main::screen#0 ← ((byte*)) (number) $400
*((byte*) main::screen#0) ← (byte) 'a'
to:main::@return
main::@return: scope:[main] from main main::@2
return
to:@return
@1: scope:[] from @begin
call main
to:@2
@2: scope:[] from @1
to:@end
@end: scope:[] from @2
SYMBOL TABLE SSA
(label) @1
(label) @2
(label) @begin
(label) @end
(void()) main()
(bool~) main::$0
(bool~) main::$1
(label) main::@2
(label) main::@return
(byte) main::b
(byte) main::b#0
(byte*) main::screen
(byte*) main::screen#0
Adding number conversion cast (unumber) $c in (byte) main::b#0 ← (number) $c
Adding number conversion cast (unumber) 0 in (bool~) main::$1 ← (number) 0 != (byte) main::b#0
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte) main::b#0 ← (unumber)(number) $c
Inlining cast (byte*) main::screen#0 ← (byte*)(number) $400
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast $c
Simplifying constant integer cast 0
Simplifying constant pointer cast (byte*) 1024
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) $c
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inversing boolean not [2] (bool~) main::$0 ← (byte) 0 == (byte) main::b#0 from [1] (bool~) main::$1 ← (byte) 0 != (byte) main::b#0
Successful SSA optimization Pass2UnaryNotSimplification
Simple Condition (bool~) main::$0 [3] if((byte) 0==(byte) main::b#0) goto main::@return
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant (const byte) main::b#0 = $c
Constant (const byte*) main::screen#0 = (byte*) 1024
Successful SSA optimization Pass2ConstantIdentification
if() condition always false - eliminating [3] if((byte) 0==(const byte) main::b#0) goto main::@return
Successful SSA optimization Pass2ConstantIfs
Eliminating unused constant (const byte) main::b#0
Successful SSA optimization PassNEliminateUnusedVars
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 @end
Adding NOP phi() at start of main
CALL GRAPH
Calls in [] to main:2
Created 0 initial phi equivalence classes
Coalesced down to 0 phi equivalence classes
Culled Empty Block (label) @2
Renumbering block main::@2 to main::@1
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @1
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
FINAL CONTROL FLOW GRAPH
@begin: scope:[] from
[0] phi()
to:@1
@1: scope:[] from @begin
[1] phi()
[2] call main
to:@end
@end: scope:[] from @1
[3] phi()
main: scope:[main] from @1
[4] phi()
to:main::@1
main::@1: scope:[main] from main
[5] *((const byte*) main::screen#0) ← (byte) 'a'
to:main::@return
main::@return: scope:[main] from main::@1
[6] return
to:@return
VARIABLE REGISTER WEIGHTS
(void()) main()
(byte) main::b
(byte*) main::screen
Initial phi equivalence classes
Complete equivalence classes
INITIAL ASM
//SEG0 File Comments
// Tests a condition type mismatch (not boolean)
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG2 Global Constants & labels
//SEG3 @begin
bbegin:
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
b1_from_bbegin:
jmp b1
//SEG5 @1
b1:
//SEG6 [2] call main
//SEG7 [4] phi from @1 to main [phi:@1->main]
main_from_b1:
jsr main
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
bend_from_b1:
jmp bend
//SEG9 @end
bend:
//SEG10 main
main: {
.label screen = $400
jmp b1
//SEG11 main::@1
b1:
//SEG12 [5] *((const byte*) main::screen#0) ← (byte) 'a' -- _deref_pbuc1=vbuc2
lda #'a'
sta screen
jmp breturn
//SEG13 main::@return
breturn:
//SEG14 [6] return
rts
}
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [5] *((const byte*) main::screen#0) ← (byte) 'a' [ ] ( main:2 [ ] ) always clobbers reg byte a
REGISTER UPLIFT SCOPES
Uplift Scope [main]
Uplift Scope []
Uplifting [main] best 57 combination
Uplifting [] best 57 combination
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 File Comments
// Tests a condition type mismatch (not boolean)
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG2 Global Constants & labels
//SEG3 @begin
bbegin:
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
b1_from_bbegin:
jmp b1
//SEG5 @1
b1:
//SEG6 [2] call main
//SEG7 [4] phi from @1 to main [phi:@1->main]
main_from_b1:
jsr main
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
bend_from_b1:
jmp bend
//SEG9 @end
bend:
//SEG10 main
main: {
.label screen = $400
jmp b1
//SEG11 main::@1
b1:
//SEG12 [5] *((const byte*) main::screen#0) ← (byte) 'a' -- _deref_pbuc1=vbuc2
lda #'a'
sta screen
jmp breturn
//SEG13 main::@return
breturn:
//SEG14 [6] return
rts
}
ASSEMBLER OPTIMIZATIONS
Removing instruction jmp b1
Removing instruction jmp bend
Removing instruction jmp b1
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction main_from_b1:
Removing instruction bend_from_b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction bend:
Removing instruction b1:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @1
(label) @begin
(label) @end
(void()) main()
(label) main::@1
(label) main::@return
(byte) main::b
(byte*) main::screen
(const byte*) main::screen#0 screen = (byte*) 1024
FINAL ASSEMBLER
Score: 12
//SEG0 File Comments
// Tests a condition type mismatch (not boolean)
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
//SEG2 Global Constants & labels
//SEG3 @begin
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
//SEG5 @1
//SEG6 [2] call main
//SEG7 [4] phi from @1 to main [phi:@1->main]
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
//SEG9 @end
//SEG10 main
main: {
.label screen = $400
//SEG11 main::@1
//SEG12 [5] *((const byte*) main::screen#0) ← (byte) 'a' -- _deref_pbuc1=vbuc2
lda #'a'
sta screen
//SEG13 main::@return
//SEG14 [6] return
rts
}

View File

@ -0,0 +1 @@
program

View File

@ -12,7 +12,7 @@ main: scope:[main] from @1
(byte) main::BLACK#0 ← (number) 0
(byte*) main::screen#0 ← ((byte*)) (number) $400
(byte*) main::cols#0 ← ((byte*)) (number) $d800
(byte) main::x#0 ← (number) 0
(byte) main::x#0 ← (byte) 0
to:main::@1
main::@1: scope:[main] from main main::@1
(byte) main::x#2 ← phi( main/(byte) main::x#0 main::@1/(byte) main::x#1 )
@ -58,23 +58,19 @@ SYMBOL TABLE SSA
(byte) main::y#0
Adding number conversion cast (unumber) 0 in (byte) main::BLACK#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) main::x#0 ← (number) 0
Adding number conversion cast (unumber) $c in (number~) main::$0 ← (byte) main::x#2 + (number) $c
Adding number conversion cast (unumber) main::$0 in (number~) main::$0 ← (byte) main::x#2 + (unumber)(number) $c
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte) main::BLACK#0 ← (unumber)(number) 0
Inlining cast (byte*) main::screen#0 ← (byte*)(number) $400
Inlining cast (byte*) main::cols#0 ← (byte*)(number) $d800
Inlining cast (byte) main::x#0 ← (unumber)(number) 0
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast 0
Simplifying constant pointer cast (byte*) 1024
Simplifying constant pointer cast (byte*) 55296
Simplifying constant integer cast 0
Simplifying constant integer cast $c
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $c
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in (unumber~) main::$0 ← (byte) main::x#2 + (byte) $c

View File

@ -6,7 +6,7 @@ CONTROL FLOW GRAPH SSA
(byte*) screen#0 ← ((byte*)) (number) $400
to:@1
main: scope:[main] from @1
(byte) main::j#0 ← (number) 0
(byte) main::j#0 ← (byte) 0
to:main::@1
main::@1: scope:[main] from main main::@1
(byte) main::j#2 ← phi( main/(byte) main::j#0 main::@1/(byte) main::j#1 )
@ -52,7 +52,6 @@ SYMBOL TABLE SSA
(byte*) screen
(byte*) screen#0
Adding number conversion cast (unumber) 0 in (byte) main::j#0 ← (number) 0
Adding number conversion cast (unumber) $28 in (number~) main::$0 ← (number) $28 * (byte) main::j#2
Adding number conversion cast (unumber) main::$0 in (number~) main::$0 ← (unumber)(number) $28 * (byte) main::j#2
Adding number conversion cast (unumber) $27 in (byte*~) main::$2 ← (byte*~) main::$1 + (number) $27
@ -64,12 +63,10 @@ Adding number conversion cast (unumber) main::$4 in (number~) main::$4 ← (unum
Adding number conversion cast (unumber) 0 in *((byte*) screen#0 + (unumber~) main::$4) ← (number) 0
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) screen#0 ← (byte*)(number) $400
Inlining cast (byte) main::j#0 ← (unumber)(number) 0
Inlining cast *((byte*~) main::$2) ← (unumber)(number) 0
Inlining cast *((byte*) screen#0 + (unumber~) main::$4) ← (unumber)(number) 0
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 0
Simplifying constant integer cast $28
Simplifying constant integer cast $27
Simplifying constant integer cast 0
@ -77,7 +74,6 @@ Simplifying constant integer cast $28
Simplifying constant integer cast $26
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) $27
Finalized unsigned number type (byte) 0

View File

@ -14,7 +14,7 @@ CONTROL FLOW GRAPH SSA
(byte*) SCREEN#0 ← ((byte*)) (number) $400
to:@3
main: scope:[main] from @3
(byte) main::i#0 ← (number) 0
(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 )
@ -139,7 +139,6 @@ SYMBOL TABLE SSA
(byte*) plots
(byte*) plots#0
Adding number conversion cast (unumber) 0 in (byte) main::i#0 ← (number) 0
Adding number conversion cast (unumber) 0 in *((byte*) SCREEN#0 + (byte) main::i#2) ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) line::x0#0 ← (number) 0
Adding number conversion cast (unumber) $a in (byte) line::x1#0 ← (number) $a
@ -148,7 +147,6 @@ Adding number conversion cast (unumber) plot::$0 in (number~) plot::$0 ← *((by
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) plots#0 ← (byte*)(number) $1000
Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400
Inlining cast (byte) main::i#0 ← (unumber)(number) 0
Inlining cast *((byte*) SCREEN#0 + (byte) main::i#2) ← (unumber)(number) 0
Inlining cast (byte) line::x0#0 ← (unumber)(number) 0
Inlining cast (byte) line::x1#0 ← (unumber)(number) $a
@ -157,13 +155,11 @@ Simplifying constant pointer cast (byte*) 4096
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $a
Simplifying constant integer cast 1
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $a
Finalized unsigned number type (byte) 1
Successful SSA optimization PassNFinalizeNumberTypeConversions

View File

@ -6,7 +6,7 @@ CONTROL FLOW GRAPH SSA
(byte*) SCREEN#0 ← ((byte*)) (number) $400
to:@1
main: scope:[main] from @1
(byte) main::i#0 ← (number) $79
(byte) main::i#0 ← (byte) $79
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 )
@ -43,17 +43,13 @@ SYMBOL TABLE SSA
(byte) main::i#1
(byte) main::i#2
Adding number conversion cast (unumber) $79 in (byte) main::i#0 ← (number) $79
Adding number conversion cast (unumber) 4 in (byte~) main::$0 ← (byte) main::i#2 >> (number) 4
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400
Inlining cast (byte) main::i#0 ← (unumber)(number) $79
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast $79
Simplifying constant integer cast 4
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) $79
Finalized unsigned number type (byte) 4
Successful SSA optimization PassNFinalizeNumberTypeConversions
Simple Condition (bool~) main::$1 [7] if((byte) main::i#1!=rangelast($79,$7a)) goto main::@1

View File

@ -8,7 +8,7 @@ CONTROL FLOW GRAPH SSA
(signed word[3]) world#0 ← { fill( 3, 0) }
to:@1
main: scope:[main] from @1
(byte) main::i#0 ← (number) 0
(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 )
@ -55,21 +55,17 @@ SYMBOL TABLE SSA
(signed word[3]) world
(signed word[3]) world#0
Adding number conversion cast (unumber) 0 in (byte) main::i#0 ← (number) 0
Adding number conversion cast (snumber) $190 in *((signed word[3]) world#0 + (byte~) main::$1) ← (number) $190
Adding number conversion cast (unumber) 0 in (number~) main::$2 ← (number) 0 * (const byte) SIZEOF_SIGNED_WORD
Adding number conversion cast (unumber) main::$2 in (number~) main::$2 ← (unumber)(number) 0 * (const byte) SIZEOF_SIGNED_WORD
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte) main::i#0 ← (unumber)(number) 0
Inlining cast *((signed word[3]) world#0 + (byte~) main::$1) ← (snumber)(number) $190
Inlining cast (signed word*) main::screen#0 ← (signed word*)(number) $400
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast 0
Simplifying constant integer cast $190
Simplifying constant pointer cast (signed word*) 1024
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
Finalized signed number type (signed word) $190
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions

View File

@ -8,7 +8,7 @@ CONTROL FLOW GRAPH SSA
main: scope:[main] from @1
(byte[]) main::s#0 ← (const string) main::$1
(byte*) main::SCREEN#0 ← ((byte*)) (number) $400
(byte) main::i#0 ← (number) 0
(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 )
@ -46,16 +46,10 @@ SYMBOL TABLE SSA
(byte[]) main::s
(byte[]) main::s#0
Adding number conversion cast (unumber) 0 in (byte) main::i#0 ← (number) 0
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) main::SCREEN#0 ← (byte*)(number) $400
Inlining cast (byte) main::i#0 ← (unumber)(number) 0
Successful SSA optimization Pass2InlineCast
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 [7] if((byte) main::i#1!=rangelast(0,7)) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant (const byte[]) main::s#0 = main::$1

View File

@ -19,7 +19,7 @@ main: scope:[main] from @1
(byte*) BGCOL#1 ← phi( @1/(byte*) BGCOL#2 )
*((byte*) SCREEN#0) ← (byte) STAR#0
*((byte*) BGCOL#1) ← (byte) RED#0
(byte) main::i#0 ← (number) $28
(byte) main::i#0 ← (byte) $28
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 )
@ -74,7 +74,6 @@ Adding number conversion cast (unumber) $51 in (byte) STAR#0 ← (number) $51
Adding number conversion cast (unumber) $0 in (byte*~) $1 ← (byte*) VIC#0 + (number~) $0
Adding number conversion cast (unumber) 1 in (byte*~) $2 ← (byte*~) $1 + (number) 1
Adding number conversion cast (unumber) 2 in (byte) RED#0 ← (number) 2
Adding number conversion cast (unumber) $28 in (byte) main::i#0 ← (number) $28
Adding number conversion cast (unumber) 1 in (number~) main::$0 ← (byte) STAR#0 + (number) 1
Adding number conversion cast (unumber) main::$0 in (number~) main::$0 ← (byte) STAR#0 + (unumber)(number) 1
Successful SSA optimization PassNAddNumberTypeConversions
@ -83,20 +82,17 @@ Inlining cast (byte) STAR#0 ← (unumber)(number) $51
Inlining cast (byte*) VIC#0 ← (byte*)(number) $d000
Inlining cast (unumber~) $3 ← (unumber)(number~) $0
Inlining cast (byte) RED#0 ← (unumber)(number) 2
Inlining cast (byte) main::i#0 ← (unumber)(number) $28
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast $51
Simplifying constant pointer cast (byte*) 53248
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast $28
Simplifying constant integer cast 1
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) $51
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) 1
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in (unumber~) main::$0 ← (byte) STAR#0 + (byte) 1

View File

@ -6,7 +6,7 @@ CONTROL FLOW GRAPH SSA
to:@1
main: scope:[main] from @1
(byte*) main::screen#0 ← ((byte*)) (number) $400
(byte) main::i#0 ← (number) 0
(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 )
@ -45,19 +45,14 @@ SYMBOL TABLE SSA
(byte*) main::screen
(byte*) main::screen#0
Adding number conversion cast (unumber) 0 in (byte) main::i#0 ← (number) 0
Adding number conversion cast (unumber) main::$0 in (number~) main::$1 ← (number~) main::$0 + (byte) main::i#2
Adding number conversion cast (unumber) main::$1 in (number~) main::$1 ← (unumber~) main::$3 + (byte) main::i#2
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) main::screen#0 ← (byte*)(number) $400
Inlining cast (byte) main::i#0 ← (unumber)(number) 0
Inlining cast (unumber~) main::$3 ← (unumber)(number~) main::$0
Successful SSA optimization Pass2InlineCast
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::$2 [9] if((byte) main::i#1!=rangelast(0,$27)) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant right-side identified [3] (number~) main::$0 ← (number) $28 * (number) $a

View File

@ -6,7 +6,7 @@ CONTROL FLOW GRAPH SSA
to:@1
main: scope:[main] from @1
(byte*) main::SCREEN#0 ← ((byte*)) (number) $400
(byte) main::i#0 ← (number) 0
(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 )
@ -84,7 +84,6 @@ SYMBOL TABLE SSA
(signed byte) main::sb
(signed byte) main::sb#0
Adding number conversion cast (unumber) 0 in (byte) main::i#0 ← (number) 0
Adding number conversion cast (unumber) main::$0 in (byte*~) main::$1 ← (byte*) main::SCREEN#0 + (number~) main::$0
Adding number conversion cast (unumber) 1 in (number~) main::$2 ← (byte) main::i#2 / (number) 1
Adding number conversion cast (unumber) main::$2 in (number~) main::$2 ← (byte) main::i#2 / (unumber)(number) 1
@ -102,7 +101,6 @@ Adding number conversion cast (snumber) 2 in (number~) main::$16 ← (signed byt
Adding number conversion cast (snumber) main::$16 in (number~) main::$16 ← (signed byte) main::sb#0 / (snumber)(number) 2
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) main::SCREEN#0 ← (byte*)(number) $400
Inlining cast (byte) main::i#0 ← (unumber)(number) 0
Inlining cast (unumber~) main::$19 ← (unumber)(number~) main::$0
Inlining cast (unumber~) main::$20 ← (unumber)(number~) main::$3
Inlining cast (unumber~) main::$21 ← (unumber)(number~) main::$6
@ -112,14 +110,12 @@ Inlining cast (unumber~) main::$23 ← (unumber)(number~) main::$14
Inlining cast (byte~) main::$17 ← (byte)(snumber~) main::$16
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 4
Simplifying constant integer cast 8
Simplifying constant integer cast 2
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) 4

View File

@ -13,7 +13,7 @@ CONTROL FLOW GRAPH SSA
(byte*) COLS#0 ← ((byte*)) (number) $d800
to:@1
main: scope:[main] from @1
(byte) main::x#0 ← (number) 0
(byte) main::x#0 ← (byte) 0
to:main::@1
main::@1: scope:[main] from main main::@1
(byte) main::x#2 ← phi( main/(byte) main::x#0 main::@1/(byte) main::x#1 )
@ -97,7 +97,6 @@ SYMBOL TABLE SSA
(byte) main::x#1 !reg byte y
(byte) main::x#2 !reg byte y
Adding number conversion cast (unumber) 0 in (byte) main::x#0 ← (number) 0
Adding number conversion cast (unumber) $c8 in (number~) main::$0 ← (number) $c8 + (byte) main::x#2
Adding number conversion cast (unumber) main::$0 in (number~) main::$0 ← (unumber)(number) $c8 + (byte) main::x#2
Adding number conversion cast (unumber) $c8 in (number~) main::$1 ← (number) $c8 + (byte) main::x#2
@ -133,11 +132,9 @@ Adding number conversion cast (unumber) main::$15 in (number~) main::$15 ← (un
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400
Inlining cast (byte*) COLS#0 ← (byte*)(number) $d800
Inlining cast (byte) main::x#0 ← (unumber)(number) 0
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Simplifying constant pointer cast (byte*) 55296
Simplifying constant integer cast 0
Simplifying constant integer cast $c8
Simplifying constant integer cast $c8
Simplifying constant integer cast $c8
@ -155,7 +152,6 @@ Simplifying constant integer cast $320
Simplifying constant integer cast $320
Simplifying constant integer cast $320
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $c8
Finalized unsigned number type (byte) $c8
Finalized unsigned number type (byte) $c8

View File

@ -7,7 +7,7 @@ CONTROL FLOW GRAPH SSA
to:@1
main: scope:[main] from @1
(dword) main::a#0 ← (number) $ee6b2800
(byte) main::i#0 ← (number) 0
(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 )
@ -56,19 +56,15 @@ SYMBOL TABLE SSA
(byte) main::i#2
Adding number conversion cast (unumber) $ee6b2800 in (dword) main::a#0 ← (number) $ee6b2800
Adding number conversion cast (unumber) 0 in (byte) main::i#0 ← (number) 0
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (dword) main::a#0 ← (unumber)(number) $ee6b2800
Inlining cast (byte) main::i#0 ← (unumber)(number) 0
Inlining cast (byte~) main::$1 ← (byte)(dword) main::b#0
Inlining cast (byte*) main::SCREEN#0 ← (byte*)(number) $400
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast $ee6b2800
Simplifying constant integer cast 0
Simplifying constant pointer cast (byte*) 1024
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (dword) $ee6b2800
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias (dword) main::b#0 = (dword~) main::$0
Alias (byte) main::c#0 = (byte~) main::$1

View File

@ -524,7 +524,7 @@ anim::@28: scope:[anim] from anim::@27
(byte*) print_screen#45 ← phi( anim::@27/(byte*) print_screen#47 )
(signed byte) sy#29 ← phi( anim::@27/(signed byte) sy#30 )
(signed byte) sx#26 ← phi( anim::@27/(signed byte) sx#27 )
(byte) anim::i#0 ← (number) 0
(byte) anim::i#0 ← (byte) 0
to:anim::@22
anim::@22: scope:[anim] from anim::@28 anim::@29
(signed byte*) COSQ#14 ← phi( anim::@28/(signed byte*) COSQ#15 anim::@29/(signed byte*) COSQ#12 )
@ -690,7 +690,7 @@ debug_print_init::@17: scope:[debug_print_init] from debug_print_init::@16
(number~) debug_print_init::$42 ← (number) $10 * (number) $28
(byte*~) debug_print_init::$43 ← (byte*) debug_print_init::COLS#0 + (number~) debug_print_init::$42
(byte*) debug_print_init::at_cols#0 ← (byte*~) debug_print_init::$43
(byte) debug_print_init::i#0 ← (number) 0
(byte) debug_print_init::i#0 ← (byte) 0
to:debug_print_init::@1
debug_print_init::@1: scope:[debug_print_init] from debug_print_init::@17 debug_print_init::@3
(byte*) debug_print_init::at_cols#5 ← phi( debug_print_init::@17/(byte*) debug_print_init::at_cols#0 debug_print_init::@3/(byte*) debug_print_init::at_cols#6 )
@ -733,7 +733,7 @@ debug_print_init::@20: scope:[debug_print_init] from debug_print_init::@19
(byte) debug_print_init::c#7 ← phi( debug_print_init::@19/(byte) debug_print_init::c#4 )
(byte*) debug_print_init::at_cols#2 ← phi( debug_print_init::@19/(byte*) debug_print_init::at_cols#3 )
(byte) debug_print_init::i#7 ← phi( debug_print_init::@19/(byte) debug_print_init::i#4 )
(byte) debug_print_init::j#0 ← (number) 0
(byte) debug_print_init::j#0 ← (byte) 0
to:debug_print_init::@2
debug_print_init::@2: scope:[debug_print_init] from debug_print_init::@2 debug_print_init::@20
(byte*) debug_print_init::at_line#5 ← phi( debug_print_init::@2/(byte*) debug_print_init::at_line#5 debug_print_init::@20/(byte*) debug_print_init::at_line#6 )
@ -1066,7 +1066,7 @@ debug_print::@14: scope:[debug_print] from debug_print::@26
(byte*~) debug_print::$13 ← (byte*) SCREEN#0 + (number~) debug_print::$12
(byte*) debug_print::at_line#0 ← (byte*~) debug_print::$13
(byte) debug_print::c#0 ← (number) 4
(byte) debug_print::i#0 ← (number) 0
(byte) debug_print::i#0 ← (byte) 0
to:debug_print::@1
debug_print::@1: scope:[debug_print] from debug_print::@14 debug_print::@32
(byte) debug_print::i#2 ← phi( debug_print::@14/(byte) debug_print::i#0 debug_print::@32/(byte) debug_print::i#1 )
@ -1151,7 +1151,7 @@ sprites_init: scope:[sprites_init] from main
*((byte*) SPRITES_ENABLE#0) ← (number) $ff
(byte*~) sprites_init::$0 ← (byte*) sprites_init::SCREEN#0 + (number) $3f8
(byte*) sprites_init::sprites_ptr#0 ← (byte*~) sprites_init::$0
(byte) sprites_init::i#0 ← (number) 0
(byte) sprites_init::i#0 ← (byte) 0
to:sprites_init::@1
sprites_init::@1: scope:[sprites_init] from sprites_init sprites_init::@1
(byte) sprites_init::i#2 ← phi( sprites_init/(byte) sprites_init::i#0 sprites_init::@1/(byte) sprites_init::i#1 )
@ -2346,7 +2346,6 @@ Adding number conversion cast (snumber) 0 in (signed byte) sz#0 ← (number) 0
Adding number conversion cast (unumber) $ff in (bool~) anim::$0 ← *((byte*) RASTER#0) != (number) $ff
Adding number conversion cast (unumber) $fe in (bool~) anim::$1 ← *((byte*) RASTER#0) != (number) $fe
Adding number conversion cast (unumber) $fd in (bool~) anim::$2 ← *((byte*) RASTER#0) != (number) $fd
Adding number conversion cast (unumber) 0 in (byte) anim::i#0 ← (number) 0
Adding number conversion cast (unumber) 2 in (number~) anim::$6 ← (byte) anim::i#3 * (number) 2
Adding number conversion cast (unumber) anim::$6 in (number~) anim::$6 ← (byte) anim::i#3 * (unumber)(number) 2
Adding number conversion cast (unumber) $80 in (number~) anim::$8 ← (number) $80 + (byte~) anim::$7
@ -2373,11 +2372,9 @@ Adding number conversion cast (unumber) debug_print_init::$37 in (byte*~) debug_
Adding number conversion cast (unumber) debug_print_init::$40 in (byte*~) debug_print_init::$41 ← (byte*) SCREEN#0 + (number~) debug_print_init::$40
Adding number conversion cast (unumber) 4 in (byte) debug_print_init::c#0 ← (number) 4
Adding number conversion cast (unumber) debug_print_init::$42 in (byte*~) debug_print_init::$43 ← (byte*) debug_print_init::COLS#0 + (number~) debug_print_init::$42
Adding number conversion cast (unumber) 0 in (byte) debug_print_init::i#0 ← (number) 0
Adding number conversion cast (unumber) debug_print_init::$44 in (byte*~) debug_print_init::$45 ← (byte*) debug_print_init::at_line#1 + (number~) debug_print_init::$44
Adding number conversion cast (unumber) debug_print_init::$48 in (byte*~) debug_print_init::$49 ← (byte*) debug_print_init::at_line#2 + (number~) debug_print_init::$48
Adding number conversion cast (unumber) debug_print_init::$52 in (byte*~) debug_print_init::$53 ← (byte*) debug_print_init::at_line#3 + (number~) debug_print_init::$52
Adding number conversion cast (unumber) 0 in (byte) debug_print_init::j#0 ← (number) 0
Adding number conversion cast (unumber) 8 in (number~) debug_print_init::$56 ← (number) 8 + (byte) debug_print_init::i#5
Adding number conversion cast (unumber) debug_print_init::$56 in (number~) debug_print_init::$56 ← (unumber)(number) 8 + (byte) debug_print_init::i#5
Adding number conversion cast (unumber) debug_print_init::$57 in (byte*~) debug_print_init::$58 ← (byte*) debug_print_init::at_cols#1 + (number~) debug_print_init::$57
@ -2449,7 +2446,6 @@ Adding number conversion cast (unumber) $28 in (number~) debug_print::print_sbyt
Adding number conversion cast (unumber) debug_print::print_sbyte_pos12_$0#0 in (number~) debug_print::print_sbyte_pos12_$0#0 ← (byte) debug_print::print_sbyte_pos12_row#1 * (unumber)(number) $28
Adding number conversion cast (unumber) debug_print::$12 in (byte*~) debug_print::$13 ← (byte*) SCREEN#0 + (number~) debug_print::$12
Adding number conversion cast (unumber) 4 in (byte) debug_print::c#0 ← (number) 4
Adding number conversion cast (unumber) 0 in (byte) debug_print::i#0 ← (number) 0
Adding number conversion cast (unumber) debug_print::$14 in (byte*~) debug_print::$15 ← (byte*) debug_print::at_line#1 + (number~) debug_print::$14
Adding number conversion cast (unumber) debug_print::$18 in (byte*~) debug_print::$19 ← (byte*) debug_print::at_line#2 + (number~) debug_print::$18
Adding number conversion cast (unumber) debug_print::$22 in (byte*~) debug_print::$23 ← (byte*) debug_print::at_line#3 + (number~) debug_print::$22
@ -2459,7 +2455,6 @@ Adding number conversion cast (unumber) debug_print::$34 in (byte*~) debug_print
Adding number conversion cast (unumber) 4 in (byte) debug_print::c#1 ← (byte) debug_print::c#8 + (number) 4
Adding number conversion cast (unumber) $ff in *((byte*) SPRITES_ENABLE#0) ← (number) $ff
Adding number conversion cast (unumber) $3f8 in (byte*~) sprites_init::$0 ← (byte*) sprites_init::SCREEN#0 + (number) $3f8
Adding number conversion cast (unumber) 0 in (byte) sprites_init::i#0 ← (number) 0
Adding number conversion cast (unumber) $40 in (byte*~) sprites_init::$1 ← (byte*) SPRITE#0 / (number) $40
Adding number conversion cast (unumber) 0 in *((signed byte[9]) rotation_matrix#0 + (number) 0) ← (signed byte~) calculate_matrix::$10
Adding number conversion cast (unumber) 1 in *((signed byte[9]) rotation_matrix#0 + (number) 1) ← (signed byte~) calculate_matrix::$11
@ -2502,7 +2497,6 @@ Inlining cast (word~) main::$2 ← (word)(byte*) mulf_sqr2#0
Inlining cast (signed byte) sx#2 ← (snumber)(number) 0
Inlining cast (signed byte) sy#2 ← (snumber)(number) 0
Inlining cast (signed byte) sz#0 ← (snumber)(number) 0
Inlining cast (byte) anim::i#0 ← (unumber)(number) 0
Inlining cast (byte~) anim::$7 ← (byte)*((signed byte*) xp#0)
Inlining cast (byte~) anim::$9 ← (byte)*((signed byte*) yp#0)
Inlining cast (unumber~) debug_print_init::$95 ← (unumber)(number~) debug_print_init::$1
@ -2521,11 +2515,9 @@ Inlining cast (unumber~) debug_print_init::$107 ← (unumber)(number~) debug_pri
Inlining cast (byte) debug_print_init::c#0 ← (unumber)(number) 4
Inlining cast (byte*) debug_print_init::COLS#0 ← (byte*)(number) $d800
Inlining cast (unumber~) debug_print_init::$108 ← (unumber)(number~) debug_print_init::$42
Inlining cast (byte) debug_print_init::i#0 ← (unumber)(number) 0
Inlining cast (unumber~) debug_print_init::$109 ← (unumber)(number~) debug_print_init::$44
Inlining cast (unumber~) debug_print_init::$110 ← (unumber)(number~) debug_print_init::$48
Inlining cast (unumber~) debug_print_init::$111 ← (unumber)(number~) debug_print_init::$52
Inlining cast (byte) debug_print_init::j#0 ← (unumber)(number) 0
Inlining cast (unumber~) debug_print_init::$112 ← (unumber)(number~) debug_print_init::$57
Inlining cast (unumber~) debug_print_init::$113 ← (unumber)(number~) debug_print_init::$61
Inlining cast (unumber~) debug_print_init::$114 ← (unumber)(number~) debug_print_init::$65
@ -2561,7 +2553,6 @@ Inlining cast (byte) debug_print::print_sbyte_pos12_row#0 ← (unumber)(number)
Inlining cast (byte) debug_print::print_sbyte_pos12_col#0 ← (unumber)(number) $25
Inlining cast (unumber~) debug_print::$39 ← (unumber)(number~) debug_print::$12
Inlining cast (byte) debug_print::c#0 ← (unumber)(number) 4
Inlining cast (byte) debug_print::i#0 ← (unumber)(number) 0
Inlining cast (unumber~) debug_print::$40 ← (unumber)(number~) debug_print::$14
Inlining cast (unumber~) debug_print::$41 ← (unumber)(number~) debug_print::$18
Inlining cast (unumber~) debug_print::$42 ← (unumber)(number~) debug_print::$22
@ -2570,7 +2561,6 @@ Inlining cast (unumber~) debug_print::$44 ← (unumber)(number~) debug_print::$3
Inlining cast (unumber~) debug_print::$45 ← (unumber)(number~) debug_print::$34
Inlining cast (byte*) sprites_init::SCREEN#0 ← (byte*)(number) $400
Inlining cast *((byte*) SPRITES_ENABLE#0) ← (unumber)(number) $ff
Inlining cast (byte) sprites_init::i#0 ← (unumber)(number) 0
Inlining cast (byte~) sprites_init::$2 ← (byte)(byte*~) sprites_init::$1
Inlining cast (byte*) mulf_sqr1#0 ← (byte*)(number) $2400
Inlining cast (byte*) mulf_sqr2#0 ← (byte*)(number) $2600
@ -2638,7 +2628,6 @@ Simplifying constant integer cast 0
Simplifying constant integer cast $ff
Simplifying constant integer cast $fe
Simplifying constant integer cast $fd
Simplifying constant integer cast 0
Simplifying constant integer cast 2
Simplifying constant integer cast $80
Simplifying constant integer cast $80
@ -2649,8 +2638,6 @@ Simplifying constant integer cast $22
Simplifying constant integer cast $22
Simplifying constant integer cast 4
Simplifying constant pointer cast (byte*) 55296
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 8
Simplifying constant integer cast 4
Simplifying constant integer cast 0
@ -2699,12 +2686,10 @@ Simplifying constant integer cast 6
Simplifying constant integer cast $25
Simplifying constant integer cast $28
Simplifying constant integer cast 4
Simplifying constant integer cast 0
Simplifying constant integer cast 4
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast $ff
Simplifying constant integer cast $3f8
Simplifying constant integer cast 0
Simplifying constant integer cast $40
Simplifying constant integer cast 0
Simplifying constant integer cast 1
@ -2743,7 +2728,6 @@ Finalized signed number type (signed byte) 0
Finalized unsigned number type (byte) $ff
Finalized unsigned number type (byte) $fe
Finalized unsigned number type (byte) $fd
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) $80
Finalized unsigned number type (byte) $80
@ -2753,8 +2737,6 @@ Finalized unsigned number type (byte) $22
Finalized unsigned number type (byte) $22
Finalized unsigned number type (byte) $22
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 8
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) 0
@ -2803,11 +2785,9 @@ Finalized unsigned number type (byte) 6
Finalized unsigned number type (byte) $25
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) $ff
Finalized unsigned number type (word) $3f8
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $40
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1

View File

@ -454,7 +454,7 @@ perspective::@return: scope:[perspective] from perspective
mulf_init: scope:[mulf_init] from main
(signed word) mulf_init::sqr#0 ← (number) 0
(signed word) mulf_init::add#0 ← (number) 1
(byte) mulf_init::i#0 ← (number) 0
(byte) mulf_init::i#0 ← (byte) 0
to:mulf_init::@1
mulf_init::@1: scope:[mulf_init] from mulf_init mulf_init::@1
(signed word) mulf_init::add#2 ← phi( mulf_init/(signed word) mulf_init::add#0 mulf_init::@1/(signed word) mulf_init::add#1 )
@ -864,7 +864,6 @@ Adding number conversion cast (snumber) -$47 in (signed byte) do_perspective::y#
Adding number conversion cast (snumber) $36 in (signed byte) do_perspective::z#0 ← (number) $36
Adding number conversion cast (snumber) 0 in (signed word) mulf_init::sqr#0 ← (number) 0
Adding number conversion cast (snumber) 1 in (signed word) mulf_init::add#0 ← (number) 1
Adding number conversion cast (unumber) 0 in (byte) mulf_init::i#0 ← (number) 0
Adding number conversion cast (unumber) $100 in (byte*~) mulf_init::$1 ← (byte[$200]) mulf_sqr1#0 + (number) $100
Adding number conversion cast (unumber) $100 in (byte*~) mulf_init::$3 ← (byte[$200]) mulf_sqr1#0 + (number) $100
Adding number conversion cast (unumber) 1 in (number~) mulf_init::$5 ← (byte) mulf_init::i#2 + (number) 1
@ -895,7 +894,6 @@ Inlining cast (byte~) do_perspective::$8 ← (byte)*((signed byte*) xr#0)
Inlining cast (byte~) do_perspective::$11 ← (byte)*((signed byte*) yr#0)
Inlining cast (signed word) mulf_init::sqr#0 ← (snumber)(number) 0
Inlining cast (signed word) mulf_init::add#0 ← (snumber)(number) 1
Inlining cast (byte) mulf_init::i#0 ← (unumber)(number) 0
Inlining cast (signed byte*) PERSP_Z#0 ← (signed byte*)(number) $2400
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
@ -914,7 +912,6 @@ Simplifying constant integer cast -$47
Simplifying constant integer cast $36
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast $100
Simplifying constant integer cast $100
Simplifying constant integer cast 1
@ -936,7 +933,6 @@ Finalized signed number type (signed byte) -$47
Finalized signed number type (signed byte) $36
Finalized signed number type (signed byte) 0
Finalized signed number type (signed byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (word) $100
Finalized unsigned number type (word) $100
Finalized unsigned number type (byte) 1

View File

@ -106,7 +106,7 @@ CONTROL FLOW GRAPH SSA
bitmap_init: scope:[bitmap_init] from main
(byte*) bitmap_init::bitmap#2 ← phi( main/(byte*) bitmap_init::bitmap#0 )
(byte) bitmap_init::bits#0 ← (number) $80
(byte) bitmap_init::x#0 ← (number) 0
(byte) bitmap_init::x#0 ← (byte) 0
to:bitmap_init::@1
bitmap_init::@1: scope:[bitmap_init] from bitmap_init bitmap_init::@2
(byte) bitmap_init::bits#3 ← phi( bitmap_init/(byte) bitmap_init::bits#0 bitmap_init::@2/(byte) bitmap_init::bits#4 )
@ -138,7 +138,7 @@ bitmap_init::@3: scope:[bitmap_init] from bitmap_init::@1
to:bitmap_init::@2
bitmap_init::@4: scope:[bitmap_init] from bitmap_init::@2
(byte*) bitmap_init::yoffs#0 ← ((byte*)) (number) 0
(byte) bitmap_init::y#0 ← (number) 0
(byte) bitmap_init::y#0 ← (byte) 0
to:bitmap_init::@5
bitmap_init::@5: scope:[bitmap_init] from bitmap_init::@4 bitmap_init::@6
(byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@4/(byte*) bitmap_init::yoffs#0 bitmap_init::@6/(byte*) bitmap_init::yoffs#4 )
@ -174,12 +174,12 @@ bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@6
bitmap_clear: scope:[bitmap_clear] from main::@3
(byte*~) bitmap_clear::$0 ← ((byte*)) { *((byte[$100]) bitmap_plot_xhi#0 + (number) 0), *((byte[$100]) bitmap_plot_xlo#0 + (number) 0) }
(byte*) bitmap_clear::bitmap#0 ← (byte*~) bitmap_clear::$0
(byte) bitmap_clear::y#0 ← (number) 0
(byte) bitmap_clear::y#0 ← (byte) 0
to:bitmap_clear::@1
bitmap_clear::@1: scope:[bitmap_clear] from bitmap_clear bitmap_clear::@3
(byte) bitmap_clear::y#4 ← phi( bitmap_clear/(byte) bitmap_clear::y#0 bitmap_clear::@3/(byte) bitmap_clear::y#1 )
(byte*) bitmap_clear::bitmap#3 ← phi( bitmap_clear/(byte*) bitmap_clear::bitmap#0 bitmap_clear::@3/(byte*) bitmap_clear::bitmap#4 )
(byte) bitmap_clear::x#0 ← (number) 0
(byte) bitmap_clear::x#0 ← (byte) 0
to:bitmap_clear::@2
bitmap_clear::@2: scope:[bitmap_clear] from bitmap_clear::@1 bitmap_clear::@2
(byte) bitmap_clear::y#3 ← phi( bitmap_clear::@1/(byte) bitmap_clear::y#4 bitmap_clear::@2/(byte) bitmap_clear::y#3 )
@ -1304,13 +1304,11 @@ Adding number conversion cast (unumber) $20 in (byte) VIC_BMM#0 ← (number) $20
Adding number conversion cast (unumber) $10 in (byte) VIC_DEN#0 ← (number) $10
Adding number conversion cast (unumber) 8 in (byte) VIC_RSEL#0 ← (number) 8
Adding number conversion cast (unumber) $80 in (byte) bitmap_init::bits#0 ← (number) $80
Adding number conversion cast (unumber) 0 in (byte) bitmap_init::x#0 ← (number) 0
Adding number conversion cast (unumber) $f8 in (number~) bitmap_init::$0 ← (byte) bitmap_init::x#2 & (number) $f8
Adding number conversion cast (unumber) bitmap_init::$0 in (number~) bitmap_init::$0 ← (byte) bitmap_init::x#2 & (unumber)(number) $f8
Adding number conversion cast (unumber) 1 in (byte~) bitmap_init::$2 ← (byte) bitmap_init::bits#3 >> (number) 1
Adding number conversion cast (unumber) 0 in (bool~) bitmap_init::$3 ← (byte) bitmap_init::bits#1 == (number) 0
Adding number conversion cast (unumber) $80 in (byte) bitmap_init::bits#2 ← (number) $80
Adding number conversion cast (unumber) 0 in (byte) bitmap_init::y#0 ← (number) 0
Adding number conversion cast (unumber) 7 in (number~) bitmap_init::$6 ← (byte) bitmap_init::y#2 & (number) 7
Adding number conversion cast (unumber) bitmap_init::$6 in (number~) bitmap_init::$6 ← (byte) bitmap_init::y#2 & (unumber)(number) 7
Adding number conversion cast (unumber) bitmap_init::$8 in (number~) bitmap_init::$8 ← (unumber~) bitmap_init::$6 | (byte~) bitmap_init::$7
@ -1320,8 +1318,6 @@ Adding number conversion cast (unumber) 7 in (bool~) bitmap_init::$11 ← (unumb
Adding number conversion cast (unumber) bitmap_init::$13 in (byte*~) bitmap_init::$14 ← (byte*) bitmap_init::yoffs#3 + (number~) bitmap_init::$13
Adding number conversion cast (unumber) 0 in (var) bitmap_clear::$3 ← (byte)*((byte[$100]) bitmap_plot_xhi#0 + (number) 0) w= (byte)*((byte[$100]) bitmap_plot_xlo#0 + (number) 0)
Adding number conversion cast (unumber) 0 in (var) bitmap_clear::$3 ← (byte)*((byte[$100]) bitmap_plot_xhi#0 + (unumber)(number) 0) w= (byte)*((byte[$100]) bitmap_plot_xlo#0 + (number) 0)
Adding number conversion cast (unumber) 0 in (byte) bitmap_clear::y#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) bitmap_clear::x#0 ← (number) 0
Adding number conversion cast (unumber) 0 in *((byte*) bitmap_clear::bitmap#2) ← (number) 0
Adding number conversion cast (unumber) 1 in (byte~) bitmap_line_xdyi::$0 ← (byte) bitmap_line_xdyi::yd#2 >> (number) 1
Adding number conversion cast (unumber) 1 in (number~) bitmap_line_xdyi::$6 ← (byte) bitmap_line_xdyi::x1#2 + (number) 1
@ -1368,13 +1364,9 @@ Inlining cast (byte) VIC_DEN#0 ← (unumber)(number) $10
Inlining cast (byte) VIC_RSEL#0 ← (unumber)(number) 8
Inlining cast (byte*) VIC_MEMORY#0 ← (byte*)(number) $d018
Inlining cast (byte) bitmap_init::bits#0 ← (unumber)(number) $80
Inlining cast (byte) bitmap_init::x#0 ← (unumber)(number) 0
Inlining cast (byte) bitmap_init::bits#2 ← (unumber)(number) $80
Inlining cast (byte*) bitmap_init::yoffs#0 ← (byte*)(number) 0
Inlining cast (byte) bitmap_init::y#0 ← (unumber)(number) 0
Inlining cast (unumber~) bitmap_init::$16 ← (unumber)(number~) bitmap_init::$13
Inlining cast (byte) bitmap_clear::y#0 ← (unumber)(number) 0
Inlining cast (byte) bitmap_clear::x#0 ← (unumber)(number) 0
Inlining cast *((byte*) bitmap_clear::bitmap#2) ← (unumber)(number) 0
Inlining cast (byte*) bitmap_plot::plotter#0 ← (byte*)(word~) bitmap_plot::$0
Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400
@ -1396,13 +1388,11 @@ Simplifying constant integer cast $10
Simplifying constant integer cast 8
Simplifying constant pointer cast (byte*) 53272
Simplifying constant integer cast $80
Simplifying constant integer cast 0
Simplifying constant integer cast $f8
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast $80
Simplifying constant pointer cast (byte*) 0
Simplifying constant integer cast 0
Simplifying constant integer cast 7
Simplifying constant integer cast 7
Simplifying constant integer cast 7
@ -1411,8 +1401,6 @@ Simplifying constant integer cast 0
Simplifying constant integer cast *((byte[$100]) bitmap_plot_xlo#0 + (unumber)(number) 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 *((byte[$100]) bitmap_plot_xhi#0 + (byte) bitmap_plot::x#4)
Simplifying constant integer cast *((byte[$100]) bitmap_plot_xlo#0 + (byte) bitmap_plot::x#4)
Simplifying constant integer cast *((byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#4)
@ -1463,20 +1451,16 @@ Finalized unsigned number type (byte) $20
Finalized unsigned number type (byte) $10
Finalized unsigned number type (byte) 8
Finalized unsigned number type (byte) $80
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $f8
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $80
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 7
Finalized unsigned number type (byte) 7
Finalized unsigned number type (byte) 7
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 1

View File

@ -274,7 +274,7 @@ main::@27: scope:[main] from main::@26
call print_str_at
to:main::@28
main::@28: scope:[main] from main::@27
(byte) main::i#0 ← (number) 0
(byte) main::i#0 ← (byte) 0
to:main::@3
main::@3: scope:[main] from main::@28 main::@29
(byte) main::i#2 ← phi( main::@28/(byte) main::i#0 main::@29/(byte) main::i#1 )
@ -385,7 +385,7 @@ main::@23: scope:[main] from main::@34
main::@11: scope:[main] from main::@10 main::@23
(byte) main::shift#9 ← phi( main::@10/(byte) main::shift#1 main::@23/(byte) main::shift#2 )
(byte) main::cur_pos#11 ← phi( main::@10/(byte) main::cur_pos#13 main::@23/(byte) main::cur_pos#14 )
(byte) main::ch#0 ← (number) 0
(byte) main::ch#0 ← (byte) 0
to:main::@12
main::@12: scope:[main] from main::@11 main::@14
(byte) main::shift#7 ← phi( main::@11/(byte) main::shift#9 main::@14/(byte) main::shift#10 )
@ -513,7 +513,7 @@ plot_chargen::@9: scope:[plot_chargen] from plot_chargen::@1
(word~) plot_chargen::$7 ← (word) mul8u::return#4
(byte*~) plot_chargen::$8 ← (byte*~) plot_chargen::$6 + (word~) plot_chargen::$7
(byte*) plot_chargen::sc#0 ← (byte*~) plot_chargen::$8
(byte) plot_chargen::y#0 ← (number) 0
(byte) plot_chargen::y#0 ← (byte) 0
to:plot_chargen::@3
plot_chargen::@2: scope:[plot_chargen] from plot_chargen
(byte) plot_chargen::pos#4 ← phi( plot_chargen/(byte) plot_chargen::pos#3 )
@ -526,7 +526,7 @@ plot_chargen::@3: scope:[plot_chargen] from plot_chargen::@7 plot_chargen::@9
(byte) plot_chargen::y#2 ← phi( plot_chargen::@7/(byte) plot_chargen::y#1 plot_chargen::@9/(byte) plot_chargen::y#0 )
(byte*) plot_chargen::chargen#3 ← phi( plot_chargen::@7/(byte*) plot_chargen::chargen#4 plot_chargen::@9/(byte*) plot_chargen::chargen#5 )
(byte) plot_chargen::bits#0 ← *((byte*) plot_chargen::chargen#3 + (byte) plot_chargen::y#2)
(byte) plot_chargen::x#0 ← (number) 0
(byte) plot_chargen::x#0 ← (byte) 0
to:plot_chargen::@4
plot_chargen::@4: scope:[plot_chargen] from plot_chargen::@3 plot_chargen::@5
(byte*) plot_chargen::chargen#8 ← phi( plot_chargen::@3/(byte*) plot_chargen::chargen#3 plot_chargen::@5/(byte*) plot_chargen::chargen#7 )
@ -1151,7 +1151,6 @@ Adding number conversion cast (unumber) 1 in (byte*~) main::$5 ← (byte*) SCREE
Adding number conversion cast (unumber) $14 in (byte*~) main::$6 ← (byte*~) main::$5 + (number) $14
Adding number conversion cast (unumber) 1 in (byte*~) main::$8 ← (byte*) SCREEN#0 + (number) 1
Adding number conversion cast (unumber) $1e in (byte*~) main::$9 ← (byte*~) main::$8 + (number) $1e
Adding number conversion cast (unumber) 0 in (byte) main::i#0 ← (number) 0
Adding number conversion cast (unumber) $20 in (byte) plot_chargen::ch#0 ← (number) $20
Adding number conversion cast (unumber) 0 in (byte) plot_chargen::shift#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) main::cur_pos#0 ← (number) 0
@ -1167,7 +1166,6 @@ Adding number conversion cast (unumber) 0 in (bool~) main::$28 ← (byte~) main:
Adding number conversion cast (unumber) 3 in (byte) main::cur_pos#4 ← (number) 3
Adding number conversion cast (unumber) 1 in (byte) main::shift#1 ← (number) 1
Adding number conversion cast (unumber) 0 in (byte) main::shift#2 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) main::ch#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) main::pressed#0 ← (number) 0
Adding number conversion cast (unumber) $3f in (bool~) main::$30 ← (byte) main::key#0 != (number) $3f
Adding number conversion cast (unumber) 0 in (bool~) main::$33 ← (byte) main::pressed#2 != (number) 0
@ -1178,9 +1176,7 @@ Adding number conversion cast (unumber) $32 in *((byte*) PROCPORT#0) ← (number
Adding number conversion cast (unumber) $28 in (byte*~) plot_chargen::$5 ← (byte*) SCREEN#0 + (number) $28
Adding number conversion cast (unumber) 1 in (byte*~) plot_chargen::$6 ← (byte*~) plot_chargen::$5 + (number) 1
Adding number conversion cast (unumber) $a in (byte) mul8u::b#0 ← (number) $a
Adding number conversion cast (unumber) 0 in (byte) plot_chargen::y#0 ← (number) 0
Adding number conversion cast (unumber) $800 in (byte*~) plot_chargen::$9 ← (byte*) plot_chargen::chargen#2 + (number) $800
Adding number conversion cast (unumber) 0 in (byte) plot_chargen::x#0 ← (number) 0
Adding number conversion cast (unumber) $80 in (number~) plot_chargen::$10 ← (byte) plot_chargen::bits#2 & (number) $80
Adding number conversion cast (unumber) plot_chargen::$10 in (number~) plot_chargen::$10 ← (byte) plot_chargen::bits#2 & (unumber)(number) $80
Adding number conversion cast (unumber) 0 in (bool~) plot_chargen::$11 ← (unumber~) plot_chargen::$10 != (number) 0
@ -1254,7 +1250,6 @@ Inlining cast (byte) KEY_2#0 ← (unumber)(number) $3b
Inlining cast (byte) KEY_SPACE#0 ← (unumber)(number) $3c
Inlining cast (byte) KEY_Q#0 ← (unumber)(number) $3e
Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400
Inlining cast (byte) main::i#0 ← (unumber)(number) 0
Inlining cast (byte) plot_chargen::ch#0 ← (unumber)(number) $20
Inlining cast (byte) plot_chargen::shift#0 ← (unumber)(number) 0
Inlining cast (byte) main::cur_pos#0 ← (unumber)(number) 0
@ -1265,13 +1260,10 @@ Inlining cast (byte) main::cur_pos#3 ← (unumber)(number) 2
Inlining cast (byte) main::cur_pos#4 ← (unumber)(number) 3
Inlining cast (byte) main::shift#1 ← (unumber)(number) 1
Inlining cast (byte) main::shift#2 ← (unumber)(number) 0
Inlining cast (byte) main::ch#0 ← (unumber)(number) 0
Inlining cast (byte) main::pressed#0 ← (unumber)(number) 0
Inlining cast (word~) plot_chargen::$0 ← (word)(byte) plot_chargen::ch#2
Inlining cast *((byte*) PROCPORT#0) ← (unumber)(number) $32
Inlining cast (byte) mul8u::b#0 ← (unumber)(number) $a
Inlining cast (byte) plot_chargen::y#0 ← (unumber)(number) 0
Inlining cast (byte) plot_chargen::x#0 ← (unumber)(number) 0
Inlining cast *((byte*) PROCPORT#0) ← (unumber)(number) $37
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1
@ -1380,7 +1372,6 @@ Simplifying constant integer cast 1
Simplifying constant integer cast $14
Simplifying constant integer cast 1
Simplifying constant integer cast $1e
Simplifying constant integer cast 0
Simplifying constant integer cast $20
Simplifying constant integer cast 0
Simplifying constant integer cast 0
@ -1397,7 +1388,6 @@ Simplifying constant integer cast 3
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $3f
Simplifying constant integer cast 0
Simplifying constant integer cast 8
@ -1406,9 +1396,7 @@ Simplifying constant integer cast $32
Simplifying constant integer cast $28
Simplifying constant integer cast 1
Simplifying constant integer cast $a
Simplifying constant integer cast 0
Simplifying constant integer cast $800
Simplifying constant integer cast 0
Simplifying constant integer cast $80
Simplifying constant integer cast 0
Simplifying constant integer cast 2
@ -1486,7 +1474,6 @@ Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) $14
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) $1e
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $20
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
@ -1503,7 +1490,6 @@ Finalized unsigned number type (byte) 3
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $3f
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 8
@ -1512,9 +1498,7 @@ Finalized unsigned number type (byte) $32
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) $a
Finalized unsigned number type (byte) 0
Finalized unsigned number type (word) $800
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $80
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 2

View File

@ -148,7 +148,7 @@ main::@7: scope:[main] from main
(byte*) main::at_line#0 ← ((byte*)) (number) $400
(byte*~) main::$1 ← (byte*) main::at_line#0 + (number) 4
(byte*) main::at#0 ← (byte*~) main::$1
(byte) main::k#0 ← (number) 0
(byte) main::k#0 ← (byte) 0
to:main::@1
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 )
@ -169,7 +169,7 @@ main::@8: scope:[main] from main::@1
to:main::@2
main::@2: scope:[main] from main::@8
(byte*) main::at_line#3 ← phi( main::@8/(byte*) main::at_line#5 )
(byte) main::i#0 ← (number) 0
(byte) main::i#0 ← (byte) 0
to:main::@3
main::@3: scope:[main] from main::@2 main::@5
(byte) main::i#2 ← phi( main::@2/(byte) main::i#0 main::@5/(byte) main::i#1 )
@ -184,7 +184,7 @@ main::@9: scope:[main] from main::@3
(byte*) main::at_line#10 ← phi( main::@3/(byte*) main::at_line#1 )
(byte) main::i#6 ← phi( main::@3/(byte) main::i#2 )
(byte*) main::at#9 ← phi( main::@3/(byte*) main::at#2 )
(byte) main::j#0 ← (number) 0
(byte) main::j#0 ← (byte) 0
to:main::@4
main::@4: scope:[main] from main::@11 main::@9
(byte*) main::at_line#9 ← phi( main::@11/(byte*) main::at_line#6 main::@9/(byte*) main::at_line#10 )
@ -235,7 +235,7 @@ init_screen: scope:[init_screen] from main
init_screen::@5: scope:[init_screen] from init_screen
(byte*) init_screen::COLS#0 ← ((byte*)) (number) $d800
(byte) init_screen::WHITE#0 ← (number) 1
(byte) init_screen::l#0 ← (number) 0
(byte) init_screen::l#0 ← (byte) 0
to:init_screen::@1
init_screen::@1: scope:[init_screen] from init_screen::@1 init_screen::@5
(byte) init_screen::l#2 ← phi( init_screen::@1/(byte) init_screen::l#1 init_screen::@5/(byte) init_screen::l#0 )
@ -247,7 +247,7 @@ init_screen::@1: scope:[init_screen] from init_screen::@1 init_screen::@5
to:init_screen::@2
init_screen::@2: scope:[init_screen] from init_screen::@1
(byte*) init_screen::COLS#4 ← phi( init_screen::@1/(byte*) init_screen::COLS#2 )
(byte) init_screen::m#0 ← (number) 0
(byte) init_screen::m#0 ← (byte) 0
to:init_screen::@3
init_screen::@3: scope:[init_screen] from init_screen::@2 init_screen::@3
(byte) init_screen::m#2 ← phi( init_screen::@2/(byte) init_screen::m#0 init_screen::@3/(byte) init_screen::m#1 )
@ -518,15 +518,10 @@ Adding number conversion cast (unumber) print_byte_at::$2 in (number~) print_byt
Adding number conversion cast (unumber) 1 in (byte*~) print_byte_at::$3 ← (byte*) print_byte_at::at#2 + (number) 1
Adding number conversion cast (unumber) $3e8 in (byte*~) print_cls::$0 ← (byte*) print_screen#2 + (number) $3e8
Adding number conversion cast (unumber) 4 in (byte*~) main::$1 ← (byte*) main::at_line#0 + (number) 4
Adding number conversion cast (unumber) 0 in (byte) main::k#0 ← (number) 0
Adding number conversion cast (unumber) 4 in (byte*) main::at#1 ← (byte*) main::at#5 + (number) 4
Adding number conversion cast (unumber) 0 in (byte) main::i#0 ← (number) 0
Adding number conversion cast (unumber) $28 in (byte*) main::at_line#1 ← (byte*) main::at_line#2 + (number) $28
Adding number conversion cast (unumber) 0 in (byte) main::j#0 ← (number) 0
Adding number conversion cast (unumber) 4 in (byte*) main::at#3 ← (byte*) main::at#6 + (number) 4
Adding number conversion cast (unumber) 1 in (byte) init_screen::WHITE#0 ← (number) 1
Adding number conversion cast (unumber) 0 in (byte) init_screen::l#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) init_screen::m#0 ← (number) 0
Adding number conversion cast (unumber) 0 in *((byte*) init_screen::COLS#3 + (number) 0) ← (byte) init_screen::WHITE#0
Adding number conversion cast (unumber) 1 in *((byte*) init_screen::COLS#3 + (number) 1) ← (byte) init_screen::WHITE#0
Adding number conversion cast (unumber) 2 in *((byte*) init_screen::COLS#3 + (number) 2) ← (byte) init_screen::WHITE#0
@ -538,13 +533,8 @@ Successful SSA optimization PassNAddArrayNumberTypeConversions
Inlining cast (byte*) print_screen#0 ← (byte*)(number) $400
Inlining cast (byte~) print_sbyte_at::$1 ← (byte)(signed byte) print_sbyte_at::b#6
Inlining cast (byte*) main::at_line#0 ← (byte*)(number) $400
Inlining cast (byte) main::k#0 ← (unumber)(number) 0
Inlining cast (byte) main::i#0 ← (unumber)(number) 0
Inlining cast (byte) main::j#0 ← (unumber)(number) 0
Inlining cast (byte*) init_screen::COLS#0 ← (byte*)(number) $d800
Inlining cast (byte) init_screen::WHITE#0 ← (unumber)(number) 1
Inlining cast (byte) init_screen::l#0 ← (unumber)(number) 0
Inlining cast (byte) init_screen::m#0 ← (unumber)(number) 0
Inlining cast (signed byte*) ap#0 ← (signed byte*)(number) $fd
Inlining cast (signed byte*) bp#0 ← (signed byte*)(number) $fe
Inlining cast (signed byte*) cp#0 ← (signed byte*)(number) $ff
@ -569,17 +559,12 @@ 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 0
Simplifying constant integer cast 4
Simplifying constant integer cast 0
Simplifying constant integer cast $28
Simplifying constant integer cast 0
Simplifying constant integer cast 4
Simplifying constant pointer cast (byte*) 55296
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 3
@ -597,16 +582,11 @@ Finalized unsigned number type (byte) $f
Finalized unsigned number type (byte) 1
Finalized unsigned number type (word) $3e8
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) 3

View File

@ -309,7 +309,7 @@ sid_rnd_init: {
fillscreen: {
.label screen = $11
.label i = $13
lda #0
lda #<0
sta i
sta i+1
b1:

View File

@ -174,7 +174,7 @@ fillscreen: scope:[fillscreen] from main main::@4 main::@5 main::@6
[90] (byte) fillscreen::fill#5 ← phi( main/(byte) 0 main::@5/(byte) 0 main::@6/(const byte) YELLOW#0 main::@4/(byte) 0 )
to:fillscreen::@1
fillscreen::@1: scope:[fillscreen] from fillscreen fillscreen::@1
[91] (word) fillscreen::i#2 ← phi( fillscreen/(byte) 0 fillscreen::@1/(word) fillscreen::i#1 )
[91] (word) fillscreen::i#2 ← phi( fillscreen/(word) 0 fillscreen::@1/(word) fillscreen::i#1 )
[91] (byte*) fillscreen::screen#5 ← phi( fillscreen/(byte*) fillscreen::screen#6 fillscreen::@1/(byte*) fillscreen::screen#4 )
[92] *((byte*) fillscreen::screen#5) ← (byte) fillscreen::fill#5
[93] (byte*) fillscreen::screen#4 ← ++ (byte*) fillscreen::screen#5

View File

@ -408,7 +408,7 @@ makecharset::@return: scope:[makecharset] from makecharset::@11
fillscreen: scope:[fillscreen] from main main::@10 main::@11 main::@9
(byte*) fillscreen::screen#6 ← phi( main/(byte*) fillscreen::screen#0 main::@10/(byte*) fillscreen::screen#2 main::@11/(byte*) fillscreen::screen#3 main::@9/(byte*) fillscreen::screen#1 )
(byte) fillscreen::fill#5 ← phi( main/(byte) fillscreen::fill#0 main::@10/(byte) fillscreen::fill#2 main::@11/(byte) fillscreen::fill#3 main::@9/(byte) fillscreen::fill#1 )
(word) fillscreen::i#0 ← (number) 0
(word) fillscreen::i#0 ← (word) 0
to:fillscreen::@1
fillscreen::@1: scope:[fillscreen] from fillscreen fillscreen::@1
(word) fillscreen::i#2 ← phi( fillscreen/(word) fillscreen::i#0 fillscreen::@1/(word) fillscreen::i#1 )
@ -808,7 +808,6 @@ Adding number conversion cast (unumber) makecharset::$15 in (byte*~) makecharset
Adding number conversion cast (unumber) 3 in (word~) makecharset::$18 ← (word~) makecharset::$17 << (number) 3
Adding number conversion cast (unumber) 8 in (bool~) makecharset::$20 ← (byte) makecharset::i#1 < (number) 8
Adding number conversion cast (unumber) $40 in (bool~) makecharset::$21 ← (byte) makecharset::c#1 < (number) $40
Adding number conversion cast (unumber) 0 in (word) fillscreen::i#0 ← (number) 0
Successful SSA optimization PassNAddNumberTypeConversions
Adding number conversion cast (unumber) $28 - 1 in (unumber~) fire::$7 ← (number) $28 - (number) 1
Adding number conversion cast (unumber) $28 - 1 in (unumber~) fire::$8 ← (number) $28 - (number) 1
@ -855,7 +854,6 @@ Inlining cast (byte) makecharset::b#0 ← (unumber)(number) 0
Inlining cast (byte) makecharset::ii#0 ← (unumber)(number) 0
Inlining cast (unumber~) makecharset::$25 ← (unumber)(number~) makecharset::$15
Inlining cast (word~) makecharset::$17 ← (word)(byte) makecharset::c#3
Inlining cast (word) fillscreen::i#0 ← (unumber)(number) 0
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 53280
Simplifying constant pointer cast (byte*) 53281
@ -913,7 +911,6 @@ Simplifying constant integer cast 7
Simplifying constant integer cast 3
Simplifying constant integer cast 8
Simplifying constant integer cast $40
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 7
@ -952,7 +949,6 @@ Finalized unsigned number type (byte) 7
Finalized unsigned number type (byte) 3
Finalized unsigned number type (byte) 8
Finalized unsigned number type (byte) $40
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to word in (unumber~) main::toD0181_$1#0 ← (word~) main::toD0181_$0#0 & (word) $3fff
Inferred type updated to word in (unumber~) main::toD0181_$2#0 ← (word~) main::toD0181_$1#0 * (byte) 4
@ -1293,7 +1289,7 @@ Constant inlined fire::$18 = (number) $19*(number) $28
Constant inlined fire::$5 = (const byte*) BUFFER#0+(number) $18*(number) $28
Constant inlined fire::screenbase#0 = (const byte*) SCREEN1#0
Constant inlined fire::$4 = (number) $18*(number) $28
Constant inlined fillscreen::i#0 = (byte) 0
Constant inlined fillscreen::i#0 = (word) 0
Constant inlined makecharset::$5 = (number) $100*(number) 8
Constant inlined makecharset::$3 = (number) $40*(number) 8
Constant inlined makecharset::$0 = (number) 1*(number) 8
@ -1625,7 +1621,7 @@ fillscreen: scope:[fillscreen] from main main::@4 main::@5 main::@6
[90] (byte) fillscreen::fill#5 ← phi( main/(byte) 0 main::@5/(byte) 0 main::@6/(const byte) YELLOW#0 main::@4/(byte) 0 )
to:fillscreen::@1
fillscreen::@1: scope:[fillscreen] from fillscreen fillscreen::@1
[91] (word) fillscreen::i#2 ← phi( fillscreen/(byte) 0 fillscreen::@1/(word) fillscreen::i#1 )
[91] (word) fillscreen::i#2 ← phi( fillscreen/(word) 0 fillscreen::@1/(word) fillscreen::i#1 )
[91] (byte*) fillscreen::screen#5 ← phi( fillscreen/(byte*) fillscreen::screen#6 fillscreen::@1/(byte*) fillscreen::screen#4 )
[92] *((byte*) fillscreen::screen#5) ← (byte) fillscreen::fill#5
[93] (byte*) fillscreen::screen#4 ← ++ (byte*) fillscreen::screen#5
@ -2497,10 +2493,10 @@ fillscreen: {
.label fill = $16
//SEG180 [91] phi from fillscreen to fillscreen::@1 [phi:fillscreen->fillscreen::@1]
b1_from_fillscreen:
//SEG181 [91] phi (word) fillscreen::i#2 = (byte) 0 [phi:fillscreen->fillscreen::@1#0] -- vwuz1=vbuc1
lda #0
//SEG181 [91] phi (word) fillscreen::i#2 = (word) 0 [phi:fillscreen->fillscreen::@1#0] -- vwuz1=vwuc1
lda #<0
sta i
lda #0
lda #>0
sta i+1
//SEG182 [91] phi (byte*) fillscreen::screen#5 = (byte*) fillscreen::screen#6 [phi:fillscreen->fillscreen::@1#1] -- register_copy
jmp b1
@ -3340,10 +3336,10 @@ fillscreen: {
.label i = $13
//SEG180 [91] phi from fillscreen to fillscreen::@1 [phi:fillscreen->fillscreen::@1]
b1_from_fillscreen:
//SEG181 [91] phi (word) fillscreen::i#2 = (byte) 0 [phi:fillscreen->fillscreen::@1#0] -- vwuz1=vbuc1
lda #0
//SEG181 [91] phi (word) fillscreen::i#2 = (word) 0 [phi:fillscreen->fillscreen::@1#0] -- vwuz1=vwuc1
lda #<0
sta i
lda #0
lda #>0
sta i+1
//SEG182 [91] phi (byte*) fillscreen::screen#5 = (byte*) fillscreen::screen#6 [phi:fillscreen->fillscreen::@1#1] -- register_copy
jmp b1
@ -3426,7 +3422,7 @@ Removing instruction ldy #0
Replacing instruction ldy #0 with TAY
Replacing instruction ldx #0 with TAX
Replacing instruction lda #0 with TYA
Removing instruction lda #0
Removing instruction lda #>0
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Replacing label b1_from_b3 with b1
Replacing label b6_from_b7 with b6
@ -4210,8 +4206,8 @@ fillscreen: {
.label screen = $11
.label i = $13
//SEG180 [91] phi from fillscreen to fillscreen::@1 [phi:fillscreen->fillscreen::@1]
//SEG181 [91] phi (word) fillscreen::i#2 = (byte) 0 [phi:fillscreen->fillscreen::@1#0] -- vwuz1=vbuc1
lda #0
//SEG181 [91] phi (word) fillscreen::i#2 = (word) 0 [phi:fillscreen->fillscreen::@1#0] -- vwuz1=vwuc1
lda #<0
sta i
sta i+1
//SEG182 [91] phi (byte*) fillscreen::screen#5 = (byte*) fillscreen::screen#6 [phi:fillscreen->fillscreen::@1#1] -- register_copy

View File

@ -135,7 +135,7 @@ plexInit::plexSetScreen1: scope:[plexInit] from plexInit
plexInit::@3: scope:[plexInit] from plexInit::plexSetScreen1
(byte*) PLEX_SCREEN_PTR#22 ← phi( plexInit::plexSetScreen1/(byte*) PLEX_SCREEN_PTR#1 )
(number~) plexInit::$1 ← (byte) PLEX_COUNT#0 - (number) 1
(byte) plexInit::i#0 ← (number) 0
(byte) plexInit::i#0 ← (byte) 0
to:plexInit::@1
plexInit::@1: scope:[plexInit] from plexInit::@1 plexInit::@3
(byte*) PLEX_SCREEN_PTR#15 ← phi( plexInit::@1/(byte*) PLEX_SCREEN_PTR#15 plexInit::@3/(byte*) PLEX_SCREEN_PTR#22 )
@ -152,7 +152,7 @@ plexInit::@return: scope:[plexInit] from plexInit::@1
to:@return
plexSort: scope:[plexSort] from loop::@11
(number~) plexSort::$1 ← (byte) PLEX_COUNT#0 - (number) 2
(byte) plexSort::m#0 ← (number) 0
(byte) plexSort::m#0 ← (byte) 0
to:plexSort::@1
plexSort::@1: scope:[plexSort] from plexSort plexSort::@2
(byte) plexSort::m#2 ← phi( plexSort/(byte) plexSort::m#0 plexSort::@2/(byte) plexSort::m#1 )
@ -204,7 +204,7 @@ plexSort::plexFreePrepare1: scope:[plexSort] from plexSort::@6
(byte) plex_sprite_msb#38 ← phi( plexSort::@6/(byte) plex_sprite_msb#1 )
(byte) plex_sprite_idx#39 ← phi( plexSort::@6/(byte) plex_sprite_idx#1 )
(byte) plex_show_idx#39 ← phi( plexSort::@6/(byte) plex_show_idx#1 )
(byte) plexSort::plexFreePrepare1_s#0 ← (number) 0
(byte) plexSort::plexFreePrepare1_s#0 ← (byte) 0
to:plexSort::plexFreePrepare1_@1
plexSort::plexFreePrepare1_@1: scope:[plexSort] from plexSort::plexFreePrepare1 plexSort::plexFreePrepare1_@1
(byte) plex_sprite_msb#30 ← phi( plexSort::plexFreePrepare1/(byte) plex_sprite_msb#38 plexSort::plexFreePrepare1_@1/(byte) plex_sprite_msb#30 )
@ -406,7 +406,7 @@ init::@5: scope:[init] from init
(byte*) PLEX_SCREEN_PTR#5 ← (byte*) PLEX_SCREEN_PTR#12
(word) init::xp#0 ← (number) $20
(number~) init::$3 ← (byte) PLEX_COUNT#0 - (number) 1
(byte) init::sx#0 ← (number) 0
(byte) init::sx#0 ← (byte) 0
to:init::@1
init::@1: scope:[init] from init::@1 init::@5
(byte*) PLEX_SCREEN_PTR#28 ← phi( init::@1/(byte*) PLEX_SCREEN_PTR#28 init::@5/(byte*) PLEX_SCREEN_PTR#5 )
@ -425,7 +425,7 @@ init::@1: scope:[init] from init::@1 init::@5
init::@2: scope:[init] from init::@1
(byte*) PLEX_SCREEN_PTR#24 ← phi( init::@1/(byte*) PLEX_SCREEN_PTR#28 )
*((byte*) SPRITES_ENABLE#0) ← (number) $ff
(byte) init::ss#0 ← (number) 0
(byte) init::ss#0 ← (byte) 0
to:init::@3
init::@3: scope:[init] from init::@2 init::@3
(byte*) PLEX_SCREEN_PTR#20 ← phi( init::@2/(byte*) PLEX_SCREEN_PTR#24 init::@3/(byte*) PLEX_SCREEN_PTR#20 )
@ -477,7 +477,7 @@ loop::@6: scope:[loop] from loop::@4
*((byte*) BORDERCOL#0) ← ++ *((byte*) BORDERCOL#0)
(byte) loop::y_idx#0 ← (byte) loop::sin_idx#2
(number~) loop::$1 ← (byte) PLEX_COUNT#0 - (number) 1
(byte) loop::sy#0 ← (number) 0
(byte) loop::sy#0 ← (byte) 0
to:loop::@10
loop::@10: scope:[loop] from loop::@10 loop::@6
(byte*) PLEX_SCREEN_PTR#39 ← phi( loop::@10/(byte*) PLEX_SCREEN_PTR#39 loop::@6/(byte*) PLEX_SCREEN_PTR#40 )
@ -537,7 +537,7 @@ loop::@14: scope:[loop] from loop::@12
(byte) plex_sprite_idx#47 ← phi( loop::@12/(byte) plex_sprite_idx#48 )
(byte) plex_free_next#36 ← phi( loop::@12/(byte) plex_free_next#41 )
(number~) loop::$6 ← (byte) PLEX_COUNT#0 - (number) 1
(byte) loop::ss#0 ← (number) 0
(byte) loop::ss#0 ← (byte) 0
to:loop::@18
loop::@18: scope:[loop] from loop::@14 loop::@31
(byte) loop::sin_idx#14 ← phi( loop::@14/(byte) loop::sin_idx#15 loop::@31/(byte) loop::sin_idx#8 )
@ -1178,10 +1178,8 @@ Adding number conversion cast (unumber) 1 in (byte) plex_sprite_msb#0 ← (numbe
Adding number conversion cast (unumber) $3f8 in (byte*~) plexInit::plexSetScreen1_$0#0 ← (byte*) plexInit::plexSetScreen1_screen#1 + (number) $3f8
Adding number conversion cast (unumber) 1 in (number~) plexInit::$1 ← (byte) PLEX_COUNT#0 - (number) 1
Adding number conversion cast (unumber) plexInit::$1 in (number~) plexInit::$1 ← (byte) PLEX_COUNT#0 - (unumber)(number) 1
Adding number conversion cast (unumber) 0 in (byte) plexInit::i#0 ← (number) 0
Adding number conversion cast (unumber) 2 in (number~) plexSort::$1 ← (byte) PLEX_COUNT#0 - (number) 2
Adding number conversion cast (unumber) plexSort::$1 in (number~) plexSort::$1 ← (byte) PLEX_COUNT#0 - (unumber)(number) 2
Adding number conversion cast (unumber) 0 in (byte) plexSort::m#0 ← (number) 0
Adding number conversion cast (unumber) 1 in (number~) plexSort::$2 ← (byte) plexSort::m#2 + (number) 1
Adding number conversion cast (unumber) plexSort::$2 in (number~) plexSort::$2 ← (byte) plexSort::m#2 + (unumber)(number) 1
Adding number conversion cast (unumber) 1 in (number~) plexSort::$5 ← (byte) plexSort::s#3 + (number) 1
@ -1190,7 +1188,6 @@ Adding number conversion cast (unumber) $ff in (bool~) plexSort::$6 ← (byte) p
Adding number conversion cast (unumber) 0 in (byte) plex_show_idx#1 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) plex_sprite_idx#1 ← (number) 0
Adding number conversion cast (unumber) 1 in (byte) plex_sprite_msb#1 ← (number) 1
Adding number conversion cast (unumber) 0 in (byte) plexSort::plexFreePrepare1_s#0 ← (number) 0
Adding number conversion cast (unumber) 0 in *((byte[8]) PLEX_FREE_YPOS#0 + (byte) plexSort::plexFreePrepare1_s#2) ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) plex_free_next#0 ← (number) 0
Adding number conversion cast (unumber) 1 in (byte~) plexShowSprite::$0 ← (byte) plex_sprite_idx#12 << (number) 1
@ -1216,22 +1213,18 @@ Adding number conversion cast (unumber) init::$1 in (number~) init::$1 ← (byte
Adding number conversion cast (unumber) $20 in (word) init::xp#0 ← (number) $20
Adding number conversion cast (unumber) 1 in (number~) init::$3 ← (byte) PLEX_COUNT#0 - (number) 1
Adding number conversion cast (unumber) init::$3 in (number~) init::$3 ← (byte) PLEX_COUNT#0 - (unumber)(number) 1
Adding number conversion cast (unumber) 0 in (byte) init::sx#0 ← (number) 0
Adding number conversion cast (unumber) $40 in (byte*~) init::$4 ← (byte*) SPRITE#0 / (number) $40
Adding number conversion cast (unumber) 9 in (word) init::xp#1 ← (word) init::xp#2 + (number) 9
Adding number conversion cast (unumber) $ff in *((byte*) SPRITES_ENABLE#0) ← (number) $ff
Adding number conversion cast (unumber) 0 in (byte) init::ss#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) loop::sin_idx#0 ← (number) 0
Adding number conversion cast (unumber) $ff in (bool~) loop::$0 ← *((byte*) RASTER#0) != (number) $ff
Adding number conversion cast (unumber) 1 in (number~) loop::$1 ← (byte) PLEX_COUNT#0 - (number) 1
Adding number conversion cast (unumber) loop::$1 in (number~) loop::$1 ← (byte) PLEX_COUNT#0 - (unumber)(number) 1
Adding number conversion cast (unumber) 0 in (byte) loop::sy#0 ← (number) 0
Adding number conversion cast (unumber) 8 in (byte) loop::y_idx#1 ← (byte) loop::y_idx#2 + (number) 8
Adding number conversion cast (unumber) 1 in (byte) loop::sin_idx#1 ← (byte) loop::sin_idx#3 + (number) 1
Adding number conversion cast (unumber) 0 in (bool~) loop::$5 ← (byte~) loop::$4 != (number) 0
Adding number conversion cast (unumber) 1 in (number~) loop::$6 ← (byte) PLEX_COUNT#0 - (number) 1
Adding number conversion cast (unumber) loop::$6 in (number~) loop::$6 ← (byte) PLEX_COUNT#0 - (unumber)(number) 1
Adding number conversion cast (unumber) 0 in (byte) loop::ss#0 ← (number) 0
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) SPRITES_XPOS#0 ← (byte*)(number) $d000
Inlining cast (byte*) SPRITES_YPOS#0 ← (byte*)(number) $d001
@ -1251,12 +1244,9 @@ Inlining cast (byte*) PLEX_SCREEN_PTR#0 ← (byte*)(number~) $0
Inlining cast (byte) plex_show_idx#0 ← (unumber)(number) 0
Inlining cast (byte) plex_sprite_idx#0 ← (unumber)(number) 0
Inlining cast (byte) plex_sprite_msb#0 ← (unumber)(number) 1
Inlining cast (byte) plexInit::i#0 ← (unumber)(number) 0
Inlining cast (byte) plexSort::m#0 ← (unumber)(number) 0
Inlining cast (byte) plex_show_idx#1 ← (unumber)(number) 0
Inlining cast (byte) plex_sprite_idx#1 ← (unumber)(number) 0
Inlining cast (byte) plex_sprite_msb#1 ← (unumber)(number) 1
Inlining cast (byte) plexSort::plexFreePrepare1_s#0 ← (unumber)(number) 0
Inlining cast *((byte[8]) PLEX_FREE_YPOS#0 + (byte) plexSort::plexFreePrepare1_s#2) ← (unumber)(number) 0
Inlining cast (byte) plex_free_next#0 ← (unumber)(number) 0
Inlining cast (byte) plex_sprite_msb#4 ← (unumber)(number) 1
@ -1265,13 +1255,9 @@ Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400
Inlining cast (byte*) SPRITE#0 ← (byte*)(number) $2000
Inlining cast (byte*) YSIN#0 ← (byte*)(number) $2100
Inlining cast (word) init::xp#0 ← (unumber)(number) $20
Inlining cast (byte) init::sx#0 ← (unumber)(number) 0
Inlining cast (byte~) init::$5 ← (byte)(byte*~) init::$4
Inlining cast *((byte*) SPRITES_ENABLE#0) ← (unumber)(number) $ff
Inlining cast (byte) init::ss#0 ← (unumber)(number) 0
Inlining cast (byte) loop::sin_idx#0 ← (unumber)(number) 0
Inlining cast (byte) loop::sy#0 ← (unumber)(number) 0
Inlining cast (byte) loop::ss#0 ← (unumber)(number) 0
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 53248
Simplifying constant pointer cast (byte*) 53249
@ -1292,9 +1278,7 @@ Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast $3f8
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast 2
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast $ff
@ -1303,7 +1287,6 @@ Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast $15
Simplifying constant integer cast 1
@ -1322,20 +1305,16 @@ Simplifying constant pointer cast (byte*) 8448
Simplifying constant integer cast 3
Simplifying constant integer cast $20
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast $40
Simplifying constant integer cast 9
Simplifying constant integer cast $ff
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $ff
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast 8
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) $80
Finalized unsigned number type (byte) $10
@ -1348,9 +1327,7 @@ Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (word) $3f8
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) $ff
@ -1359,7 +1336,6 @@ Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) $15
Finalized unsigned number type (byte) 1
@ -1375,20 +1351,16 @@ Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 3
Finalized unsigned number type (byte) $20
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $40
Finalized unsigned number type (byte) 9
Finalized unsigned number type (byte) $ff
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $ff
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 8
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in (unumber~) plexInit::$1 ← (byte) PLEX_COUNT#0 - (byte) 1
Inferred type updated to byte in (unumber~) plexSort::$1 ← (byte) PLEX_COUNT#0 - (byte) 2

View File

@ -312,7 +312,7 @@ init::@3: scope:[init] from init
*((byte*) SPRITES_ENABLE#0) ← (number) $ff
(byte*~) init::$1 ← (byte*) SCREEN#0 + (number) $3f8
(byte*) init::sprites_ptr#0 ← (byte*~) init::$1
(byte) init::i#0 ← (number) 0
(byte) init::i#0 ← (byte) 0
to:init::@1
init::@1: scope:[init] from init::@1 init::@3
(byte) init::i#2 ← phi( init::@1/(byte) init::i#1 init::@3/(byte) init::i#0 )
@ -357,7 +357,7 @@ anim::@6: scope:[anim] from anim::@4
(signed byte~) anim::$2 ← ((signed byte)) *((byte*) SIN#1 + (byte) anim::angle#2)
(signed byte) anim::sin_a#0 ← (signed byte~) anim::$2
(byte) anim::sprite_msb#0 ← (number) 0
(byte) anim::i#0 ← (number) 0
(byte) anim::i#0 ← (byte) 0
to:anim::@10
anim::@10: scope:[anim] from anim::@11 anim::@6
(byte*) SIN#22 ← phi( anim::@11/(byte*) SIN#7 anim::@6/(byte*) SIN#1 )
@ -1045,12 +1045,10 @@ Adding number conversion cast (snumber) 0 in (bool~) mulf8s_prepared::$4 ← (si
Adding number conversion cast (unumber) $40 in (byte*~) $0 ← (byte*) COS#0 + (number) $40
Adding number conversion cast (unumber) $ff in *((byte*) SPRITES_ENABLE#0) ← (number) $ff
Adding number conversion cast (unumber) $3f8 in (byte*~) init::$1 ← (byte*) SCREEN#0 + (number) $3f8
Adding number conversion cast (unumber) 0 in (byte) init::i#0 ← (number) 0
Adding number conversion cast (unumber) $40 in (byte*~) init::$2 ← (byte*) SPRITE#0 / (number) $40
Adding number conversion cast (unumber) 0 in (byte) anim::angle#0 ← (number) 0
Adding number conversion cast (unumber) $ff in (bool~) anim::$0 ← *((byte*) RASTER#0) != (number) $ff
Adding number conversion cast (unumber) 0 in (byte) anim::sprite_msb#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) anim::i#0 ← (number) 0
Adding number conversion cast (snumber) 2 in (number~) anim::$5 ← (signed word~) anim::$4 * (number) 2
Adding number conversion cast (snumber) anim::$5 in (number~) anim::$5 ← (signed word~) anim::$4 * (snumber)(number) 2
Adding number conversion cast (snumber) 2 in (number~) anim::$7 ← (signed word~) anim::$6 * (number) 2
@ -1103,13 +1101,11 @@ Inlining cast (byte~) mulf8s_prepared::$13 ← (byte)*((signed byte*) mulf8s_pre
Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400
Inlining cast (byte*) COS#0 ← (byte*)(number) $2000
Inlining cast *((byte*) SPRITES_ENABLE#0) ← (unumber)(number) $ff
Inlining cast (byte) init::i#0 ← (unumber)(number) 0
Inlining cast (byte~) init::$3 ← (byte)(byte*~) init::$2
Inlining cast (byte) anim::angle#0 ← (unumber)(number) 0
Inlining cast (signed byte~) anim::$1 ← (signed byte)*((byte*) COS#0 + (byte) anim::angle#2)
Inlining cast (signed byte~) anim::$2 ← (signed byte)*((byte*) SIN#1 + (byte) anim::angle#2)
Inlining cast (byte) anim::sprite_msb#0 ← (unumber)(number) 0
Inlining cast (byte) anim::i#0 ← (unumber)(number) 0
Inlining cast (byte~) anim::mulf8s_prepare1_$0#0 ← (byte)(signed byte) anim::mulf8s_prepare1_a#1
Inlining cast (byte~) anim::mulf8s_prepare2_$0#0 ← (byte)(signed byte) anim::mulf8s_prepare2_a#1
Inlining cast (signed byte~) anim::$14 ← (signed byte)(byte~) anim::$13
@ -1154,7 +1150,6 @@ Simplifying constant pointer cast (byte*) 8192
Simplifying constant integer cast $40
Simplifying constant integer cast $ff
Simplifying constant integer cast $3f8
Simplifying constant integer cast 0
Simplifying constant integer cast $40
Simplifying constant integer cast -$46
Simplifying constant integer cast -$46
@ -1175,7 +1170,6 @@ Simplifying constant integer cast $46
Simplifying constant integer cast 0
Simplifying constant integer cast $ff
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 2
@ -1213,12 +1207,10 @@ Finalized signed number type (signed byte) 0
Finalized unsigned number type (byte) $40
Finalized unsigned number type (byte) $ff
Finalized unsigned number type (word) $3f8
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $40
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $ff
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized signed number type (signed byte) 2
Finalized signed number type (signed byte) 2
Finalized signed number type (signed byte) 2

View File

@ -169,7 +169,7 @@ scroll_bit::@7: scope:[scroll_bit] from scroll_bit::@1
(byte*~) scroll_bit::$4 ← (byte*) SCREEN#0 + (number) $28
(byte*~) scroll_bit::$5 ← (byte*~) scroll_bit::$4 + (number) $27
(byte*) scroll_bit::sc#0 ← (byte*~) scroll_bit::$5
(byte) scroll_bit::r#0 ← (number) 0
(byte) scroll_bit::r#0 ← (byte) 0
to:scroll_bit::@3
scroll_bit::@2: scope:[scroll_bit] from scroll_bit
(byte*) nxt#24 ← phi( scroll_bit/(byte*) nxt#29 )
@ -671,7 +671,6 @@ Adding number conversion cast (unumber) 0 in (bool~) scroll_bit::$1 ← (byte) c
Adding number conversion cast (unumber) $32 in *((byte*) PROCPORT#0) ← (number) $32
Adding number conversion cast (unumber) $28 in (byte*~) scroll_bit::$4 ← (byte*) SCREEN#0 + (number) $28
Adding number conversion cast (unumber) $27 in (byte*~) scroll_bit::$5 ← (byte*~) scroll_bit::$4 + (number) $27
Adding number conversion cast (unumber) 0 in (byte) scroll_bit::r#0 ← (number) 0
Adding number conversion cast (unumber) 8 in (number~) scroll_bit::$7 ← (word) scroll_bit::c#0 * (number) 8
Adding number conversion cast (unumber) scroll_bit::$7 in (number~) scroll_bit::$7 ← (word) scroll_bit::c#0 * (unumber)(number) 8
Adding number conversion cast (unumber) $80 in (byte) current_bit#6 ← (number) $80
@ -727,7 +726,6 @@ Inlining cast (byte) scroll#2 ← (unumber)(number) 7
Inlining cast (byte) scroll#4 ← (unumber)(number) 7
Inlining cast (byte) current_bit#4 ← (unumber)(number) 1
Inlining cast *((byte*) PROCPORT#0) ← (unumber)(number) $32
Inlining cast (byte) scroll_bit::r#0 ← (unumber)(number) 0
Inlining cast (byte) current_bit#6 ← (unumber)(number) $80
Inlining cast *((byte*) PROCPORT#0) ← (unumber)(number) $37
Inlining cast (byte) scroll_hard::i#0 ← (unumber)(number) 0
@ -766,7 +764,6 @@ Simplifying constant integer cast 0
Simplifying constant integer cast $32
Simplifying constant integer cast $28
Simplifying constant integer cast $27
Simplifying constant integer cast 0
Simplifying constant integer cast 8
Simplifying constant integer cast $80
Simplifying constant integer cast 0
@ -797,7 +794,6 @@ Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $32
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) $27
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 8
Finalized unsigned number type (byte) $80
Finalized unsigned number type (byte) 0

View File

@ -137,7 +137,7 @@ divr16u: scope:[divr16u] from div32u16u div32u16u::@2
(word) divr16u::dividend#5 ← phi( div32u16u/(word) divr16u::dividend#1 div32u16u::@2/(word) divr16u::dividend#2 )
(word) divr16u::rem#10 ← phi( div32u16u/(word) divr16u::rem#3 div32u16u::@2/(word) divr16u::rem#4 )
(word) divr16u::quotient#0 ← (number) 0
(byte) divr16u::i#0 ← (number) 0
(byte) divr16u::i#0 ← (byte) 0
to:divr16u::@1
divr16u::@1: scope:[divr16u] from divr16u divr16u::@3
(byte) divr16u::i#5 ← phi( divr16u/(byte) divr16u::i#0 divr16u::@3/(byte) divr16u::i#1 )
@ -683,7 +683,7 @@ main::@4: scope:[main] from main::@3
main::@5: scope:[main] from main::@4
(word) xsin_idx#21 ← phi( main::@4/(word) xsin_idx#22 )
(word) rem16u#30 ← phi( main::@4/(word) rem16u#33 )
(byte) main::ch#0 ← (number) 0
(byte) main::ch#0 ← (byte) 0
to:main::@1
main::@1: scope:[main] from main::@1 main::@5
(word) xsin_idx#20 ← phi( main::@1/(word) xsin_idx#20 main::@5/(word) xsin_idx#21 )
@ -1658,7 +1658,6 @@ Adding number conversion cast (unumber) 1 in (byte) WHITE#0 ← (number) 1
Adding number conversion cast (unumber) $b in (byte) DARK_GREY#0 ← (number) $b
Adding number conversion cast (unumber) 0 in (word) rem16u#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (word) divr16u::quotient#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) divr16u::i#0 ← (number) 0
Adding number conversion cast (unumber) 1 in (word~) divr16u::$0 ← (word) divr16u::rem#5 << (number) 1
Adding number conversion cast (unumber) $80 in (number~) divr16u::$2 ← (byte~) divr16u::$1 & (number) $80
Adding number conversion cast (unumber) divr16u::$2 in (number~) divr16u::$2 ← (byte~) divr16u::$1 & (unumber)(number) $80
@ -1709,7 +1708,6 @@ Adding number conversion cast (unumber) $3e8 in (word) fill::size#0 ← (number)
Adding number conversion cast (unumber) 8 in (number~) main::$2 ← (byte) WHITE#0 | (number) 8
Adding number conversion cast (unumber) main::$2 in (number~) main::$2 ← (byte) WHITE#0 | (unumber)(number) 8
Adding number conversion cast (unumber) $3e8 in (word) fill::size#1 ← (number) $3e8
Adding number conversion cast (unumber) 0 in (byte) main::ch#0 ← (number) 0
Adding number conversion cast (snumber) -$140 in (signed word) sin16s_gen2::min#0 ← (number) -$140
Adding number conversion cast (snumber) $140 in (signed word) sin16s_gen2::max#0 ← (number) $140
Adding number conversion cast (unumber) 0 in (word) xsin_idx#2 ← (number) 0
@ -1763,7 +1761,6 @@ Inlining cast (byte) WHITE#0 ← (unumber)(number) 1
Inlining cast (byte) DARK_GREY#0 ← (unumber)(number) $b
Inlining cast (word) rem16u#0 ← (unumber)(number) 0
Inlining cast (word) divr16u::quotient#0 ← (unumber)(number) 0
Inlining cast (byte) divr16u::i#0 ← (unumber)(number) 0
Inlining cast (word) divr16u::rem#3 ← (unumber)(number) 0
Inlining cast (dword) mul16u::res#0 ← (unumber)(number) 0
Inlining cast (word~) mul16s::$0 ← (word)(signed word) mul16s::a#1
@ -1794,7 +1791,6 @@ Inlining cast (word~) main::toD0181_$0#0 ← (word)(byte*) main::toD0181_screen#
Inlining cast (word~) main::toD0181_$4#0 ← (word)(byte*) main::toD0181_gfx#1
Inlining cast (word) fill::size#0 ← (unumber)(number) $3e8
Inlining cast (word) fill::size#1 ← (unumber)(number) $3e8
Inlining cast (byte) main::ch#0 ← (unumber)(number) 0
Inlining cast (signed word) sin16s_gen2::min#0 ← (snumber)(number) -$140
Inlining cast (signed word) sin16s_gen2::max#0 ← (snumber)(number) $140
Inlining cast (word) xsin_idx#2 ← (unumber)(number) 0
@ -1828,7 +1824,6 @@ Simplifying constant integer cast 1
Simplifying constant integer cast $b
Simplifying constant integer cast 0
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
@ -1872,7 +1867,6 @@ Simplifying constant integer cast $f
Simplifying constant integer cast $3e8
Simplifying constant integer cast 8
Simplifying constant integer cast $3e8
Simplifying constant integer cast 0
Simplifying constant integer cast -$140
Simplifying constant integer cast $140
Simplifying constant integer cast 0
@ -1907,7 +1901,6 @@ Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) $b
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) $80
Finalized unsigned number type (byte) 0
@ -1947,7 +1940,6 @@ Finalized unsigned number type (byte) $f
Finalized unsigned number type (word) $3e8
Finalized unsigned number type (byte) 8
Finalized unsigned number type (word) $3e8
Finalized unsigned number type (byte) 0
Finalized signed number type (signed word) -$140
Finalized signed number type (signed word) $140
Finalized unsigned number type (byte) 0

View File

@ -134,7 +134,7 @@ main::@10: scope:[main] from main::@9
call fill
to:main::@11
main::@11: scope:[main] from main::@10
(byte) main::ch#0 ← (number) 0
(byte) main::ch#0 ← (byte) 0
to:main::@1
main::@1: scope:[main] from main::@1 main::@11
(byte) main::ch#2 ← phi( main::@1/(byte) main::ch#1 main::@11/(byte) main::ch#0 )
@ -312,7 +312,6 @@ Adding number conversion cast (unumber) main::$2 in (word) fill::size#0 ← (num
Adding number conversion cast (unumber) 8 in (number~) main::$5 ← (byte) WHITE#0 | (number) 8
Adding number conversion cast (unumber) main::$5 in (number~) main::$5 ← (byte) WHITE#0 | (unumber)(number) 8
Adding number conversion cast (unumber) main::$4 in (word) fill::size#1 ← (number~) main::$4
Adding number conversion cast (unumber) 0 in (byte) main::ch#0 ← (number) 0
Adding number conversion cast (unumber) $3e7 in (byte*~) main::$10 ← (byte*) SCREEN#0 + (number) $3e7
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) BORDERCOL#0 ← (byte*)(number) $d020
@ -333,7 +332,6 @@ Inlining cast (word~) main::toD0181_$0#0 ← (word)(byte*) main::toD0181_screen#
Inlining cast (word~) main::toD0181_$4#0 ← (word)(byte*) main::toD0181_gfx#1
Inlining cast (word) fill::size#0 ← (unumber)(number~) main::$2
Inlining cast (word) fill::size#1 ← (unumber)(number~) main::$4
Inlining cast (byte) main::ch#0 ← (unumber)(number) 0
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 53280
Simplifying constant pointer cast (byte*) 53281
@ -354,7 +352,6 @@ Simplifying constant integer cast 4
Simplifying constant integer cast 4
Simplifying constant integer cast $f
Simplifying constant integer cast 8
Simplifying constant integer cast 0
Simplifying constant integer cast $3e7
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) $10
@ -367,7 +364,6 @@ Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) $f
Finalized unsigned number type (byte) 8
Finalized unsigned number type (byte) 0
Finalized unsigned number type (word) $3e7
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to word in (unumber~) main::toD0181_$1#0 ← (word~) main::toD0181_$0#0 & (word) $3fff

View File

@ -139,7 +139,7 @@ divr16u: scope:[divr16u] from div32u16u div32u16u::@2
(word) divr16u::dividend#5 ← phi( div32u16u/(word) divr16u::dividend#1 div32u16u::@2/(word) divr16u::dividend#2 )
(word) divr16u::rem#10 ← phi( div32u16u/(word) divr16u::rem#3 div32u16u::@2/(word) divr16u::rem#4 )
(word) divr16u::quotient#0 ← (number) 0
(byte) divr16u::i#0 ← (number) 0
(byte) divr16u::i#0 ← (byte) 0
to:divr16u::@1
divr16u::@1: scope:[divr16u] from divr16u divr16u::@3
(byte) divr16u::i#5 ← phi( divr16u/(byte) divr16u::i#0 divr16u::@3/(byte) divr16u::i#1 )
@ -622,7 +622,7 @@ fill::@return: scope:[fill] from fill::@1
bitmap_init: scope:[bitmap_init] from main::@9
(byte*) bitmap_init::bitmap#5 ← phi( main::@9/(byte*) bitmap_init::bitmap#0 )
(byte) bitmap_init::bits#0 ← (number) $80
(byte) bitmap_init::x#0 ← (number) 0
(byte) bitmap_init::x#0 ← (byte) 0
to:bitmap_init::@1
bitmap_init::@1: scope:[bitmap_init] from bitmap_init bitmap_init::@2
(byte*) bitmap_init::bitmap#3 ← phi( bitmap_init/(byte*) bitmap_init::bitmap#5 bitmap_init::@2/(byte*) bitmap_init::bitmap#2 )
@ -650,7 +650,7 @@ bitmap_init::@3: scope:[bitmap_init] from bitmap_init::@1
bitmap_init::@4: scope:[bitmap_init] from bitmap_init::@2
(byte*) bitmap_init::bitmap#1 ← phi( bitmap_init::@2/(byte*) bitmap_init::bitmap#2 )
(byte*) bitmap_init::yoffs#0 ← (byte*) bitmap_init::bitmap#1
(byte) bitmap_init::y#0 ← (number) 0
(byte) bitmap_init::y#0 ← (byte) 0
to:bitmap_init::@5
bitmap_init::@5: scope:[bitmap_init] from bitmap_init::@4 bitmap_init::@6
(byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@4/(byte*) bitmap_init::yoffs#0 bitmap_init::@6/(byte*) bitmap_init::yoffs#4 )
@ -686,12 +686,12 @@ bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@6
bitmap_clear: scope:[bitmap_clear] from main::@10
(byte*~) bitmap_clear::$0 ← ((byte*)) { *((byte[$100]) bitmap_plot_yhi#0 + (number) 0), *((byte[$100]) bitmap_plot_ylo#0 + (number) 0) }
(byte*) bitmap_clear::bitmap#0 ← (byte*~) bitmap_clear::$0
(byte) bitmap_clear::y#0 ← (number) 0
(byte) bitmap_clear::y#0 ← (byte) 0
to:bitmap_clear::@1
bitmap_clear::@1: scope:[bitmap_clear] from bitmap_clear bitmap_clear::@3
(byte) bitmap_clear::y#4 ← phi( bitmap_clear/(byte) bitmap_clear::y#0 bitmap_clear::@3/(byte) bitmap_clear::y#1 )
(byte*) bitmap_clear::bitmap#3 ← phi( bitmap_clear/(byte*) bitmap_clear::bitmap#0 bitmap_clear::@3/(byte*) bitmap_clear::bitmap#4 )
(byte) bitmap_clear::x#0 ← (number) 0
(byte) bitmap_clear::x#0 ← (byte) 0
to:bitmap_clear::@2
bitmap_clear::@2: scope:[bitmap_clear] from bitmap_clear::@1 bitmap_clear::@2
(byte) bitmap_clear::y#3 ← phi( bitmap_clear::@1/(byte) bitmap_clear::y#4 bitmap_clear::@2/(byte) bitmap_clear::y#3 )
@ -1746,7 +1746,6 @@ Adding number conversion cast (unumber) 8 in (byte) VIC_CSEL#0 ← (number) 8
Adding number conversion cast (unumber) 1 in (byte) WHITE#0 ← (number) 1
Adding number conversion cast (unumber) 0 in (word) rem16u#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (word) divr16u::quotient#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) divr16u::i#0 ← (number) 0
Adding number conversion cast (unumber) 1 in (word~) divr16u::$0 ← (word) divr16u::rem#5 << (number) 1
Adding number conversion cast (unumber) $80 in (number~) divr16u::$2 ← (byte~) divr16u::$1 & (number) $80
Adding number conversion cast (unumber) divr16u::$2 in (number~) divr16u::$2 ← (byte~) divr16u::$1 & (unumber)(number) $80
@ -1783,11 +1782,9 @@ Adding number conversion cast (unumber) 0 in (byte) mulu16_sel::select#4 ← (nu
Adding number conversion cast (unumber) 4 in (word~) sin16s::$13 ← (word) sin16s::x5#0 >> (number) 4
Adding number conversion cast (unumber) 0 in (bool~) sin16s::$16 ← (byte) sin16s::isUpper#2 != (number) 0
Adding number conversion cast (unumber) $80 in (byte) bitmap_init::bits#0 ← (number) $80
Adding number conversion cast (unumber) 0 in (byte) bitmap_init::x#0 ← (number) 0
Adding number conversion cast (unumber) 1 in (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (number) 1
Adding number conversion cast (unumber) 0 in (bool~) bitmap_init::$0 ← (byte) bitmap_init::bits#1 == (number) 0
Adding number conversion cast (unumber) $80 in (byte) bitmap_init::bits#2 ← (number) $80
Adding number conversion cast (unumber) 0 in (byte) bitmap_init::y#0 ← (number) 0
Adding number conversion cast (unumber) 7 in (number~) bitmap_init::$3 ← (byte) bitmap_init::y#2 & (number) 7
Adding number conversion cast (unumber) bitmap_init::$3 in (number~) bitmap_init::$3 ← (byte) bitmap_init::y#2 & (unumber)(number) 7
Adding number conversion cast (unumber) bitmap_init::$5 in (number~) bitmap_init::$5 ← (unumber~) bitmap_init::$3 | (byte~) bitmap_init::$4
@ -1797,8 +1794,6 @@ Adding number conversion cast (unumber) 7 in (bool~) bitmap_init::$8 ← (unumbe
Adding number conversion cast (unumber) bitmap_init::$10 in (byte*~) bitmap_init::$11 ← (byte*) bitmap_init::yoffs#3 + (number~) bitmap_init::$10
Adding number conversion cast (unumber) 0 in (var) bitmap_clear::$3 ← (byte)*((byte[$100]) bitmap_plot_yhi#0 + (number) 0) w= (byte)*((byte[$100]) bitmap_plot_ylo#0 + (number) 0)
Adding number conversion cast (unumber) 0 in (var) bitmap_clear::$3 ← (byte)*((byte[$100]) bitmap_plot_yhi#0 + (unumber)(number) 0) w= (byte)*((byte[$100]) bitmap_plot_ylo#0 + (number) 0)
Adding number conversion cast (unumber) 0 in (byte) bitmap_clear::y#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) bitmap_clear::x#0 ← (number) 0
Adding number conversion cast (unumber) 0 in *((byte*) bitmap_clear::bitmap#2) ← (number) 0
Adding number conversion cast (unumber) $fff8 in (number~) bitmap_plot::$1 ← (word) bitmap_plot::x#2 & (number) $fff8
Adding number conversion cast (unumber) bitmap_plot::$1 in (number~) bitmap_plot::$1 ← (word) bitmap_plot::x#2 & (unumber)(number) $fff8
@ -1851,7 +1846,6 @@ Inlining cast (byte*) CIA2_PORT_A_DDR#0 ← (byte*)(number) $dd02
Inlining cast (byte) WHITE#0 ← (unumber)(number) 1
Inlining cast (word) rem16u#0 ← (unumber)(number) 0
Inlining cast (word) divr16u::quotient#0 ← (unumber)(number) 0
Inlining cast (byte) divr16u::i#0 ← (unumber)(number) 0
Inlining cast (word) divr16u::rem#3 ← (unumber)(number) 0
Inlining cast (dword) mul16u::res#0 ← (unumber)(number) 0
Inlining cast (word~) mul16s::$0 ← (word)(signed word) mul16s::a#1
@ -1876,12 +1870,8 @@ Inlining cast (byte) mulu16_sel::select#4 ← (unumber)(number) 0
Inlining cast (signed word~) sin16s::$15 ← (signed word)(word) sin16s::usinx#1
Inlining cast (signed word~) sin16s::$20 ← (signed word)(word) sin16s::usinx#3
Inlining cast (byte) bitmap_init::bits#0 ← (unumber)(number) $80
Inlining cast (byte) bitmap_init::x#0 ← (unumber)(number) 0
Inlining cast (byte) bitmap_init::bits#2 ← (unumber)(number) $80
Inlining cast (byte) bitmap_init::y#0 ← (unumber)(number) 0
Inlining cast (unumber~) bitmap_init::$13 ← (unumber)(number~) bitmap_init::$10
Inlining cast (byte) bitmap_clear::y#0 ← (unumber)(number) 0
Inlining cast (byte) bitmap_clear::x#0 ← (unumber)(number) 0
Inlining cast *((byte*) bitmap_clear::bitmap#2) ← (unumber)(number) 0
Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400
Inlining cast (byte*) BITMAP#0 ← (byte*)(number) $2000
@ -1916,7 +1906,6 @@ Simplifying constant pointer cast (byte*) 56578
Simplifying constant integer cast 1
Simplifying constant integer cast 0
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
@ -1951,11 +1940,9 @@ Simplifying constant integer cast 0
Simplifying constant integer cast 4
Simplifying constant integer cast 0
Simplifying constant integer cast $80
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast $80
Simplifying constant integer cast 0
Simplifying constant integer cast 7
Simplifying constant integer cast 7
Simplifying constant integer cast 7
@ -1964,8 +1951,6 @@ Simplifying constant integer cast 0
Simplifying constant integer cast *((byte[$100]) bitmap_plot_ylo#0 + (unumber)(number) 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 *((byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#2)
Simplifying constant integer cast *((byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#2)
Simplifying constant integer cast $fff8
@ -2003,7 +1988,6 @@ Finalized unsigned number type (byte) 8
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) $80
Finalized unsigned number type (byte) 0
@ -2036,19 +2020,15 @@ Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $80
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $80
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 7
Finalized unsigned number type (byte) 7
Finalized unsigned number type (byte) 7
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (word) $fff8
Finalized unsigned number type (word) $200
Finalized unsigned number type (byte) 3

View File

@ -293,7 +293,7 @@ init: scope:[init] from main
init::@3: scope:[init] from init
(byte) progress_idx#45 ← phi( init/(byte) progress_idx#47 )
(byte*) progress_cursor#45 ← phi( init/(byte*) progress_cursor#47 )
(byte) init::i#0 ← (number) 0
(byte) init::i#0 ← (byte) 0
to:init::@1
init::@1: scope:[init] from init::@1 init::@3
(byte) progress_idx#43 ← phi( init::@1/(byte) progress_idx#43 init::@3/(byte) progress_idx#45 )
@ -442,7 +442,7 @@ anim: scope:[anim] from main::@3
(byte) anim::yidx#0 ← (byte) sin_idx_y#9
(byte) anim::j2#0 ← (number) $c
(byte) anim::x_msb#0 ← (number) 0
(byte) anim::j#0 ← (number) 0
(byte) anim::j#0 ← (byte) 0
to:anim::@4
anim::@4: scope:[anim] from anim anim::@6
(byte) sin_idx_y#24 ← phi( anim/(byte) sin_idx_y#9 anim::@6/(byte) sin_idx_y#19 )
@ -569,7 +569,7 @@ place_sprites: scope:[place_sprites] from init::@2
(byte) place_sprites::spr_x#0 ← (number) $3c
(byte) place_sprites::j2#0 ← (number) 0
(byte) place_sprites::col#0 ← (number) 5
(byte) place_sprites::j#0 ← (number) 0
(byte) place_sprites::j#0 ← (byte) 0
to:place_sprites::@1
place_sprites::@1: scope:[place_sprites] from place_sprites place_sprites::@1
(byte) place_sprites::col#2 ← phi( place_sprites/(byte) place_sprites::col#0 place_sprites::@1/(byte) place_sprites::col#1 )
@ -600,7 +600,7 @@ place_sprites::@return: scope:[place_sprites] from place_sprites::@1
gen_sprites: scope:[gen_sprites] from init::@4
(byte[]) gen_sprites::cml#0 ← (const string) gen_sprites::$3
(byte*) gen_sprites::spr#0 ← (byte*) sprites#0
(byte) gen_sprites::i#0 ← (number) 0
(byte) gen_sprites::i#0 ← (byte) 0
to:gen_sprites::@1
gen_sprites::@1: scope:[gen_sprites] from gen_sprites gen_sprites::@3
(byte*) gen_sprites::spr#2 ← phi( gen_sprites/(byte*) gen_sprites::spr#0 gen_sprites::@3/(byte*) gen_sprites::spr#1 )
@ -630,7 +630,7 @@ gen_chargen_sprite: scope:[gen_chargen_sprite] from gen_sprites::@1
(byte*) gen_chargen_sprite::chargen#0 ← (byte*~) gen_chargen_sprite::$2
asm { sei }
*((byte*) PROCPORT#0) ← (number) $32
(byte) gen_chargen_sprite::y#0 ← (number) 0
(byte) gen_chargen_sprite::y#0 ← (byte) 0
to:gen_chargen_sprite::@1
gen_chargen_sprite::@1: scope:[gen_chargen_sprite] from gen_chargen_sprite gen_chargen_sprite::@8
(byte*) gen_chargen_sprite::sprite#11 ← phi( gen_chargen_sprite/(byte*) gen_chargen_sprite::sprite#12 gen_chargen_sprite::@8/(byte*) gen_chargen_sprite::sprite#2 )
@ -639,7 +639,7 @@ gen_chargen_sprite::@1: scope:[gen_chargen_sprite] from gen_chargen_sprite gen_
(byte) gen_chargen_sprite::bits#0 ← *((byte*) gen_chargen_sprite::chargen#1 + (byte) gen_chargen_sprite::y#2)
(byte) gen_chargen_sprite::s_gen#0 ← (number) 0
(byte) gen_chargen_sprite::s_gen_cnt#0 ← (number) 0
(byte) gen_chargen_sprite::x#0 ← (number) 0
(byte) gen_chargen_sprite::x#0 ← (byte) 0
to:gen_chargen_sprite::@2
gen_chargen_sprite::@2: scope:[gen_chargen_sprite] from gen_chargen_sprite::@1 gen_chargen_sprite::@7
(byte*) gen_chargen_sprite::chargen#9 ← phi( gen_chargen_sprite::@1/(byte*) gen_chargen_sprite::chargen#1 gen_chargen_sprite::@7/(byte*) gen_chargen_sprite::chargen#3 )
@ -664,7 +664,7 @@ gen_chargen_sprite::@3: scope:[gen_chargen_sprite] from gen_chargen_sprite::@10
(byte) gen_chargen_sprite::s_gen_cnt#4 ← phi( gen_chargen_sprite::@10/(byte) gen_chargen_sprite::s_gen_cnt#6 gen_chargen_sprite::@2/(byte) gen_chargen_sprite::s_gen_cnt#7 )
(byte) gen_chargen_sprite::c#3 ← phi( gen_chargen_sprite::@10/(byte) gen_chargen_sprite::c#1 gen_chargen_sprite::@2/(byte) gen_chargen_sprite::c#0 )
(byte) gen_chargen_sprite::s_gen#5 ← phi( gen_chargen_sprite::@10/(byte) gen_chargen_sprite::s_gen#7 gen_chargen_sprite::@2/(byte) gen_chargen_sprite::s_gen#8 )
(byte) gen_chargen_sprite::b#0 ← (number) 0
(byte) gen_chargen_sprite::b#0 ← (byte) 0
to:gen_chargen_sprite::@4
gen_chargen_sprite::@10: scope:[gen_chargen_sprite] from gen_chargen_sprite::@2
(byte*) gen_chargen_sprite::chargen#8 ← phi( gen_chargen_sprite::@2/(byte*) gen_chargen_sprite::chargen#9 )
@ -1716,7 +1716,6 @@ Successful SSA optimization Pass2FixInlineConstructorsNew
Adding number conversion cast (unumber) $dd in (byte) sinlen_x#0 ← (number) $dd
Adding number conversion cast (unumber) $c5 in (byte) sinlen_y#0 ← (number) $c5
Adding number conversion cast (unumber) $ff in (bool~) main::$1 ← *((byte*) RASTER#0) != (number) $ff
Adding number conversion cast (unumber) 0 in (byte) init::i#0 ← (number) 0
Adding number conversion cast (unumber) 0 in *((byte*) COLS#0 + (byte) init::i#2) ← (number) 0
Adding number conversion cast (unumber) $28 in (number~) init::$9 ← (number) $28 + (byte) init::i#2
Adding number conversion cast (unumber) init::$9 in (number~) init::$9 ← (unumber)(number) $28 + (byte) init::i#2
@ -1736,7 +1735,6 @@ 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
Adding number conversion cast (unumber) $c in (byte) anim::j2#0 ← (number) $c
Adding number conversion cast (unumber) 0 in (byte) anim::x_msb#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) anim::j#0 ← (number) 0
Adding number conversion cast (unumber) 2 in (number~) anim::$6 ← (byte) anim::x_msb#2 * (number) 2
Adding number conversion cast (unumber) anim::$6 in (number~) anim::$6 ← (byte) anim::x_msb#2 * (unumber)(number) 2
Adding number conversion cast (unumber) anim::$8 in (number~) anim::$8 ← (unumber~) anim::$6 | (byte~) anim::$7
@ -1757,26 +1755,21 @@ Adding number conversion cast (unumber) place_sprites::$2 in (number~) place_spr
Adding number conversion cast (unumber) $3c in (byte) place_sprites::spr_x#0 ← (number) $3c
Adding number conversion cast (unumber) 0 in (byte) place_sprites::j2#0 ← (number) 0
Adding number conversion cast (unumber) 5 in (byte) place_sprites::col#0 ← (number) 5
Adding number conversion cast (unumber) 0 in (byte) place_sprites::j#0 ← (number) 0
Adding number conversion cast (unumber) $50 in *((byte*) SPRITES_YPOS#0 + (byte) place_sprites::j2#3) ← (number) $50
Adding number conversion cast (unumber) $20 in (number~) place_sprites::$4 ← (byte) place_sprites::spr_x#2 + (number) $20
Adding number conversion cast (unumber) place_sprites::$4 in (number~) place_sprites::$4 ← (byte) place_sprites::spr_x#2 + (unumber)(number) $20
Adding number conversion cast (unumber) place_sprites::$5 in (number~) place_sprites::$6 ← (byte) place_sprites::col#2 ^ (number~) place_sprites::$5
Adding number conversion cast (unumber) place_sprites::$6 in (number~) place_sprites::$6 ← (byte) place_sprites::col#2 ^ (unumber~) place_sprites::$8
Adding number conversion cast (unumber) 0 in (byte) gen_sprites::i#0 ← (number) 0
Adding number conversion cast (unumber) $40 in (byte*~) gen_sprites::$1 ← (byte*) gen_sprites::spr#3 + (number) $40
Adding number conversion cast (unumber) 8 in (number~) gen_chargen_sprite::$1 ← (word~) gen_chargen_sprite::$0 * (number) 8
Adding number conversion cast (unumber) gen_chargen_sprite::$1 in (number~) gen_chargen_sprite::$1 ← (word~) gen_chargen_sprite::$0 * (unumber)(number) 8
Adding number conversion cast (unumber) $32 in *((byte*) PROCPORT#0) ← (number) $32
Adding number conversion cast (unumber) 0 in (byte) gen_chargen_sprite::y#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) gen_chargen_sprite::s_gen#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) gen_chargen_sprite::s_gen_cnt#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) gen_chargen_sprite::x#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) gen_chargen_sprite::c#0 ← (number) 0
Adding number conversion cast (unumber) $80 in (number~) gen_chargen_sprite::$3 ← (byte) gen_chargen_sprite::bits#2 & (number) $80
Adding number conversion cast (unumber) gen_chargen_sprite::$3 in (number~) gen_chargen_sprite::$3 ← (byte) gen_chargen_sprite::bits#2 & (unumber)(number) $80
Adding number conversion cast (unumber) 0 in (bool~) gen_chargen_sprite::$4 ← (unumber~) gen_chargen_sprite::$3 != (number) 0
Adding number conversion cast (unumber) 0 in (byte) gen_chargen_sprite::b#0 ← (number) 0
Adding number conversion cast (unumber) 1 in (byte) gen_chargen_sprite::c#1 ← (number) 1
Adding number conversion cast (unumber) 2 in (number~) gen_chargen_sprite::$6 ← (byte) gen_chargen_sprite::s_gen#3 * (number) 2
Adding number conversion cast (unumber) gen_chargen_sprite::$6 in (number~) gen_chargen_sprite::$6 ← (byte) gen_chargen_sprite::s_gen#3 * (unumber)(number) 2
@ -1818,7 +1811,6 @@ Inlining cast (byte) sinlen_x#0 ← (unumber)(number) $dd
Inlining cast (byte) sinlen_y#0 ← (unumber)(number) $c5
Inlining cast (byte*) sprites#0 ← (byte*)(number) $2000
Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400
Inlining cast (byte) init::i#0 ← (unumber)(number) 0
Inlining cast *((byte*) COLS#0 + (byte) init::i#2) ← (unumber)(number) 0
Inlining cast *((byte*) COLS#0 + (unumber~) init::$9) ← (unumber)(number) $b
Inlining cast (byte) gen_sintab::min#0 ← (unumber)(number) 0
@ -1832,7 +1824,6 @@ Inlining cast (byte) sin_idx_x#2 ← (unumber)(number) 0
Inlining cast (byte) sin_idx_y#2 ← (unumber)(number) 0
Inlining cast (byte) anim::j2#0 ← (unumber)(number) $c
Inlining cast (byte) anim::x_msb#0 ← (unumber)(number) 0
Inlining cast (byte) anim::j#0 ← (unumber)(number) 0
Inlining cast (word~) anim::$4 ← (word)(number) $1e
Inlining cast (byte) sin_idx_x#4 ← (unumber)(number) 0
Inlining cast (byte) sin_idx_y#4 ← (unumber)(number) 0
@ -1844,18 +1835,13 @@ Inlining cast (byte~) place_sprites::$3 ← (byte)(unumber~) place_sprites::$2
Inlining cast (byte) place_sprites::spr_x#0 ← (unumber)(number) $3c
Inlining cast (byte) place_sprites::j2#0 ← (unumber)(number) 0
Inlining cast (byte) place_sprites::col#0 ← (unumber)(number) 5
Inlining cast (byte) place_sprites::j#0 ← (unumber)(number) 0
Inlining cast *((byte*) SPRITES_YPOS#0 + (byte) place_sprites::j2#3) ← (unumber)(number) $50
Inlining cast (unumber~) place_sprites::$8 ← (unumber)(number~) place_sprites::$5
Inlining cast (byte) gen_sprites::i#0 ← (unumber)(number) 0
Inlining cast (word~) gen_chargen_sprite::$0 ← (word)(byte) gen_chargen_sprite::ch#1
Inlining cast *((byte*) PROCPORT#0) ← (unumber)(number) $32
Inlining cast (byte) gen_chargen_sprite::y#0 ← (unumber)(number) 0
Inlining cast (byte) gen_chargen_sprite::s_gen#0 ← (unumber)(number) 0
Inlining cast (byte) gen_chargen_sprite::s_gen_cnt#0 ← (unumber)(number) 0
Inlining cast (byte) gen_chargen_sprite::x#0 ← (unumber)(number) 0
Inlining cast (byte) gen_chargen_sprite::c#0 ← (unumber)(number) 0
Inlining cast (byte) gen_chargen_sprite::b#0 ← (unumber)(number) 0
Inlining cast (byte) gen_chargen_sprite::c#1 ← (unumber)(number) 1
Inlining cast (byte) gen_chargen_sprite::s_gen#2 ← (unumber)(number) 0
Inlining cast (byte) gen_chargen_sprite::s_gen_cnt#2 ← (unumber)(number) 0
@ -1891,7 +1877,6 @@ Simplifying constant pointer cast (byte*) 8192
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast $ff
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $28
Simplifying constant integer cast $b
Simplifying constant integer cast 0
@ -1918,7 +1903,6 @@ Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $c
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $1e
Simplifying constant integer cast 2
Simplifying constant integer cast $a
@ -1934,21 +1918,16 @@ Simplifying constant integer cast $40
Simplifying constant integer cast $3c
Simplifying constant integer cast 0
Simplifying constant integer cast 5
Simplifying constant integer cast 0
Simplifying constant integer cast $50
Simplifying constant integer cast $20
Simplifying constant integer cast 0
Simplifying constant integer cast $40
Simplifying constant integer cast 8
Simplifying constant integer cast $32
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 $80
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 8
@ -1983,7 +1962,6 @@ Finalized unsigned number type (byte) $dd
Finalized unsigned number type (byte) $c5
Finalized unsigned number type (byte) $ff
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) $b
Finalized unsigned number type (byte) 0
@ -2001,7 +1979,6 @@ Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $c
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) $a
Finalized unsigned number type (byte) 8
@ -2016,21 +1993,16 @@ Finalized unsigned number type (byte) $40
Finalized unsigned number type (byte) $3c
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 5
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $50
Finalized unsigned number type (byte) $20
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $40
Finalized unsigned number type (byte) 8
Finalized unsigned number type (byte) $32
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $80
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) 8

View File

@ -19,7 +19,7 @@ main::@return: scope:[main] from main::@1
to:@return
fillscreen: scope:[fillscreen] from main
(byte) fillscreen::c#2 ← phi( main/(byte) fillscreen::c#0 )
(byte) fillscreen::j#0 ← (number) 0
(byte) fillscreen::j#0 ← (byte) 0
to:fillscreen::@1
fillscreen::@1: scope:[fillscreen] from fillscreen fillscreen::@1
(byte) fillscreen::j#2 ← phi( fillscreen/(byte) fillscreen::j#0 fillscreen::@1/(byte) fillscreen::j#1 )
@ -82,21 +82,17 @@ SYMBOL TABLE SSA
(byte) main::c
(byte) main::c#0
Adding number conversion cast (unumber) 0 in (byte) fillscreen::j#0 ← (number) 0
Adding number conversion cast (unumber) $100 in (byte*~) fillscreen::$0 ← (byte*) SCREEN#0 + (number) $100
Adding number conversion cast (unumber) $200 in (byte*~) fillscreen::$1 ← (byte*) SCREEN#0 + (number) $200
Adding number conversion cast (unumber) $3e8 in (byte*~) fillscreen::$2 ← (byte*) SCREEN#0 + (number) $3e8
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400
Inlining cast (byte) fillscreen::j#0 ← (unumber)(number) 0
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 0
Simplifying constant integer cast $100
Simplifying constant integer cast $200
Simplifying constant integer cast $3e8
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
Finalized unsigned number type (word) $100
Finalized unsigned number type (word) $200
Finalized unsigned number type (word) $3e8

View File

@ -27,7 +27,7 @@ main: scope:[main] from @4
main::@9: scope:[main] from main
to:main::@1
main::@1: scope:[main] from main::@11 main::@9
(byte) main::c#0 ← (number) $19
(byte) main::c#0 ← (byte) $19
to:main::@3
main::@3: scope:[main] from main::@1 main::@3 main::@6
(byte) main::c#4 ← phi( main::@1/(byte) main::c#0 main::@3/(byte) main::c#4 main::@6/(byte) main::c#1 )
@ -58,7 +58,7 @@ main::@return: scope:[main] from main::@11
return
to:@return
prepare: scope:[prepare] from main
(byte) prepare::i#0 ← (number) 0
(byte) prepare::i#0 ← (byte) 0
to:prepare::@1
prepare::@1: scope:[prepare] from prepare prepare::@1
(byte) prepare::i#2 ← phi( prepare/(byte) prepare::i#0 prepare::@1/(byte) prepare::i#1 )
@ -73,13 +73,13 @@ prepare::@return: scope:[prepare] from prepare::@1
flip: scope:[flip] from main::@7
(byte) flip::srcIdx#0 ← (number) 0
(byte) flip::dstIdx#0 ← (number) $f
(byte) flip::r#0 ← (number) $10
(byte) flip::r#0 ← (byte) $10
to:flip::@1
flip::@1: scope:[flip] from flip flip::@3
(byte) flip::r#4 ← phi( flip/(byte) flip::r#0 flip::@3/(byte) flip::r#1 )
(byte) flip::dstIdx#5 ← phi( flip/(byte) flip::dstIdx#0 flip::@3/(byte) flip::dstIdx#2 )
(byte) flip::srcIdx#3 ← phi( flip/(byte) flip::srcIdx#0 flip::@3/(byte) flip::srcIdx#4 )
(byte) flip::c#0 ← (number) $10
(byte) flip::c#0 ← (byte) $10
to:flip::@2
flip::@2: scope:[flip] from flip::@1 flip::@2
(byte) flip::r#3 ← phi( flip::@1/(byte) flip::r#4 flip::@2/(byte) flip::r#3 )
@ -104,7 +104,7 @@ flip::@3: scope:[flip] from flip::@2
if((bool~) flip::$2) goto flip::@1
to:flip::@4
flip::@4: scope:[flip] from flip::@3
(byte) flip::i#0 ← (number) 0
(byte) flip::i#0 ← (byte) 0
to:flip::@5
flip::@5: scope:[flip] from flip::@4 flip::@5
(byte) flip::i#2 ← phi( flip::@4/(byte) flip::i#0 flip::@5/(byte) flip::i#1 )
@ -122,7 +122,7 @@ plot: scope:[plot] from main::@10
(byte*~) plot::$2 ← (byte*~) plot::$1 + (number) $c
(byte*) plot::line#0 ← (byte*~) plot::$2
(byte) plot::i#0 ← (number) 0
(byte) plot::y#0 ← (number) $10
(byte) plot::y#0 ← (byte) $10
to:plot::@1
plot::@1: scope:[plot] from plot plot::@3
(byte) plot::y#4 ← phi( plot/(byte) plot::y#0 plot::@3/(byte) plot::y#1 )
@ -275,71 +275,47 @@ SYMBOL TABLE SSA
(byte) prepare::i#1
(byte) prepare::i#2
Adding number conversion cast (unumber) $19 in (byte) main::c#0 ← (number) $19
Adding number conversion cast (unumber) $fe in (bool~) main::$1 ← *((byte*) RASTER#0) != (number) $fe
Adding number conversion cast (unumber) $ff in (bool~) main::$2 ← *((byte*) RASTER#0) != (number) $ff
Adding number conversion cast (unumber) 0 in (byte) prepare::i#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) flip::srcIdx#0 ← (number) 0
Adding number conversion cast (unumber) $f in (byte) flip::dstIdx#0 ← (number) $f
Adding number conversion cast (unumber) $10 in (byte) flip::r#0 ← (number) $10
Adding number conversion cast (unumber) $10 in (byte) flip::c#0 ← (number) $10
Adding number conversion cast (unumber) $10 in (number~) flip::$0 ← (byte) flip::dstIdx#3 + (number) $10
Adding number conversion cast (unumber) flip::$0 in (number~) flip::$0 ← (byte) flip::dstIdx#3 + (unumber)(number) $10
Adding number conversion cast (unumber) 0 in (byte) flip::i#0 ← (number) 0
Adding number conversion cast (unumber) plot::$0 in (byte*~) plot::$1 ← (byte*) SCREEN#0 + (number~) plot::$0
Adding number conversion cast (unumber) $c in (byte*~) plot::$2 ← (byte*~) plot::$1 + (number) $c
Adding number conversion cast (unumber) 0 in (byte) plot::i#0 ← (number) 0
Adding number conversion cast (unumber) $10 in (byte) plot::y#0 ← (number) $10
Adding number conversion cast (unumber) 0 in (byte) plot::x#0 ← (number) 0
Adding number conversion cast (unumber) $10 in (bool~) plot::$3 ← (byte) plot::x#1 < (number) $10
Adding number conversion cast (unumber) $28 in (byte*~) plot::$4 ← (byte*) plot::line#3 + (number) $28
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) RASTER#0 ← (byte*)(number) $d012
Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400
Inlining cast (byte) main::c#0 ← (unumber)(number) $19
Inlining cast (byte) prepare::i#0 ← (unumber)(number) 0
Inlining cast (byte) flip::srcIdx#0 ← (unumber)(number) 0
Inlining cast (byte) flip::dstIdx#0 ← (unumber)(number) $f
Inlining cast (byte) flip::r#0 ← (unumber)(number) $10
Inlining cast (byte) flip::c#0 ← (unumber)(number) $10
Inlining cast (byte) flip::i#0 ← (unumber)(number) 0
Inlining cast (unumber~) plot::$6 ← (unumber)(number~) plot::$0
Inlining cast (byte) plot::i#0 ← (unumber)(number) 0
Inlining cast (byte) plot::y#0 ← (unumber)(number) $10
Inlining cast (byte) plot::x#0 ← (unumber)(number) 0
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 53266
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast $19
Simplifying constant integer cast $fe
Simplifying constant integer cast $ff
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $f
Simplifying constant integer cast $10
Simplifying constant integer cast $10
Simplifying constant integer cast $10
Simplifying constant integer cast 0
Simplifying constant integer cast $c
Simplifying constant integer cast 0
Simplifying constant integer cast $10
Simplifying constant integer cast 0
Simplifying constant integer cast $10
Simplifying constant integer cast $28
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) $19
Finalized unsigned number type (byte) $fe
Finalized unsigned number type (byte) $ff
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $f
Finalized unsigned number type (byte) $10
Finalized unsigned number type (byte) $10
Finalized unsigned number type (byte) $10
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $c
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $10
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $10
Finalized unsigned number type (byte) $28

View File

@ -5,7 +5,7 @@ main: {
.label SCREEN = $400
.label w = 2
.label sw = 4
lda #0
lda #<0
sta w
sta w+1
b1:

View File

@ -11,7 +11,7 @@ main: scope:[main] from @1
[4] phi()
to:main::@1
main::@1: scope:[main] from main main::@1
[5] (word) main::w#2 ← phi( main/(byte) 0 main::@1/(word) main::w#1 )
[5] (word) main::w#2 ← phi( main/(word) 0 main::@1/(word) main::w#1 )
[6] (byte~) main::$0 ← < (word) main::w#2
[7] *((const byte*) main::SCREEN#0) ← (byte~) main::$0
[8] (byte~) main::$1 ← > (word) main::w#2

View File

@ -7,7 +7,7 @@ CONTROL FLOW GRAPH SSA
to:@1
main: scope:[main] from @1
(byte*) main::SCREEN#0 ← ((byte*)) (number) $400
(word) main::w#0 ← (number) 0
(word) main::w#0 ← (word) 0
to:main::@1
main::@1: scope:[main] from main main::@1
(word) main::w#2 ← phi( main/(word) main::w#0 main::@1/(word) main::w#1 )
@ -20,7 +20,7 @@ main::@1: scope:[main] from main main::@1
if((bool~) main::$2) goto main::@1
to:main::@2
main::@2: scope:[main] from main::@1
(signed word) main::sw#0 ← (number) -$7fff
(signed word) main::sw#0 ← (signed word) -$7fff
to:main::@3
main::@3: scope:[main] from main::@2 main::@3
(signed word) main::sw#2 ← phi( main::@2/(signed word) main::sw#0 main::@3/(signed word) main::sw#1 )
@ -69,29 +69,21 @@ SYMBOL TABLE SSA
(word) main::w#1
(word) main::w#2
Adding number conversion cast (unumber) 0 in (word) main::w#0 ← (number) 0
Adding number conversion cast (unumber) 0 in *((byte*) main::SCREEN#0 + (number) 0) ← (byte~) main::$0
Adding number conversion cast (unumber) 1 in *((byte*) main::SCREEN#0 + (number) 1) ← (byte~) main::$1
Adding number conversion cast (snumber) -$7fff in (signed word) main::sw#0 ← (number) -$7fff
Adding number conversion cast (unumber) 3 in *((byte*) main::SCREEN#0 + (number) 3) ← (byte~) main::$3
Adding number conversion cast (unumber) 4 in *((byte*) main::SCREEN#0 + (number) 4) ← (byte~) main::$4
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) main::SCREEN#0 ← (byte*)(number) $400
Inlining cast (word) main::w#0 ← (unumber)(number) 0
Inlining cast (signed word) main::sw#0 ← (snumber)(number) -$7fff
Successful SSA optimization Pass2InlineCast
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 -$7fff
Simplifying constant integer cast 3
Simplifying constant integer cast 4
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized signed number type (signed word) -$7fff
Finalized unsigned number type (byte) 3
Finalized unsigned number type (byte) 4
Successful SSA optimization PassNFinalizeNumberTypeConversions
@ -119,7 +111,7 @@ Finalized signed number type (signed word) $7fff
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inlining constant with var siblings (const word) main::w#0
Inlining constant with var siblings (const signed word) main::sw#0
Constant inlined main::w#0 = (byte) 0
Constant inlined main::w#0 = (word) 0
Constant inlined main::sw#0 = (signed word) -$7fff
Successful SSA optimization Pass2ConstantInlining
Consolidated array index constant in *(main::SCREEN#0+1)
@ -165,7 +157,7 @@ main: scope:[main] from @1
[4] phi()
to:main::@1
main::@1: scope:[main] from main main::@1
[5] (word) main::w#2 ← phi( main/(byte) 0 main::@1/(word) main::w#1 )
[5] (word) main::w#2 ← phi( main/(word) 0 main::@1/(word) main::w#1 )
[6] (byte~) main::$0 ← < (word) main::w#2
[7] *((const byte*) main::SCREEN#0) ← (byte~) main::$0
[8] (byte~) main::$1 ← > (word) main::w#2
@ -256,10 +248,10 @@ main: {
.label sw = 4
//SEG11 [5] phi from main to main::@1 [phi:main->main::@1]
b1_from_main:
//SEG12 [5] phi (word) main::w#2 = (byte) 0 [phi:main->main::@1#0] -- vwuz1=vbuc1
lda #0
//SEG12 [5] phi (word) main::w#2 = (word) 0 [phi:main->main::@1#0] -- vwuz1=vwuc1
lda #<0
sta w
lda #0
lda #>0
sta w+1
jmp b1
//SEG13 [5] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
@ -387,10 +379,10 @@ main: {
.label sw = 4
//SEG11 [5] phi from main to main::@1 [phi:main->main::@1]
b1_from_main:
//SEG12 [5] phi (word) main::w#2 = (byte) 0 [phi:main->main::@1#0] -- vwuz1=vbuc1
lda #0
//SEG12 [5] phi (word) main::w#2 = (word) 0 [phi:main->main::@1#0] -- vwuz1=vwuc1
lda #<0
sta w
lda #0
lda #>0
sta w+1
jmp b1
//SEG13 [5] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
@ -465,7 +457,7 @@ Removing instruction jmp b1
Removing instruction jmp b2
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda #0
Removing instruction lda #>0
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Replacing label b1_from_b1 with b1
Replacing label b1_from_b1 with b1
@ -543,8 +535,8 @@ main: {
.label w = 2
.label sw = 4
//SEG11 [5] phi from main to main::@1 [phi:main->main::@1]
//SEG12 [5] phi (word) main::w#2 = (byte) 0 [phi:main->main::@1#0] -- vwuz1=vbuc1
lda #0
//SEG12 [5] phi (word) main::w#2 = (word) 0 [phi:main->main::@1#0] -- vwuz1=vwuc1
lda #<0
sta w
sta w+1
//SEG13 [5] phi from main::@1 to main::@1 [phi:main::@1->main::@1]

View File

@ -10,7 +10,7 @@ CONTROL FLOW GRAPH SSA
(byte*) SCREEN2#0 ← ((byte*)) (number) $500
to:@1
main: scope:[main] from @1
(byte) main::i#0 ← (number) 0
(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 )
@ -66,20 +66,16 @@ SYMBOL TABLE SSA
(byte) main::j#2
(byte) main::j#3
Adding number conversion cast (unumber) 0 in (byte) main::i#0 ← (number) 0
Adding number conversion cast (unumber) $64 in (byte) main::j#1 ← (number) $64
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) SCREEN1#0 ← (byte*)(number) $400
Inlining cast (byte*) SCREEN2#0 ← (byte*)(number) $500
Inlining cast (byte) main::i#0 ← (unumber)(number) 0
Inlining cast (byte) main::j#1 ← (unumber)(number) $64
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Simplifying constant pointer cast (byte*) 1280
Simplifying constant integer cast 0
Simplifying constant integer cast $64
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $64
Successful SSA optimization PassNFinalizeNumberTypeConversions
Simple Condition (bool~) main::$0 [7] if((byte) main::i#1!=rangelast(0,$ff)) goto main::@1

View File

@ -13,7 +13,7 @@ CONTROL FLOW GRAPH SSA
@begin: scope:[] from
to:@3
main: scope:[main] from @3
(byte) main::i#0 ← (number) 0
(byte) main::i#0 ← (byte) 0
to:main::@1
main::@1: scope:[main] from main main::@3
(byte) main::i#2 ← phi( main/(byte) main::i#0 main::@3/(byte) main::i#1 )
@ -82,22 +82,18 @@ SYMBOL TABLE SSA
(byte) main::i#3
(byte) main::i#4
Adding number conversion cast (unumber) 0 in (byte) main::i#0 ← (number) 0
Adding number conversion cast (unumber) 1 in (number~) main::$0 ← (byte) main::i#2 & (number) 1
Adding number conversion cast (unumber) main::$0 in (number~) main::$0 ← (byte) main::i#2 & (unumber)(number) 1
Adding number conversion cast (unumber) 0 in (bool~) main::$1 ← (unumber~) main::$0 == (number) 0
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte) main::i#0 ← (unumber)(number) 0
Inlining cast (byte*) fn1::BORDERCOL#0 ← (byte*)(number) $d020
Inlining cast (byte*) fn2::BGCOL#0 ← (byte*)(number) $d021
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant pointer cast (byte*) 53280
Simplifying constant pointer cast (byte*) 53281
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions

View File

@ -27,7 +27,7 @@ main::@return: scope:[main] from main::@2
to:@return
do10: scope:[do10] from main main::@1
(void()*) do10::fn#3 ← phi( main/(void()*) do10::fn#0 main::@1/(void()*) do10::fn#1 )
(byte) do10::i#0 ← (number) 0
(byte) do10::i#0 ← (byte) 0
to:do10::@1
do10::@1: scope:[do10] from do10 do10::@1
(byte) do10::i#2 ← phi( do10/(byte) do10::i#0 do10::@1/(byte) do10::i#1 )
@ -167,23 +167,19 @@ SYMBOL TABLE SSA
(label) world::@return
(const string) world::msg = (string) "world @"
Adding number conversion cast (unumber) 0 in (byte) do10::i#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) idx#4 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) print::i#0 ← (number) 0
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte) do10::i#0 ← (unumber)(number) 0
Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400
Inlining cast (byte) idx#4 ← (unumber)(number) 0
Inlining cast (byte) print::i#0 ← (unumber)(number) 0
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast 0
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias (void()*) do10::fn#0 = (void()*~) main::$0
Alias (void()*) do10::fn#1 = (void()*~) main::$2

View File

@ -20,7 +20,7 @@ main::@return: scope:[main] from main::@1
to:@return
do10: scope:[do10] from main
(void()*) do10::fn#2 ← phi( main/(void()*) do10::fn#0 )
(byte) do10::i#0 ← (number) 0
(byte) do10::i#0 ← (byte) 0
to:do10::@1
do10::@1: scope:[do10] from do10 do10::@1
(byte) do10::i#2 ← phi( do10/(byte) do10::i#0 do10::@1/(byte) do10::i#1 )
@ -110,23 +110,19 @@ SYMBOL TABLE SSA
(byte[]) msg
(byte[]) msg#0
Adding number conversion cast (unumber) 0 in (byte) do10::i#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) idx#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) hello::i#0 ← (number) 0
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte) do10::i#0 ← (unumber)(number) 0
Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400
Inlining cast (byte) idx#0 ← (unumber)(number) 0
Inlining cast (byte) hello::i#0 ← (unumber)(number) 0
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast 0
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias (void()*) main::f#0 = (void()*~) main::$0
Alias (byte) idx#1 = (byte) idx#4 (byte) idx#2

View File

@ -34,7 +34,7 @@ main::@return: scope:[main] from main::@2
to:@return
do10: scope:[do10] from main main::@1
(void()*) do10::fn#3 ← phi( main/(void()*) do10::fn#0 main::@1/(void()*) do10::fn#1 )
(byte) do10::i#0 ← (number) 0
(byte) do10::i#0 ← (byte) 0
to:do10::@1
do10::@1: scope:[do10] from do10 do10::@1
(byte) do10::i#2 ← phi( do10/(byte) do10::i#0 do10::@1/(byte) do10::i#1 )
@ -149,23 +149,19 @@ SYMBOL TABLE SSA
(byte[]) msg2
(byte[]) msg2#0
Adding number conversion cast (unumber) 0 in (byte) do10::i#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) idx#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) hello::i#0 ← (number) 0
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte) do10::i#0 ← (unumber)(number) 0
Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400
Inlining cast (byte) idx#0 ← (unumber)(number) 0
Inlining cast (byte) hello::i#0 ← (unumber)(number) 0
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast 0
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias (void()*) main::f#0 = (void()*~) main::$0 (void()*) main::f#1
Alias (byte*) msg#1 = (byte*) msg#8 (byte*) msg#5 (byte*) msg#2

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