1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-07-03 20:29:34 +00:00

Added a struct unwound placeholder when unwinding a struct variable. Will be used for address-of and to ensure the phi-generator does not run amok.

This commit is contained in:
jespergravgaard 2019-06-16 17:10:18 +02:00
parent 114a237e24
commit 00c8d5c857
29 changed files with 260 additions and 244 deletions

View File

@ -387,6 +387,7 @@ public class Compiler {
}
private void pass3Analysis() {
new PassNEliminateStructUnwoundPlaceholder(program).step();
new Pass3AssertNoTypeId(program).check();
new Pass3AssertRValues(program).check();
new Pass3AssertNoNumbers(program).check();

View File

@ -226,6 +226,7 @@ public class ProgramValueIterator {
value instanceof ConstantLiteral ||
value instanceof ConstantRef ||
value instanceof StructZero ||
value instanceof StructUnwoundPlaceholder ||
value instanceof LabelRef
) {
// No sub values

View File

@ -115,6 +115,8 @@ public class SymbolTypeInference {
}
} else if(rValue instanceof StructZero) {
return ((StructZero)rValue).getTypeStruct();
} else if(rValue instanceof StructUnwoundPlaceholder) {
return ((StructUnwoundPlaceholder) rValue).getTypeStruct();
}
if(type == null) {
throw new RuntimeException("Cannot infer type for " + rValue.toString());

View File

@ -0,0 +1,25 @@
package dk.camelot64.kickc.model.values;
import dk.camelot64.kickc.model.Program;
import dk.camelot64.kickc.model.types.SymbolTypeStruct;
/** Used as a placeholder value, where a struct has been unwound. */
public class StructUnwoundPlaceholder implements RValue {
public StructUnwoundPlaceholder(SymbolTypeStruct typeStruct) {
this.typeStruct = typeStruct;
}
/** The type of the struct. */
private SymbolTypeStruct typeStruct;
public SymbolTypeStruct getTypeStruct() {
return typeStruct;
}
@Override
public String toString(Program program) {
return "struct-unwound";
}
}

View File

@ -60,7 +60,7 @@ public class Pass1UnwindStructValues extends Pass1Base {
StatementAssignment assignment = (StatementAssignment) statement;
SymbolType lValueType = SymbolTypeInference.inferType(getScope(), assignment.getlValue());
if(lValueType instanceof SymbolTypeStruct) {
modified |= unwindAssignment(assignment, (SymbolTypeStruct)lValueType, stmtIt, block, structUnwinding);
modified |= unwindAssignment(assignment, (SymbolTypeStruct) lValueType, stmtIt, block, structUnwinding);
}
} else if(statement instanceof StatementCall) {
modified |= unwindCall((StatementCall) statement, structUnwinding);
@ -230,27 +230,27 @@ public class Pass1UnwindStructValues extends Pass1Base {
for(Variable variable : getScope().getAllVariables(true)) {
if(variable.getType() instanceof SymbolTypeStruct) {
if(structUnwinding.getVariableUnwinding(variable.getRef()) == null) {
// A non-volatile struct variable
Scope scope = variable.getScope();
if(!(scope instanceof StructDefinition)) {
// Not inside another struct
StructDefinition structDefinition = ((SymbolTypeStruct) variable.getType()).getStructDefinition(getProgram().getScope());
StructUnwinding.VariableUnwinding variableUnwinding = structUnwinding.createVariableUnwinding(variable.getRef());
for(Variable member : structDefinition.getAllVariables(false)) {
Variable memberVariable;
if(variable.getRef().isIntermediate()) {
memberVariable = scope.add(new VariableIntermediate(variable.getLocalName() + "_" + member.getLocalName(), scope, member.getType()));
} else {
memberVariable = scope.addVariable(variable.getLocalName() + "_" + member.getLocalName(), member.getType());
}
memberVariable.setDeclaredVolatile(variable.isDeclaredVolatile());
memberVariable.setDeclaredConstant(variable.isDeclaredConstant());
variableUnwinding.setMemberUnwinding(member.getLocalName(), memberVariable.getRef());
getLog().append("Created struct value member variable " + memberVariable.toString(getProgram()));
// A non-volatile struct variable
Scope scope = variable.getScope();
if(!(scope instanceof StructDefinition)) {
// Not inside another struct
StructDefinition structDefinition = ((SymbolTypeStruct) variable.getType()).getStructDefinition(getProgram().getScope());
StructUnwinding.VariableUnwinding variableUnwinding = structUnwinding.createVariableUnwinding(variable.getRef());
for(Variable member : structDefinition.getAllVariables(false)) {
Variable memberVariable;
if(variable.getRef().isIntermediate()) {
memberVariable = scope.add(new VariableIntermediate(variable.getLocalName() + "_" + member.getLocalName(), scope, member.getType()));
} else {
memberVariable = scope.addVariable(variable.getLocalName() + "_" + member.getLocalName(), member.getType());
}
getLog().append("Converted struct value to member variables " + variable.toString(getProgram()));
modified = true;
memberVariable.setDeclaredVolatile(variable.isDeclaredVolatile());
memberVariable.setDeclaredConstant(variable.isDeclaredConstant());
variableUnwinding.setMemberUnwinding(member.getLocalName(), memberVariable.getRef());
getLog().append("Created struct value member variable " + memberVariable.toString(getProgram()));
}
getLog().append("Converted struct value to member variables " + variable.toString(getProgram()));
modified = true;
}
}
}
}
@ -261,7 +261,7 @@ public class Pass1UnwindStructValues extends Pass1Base {
* Unwind an assignment to a struct value variable into assignment of each member
*
* @param assignment The assignment statement
* @param structType The struct type being unwound
* @param structType The struct type being unwound
* @param stmtIt The statement iterator used for adding/removing statements
* @param currentBlock The current code block
* @param structUnwinding Information about unwound struct value variables
@ -270,23 +270,27 @@ public class Pass1UnwindStructValues extends Pass1Base {
boolean modified = false;
StructMemberUnwinding memberUnwinding = getStructMemberUnwinding(assignment.getlValue(), structType, structUnwinding, assignment, stmtIt, currentBlock);
if(memberUnwinding==null) {
if(memberUnwinding == null) {
throw new CompileError("Cannot unwind struct assignment " + assignment.toString(getProgram(), false), assignment);
}
if(assignment.getOperator() == null && assignment.getrValue2() instanceof StructZero && assignment.getlValue() instanceof VariableRef) {
// Zero-initializing a struct - unwind to assigning zero to each member!
stmtIt.previous();
for(String memberName : memberUnwinding.getMemberNames()) {
VariableRef memberVarRef = (VariableRef) memberUnwinding.getMemberUnwinding(memberName);
Variable memberVar = getScope().getVariable(memberVarRef);
Statement initStmt = Pass0GenerateStatementSequence.createDefaultInitializationStatement(memberVarRef, memberVar.getType(), assignment.getSource(), Comment.NO_COMMENTS);
stmtIt.add(initStmt);
getLog().append("Adding struct value member variable default initializer " + initStmt.toString(getProgram(), false));
}
stmtIt.next();
stmtIt.previous();
for(String memberName : memberUnwinding.getMemberNames()) {
VariableRef memberVarRef = (VariableRef) memberUnwinding.getMemberUnwinding(memberName);
Variable memberVar = getScope().getVariable(memberVarRef);
Statement initStmt = Pass0GenerateStatementSequence.createDefaultInitializationStatement(memberVarRef, memberVar.getType(), assignment.getSource(), Comment.NO_COMMENTS);
stmtIt.add(initStmt);
getLog().append("Adding struct value member variable default initializer " + initStmt.toString(getProgram(), false));
}
stmtIt.next();
if(assignment.getlValue() instanceof VariableRef) {
assignment.setrValue2(new StructUnwoundPlaceholder(structType));
} else {
stmtIt.remove();
modified = true;
}
modified = true;
} else if(assignment.getOperator() == null && assignment.getrValue2() instanceof ValueList) {
// Initializing struct with a value list - unwind to assigning each member with a value from the list
ValueList valueList = (ValueList) assignment.getrValue2();
@ -302,9 +306,15 @@ public class Pass1UnwindStructValues extends Pass1Base {
getLog().append("Adding struct value list initializer " + initStmt.toString(getProgram(), false));
}
stmtIt.next();
stmtIt.remove();
if(assignment.getlValue() instanceof VariableRef) {
assignment.setrValue2(new StructUnwoundPlaceholder(structType));
} else {
stmtIt.remove();
}
modified = true;
} else if(assignment.getOperator() == null) {
if(assignment.getrValue2() instanceof StructUnwoundPlaceholder)
return false;
SymbolType sourceType = SymbolTypeInference.inferType(getScope(), assignment.getrValue2());
if(sourceType.equals(structType)) {
// Copying a struct - unwind to assigning each member!
@ -319,7 +329,11 @@ public class Pass1UnwindStructValues extends Pass1Base {
getLog().append("Adding struct value member variable copy " + copyStmt.toString(getProgram(), false));
}
stmtIt.next();
stmtIt.remove();
if(assignment.getlValue() instanceof VariableRef) {
assignment.setrValue2(new StructUnwoundPlaceholder(structType));
} else {
stmtIt.remove();
}
modified = true;
}
} else {
@ -339,7 +353,7 @@ public class Pass1UnwindStructValues extends Pass1Base {
} else if(lValue instanceof PointerDereferenceIndexed) {
return new StructMemberUnwindingPointerDerefIndexed((PointerDereferenceIndexed) lValue, lValueType.getStructDefinition(getScope()), stmtIt, currentBlock, currentStmt);
} else {
throw new InternalError("Struct unwinding not implemented for "+lValue.toString(getProgram()));
throw new InternalError("Struct unwinding not implemented for " + lValue.toString(getProgram()));
}
}

View File

@ -0,0 +1,37 @@
package dk.camelot64.kickc.passes;
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.values.StructUnwoundPlaceholder;
import java.util.ListIterator;
/** Remove any assignments with {@link dk.camelot64.kickc.model.values.StructUnwoundPlaceholder} as RValue */
public class PassNEliminateStructUnwoundPlaceholder extends Pass2SsaOptimization {
public PassNEliminateStructUnwoundPlaceholder(Program program) {
super(program);
}
@Override
public boolean step() {
for(ControlFlowBlock block : getGraph().getAllBlocks()) {
ListIterator<Statement> stmtIt = block.getStatements().listIterator();
while(stmtIt.hasNext()) {
Statement stmt = stmtIt.next();
if(stmt instanceof StatementAssignment) {
StatementAssignment assignment = (StatementAssignment) stmt;
if(assignment.getOperator() == null && assignment.getrValue2() instanceof StructUnwoundPlaceholder) {
getLog().append("Eliminating struct unwound placeholder "+stmt.toString(getProgram(), false));
stmtIt.remove();
}
}
}
}
return false;
}
}

View File

@ -5,6 +5,8 @@ import dk.camelot64.kickc.model.Program;
import dk.camelot64.kickc.model.VariableReferenceInfos;
import dk.camelot64.kickc.model.statements.*;
import dk.camelot64.kickc.model.symbols.ConstantVar;
import dk.camelot64.kickc.model.symbols.Procedure;
import dk.camelot64.kickc.model.symbols.Scope;
import dk.camelot64.kickc.model.symbols.Variable;
import dk.camelot64.kickc.model.values.LValue;
import dk.camelot64.kickc.model.values.VariableRef;
@ -40,6 +42,10 @@ public class PassNEliminateUnusedVars extends Pass2SsaOptimization {
if(lValue instanceof VariableRef && referenceInfos.isUnused((VariableRef) lValue) && !Pass2ConstantIdentification.isAddressOfUsed((VariableRef) lValue, getProgram())) {
Variable variable = getScope().getVariable((VariableRef) lValue);
if(variable==null || !variable.isDeclaredVolatile()) {
if(!pass2 && isReturnValue(variable)) {
// Do not eliminate reutn variables in pass 1
continue;
}
if(pass2 || getLog().isVerbosePass1CreateSsa()) {
getLog().append("Eliminating unused variable " + lValue.toString(getProgram()) + " and assignment " + assignment.toString(getProgram(), false));
}
@ -116,5 +122,15 @@ public class PassNEliminateUnusedVars extends Pass2SsaOptimization {
return modified;
}
/**
* Determines if a variable is the return value for a procedure
* @param variable The variable
* @return true if this is the return variable for a function
*/
private boolean isReturnValue(Variable variable) {
if(variable==null) return false;
return variable.getScope() instanceof Procedure && variable.getLocalName().equals("return");
}
}

View File

@ -473,6 +473,7 @@ getCharToProcess::@1: scope:[getCharToProcess] from getCharToProcess::@10 getCh
(byte) getCharToProcess::return_x#1 ← (byte) getCharToProcess::closest_x#2
(byte) getCharToProcess::return_y#1 ← (byte) getCharToProcess::closest_y#2
(word) getCharToProcess::return_dist#1 ← (word) getCharToProcess::closest_dist#4
(struct ProcessingChar) getCharToProcess::return#0 ← struct-unwound
to:getCharToProcess::@return
getCharToProcess::@11: scope:[getCharToProcess] from getCharToProcess::@10
(word) getCharToProcess::closest_dist#7 ← phi( getCharToProcess::@10/(word) getCharToProcess::closest_dist#3 )
@ -491,6 +492,7 @@ getCharToProcess::@return: scope:[getCharToProcess] from getCharToProcess::@1
(byte) getCharToProcess::return_x#2 ← (byte) getCharToProcess::return_x#4
(byte) getCharToProcess::return_y#2 ← (byte) getCharToProcess::return_y#4
(word) getCharToProcess::return_dist#2 ← (word) getCharToProcess::return_dist#4
(struct ProcessingChar) getCharToProcess::return#1 ← struct-unwound
return
to:@return
startProcessing: scope:[startProcessing] from main::@6
@ -1218,7 +1220,6 @@ SYMBOL TABLE SSA
(label) getCharToProcess::@8
(label) getCharToProcess::@9
(label) getCharToProcess::@return
(struct ProcessingChar) getCharToProcess::closest
(word) getCharToProcess::closest_dist
(word) getCharToProcess::closest_dist#0
(word) getCharToProcess::closest_dist#1
@ -1256,6 +1257,8 @@ SYMBOL TABLE SSA
(word) getCharToProcess::dist#0
(word) getCharToProcess::dist#1
(struct ProcessingChar) getCharToProcess::return
(struct ProcessingChar) getCharToProcess::return#0
(struct ProcessingChar) getCharToProcess::return#1
(word) getCharToProcess::return_dist
(word) getCharToProcess::return_dist#0
(word) getCharToProcess::return_dist#1
@ -1442,7 +1445,6 @@ interrupt(HARDWARE_ALL)(void()) irqTop()
(label) main::@6
(label) main::@7
(label) main::@return
(struct ProcessingChar) main::center
(word) main::center_dist
(word) main::center_dist#0
(word) main::center_dist#1
@ -2252,9 +2254,9 @@ Inversing boolean not [119] (bool~) main::$11 ← (word) main::center_dist#0 !=
Inversing boolean not [142] (bool~) getCharToProcess::$3 ← *((byte*) getCharToProcess::screen_line#2 + (byte) getCharToProcess::x#2) == (byte) ' ' from [141] (bool~) getCharToProcess::$2 ← *((byte*) getCharToProcess::screen_line#2 + (byte) getCharToProcess::x#2) != (byte) ' '
Inversing boolean not [154] (bool~) getCharToProcess::$6 ← (word) getCharToProcess::dist#0 >= (word) getCharToProcess::closest_dist#2 from [153] (bool~) getCharToProcess::$5 ← (word) getCharToProcess::dist#0 < (word) getCharToProcess::closest_dist#2
Inversing boolean not [167] (bool~) getCharToProcess::$1 ← (word) getCharToProcess::closest_dist#3 == (word) NOT_FOUND#0 from [166] (bool~) getCharToProcess::$0 ← (word) getCharToProcess::closest_dist#3 != (word) NOT_FOUND#0
Inversing boolean not [193] (bool~) startProcessing::$25 ← *((byte*) startProcessing::$39 + (byte~) startProcessing::$29) != (byte) STATUS_FREE#0 from [192] (bool~) startProcessing::$24 ← *((byte*) startProcessing::$39 + (byte~) startProcessing::$29) == (byte) STATUS_FREE#0
Inversing boolean not [295] (bool~) processChars::$5 ← *((byte*) processChars::$41) == (byte) STATUS_FREE#0 from [294] (bool~) processChars::$4 ← *((byte*) processChars::$41) != (byte) STATUS_FREE#0
Inversing boolean not [304] (bool~) processChars::$7 ← *((byte*) processChars::$42) != (byte) STATUS_NEW#0 from [303] (bool~) processChars::$6 ← *((byte*) processChars::$42) == (byte) STATUS_NEW#0
Inversing boolean not [195] (bool~) startProcessing::$25 ← *((byte*) startProcessing::$39 + (byte~) startProcessing::$29) != (byte) STATUS_FREE#0 from [194] (bool~) startProcessing::$24 ← *((byte*) startProcessing::$39 + (byte~) startProcessing::$29) == (byte) STATUS_FREE#0
Inversing boolean not [297] (bool~) processChars::$5 ← *((byte*) processChars::$41) == (byte) STATUS_FREE#0 from [296] (bool~) processChars::$4 ← *((byte*) processChars::$41) != (byte) STATUS_FREE#0
Inversing boolean not [306] (bool~) processChars::$7 ← *((byte*) processChars::$42) != (byte) STATUS_NEW#0 from [305] (bool~) processChars::$6 ← *((byte*) processChars::$42) == (byte) STATUS_NEW#0
Successful SSA optimization Pass2UnaryNotSimplification
Alias (word) mul8u::mb#0 = (byte) mul8u::b#2
Alias (byte) mul8u::a#3 = (byte) mul8u::a#4 (byte) mul8u::a#7
@ -2396,7 +2398,7 @@ Identical Phi Values (byte*) startProcessing::screenPtr#1 (byte*) startProcessin
Identical Phi Values (word) setupRasterIrq::raster#1 (word) setupRasterIrq::raster#0
Identical Phi Values (void()*) setupRasterIrq::irqRoutine#1 (void()*) setupRasterIrq::irqRoutine#0
Successful SSA optimization Pass2IdenticalPhiElimination
Identified duplicate assignment right side [337] (byte~) processChars::$17 ← (byte) processChars::i#10 * (byte) 2
Identified duplicate assignment right side [339] (byte~) processChars::$17 ← (byte) processChars::i#10 * (byte) 2
Successful SSA optimization Pass2DuplicateRValueIdentification
Simple Condition (bool~) mul8u::$0 [38] if((byte) mul8u::a#3!=(byte) 0) goto mul8u::@2
Simple Condition (bool~) mul8u::$3 [43] if((byte~) mul8u::$1==(byte) 0) goto mul8u::@4
@ -2408,45 +2410,45 @@ Simple Condition (bool~) getCharToProcess::$7 [147] if((byte) getCharToProcess::
Simple Condition (bool~) getCharToProcess::$6 [155] if((word) getCharToProcess::dist#0>=(word) getCharToProcess::closest_dist#2) goto getCharToProcess::@5
Simple Condition (bool~) getCharToProcess::$8 [164] if((byte) getCharToProcess::y#1!=rangelast(0,$18)) goto getCharToProcess::@3
Simple Condition (bool~) getCharToProcess::$1 [168] if((word) getCharToProcess::return_dist#1==(word) NOT_FOUND#0) goto getCharToProcess::@1
Simple Condition (bool~) startProcessing::$25 [194] if(*((byte*) startProcessing::$39 + (byte~) startProcessing::$29)!=(byte) STATUS_FREE#0) goto startProcessing::@3
Simple Condition (bool~) startProcessing::$26 [198] if((byte) startProcessing::i#1!=rangelast(0,startProcessing::$23)) goto startProcessing::@2
Simple Condition (bool~) startProcessing::$27 [203] if((byte) startProcessing::freeIdx#2==(byte) $ff) goto startProcessing::@1
Simple Condition (bool~) startProcessing::$28 [229] if((byte) startProcessing::i1#1!=rangelast(0,7)) goto startProcessing::@9
Simple Condition (bool~) processChars::$5 [296] if(*((byte*) processChars::$41)==(byte) STATUS_FREE#0) goto processChars::@3
Simple Condition (bool~) processChars::$34 [300] if((byte) processChars::i#1!=rangelast(0,processChars::$1)) goto processChars::@2
Simple Condition (bool~) processChars::$7 [305] if(*((byte*) processChars::$42)!=(byte) STATUS_NEW#0) goto processChars::@4
Simple Condition (bool~) processChars::$64 [312] if((byte) 0!=(byte~) processChars::$11) goto processChars::@5
Simple Condition (bool~) initSquareTables::$0 [398] if((byte) initSquareTables::x#2<(byte) $14) goto initSquareTables::@2
Simple Condition (bool~) initSquareTables::$7 [417] if((byte) initSquareTables::x#1!=rangelast(0,$27)) goto initSquareTables::@1
Simple Condition (bool~) initSquareTables::$8 [421] if((byte) initSquareTables::y#2<(byte) $c) goto initSquareTables::@9
Simple Condition (bool~) initSquareTables::$15 [440] if((byte) initSquareTables::y#1!=rangelast(0,$18)) goto initSquareTables::@8
Simple Condition (bool~) initSprites::$2 [449] if((byte*) initSprites::sp#1<(byte*~) initSprites::$1) goto initSprites::@1
Simple Condition (bool~) initSprites::$3 [455] if((byte) initSprites::i#1!=rangelast(0,7)) goto initSprites::@3
Simple Condition (bool~) setupRasterIrq::$0 [466] if((word) setupRasterIrq::raster#0<(word) $100) goto setupRasterIrq::@1
Simple Condition (bool~) irqTop::$2 [489] if((byte) irqTop::i#1!=rangelast(0,4)) goto irqTop::@3
Simple Condition (bool~) irqTop::$3 [496] if((byte) irqTop::i1#1!=rangelast(0,7)) goto irqTop::@5
Simple Condition (bool~) irqBottom::$4 [510] if((byte) irqBottom::i#1!=rangelast(0,4)) goto irqBottom::@5
Simple Condition (bool~) startProcessing::$25 [196] if(*((byte*) startProcessing::$39 + (byte~) startProcessing::$29)!=(byte) STATUS_FREE#0) goto startProcessing::@3
Simple Condition (bool~) startProcessing::$26 [200] if((byte) startProcessing::i#1!=rangelast(0,startProcessing::$23)) goto startProcessing::@2
Simple Condition (bool~) startProcessing::$27 [205] if((byte) startProcessing::freeIdx#2==(byte) $ff) goto startProcessing::@1
Simple Condition (bool~) startProcessing::$28 [231] if((byte) startProcessing::i1#1!=rangelast(0,7)) goto startProcessing::@9
Simple Condition (bool~) processChars::$5 [298] if(*((byte*) processChars::$41)==(byte) STATUS_FREE#0) goto processChars::@3
Simple Condition (bool~) processChars::$34 [302] if((byte) processChars::i#1!=rangelast(0,processChars::$1)) goto processChars::@2
Simple Condition (bool~) processChars::$7 [307] if(*((byte*) processChars::$42)!=(byte) STATUS_NEW#0) goto processChars::@4
Simple Condition (bool~) processChars::$64 [314] if((byte) 0!=(byte~) processChars::$11) goto processChars::@5
Simple Condition (bool~) initSquareTables::$0 [400] if((byte) initSquareTables::x#2<(byte) $14) goto initSquareTables::@2
Simple Condition (bool~) initSquareTables::$7 [419] if((byte) initSquareTables::x#1!=rangelast(0,$27)) goto initSquareTables::@1
Simple Condition (bool~) initSquareTables::$8 [423] if((byte) initSquareTables::y#2<(byte) $c) goto initSquareTables::@9
Simple Condition (bool~) initSquareTables::$15 [442] if((byte) initSquareTables::y#1!=rangelast(0,$18)) goto initSquareTables::@8
Simple Condition (bool~) initSprites::$2 [451] if((byte*) initSprites::sp#1<(byte*~) initSprites::$1) goto initSprites::@1
Simple Condition (bool~) initSprites::$3 [457] if((byte) initSprites::i#1!=rangelast(0,7)) goto initSprites::@3
Simple Condition (bool~) setupRasterIrq::$0 [468] if((word) setupRasterIrq::raster#0<(word) $100) goto setupRasterIrq::@1
Simple Condition (bool~) irqTop::$2 [491] if((byte) irqTop::i#1!=rangelast(0,4)) goto irqTop::@3
Simple Condition (bool~) irqTop::$3 [498] if((byte) irqTop::i1#1!=rangelast(0,7)) goto irqTop::@5
Simple Condition (bool~) irqBottom::$4 [512] if((byte) irqBottom::i#1!=rangelast(0,4)) goto irqBottom::@5
Successful SSA optimization Pass2ConditionalJumpSimplification
Rewriting || if()-condition to two if()s [349] (bool~) processChars::$24 ← (bool~) processChars::$22 || (bool~) processChars::$23
Rewriting || if()-condition to two if()s [351] (bool~) processChars::$24 ← (bool~) processChars::$22 || (bool~) processChars::$23
Successful SSA optimization Pass2ConditionalAndOrRewriting
Rewriting || if()-condition to two if()s [346] (bool~) processChars::$22 ← (bool~) processChars::$20 || (bool~) processChars::$21
Rewriting || if()-condition to two if()s [348] (bool~) processChars::$22 ← (bool~) processChars::$20 || (bool~) processChars::$21
Successful SSA optimization Pass2ConditionalAndOrRewriting
Rewriting || if()-condition to two if()s [343] (bool~) processChars::$20 ← (bool~) processChars::$18 || (bool~) processChars::$19
Rewriting || if()-condition to two if()s [345] (bool~) processChars::$20 ← (bool~) processChars::$18 || (bool~) processChars::$19
Successful SSA optimization Pass2ConditionalAndOrRewriting
Rewriting ! if()-condition to reversed if() [386] (bool~) processChars::$0 ← ! (bool) DEBUG#0
Rewriting ! if()-condition to reversed if() [388] (bool~) processChars::$0 ← ! (bool) DEBUG#0
Successful SSA optimization Pass2ConditionalAndOrRewriting
Rewriting ! if()-condition to reversed if() [479] (bool~) irqTop::$0 ← ! (bool) DEBUG#0
Rewriting ! if()-condition to reversed if() [481] (bool~) irqTop::$0 ← ! (bool) DEBUG#0
Successful SSA optimization Pass2ConditionalAndOrRewriting
Rewriting ! if()-condition to reversed if() [501] (bool~) irqBottom::$0 ← ! (bool) DEBUG#0
Rewriting ! if()-condition to reversed if() [503] (bool~) irqBottom::$0 ← ! (bool) DEBUG#0
Successful SSA optimization Pass2ConditionalAndOrRewriting
Rewriting ! if()-condition to reversed if() [504] (bool~) irqBottom::$2 ← ! (bool) DEBUG#0
Rewriting ! if()-condition to reversed if() [506] (bool~) irqBottom::$2 ← ! (bool) DEBUG#0
Successful SSA optimization Pass2ConditionalAndOrRewriting
Constant right-side identified [62] (byte[$3e8]) SCREEN_COPY#0 ← { fill( $3e8, 0) }
Constant right-side identified [103] (void()*) setupRasterIrq::irqRoutine#0 ← & interrupt(HARDWARE_ALL)(void()) irqTop()
Constant right-side identified [393] (word[$28]) SQUARES_X#0 ← { fill( $28, 0) }
Constant right-side identified [394] (word[$19]) SQUARES_Y#0 ← { fill( $19, 0) }
Constant right-side identified [482] (void()*~) irqTop::$1 ← & interrupt(HARDWARE_ALL)(void()) irqBottom()
Constant right-side identified [514] (void()*~) irqBottom::$3 ← & interrupt(HARDWARE_ALL)(void()) irqTop()
Constant right-side identified [395] (word[$28]) SQUARES_X#0 ← { fill( $28, 0) }
Constant right-side identified [396] (word[$19]) SQUARES_Y#0 ← { fill( $19, 0) }
Constant right-side identified [484] (void()*~) irqTop::$1 ← & interrupt(HARDWARE_ALL)(void()) irqBottom()
Constant right-side identified [516] (void()*~) irqBottom::$3 ← & interrupt(HARDWARE_ALL)(void()) irqTop()
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte*) PROCPORT_DDR#0 = (byte*) 0
Constant (const byte) PROCPORT_DDR_MEMORY_MASK#0 = 7
@ -2525,102 +2527,104 @@ Constant (const byte*) getCharToProcess::screen_line#0 = SCREEN_COPY#0
Constant (const byte*) initSprites::sp#0 = SPRITE_DATA#0
Successful SSA optimization Pass2ConstantIdentification
Constant value identified { fill( NUM_PROCESSING#0, 0) } in [68] (struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 ← { fill( NUM_PROCESSING#0, 0) }
Constant value identified (word)BORDER_YPOS_BOTTOM#0 in [278] (word~) $8 ← (word)(const byte) BORDER_YPOS_BOTTOM#0
Constant value identified (word)BORDER_YPOS_BOTTOM#0 in [280] (word~) $8 ← (word)(const byte) BORDER_YPOS_BOTTOM#0
Successful SSA optimization Pass2ConstantValues
if() condition always true - replacing block destination [126] if(true) goto main::@5
if() condition always true - replacing block destination [131] if(true) goto main::@11
if() condition always false - eliminating [387] if((const bool) DEBUG#0) goto processChars::@16
if() condition always true - replacing block destination [466] if((const word) setupRasterIrq::raster#0<(word) $100) goto setupRasterIrq::@1
if() condition always false - eliminating [480] if((const bool) DEBUG#0) goto irqTop::@2
if() condition always false - eliminating [502] if((const bool) DEBUG#0) goto irqBottom::@3
if() condition always false - eliminating [505] if((const bool) DEBUG#0) goto irqBottom::@4
if() condition always false - eliminating [389] if((const bool) DEBUG#0) goto processChars::@16
if() condition always true - replacing block destination [468] if((const word) setupRasterIrq::raster#0<(word) $100) goto setupRasterIrq::@1
if() condition always false - eliminating [482] if((const bool) DEBUG#0) goto irqTop::@2
if() condition always false - eliminating [504] if((const bool) DEBUG#0) goto irqBottom::@3
if() condition always false - eliminating [507] if((const bool) DEBUG#0) goto irqBottom::@4
Successful SSA optimization Pass2ConstantIfs
Resolved ranged next value [145] getCharToProcess::x#1 ← ++ getCharToProcess::x#2 to ++
Resolved ranged comparison value [147] if(getCharToProcess::x#1!=rangelast(0,$27)) goto getCharToProcess::@4 to (number) $28
Resolved ranged next value [162] getCharToProcess::y#1 ← ++ getCharToProcess::y#2 to ++
Resolved ranged comparison value [164] if(getCharToProcess::y#1!=rangelast(0,$18)) goto getCharToProcess::@3 to (number) $19
Resolved ranged next value [227] startProcessing::i1#1 ← ++ startProcessing::i1#2 to ++
Resolved ranged comparison value [229] if(startProcessing::i1#1!=rangelast(0,7)) goto startProcessing::@9 to (number) 8
Resolved ranged next value [415] initSquareTables::x#1 ← ++ initSquareTables::x#2 to ++
Resolved ranged comparison value [417] if(initSquareTables::x#1!=rangelast(0,$27)) goto initSquareTables::@1 to (number) $28
Resolved ranged next value [438] initSquareTables::y#1 ← ++ initSquareTables::y#2 to ++
Resolved ranged comparison value [440] if(initSquareTables::y#1!=rangelast(0,$18)) goto initSquareTables::@8 to (number) $19
Resolved ranged next value [453] initSprites::i#1 ← ++ initSprites::i#2 to ++
Resolved ranged comparison value [455] if(initSprites::i#1!=rangelast(0,7)) goto initSprites::@3 to (number) 8
Resolved ranged next value [487] irqTop::i#1 ← ++ irqTop::i#2 to ++
Resolved ranged comparison value [489] if(irqTop::i#1!=rangelast(0,4)) goto irqTop::@3 to (number) 5
Resolved ranged next value [494] irqTop::i1#1 ← ++ irqTop::i1#2 to ++
Resolved ranged comparison value [496] if(irqTop::i1#1!=rangelast(0,7)) goto irqTop::@5 to (number) 8
Resolved ranged next value [508] irqBottom::i#1 ← ++ irqBottom::i#2 to ++
Resolved ranged comparison value [510] if(irqBottom::i#1!=rangelast(0,4)) goto irqBottom::@5 to (number) 5
Converting *(pointer+n) to pointer[n] [178] *((byte*~) getCharToProcess::$12) ← (byte) ' ' -- *(getCharToProcess::$11 + getCharToProcess::return_x#1)
Converting *(pointer+n) to pointer[n] [215] (byte) startProcessing::ch#0 ← *((byte*) startProcessing::screenPtr#0) -- *(startProcessing::$2 + startProcessing::center_x#8)
Converting *(pointer+n) to pointer[n] [291] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*) processChars::$40) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_ID)
Converting *(pointer+n) to pointer[n] [296] if(*((byte*) processChars::$41)==(const byte) STATUS_FREE#0) goto processChars::@3 -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)
Converting *(pointer+n) to pointer[n] [305] if(*((byte*) processChars::$42)!=(const byte) STATUS_NEW#0) goto processChars::@4 -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)
Converting *(pointer+n) to pointer[n] [308] (word) processChars::xpos#0 ← *((word*) processChars::$43) >> (byte) 4 -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X)
Converting *(pointer+n) to pointer[n] [315] *(*((byte**) processChars::$44)) ← (byte) ' ' -- *((byte**)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR)
Converting *(pointer+n) to pointer[n] [319] (byte*~) processChars::$9 ← (byte*~) processChars::$8 + *((byte*) processChars::$45) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_ID)
Converting *(pointer+n) to pointer[n] [321] *((byte*~) processChars::$9) ← *((byte*) processChars::$46) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_PTR)
Converting *(pointer+n) to pointer[n] [321] *((byte*~) processChars::$9) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR) -- *(processChars::$8 + *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_ID))
Converting *(pointer+n) to pointer[n] [323] *((byte*) processChars::$47) ← (const byte) STATUS_PROCESSING#0 -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)
Converting *(pointer+n) to pointer[n] [334] (word~) processChars::$15 ← *((word*) processChars::$48) >> (byte) 4 -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_Y)
Converting *(pointer+n) to pointer[n] [340] (bool~) processChars::$18 ← *((word*) processChars::$49) < (word) XPOS_LEFTMOST#0 -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X)
Converting *(pointer+n) to pointer[n] [342] (bool~) processChars::$19 ← *((word*) processChars::$50) > (word) XPOS_RIGHTMOST#0 -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X)
Converting *(pointer+n) to pointer[n] [345] (bool~) processChars::$21 ← *((word*) processChars::$51) < (word) YPOS_TOPMOST#0 -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_Y)
Converting *(pointer+n) to pointer[n] [348] (bool~) processChars::$23 ← *((word*) processChars::$52) > (word) YPOS_BOTTOMMOST#0 -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_Y)
Converting *(pointer+n) to pointer[n] [353] *((byte*) processChars::$53) ← (const byte) STATUS_FREE#0 -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)
Converting *(pointer+n) to pointer[n] [365] *((word*) processChars::$55) ← *((word*) processChars::$54) + *((const word*) VXSIN#0 + (byte~) processChars::$38) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VX)
Converting *(pointer+n) to pointer[n] [365] *((word*) processChars::$55) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) + *((const word*) VXSIN#0 + (byte~) processChars::$38) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VX)
Converting *(pointer+n) to pointer[n] [369] *((word*) processChars::$58) ← *((word*) processChars::$56) + *((word*) processChars::$57) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X)
Converting *(pointer+n) to pointer[n] [369] *((word*) processChars::$58) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) + *((word*) processChars::$57) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VX)
Converting *(pointer+n) to pointer[n] [369] *((word*) processChars::$58) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X)
Converting *(pointer+n) to pointer[n] [378] *((word*) processChars::$60) ← *((word*) processChars::$59) + *((const word*) VYSIN#0 + (byte~) processChars::$39) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VY)
Converting *(pointer+n) to pointer[n] [378] *((word*) processChars::$60) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) + *((const word*) VYSIN#0 + (byte~) processChars::$39) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VY)
Converting *(pointer+n) to pointer[n] [382] *((word*) processChars::$63) ← *((word*) processChars::$61) + *((word*) processChars::$62) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_Y)
Converting *(pointer+n) to pointer[n] [382] *((word*) processChars::$63) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) + *((word*) processChars::$62) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VY)
Converting *(pointer+n) to pointer[n] [382] *((word*) processChars::$63) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_Y)
Resolved ranged next value [229] startProcessing::i1#1 ← ++ startProcessing::i1#2 to ++
Resolved ranged comparison value [231] if(startProcessing::i1#1!=rangelast(0,7)) goto startProcessing::@9 to (number) 8
Resolved ranged next value [417] initSquareTables::x#1 ← ++ initSquareTables::x#2 to ++
Resolved ranged comparison value [419] if(initSquareTables::x#1!=rangelast(0,$27)) goto initSquareTables::@1 to (number) $28
Resolved ranged next value [440] initSquareTables::y#1 ← ++ initSquareTables::y#2 to ++
Resolved ranged comparison value [442] if(initSquareTables::y#1!=rangelast(0,$18)) goto initSquareTables::@8 to (number) $19
Resolved ranged next value [455] initSprites::i#1 ← ++ initSprites::i#2 to ++
Resolved ranged comparison value [457] if(initSprites::i#1!=rangelast(0,7)) goto initSprites::@3 to (number) 8
Resolved ranged next value [489] irqTop::i#1 ← ++ irqTop::i#2 to ++
Resolved ranged comparison value [491] if(irqTop::i#1!=rangelast(0,4)) goto irqTop::@3 to (number) 5
Resolved ranged next value [496] irqTop::i1#1 ← ++ irqTop::i1#2 to ++
Resolved ranged comparison value [498] if(irqTop::i1#1!=rangelast(0,7)) goto irqTop::@5 to (number) 8
Resolved ranged next value [510] irqBottom::i#1 ← ++ irqBottom::i#2 to ++
Resolved ranged comparison value [512] if(irqBottom::i#1!=rangelast(0,4)) goto irqBottom::@5 to (number) 5
Converting *(pointer+n) to pointer[n] [179] *((byte*~) getCharToProcess::$12) ← (byte) ' ' -- *(getCharToProcess::$11 + getCharToProcess::return_x#1)
Converting *(pointer+n) to pointer[n] [217] (byte) startProcessing::ch#0 ← *((byte*) startProcessing::screenPtr#0) -- *(startProcessing::$2 + startProcessing::center_x#8)
Converting *(pointer+n) to pointer[n] [293] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*) processChars::$40) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_ID)
Converting *(pointer+n) to pointer[n] [298] if(*((byte*) processChars::$41)==(const byte) STATUS_FREE#0) goto processChars::@3 -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)
Converting *(pointer+n) to pointer[n] [307] if(*((byte*) processChars::$42)!=(const byte) STATUS_NEW#0) goto processChars::@4 -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)
Converting *(pointer+n) to pointer[n] [310] (word) processChars::xpos#0 ← *((word*) processChars::$43) >> (byte) 4 -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X)
Converting *(pointer+n) to pointer[n] [317] *(*((byte**) processChars::$44)) ← (byte) ' ' -- *((byte**)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR)
Converting *(pointer+n) to pointer[n] [321] (byte*~) processChars::$9 ← (byte*~) processChars::$8 + *((byte*) processChars::$45) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_ID)
Converting *(pointer+n) to pointer[n] [323] *((byte*~) processChars::$9) ← *((byte*) processChars::$46) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_PTR)
Converting *(pointer+n) to pointer[n] [323] *((byte*~) processChars::$9) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR) -- *(processChars::$8 + *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_ID))
Converting *(pointer+n) to pointer[n] [325] *((byte*) processChars::$47) ← (const byte) STATUS_PROCESSING#0 -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)
Converting *(pointer+n) to pointer[n] [336] (word~) processChars::$15 ← *((word*) processChars::$48) >> (byte) 4 -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_Y)
Converting *(pointer+n) to pointer[n] [342] (bool~) processChars::$18 ← *((word*) processChars::$49) < (word) XPOS_LEFTMOST#0 -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X)
Converting *(pointer+n) to pointer[n] [344] (bool~) processChars::$19 ← *((word*) processChars::$50) > (word) XPOS_RIGHTMOST#0 -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X)
Converting *(pointer+n) to pointer[n] [347] (bool~) processChars::$21 ← *((word*) processChars::$51) < (word) YPOS_TOPMOST#0 -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_Y)
Converting *(pointer+n) to pointer[n] [350] (bool~) processChars::$23 ← *((word*) processChars::$52) > (word) YPOS_BOTTOMMOST#0 -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_Y)
Converting *(pointer+n) to pointer[n] [355] *((byte*) processChars::$53) ← (const byte) STATUS_FREE#0 -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)
Converting *(pointer+n) to pointer[n] [367] *((word*) processChars::$55) ← *((word*) processChars::$54) + *((const word*) VXSIN#0 + (byte~) processChars::$38) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VX)
Converting *(pointer+n) to pointer[n] [367] *((word*) processChars::$55) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) + *((const word*) VXSIN#0 + (byte~) processChars::$38) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VX)
Converting *(pointer+n) to pointer[n] [371] *((word*) processChars::$58) ← *((word*) processChars::$56) + *((word*) processChars::$57) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X)
Converting *(pointer+n) to pointer[n] [371] *((word*) processChars::$58) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) + *((word*) processChars::$57) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VX)
Converting *(pointer+n) to pointer[n] [371] *((word*) processChars::$58) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X)
Converting *(pointer+n) to pointer[n] [380] *((word*) processChars::$60) ← *((word*) processChars::$59) + *((const word*) VYSIN#0 + (byte~) processChars::$39) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VY)
Converting *(pointer+n) to pointer[n] [380] *((word*) processChars::$60) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) + *((const word*) VYSIN#0 + (byte~) processChars::$39) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VY)
Converting *(pointer+n) to pointer[n] [384] *((word*) processChars::$63) ← *((word*) processChars::$61) + *((word*) processChars::$62) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_Y)
Converting *(pointer+n) to pointer[n] [384] *((word*) processChars::$63) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) + *((word*) processChars::$62) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VY)
Converting *(pointer+n) to pointer[n] [384] *((word*) processChars::$63) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_Y)
Successful SSA optimization Pass2InlineDerefIdx
Simplifying expression containing zero (word*)PROCESSING#0 in [83] (word*) main::$17 ← (word*)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X
Simplifying expression containing zero (word*)PROCESSING#0 in [250] (word*) startProcessing::$31 ← (word*)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X
Simplifying expression containing zero (word*)processChars::processing#0 in [307] (word*) processChars::$43 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X
Simplifying expression containing zero (word*)processChars::processing#0 in [308] (word) processChars::xpos#0 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) >> (byte) 4
Simplifying expression containing zero (word*)processChars::processing#0 in [339] (word*) processChars::$49 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X
Simplifying expression containing zero (word*)processChars::processing#0 in [340] (bool~) processChars::$18 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) < (word) XPOS_LEFTMOST#0
Simplifying expression containing zero (word*)processChars::processing#0 in [341] (word*) processChars::$50 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X
Simplifying expression containing zero (word*)processChars::processing#0 in [342] (bool~) processChars::$19 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) > (word) XPOS_RIGHTMOST#0
Simplifying expression containing zero (word*)processChars::processing#0 in [366] (word*) processChars::$56 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X
Simplifying expression containing zero (word*)processChars::processing#0 in [368] (word*) processChars::$58 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X
Simplifying expression containing zero (word*)processChars::processing#0 in [369] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX)
Simplifying expression containing zero (word*)processChars::processing#0 in [369] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) ← *((word*)(struct ProcessingSprite*) processChars::processing#0) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX)
Simplifying expression containing zero (word*)PROCESSING#0 in [252] (word*) startProcessing::$31 ← (word*)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X
Simplifying expression containing zero (word*)processChars::processing#0 in [309] (word*) processChars::$43 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X
Simplifying expression containing zero (word*)processChars::processing#0 in [310] (word) processChars::xpos#0 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) >> (byte) 4
Simplifying expression containing zero (word*)processChars::processing#0 in [341] (word*) processChars::$49 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X
Simplifying expression containing zero (word*)processChars::processing#0 in [342] (bool~) processChars::$18 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) < (word) XPOS_LEFTMOST#0
Simplifying expression containing zero (word*)processChars::processing#0 in [343] (word*) processChars::$50 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X
Simplifying expression containing zero (word*)processChars::processing#0 in [344] (bool~) processChars::$19 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) > (word) XPOS_RIGHTMOST#0
Simplifying expression containing zero (word*)processChars::processing#0 in [368] (word*) processChars::$56 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X
Simplifying expression containing zero (word*)processChars::processing#0 in [370] (word*) processChars::$58 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X
Simplifying expression containing zero (word*)processChars::processing#0 in [371] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX)
Simplifying expression containing zero (word*)processChars::processing#0 in [371] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) ← *((word*)(struct ProcessingSprite*) processChars::processing#0) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX)
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused variable (word) startProcessing::center_dist#0 and assignment [51] (word) startProcessing::center_dist#0 ← (word) main::center_dist#0
Eliminating unused variable (byte*~) getCharToProcess::$12 and assignment [75] (byte*~) getCharToProcess::$12 ← (byte*~) getCharToProcess::$11 + (byte) getCharToProcess::return_x#1
Eliminating unused variable (byte*) processChars::$40 and assignment [155] (byte*) processChars::$40 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID
Eliminating unused variable (byte*) processChars::$41 and assignment [157] (byte*) processChars::$41 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS
Eliminating unused variable (byte*) processChars::$42 and assignment [162] (byte*) processChars::$42 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS
Eliminating unused variable (word*) processChars::$43 and assignment [164] (word*) processChars::$43 ← (word*)(struct ProcessingSprite*) processChars::processing#0
Eliminating unused variable (byte**) processChars::$44 and assignment [168] (byte**) processChars::$44 ← (byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR
Eliminating unused variable (byte*) processChars::$45 and assignment [172] (byte*) processChars::$45 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID
Eliminating unused variable (byte*~) processChars::$9 and assignment [173] (byte*~) processChars::$9 ← (byte*~) processChars::$8 + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)
Eliminating unused variable (byte*) processChars::$46 and assignment [174] (byte*) processChars::$46 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR
Eliminating unused variable (byte*) processChars::$47 and assignment [176] (byte*) processChars::$47 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS
Eliminating unused variable (word*) processChars::$48 and assignment [184] (word*) processChars::$48 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y
Eliminating unused variable (word*) processChars::$49 and assignment [189] (word*) processChars::$49 ← (word*)(struct ProcessingSprite*) processChars::processing#0
Eliminating unused variable (word*) processChars::$50 and assignment [191] (word*) processChars::$50 ← (word*)(struct ProcessingSprite*) processChars::processing#0
Eliminating unused variable (word*) processChars::$51 and assignment [193] (word*) processChars::$51 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y
Eliminating unused variable (word*) processChars::$52 and assignment [195] (word*) processChars::$52 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y
Eliminating unused variable (byte*) processChars::$53 and assignment [198] (byte*) processChars::$53 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS
Eliminating unused variable (word*) processChars::$54 and assignment [207] (word*) processChars::$54 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX
Eliminating unused variable (word*) processChars::$55 and assignment [208] (word*) processChars::$55 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX
Eliminating unused variable (word*) processChars::$56 and assignment [210] (word*) processChars::$56 ← (word*)(struct ProcessingSprite*) processChars::processing#0
Eliminating unused variable (word*) processChars::$57 and assignment [211] (word*) processChars::$57 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX
Eliminating unused variable (word*) processChars::$58 and assignment [212] (word*) processChars::$58 ← (word*)(struct ProcessingSprite*) processChars::processing#0
Eliminating unused variable (word*) processChars::$59 and assignment [219] (word*) processChars::$59 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY
Eliminating unused variable (word*) processChars::$60 and assignment [220] (word*) processChars::$60 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY
Eliminating unused variable (word*) processChars::$61 and assignment [222] (word*) processChars::$61 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y
Eliminating unused variable (word*) processChars::$62 and assignment [223] (word*) processChars::$62 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY
Eliminating unused variable (word*) processChars::$63 and assignment [224] (word*) processChars::$63 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y
Eliminating unused variable (struct ProcessingChar) getCharToProcess::return#0 and assignment [72] (struct ProcessingChar) getCharToProcess::return#0 ← struct-unwound
Eliminating unused variable (byte*~) getCharToProcess::$12 and assignment [76] (byte*~) getCharToProcess::$12 ← (byte*~) getCharToProcess::$11 + (byte) getCharToProcess::return_x#1
Eliminating unused variable (struct ProcessingChar) getCharToProcess::return#1 and assignment [78] (struct ProcessingChar) getCharToProcess::return#1 ← struct-unwound
Eliminating unused variable (byte*) processChars::$40 and assignment [157] (byte*) processChars::$40 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID
Eliminating unused variable (byte*) processChars::$41 and assignment [159] (byte*) processChars::$41 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS
Eliminating unused variable (byte*) processChars::$42 and assignment [164] (byte*) processChars::$42 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS
Eliminating unused variable (word*) processChars::$43 and assignment [166] (word*) processChars::$43 ← (word*)(struct ProcessingSprite*) processChars::processing#0
Eliminating unused variable (byte**) processChars::$44 and assignment [170] (byte**) processChars::$44 ← (byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR
Eliminating unused variable (byte*) processChars::$45 and assignment [174] (byte*) processChars::$45 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID
Eliminating unused variable (byte*~) processChars::$9 and assignment [175] (byte*~) processChars::$9 ← (byte*~) processChars::$8 + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)
Eliminating unused variable (byte*) processChars::$46 and assignment [176] (byte*) processChars::$46 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR
Eliminating unused variable (byte*) processChars::$47 and assignment [178] (byte*) processChars::$47 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS
Eliminating unused variable (word*) processChars::$48 and assignment [186] (word*) processChars::$48 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y
Eliminating unused variable (word*) processChars::$49 and assignment [191] (word*) processChars::$49 ← (word*)(struct ProcessingSprite*) processChars::processing#0
Eliminating unused variable (word*) processChars::$50 and assignment [193] (word*) processChars::$50 ← (word*)(struct ProcessingSprite*) processChars::processing#0
Eliminating unused variable (word*) processChars::$51 and assignment [195] (word*) processChars::$51 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y
Eliminating unused variable (word*) processChars::$52 and assignment [197] (word*) processChars::$52 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y
Eliminating unused variable (byte*) processChars::$53 and assignment [200] (byte*) processChars::$53 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS
Eliminating unused variable (word*) processChars::$54 and assignment [209] (word*) processChars::$54 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX
Eliminating unused variable (word*) processChars::$55 and assignment [210] (word*) processChars::$55 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX
Eliminating unused variable (word*) processChars::$56 and assignment [212] (word*) processChars::$56 ← (word*)(struct ProcessingSprite*) processChars::processing#0
Eliminating unused variable (word*) processChars::$57 and assignment [213] (word*) processChars::$57 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX
Eliminating unused variable (word*) processChars::$58 and assignment [214] (word*) processChars::$58 ← (word*)(struct ProcessingSprite*) processChars::processing#0
Eliminating unused variable (word*) processChars::$59 and assignment [221] (word*) processChars::$59 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY
Eliminating unused variable (word*) processChars::$60 and assignment [222] (word*) processChars::$60 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY
Eliminating unused variable (word*) processChars::$61 and assignment [224] (word*) processChars::$61 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y
Eliminating unused variable (word*) processChars::$62 and assignment [225] (word*) processChars::$62 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY
Eliminating unused variable (word*) processChars::$63 and assignment [226] (word*) processChars::$63 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y
Eliminating unused constant (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X
Eliminating unused constant (const bool) DEBUG#0
Successful SSA optimization PassNEliminateUnusedVars
@ -3668,7 +3672,6 @@ VARIABLE REGISTER WEIGHTS
(word) getCharToProcess::$15 4.0
(word) getCharToProcess::$16 4.0
(word~) getCharToProcess::$9 3.0
(struct ProcessingChar) getCharToProcess::closest
(word) getCharToProcess::closest_dist
(word~) getCharToProcess::closest_dist#10 202.0
(word~) getCharToProcess::closest_dist#12 2002.0
@ -3742,7 +3745,6 @@ interrupt(HARDWARE_ALL)(void()) irqTop()
(byte) main::$26 22.0
(byte) main::$27 22.0
(struct ProcessingChar~) main::$9
(struct ProcessingChar) main::center
(word) main::center_dist
(word) main::center_dist#0 22.0
(byte) main::center_x
@ -8798,7 +8800,6 @@ FINAL SYMBOL TABLE
(label) getCharToProcess::@8
(label) getCharToProcess::@9
(label) getCharToProcess::@return
(struct ProcessingChar) getCharToProcess::closest
(word) getCharToProcess::closest_dist
(word~) getCharToProcess::closest_dist#10 closest_dist zp ZP_WORD:16 202.0
(word~) getCharToProcess::closest_dist#12 closest_dist zp ZP_WORD:16 2002.0
@ -8901,7 +8902,6 @@ interrupt(HARDWARE_ALL)(void()) irqTop()
(label) main::@7
(label) main::@8
(label) main::@9
(struct ProcessingChar) main::center
(word) main::center_dist
(word) main::center_dist#0 center_dist zp ZP_WORD:20 22.0
(byte) main::center_x

View File

@ -142,7 +142,6 @@
(label) getCharToProcess::@8
(label) getCharToProcess::@9
(label) getCharToProcess::@return
(struct ProcessingChar) getCharToProcess::closest
(word) getCharToProcess::closest_dist
(word~) getCharToProcess::closest_dist#10 closest_dist zp ZP_WORD:16 202.0
(word~) getCharToProcess::closest_dist#12 closest_dist zp ZP_WORD:16 2002.0
@ -245,7 +244,6 @@ interrupt(HARDWARE_ALL)(void()) irqTop()
(label) main::@7
(label) main::@8
(label) main::@9
(struct ProcessingChar) main::center
(word) main::center_dist
(word) main::center_dist#0 center_dist zp ZP_WORD:20 22.0
(byte) main::center_x

View File

@ -114,8 +114,6 @@ SYMBOL TABLE SSA
(byte) main::NUM_CIRCLES#0
(byte) main::NUM_POINTS
(byte) main::NUM_POINTS#0
(struct Circle) main::c
(struct Point) main::c_center
(struct Circle[main::NUM_CIRCLES#0]) main::circles
(struct Circle[main::NUM_CIRCLES#0]) main::circles#0
(byte) main::idx
@ -130,7 +128,6 @@ SYMBOL TABLE SSA
(byte) main::idx#7
(byte) main::idx#8
(byte) main::idx#9
(struct Point) main::p
(struct Point[main::NUM_POINTS#0]) main::points
(struct Point[main::NUM_POINTS#0]) main::points#0
@ -357,11 +354,8 @@ VARIABLE REGISTER WEIGHTS
(void()) main()
(byte) main::NUM_CIRCLES
(byte) main::NUM_POINTS
(struct Circle) main::c
(struct Point) main::c_center
(struct Circle[main::NUM_CIRCLES#0]) main::circles
(byte) main::idx
(struct Point) main::p
(struct Point[main::NUM_POINTS#0]) main::points
Initial phi equivalence classes
@ -548,11 +542,8 @@ FINAL SYMBOL TABLE
(const byte) main::NUM_CIRCLES#0 NUM_CIRCLES = (const byte) main::NUM_POINTS#0-(byte) 1
(byte) main::NUM_POINTS
(const byte) main::NUM_POINTS#0 NUM_POINTS = (byte) 4
(struct Circle) main::c
(struct Point) main::c_center
(struct Circle[main::NUM_CIRCLES#0]) main::circles
(byte) main::idx
(struct Point) main::p
(struct Point[main::NUM_POINTS#0]) main::points

View File

@ -15,10 +15,7 @@
(const byte) main::NUM_CIRCLES#0 NUM_CIRCLES = (const byte) main::NUM_POINTS#0-(byte) 1
(byte) main::NUM_POINTS
(const byte) main::NUM_POINTS#0 NUM_POINTS = (byte) 4
(struct Circle) main::c
(struct Point) main::c_center
(struct Circle[main::NUM_CIRCLES#0]) main::circles
(byte) main::idx
(struct Point) main::p
(struct Point[main::NUM_POINTS#0]) main::points

View File

@ -52,7 +52,6 @@ SYMBOL TABLE SSA
(label) main::@return
(byte*) main::SCREEN
(byte*) main::SCREEN#0
(struct Point) point
(byte) point_x
(byte) point_x#0
(byte) point_x#1
@ -151,7 +150,6 @@ VARIABLE REGISTER WEIGHTS
(byte) Point::y
(void()) main()
(byte*) main::SCREEN
(struct Point) point
(byte) point_x
(byte) point_y
@ -279,7 +277,6 @@ FINAL SYMBOL TABLE
(label) main::@return
(byte*) main::SCREEN
(const byte*) main::SCREEN#0 SCREEN = (byte*) 1024
(struct Point) point
(byte) point_x
(const byte) point_x#1 point_x = (byte) 2
(byte) point_y

View File

@ -7,7 +7,6 @@
(label) main::@return
(byte*) main::SCREEN
(const byte*) main::SCREEN#0 SCREEN = (byte*) 1024
(struct Point) point
(byte) point_x
(const byte) point_x#1 point_x = (byte) 2
(byte) point_y

View File

@ -75,7 +75,6 @@ SYMBOL TABLE SSA
(label) main::@return
(byte*) main::SCREEN
(byte*) main::SCREEN#0
(struct Point) point1
(byte) point1_x
(byte) point1_x#0
(byte) point1_x#1
@ -92,7 +91,6 @@ SYMBOL TABLE SSA
(byte) point1_y#4
(byte) point1_y#5
(byte) point1_y#6
(struct Point) point2
(byte) point2_x
(byte) point2_x#0
(byte) point2_x#1
@ -201,10 +199,8 @@ VARIABLE REGISTER WEIGHTS
(byte) Point::y
(void()) main()
(byte*) main::SCREEN
(struct Point) point1
(byte) point1_x
(byte) point1_y
(struct Point) point2
(byte) point2_x
(byte) point2_y
@ -332,12 +328,10 @@ FINAL SYMBOL TABLE
(label) main::@return
(byte*) main::SCREEN
(const byte*) main::SCREEN#0 SCREEN = (byte*) 1024
(struct Point) point1
(byte) point1_x
(const byte) point1_x#1 point1_x = (byte) 2
(byte) point1_y
(const byte) point1_y#1 point1_y = (byte) 3
(struct Point) point2
(byte) point2_x
(byte) point2_y

View File

@ -7,12 +7,10 @@
(label) main::@return
(byte*) main::SCREEN
(const byte*) main::SCREEN#0 SCREEN = (byte*) 1024
(struct Point) point1
(byte) point1_x
(const byte) point1_x#1 point1_x = (byte) 2
(byte) point1_y
(const byte) point1_y#1 point1_y = (byte) 3
(struct Point) point2
(byte) point2_x
(byte) point2_y

View File

@ -79,7 +79,6 @@ SYMBOL TABLE SSA
(label) main::@return
(byte*) main::SCREEN
(byte*) main::SCREEN#0
(struct Point) point1
(byte) point1_x
(byte) point1_x#0
(byte) point1_x#1
@ -96,7 +95,6 @@ SYMBOL TABLE SSA
(byte) point1_y#4
(byte) point1_y#5
(byte) point1_y#6
(struct Point) point2
(byte) point2_x
(byte) point2_x#0
(byte) point2_x#1
@ -222,10 +220,8 @@ VARIABLE REGISTER WEIGHTS
(byte) Point::y
(void()) main()
(byte*) main::SCREEN
(struct Point) point1
(byte) point1_x
(byte) point1_y
(struct Point) point2
(byte) point2_x
(byte) point2_y
@ -369,12 +365,10 @@ FINAL SYMBOL TABLE
(label) main::@return
(byte*) main::SCREEN
(const byte*) main::SCREEN#0 SCREEN = (byte*) 1024
(struct Point) point1
(byte) point1_x
(const byte) point1_x#1 point1_x = (byte) 2
(byte) point1_y
(const byte) point1_y#1 point1_y = (byte) 3
(struct Point) point2
(byte) point2_x
(const byte) point2_x#2 point2_x = (byte) 4
(byte) point2_y

View File

@ -7,12 +7,10 @@
(label) main::@return
(byte*) main::SCREEN
(const byte*) main::SCREEN#0 SCREEN = (byte*) 1024
(struct Point) point1
(byte) point1_x
(const byte) point1_x#1 point1_x = (byte) 2
(byte) point1_y
(const byte) point1_y#1 point1_y = (byte) 3
(struct Point) point2
(byte) point2_x
(const byte) point2_x#2 point2_x = (byte) 4
(byte) point2_y

View File

@ -106,7 +106,6 @@ SYMBOL TABLE SSA
(label) main::@1
(label) main::@2
(label) main::@return
(struct Point) main::p1
(byte) main::p1_x
(byte) main::p1_x#0
(byte) main::p1_x#1
@ -261,7 +260,6 @@ VARIABLE REGISTER WEIGHTS
(byte) idx#12 1.0
(byte) idx#4 3.0
(void()) main()
(struct Point) main::p1
(byte) main::p1_x
(byte) main::p1_y
(void()) print((byte) print::p_x , (byte) print::p_y)
@ -502,7 +500,6 @@ FINAL SYMBOL TABLE
(void()) main()
(label) main::@1
(label) main::@return
(struct Point) main::p1
(byte) main::p1_x
(byte) main::p1_y
(const byte) main::p1_y#1 p1_y = (byte) 4

View File

@ -12,7 +12,6 @@
(void()) main()
(label) main::@1
(label) main::@return
(struct Point) main::p1
(byte) main::p1_x
(byte) main::p1_y
(const byte) main::p1_y#1 p1_y = (byte) 4

View File

@ -44,7 +44,6 @@ SYMBOL TABLE SSA
(label) main::@return
(byte*) main::SCREEN
(byte*) main::SCREEN#0
(struct Point) main::p
(byte) main::p_x
(byte) main::p_x#0
(byte) main::p_y
@ -132,7 +131,6 @@ VARIABLE REGISTER WEIGHTS
(byte) Point::y
(void()) main()
(byte*) main::SCREEN
(struct Point) main::p
(byte) main::p_x
(byte) main::p_y
(byte) main::x
@ -264,7 +262,6 @@ FINAL SYMBOL TABLE
(label) main::@return
(byte*) main::SCREEN
(const byte*) main::SCREEN#0 SCREEN = (byte*) 1024
(struct Point) main::p
(byte) main::p_x
(byte) main::p_y
(const byte) main::p_y#0 p_y = (const byte) main::y#0+(byte) 1

View File

@ -7,7 +7,6 @@
(label) main::@return
(byte*) main::SCREEN
(const byte*) main::SCREEN#0 SCREEN = (byte*) 1024
(struct Point) main::p
(byte) main::p_x
(byte) main::p_y
(const byte) main::p_y#0 p_y = (const byte) main::y#0+(byte) 1

View File

@ -61,12 +61,14 @@ point: scope:[point] from main
(byte) point::p_y#0 ← (number) 3
(byte) point::return_x#1 ← (byte) point::p_x#0
(byte) point::return_y#1 ← (byte) point::p_y#0
(struct Point) point::return#0 ← struct-unwound
to:point::@return
point::@return: scope:[point] from point
(byte) point::return_y#4 ← phi( point/(byte) point::return_y#1 )
(byte) point::return_x#4 ← phi( point/(byte) point::return_x#1 )
(byte) point::return_x#2 ← (byte) point::return_x#4
(byte) point::return_y#2 ← (byte) point::return_y#4
(struct Point) point::return#1 ← struct-unwound
return
to:@return
@2: scope:[] from @begin
@ -91,7 +93,6 @@ SYMBOL TABLE SSA
(label) main::@return
(byte*) main::SCREEN
(byte*) main::SCREEN#0
(struct Point) main::q
(byte) main::q_x
(byte) main::q_x#0
(byte) main::q_x#1
@ -100,12 +101,13 @@ SYMBOL TABLE SSA
(byte) main::q_y#1
(struct Point()) point()
(label) point::@return
(struct Point) point::p
(byte) point::p_x
(byte) point::p_x#0
(byte) point::p_y
(byte) point::p_y#0
(struct Point) point::return
(struct Point) point::return#0
(struct Point) point::return#1
(byte) point::return_x
(byte) point::return_x#0
(byte) point::return_x#1
@ -160,6 +162,8 @@ Constant (const byte) main::q_y#1 = point::return_y#0
Successful SSA optimization Pass2ConstantIdentification
Simplifying expression containing zero main::SCREEN#0 in [11] *((const byte*) main::SCREEN#0 + (byte) 0) ← (const byte) main::q_x#1
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused variable (struct Point) point::return#0 and assignment [4] (struct Point) point::return#0 ← struct-unwound
Eliminating unused variable (struct Point) point::return#1 and assignment [5] (struct Point) point::return#1 ← struct-unwound
Eliminating unused constant (const byte) main::q_x#0
Eliminating unused constant (const byte) main::q_y#0
Successful SSA optimization PassNEliminateUnusedVars
@ -225,11 +229,9 @@ VARIABLE REGISTER WEIGHTS
(void()) main()
(struct Point~) main::$0
(byte*) main::SCREEN
(struct Point) main::q
(byte) main::q_x
(byte) main::q_y
(struct Point()) point()
(struct Point) point::p
(byte) point::p_x
(byte) point::p_y
(struct Point) point::return
@ -404,12 +406,10 @@ FINAL SYMBOL TABLE
(label) main::@return
(byte*) main::SCREEN
(const byte*) main::SCREEN#0 SCREEN = (byte*) 1024
(struct Point) main::q
(byte) main::q_x
(byte) main::q_y
(struct Point()) point()
(label) point::@return
(struct Point) point::p
(byte) point::p_x
(const byte) point::p_x#0 p_x = (byte) 2
(byte) point::p_y

View File

@ -9,12 +9,10 @@
(label) main::@return
(byte*) main::SCREEN
(const byte*) main::SCREEN#0 SCREEN = (byte*) 1024
(struct Point) main::q
(byte) main::q_x
(byte) main::q_y
(struct Point()) point()
(label) point::@return
(struct Point) point::p
(byte) point::p_x
(const byte) point::p_x#0 p_x = (byte) 2
(byte) point::p_y

View File

@ -60,15 +60,12 @@ SYMBOL TABLE SSA
(label) main::@return
(byte*) main::SCREEN
(byte*) main::SCREEN#0
(struct Circle) main::c
(struct Point) main::c_center
(byte) main::c_center_x
(byte) main::c_center_x#0
(byte) main::c_center_y
(byte) main::c_center_y#0
(byte) main::c_radius
(byte) main::c_radius#0
(struct Point) main::p
(byte) main::p_x
(byte) main::p_x#0
(byte) main::p_y
@ -155,12 +152,9 @@ VARIABLE REGISTER WEIGHTS
(byte) Point::y
(void()) main()
(byte*) main::SCREEN
(struct Circle) main::c
(struct Point) main::c_center
(byte) main::c_center_x
(byte) main::c_center_y
(byte) main::c_radius
(struct Point) main::p
(byte) main::p_x
(byte) main::p_y
@ -301,13 +295,10 @@ FINAL SYMBOL TABLE
(label) main::@return
(byte*) main::SCREEN
(const byte*) main::SCREEN#0 SCREEN = (byte*) 1024
(struct Circle) main::c
(struct Point) main::c_center
(byte) main::c_center_x
(byte) main::c_center_y
(byte) main::c_radius
(const byte) main::c_radius#0 c_radius = (byte) 5
(struct Point) main::p
(byte) main::p_x
(const byte) main::p_x#0 p_x = (byte) $a
(byte) main::p_y

View File

@ -9,13 +9,10 @@
(label) main::@return
(byte*) main::SCREEN
(const byte*) main::SCREEN#0 SCREEN = (byte*) 1024
(struct Circle) main::c
(struct Point) main::c_center
(byte) main::c_center_x
(byte) main::c_center_y
(byte) main::c_radius
(const byte) main::c_radius#0 c_radius = (byte) 5
(struct Point) main::p
(byte) main::p_x
(const byte) main::p_x#0 p_x = (byte) $a
(byte) main::p_y

View File

@ -90,17 +90,12 @@ SYMBOL TABLE SSA
(label) main::@return
(byte*) main::SCREEN
(byte*) main::SCREEN#0
(struct TwoCircles) main::t
(struct Circle) main::t_c1
(struct Point) main::t_c1_center
(byte) main::t_c1_center_x
(byte) main::t_c1_center_x#0
(byte) main::t_c1_center_y
(byte) main::t_c1_center_y#0
(byte) main::t_c1_radius
(byte) main::t_c1_radius#0
(struct Circle) main::t_c2
(struct Point) main::t_c2_center
(byte) main::t_c2_center_x
(byte) main::t_c2_center_x#0
(byte) main::t_c2_center_y
@ -218,14 +213,9 @@ VARIABLE REGISTER WEIGHTS
(struct Circle) TwoCircles::c2
(void()) main()
(byte*) main::SCREEN
(struct TwoCircles) main::t
(struct Circle) main::t_c1
(struct Point) main::t_c1_center
(byte) main::t_c1_center_x
(byte) main::t_c1_center_y
(byte) main::t_c1_radius
(struct Circle) main::t_c2
(struct Point) main::t_c2_center
(byte) main::t_c2_center_x
(byte) main::t_c2_center_y
(byte) main::t_c2_radius
@ -398,17 +388,12 @@ FINAL SYMBOL TABLE
(label) main::@return
(byte*) main::SCREEN
(const byte*) main::SCREEN#0 SCREEN = (byte*) 1024
(struct TwoCircles) main::t
(struct Circle) main::t_c1
(struct Point) main::t_c1_center
(byte) main::t_c1_center_x
(const byte) main::t_c1_center_x#0 t_c1_center_x = (byte) 1
(byte) main::t_c1_center_y
(const byte) main::t_c1_center_y#0 t_c1_center_y = (byte) 2
(byte) main::t_c1_radius
(const byte) main::t_c1_radius#0 t_c1_radius = (byte) 3
(struct Circle) main::t_c2
(struct Point) main::t_c2_center
(byte) main::t_c2_center_x
(const byte) main::t_c2_center_x#0 t_c2_center_x = (byte) 4
(byte) main::t_c2_center_y

View File

@ -11,17 +11,12 @@
(label) main::@return
(byte*) main::SCREEN
(const byte*) main::SCREEN#0 SCREEN = (byte*) 1024
(struct TwoCircles) main::t
(struct Circle) main::t_c1
(struct Point) main::t_c1_center
(byte) main::t_c1_center_x
(const byte) main::t_c1_center_x#0 t_c1_center_x = (byte) 1
(byte) main::t_c1_center_y
(const byte) main::t_c1_center_y#0 t_c1_center_y = (byte) 2
(byte) main::t_c1_radius
(const byte) main::t_c1_radius#0 t_c1_radius = (byte) 3
(struct Circle) main::t_c2
(struct Point) main::t_c2_center
(byte) main::t_c2_center_x
(const byte) main::t_c2_center_x#0 t_c2_center_x = (byte) 4
(byte) main::t_c2_center_y

View File

@ -47,7 +47,6 @@ SYMBOL TABLE SSA
(label) main::@return
(struct PointDef*) main::SCREEN
(struct PointDef*) main::SCREEN#0
(struct PointDef) main::p
(byte) main::p_x
(byte) main::p_x#0
(byte) main::p_y
@ -124,7 +123,6 @@ VARIABLE REGISTER WEIGHTS
(byte) PointDef::y
(void()) main()
(struct PointDef*) main::SCREEN
(struct PointDef) main::p
(byte) main::p_x
(byte) main::p_y
@ -253,7 +251,6 @@ FINAL SYMBOL TABLE
(label) main::@return
(struct PointDef*) main::SCREEN
(const struct PointDef*) main::SCREEN#0 SCREEN = (struct PointDef*) 1024
(struct PointDef) main::p
(byte) main::p_x
(const byte) main::p_x#0 p_x = (byte) 4
(byte) main::p_y

View File

@ -8,7 +8,6 @@
(label) main::@return
(struct PointDef*) main::SCREEN
(const struct PointDef*) main::SCREEN#0 SCREEN = (struct PointDef*) 1024
(struct PointDef) main::p
(byte) main::p_x
(const byte) main::p_x#0 p_x = (byte) 4
(byte) main::p_y