1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2025-04-17 00:39:07 +00:00

Optimizing constant detection - avoiding versions.

This commit is contained in:
jespergravgaard 2019-09-29 22:36:00 +02:00
parent 032f9d079e
commit bfdd2fb0a5
689 changed files with 10138 additions and 11877 deletions

View File

@ -245,6 +245,26 @@ public abstract class SymbolVariable implements Symbol {
this.storageStrategy = storageStrategy;
}
public boolean isStorageConstant() {
return StorageStrategy.CONSTANT.equals(getStorageStrategy());
}
public boolean isStoragePhiMaster() {
return StorageStrategy.PHI_MASTER.equals(getStorageStrategy());
}
public boolean isStoragePhiVersion() {
return StorageStrategy.PHI_VERSION.equals(getStorageStrategy());
}
public boolean isStorageMemory() {
return StorageStrategy.MEMORY.equals(getStorageStrategy());
}
public boolean isStorageIntermediate() {
return StorageStrategy.INTERMEDIATE.equals(getStorageStrategy());
}
public List<Comment> getComments() {
return comments;
}

View File

@ -7,18 +7,19 @@ import dk.camelot64.kickc.model.values.VariableRef;
import java.util.Objects;
/** A Variable in the program.
*
/**
* A Variable in the program.
* <p>
* There are several types of variables
*
* <p>
* - Intermediate: A variable added by the compiler to hold some intermediate value. Intermediate variables are names $1, $2, ...
* - PHI-variable: A variable with storage strategy PHI is turned into versions. The variable itself is never used directly in the program.
* - PHI-versions: A variable with storage strategy PHI is turned into versions. Versions of the PHI-variable name are named name#1, name#2, name#3
* - Memory: A variable with storage strategy memory is used directly in the program.
* */
*/
public class Variable extends SymbolVariable {
/** The number of the next version (only used for PHI masters)*/
/** The number of the next version (only used for PHI masters) */
private Integer nextPhiVersionNumber;
/** If the variable is assigned to a specific "register", this contains the register. If null the variable has no allocation (yet). Constants are never assigned to registers. */
@ -32,11 +33,12 @@ public class Variable extends SymbolVariable {
/**
* Create a version of a PHI master variable
*
* @param phiMaster The PHI master variable.
* @param version The version number
*/
public Variable(Variable phiMaster, int version) {
super(phiMaster.getName()+"#"+version, phiMaster.getScope(), phiMaster.getType(), StorageStrategy.PHI_VERSION, phiMaster.getDataSegment());
super(phiMaster.getName() + "#" + version, phiMaster.getScope(), phiMaster.getType(), StorageStrategy.PHI_VERSION, phiMaster.getDataSegment());
this.setDeclaredAlignment(phiMaster.getDeclaredAlignment());
this.setDeclaredAsRegister(phiMaster.isDeclaredAsRegister());
this.setDeclaredAsMemory(phiMaster.isDeclaredAsMemory());
@ -57,33 +59,15 @@ public class Variable extends SymbolVariable {
this.allocation = allocation;
}
public boolean isStorageConstant() {
return StorageStrategy.CONSTANT.equals(getStorageStrategy());
}
public boolean isStoragePhiMaster() {
return StorageStrategy.PHI_MASTER.equals(getStorageStrategy());
}
public boolean isStoragePhiVersion() {
return StorageStrategy.PHI_VERSION.equals(getStorageStrategy());
}
public boolean isStorageMemory() {
return StorageStrategy.MEMORY.equals(getStorageStrategy());
}
public boolean isStorageIntermediate() {
return StorageStrategy.INTERMEDIATE.equals(getStorageStrategy());
}
/**
* Creates a new PHI-version from a PHI-master
*
* @return The new version of the PHI master
*/
public Variable createVersion() {
if(!isStoragePhiMaster())
throw new InternalError("Cannot version non-PHI variable");
throw new InternalError("Cannot version non-PHI variable " + this.toString());
Variable version = new Variable(this, nextPhiVersionNumber++);
getScope().add(version);
return version;
@ -91,16 +75,15 @@ public class Variable extends SymbolVariable {
/**
* If the variable is a version of a variable returns the original variable.
*
* @return The original variable. Null if this is not a version.
*/
public Variable getVersionOf() {
if(isStoragePhiVersion()) {
String name = getName();
String versionOfName = name.substring(0, name.indexOf("#"));
return getScope().getVariable(versionOfName);
} else {
return null;
}
if(!isStoragePhiVersion())
throw new InternalError("Cannot get master for non-PHI version variable " + this.toString());
String name = getName();
String versionOfName = name.substring(0, name.indexOf("#"));
return getScope().getVariable(versionOfName);
}
public VariableRef getRef() {

View File

@ -8,6 +8,7 @@ import dk.camelot64.kickc.model.statements.StatementAssignment;
import dk.camelot64.kickc.model.statements.StatementLValue;
import dk.camelot64.kickc.model.symbols.Procedure;
import dk.camelot64.kickc.model.symbols.Scope;
import dk.camelot64.kickc.model.symbols.SymbolVariable;
import dk.camelot64.kickc.model.symbols.Variable;
import dk.camelot64.kickc.model.values.ConstantValue;
import dk.camelot64.kickc.model.values.VariableRef;
@ -38,9 +39,11 @@ public class Pass1EarlyConstantIdentification extends Pass1Base {
if(assign.getrValue1() == null && assign.getOperator() == null && assign.getrValue2() instanceof ConstantValue) {
getLog().append("Identified constant variable " + variable.toString(getProgram()));
earlyConstants.add(variableRef);
variable.setStorageStrategy(SymbolVariable.StorageStrategy.CONSTANT);
} else if(assign.getrValue1() == null && assign.getOperator() instanceof OperatorCastPtr && assign.getrValue2() instanceof ConstantValue) {
getLog().append("Identified constant variable " + variable.toString(getProgram()));
earlyConstants.add(variableRef);
variable.setStorageStrategy(SymbolVariable.StorageStrategy.CONSTANT);
}
}
}

View File

@ -2,6 +2,7 @@ package dk.camelot64.kickc.passes;
import dk.camelot64.kickc.model.CompileError;
import dk.camelot64.kickc.model.ControlFlowBlock;
import dk.camelot64.kickc.model.InternalError;
import dk.camelot64.kickc.model.Program;
import dk.camelot64.kickc.model.iterator.ProgramValue;
import dk.camelot64.kickc.model.iterator.ProgramValueIterator;
@ -85,8 +86,9 @@ public class Pass1GenerateSingleStaticAssignmentForm extends Pass1Base {
if(versions.size() != 0) {
throw new CompileError("Error! Constants can not be modified", source);
}
version = assignedSymbol.createVersion();
version.setDeclaredConstant(true);
throw new InternalError("ERR!");
//version = assignedSymbol.createVersion();
//version.setDeclaredConstant(true);
} else {
version = assignedSymbol.createVersion();
}

View File

@ -84,8 +84,10 @@ public class Pass1UnwindBlockScopes extends Pass1Base {
unwound.setDeclaredRegister((var.getDeclaredRegister()));
unwound.setDeclaredExport(var.isDeclaredExport());
unwoundSymbols.put(symbol.getRef(), unwound.getRef());
unwound.setStorageStrategy(var.getStorageStrategy());
} else if(variable.isStorageIntermediate()) {
Variable unwound = procedure.addVariableIntermediate();
unwound.setStorageStrategy(variable.getStorageStrategy());
unwoundSymbols.put(symbol.getRef(), unwound.getRef());
} else {
throw new CompileError("ERROR! Unexpected symbol encountered in block scope " + symbol.toString(getProgram()));

View File

@ -420,7 +420,7 @@ public class Pass2AliasElimination extends Pass2SsaOptimization {
String name;
int score;
Variable variable = scope.getVariable(var);
if(variable.isDeclaredConstant()) {
if(variable.isDeclaredConstant() || variable.isStorageConstant()) {
name = var.getFullNameUnversioned();
score = 100;
} else if(var.isVersion()) {

View File

@ -6,6 +6,7 @@ import dk.camelot64.kickc.model.Program;
import dk.camelot64.kickc.model.statements.*;
import dk.camelot64.kickc.model.symbols.Procedure;
import dk.camelot64.kickc.model.symbols.ProgramScope;
import dk.camelot64.kickc.model.symbols.SymbolVariable;
import dk.camelot64.kickc.model.symbols.Variable;
import dk.camelot64.kickc.model.types.*;
import dk.camelot64.kickc.model.values.AssignmentRValue;
@ -135,8 +136,10 @@ public class PassNTypeInference extends Pass2SsaOptimization {
// If the type is an array or a string the symbol is constant
if(symbol.getType() instanceof SymbolTypeArray) {
symbol.setDeclaredConstant(true);
symbol.setStorageStrategy(SymbolVariable.StorageStrategy.CONSTANT);
} else if(SymbolType.STRING.equals(symbol.getType())) {
symbol.setDeclaredConstant(true);
symbol.setStorageStrategy(SymbolVariable.StorageStrategy.CONSTANT);
}
}
}

View File

@ -15,7 +15,7 @@ main: scope:[main] from @1
main::@1: scope:[main] from main main::@1
[5] (byte) main::b#2 ← phi( main/(byte) main::b#0 main::@1/(byte) main::b#1 )
[6] (byte) main::c#0 ← *((const byte*) main::bp#0) + (byte) 1
[7] *((const byte*) main::SCREEN#0 + (byte) main::b#2) ← (byte) main::c#0
[7] *((const byte*) main::SCREEN + (byte) main::b#2) ← (byte) main::c#0
[8] (byte) main::b#1 ← ++ (byte) main::b#2
[9] if((byte) main::b#1!=(byte) $b) goto main::@1
to:main::@return

View File

@ -8,7 +8,7 @@ CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from @1
(byte*) main::SCREEN#0 ← ((byte*)) (number) $400
(byte*) main::SCREEN ← ((byte*)) (number) $400
(byte) main::b#0 ← (byte) 0
to:main::@1
main::@1: scope:[main] from main main::@1
@ -17,7 +17,7 @@ main::@1: scope:[main] from main main::@1
(byte*) main::bp#0 ← (byte*~) main::$0
(number~) main::$1 ← *((byte*) main::bp#0) + (number) 1
(byte) main::c#0 ← (number~) main::$1
*((byte*) main::SCREEN#0 + (byte) main::b#2) ← (byte) main::c#0
*((byte*) main::SCREEN + (byte) main::b#2) ← (byte) main::c#0
(byte) main::b#1 ← (byte) main::b#2 + rangenext(0,$a)
(bool~) main::$2 ← (byte) main::b#1 != rangelast(0,$a)
if((bool~) main::$2) goto main::@1
@ -44,7 +44,6 @@ SYMBOL TABLE SSA
(label) main::@1
(label) main::@return
(byte*) main::SCREEN
(byte*) main::SCREEN#0
(byte) main::b
(byte) main::b#0
(byte) main::b#1
@ -57,7 +56,7 @@ SYMBOL TABLE SSA
Adding number conversion cast (unumber) 1 in (number~) main::$1 ← *((byte*) main::bp#0) + (number) 1
Adding number conversion cast (unumber) main::$1 in (number~) main::$1 ← *((byte*) main::bp#0) + (unumber)(number) 1
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) main::SCREEN#0 ← (byte*)(number) $400
Inlining cast (byte*) main::SCREEN ← (byte*)(number) $400
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 1
@ -72,7 +71,7 @@ Simple Condition (bool~) main::$2 [10] if((byte) main::b#1!=rangelast(0,$a)) got
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant right-side identified [3] (byte*) main::bp#0 ← & (byte) main::b#2
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte*) main::SCREEN#0 = (byte*) 1024
Constant (const byte*) main::SCREEN = (byte*) 1024
Constant (const byte*) main::bp#0 = &main::b#2
Successful SSA optimization Pass2ConstantIdentification
Resolved ranged next value [8] main::b#1 ← ++ main::b#2 to ++
@ -119,7 +118,7 @@ main: scope:[main] from @1
main::@1: scope:[main] from main main::@1
[5] (byte) main::b#2 ← phi( main/(byte) main::b#0 main::@1/(byte) main::b#1 )
[6] (byte) main::c#0 ← *((const byte*) main::bp#0) + (byte) 1
[7] *((const byte*) main::SCREEN#0 + (byte) main::b#2) ← (byte) main::c#0
[7] *((const byte*) main::SCREEN + (byte) main::b#2) ← (byte) main::c#0
[8] (byte) main::b#1 ← ++ (byte) main::b#2
[9] if((byte) main::b#1!=(byte) $b) goto main::@1
to:main::@return
@ -130,7 +129,6 @@ main::@return: scope:[main] from main::@1
VARIABLE REGISTER WEIGHTS
(void()) main()
(byte*) main::SCREEN
(byte) main::b
(byte) main::b#0 4.0
(byte) main::b#1 16.5
@ -191,7 +189,7 @@ main: {
ldy.z bp
iny
sty.z c
// [7] *((const byte*) main::SCREEN#0 + (byte) main::b#2) ← (byte) main::c#0 -- pbuc1_derefidx_vbuz1=vbuz2
// [7] *((const byte*) main::SCREEN + (byte) main::b#2) ← (byte) main::c#0 -- pbuc1_derefidx_vbuz1=vbuz2
lda.z c
ldy.z b
sta SCREEN,y
@ -211,7 +209,7 @@ main: {
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [4] (byte) main::b#0 ← (byte) 0 [ main::b#0 ] ( main:2 [ main::b#0 ] ) always clobbers reg byte a
Statement [7] *((const byte*) main::SCREEN#0 + (byte) main::b#2) ← (byte) main::c#0 [ main::b#2 ] ( main:2 [ main::b#2 ] ) always clobbers reg byte y
Statement [7] *((const byte*) main::SCREEN + (byte) main::b#2) ← (byte) main::c#0 [ main::b#2 ] ( main:2 [ main::b#2 ] ) always clobbers reg byte y
Statement [9] if((byte) main::b#1!=(byte) $b) goto main::@1 [ main::b#1 ] ( main:2 [ main::b#1 ] ) always clobbers reg byte a
Potential registers zp ZP_BYTE:2 [ main::b#2 main::b#0 main::b#1 ] : zp ZP_BYTE:2 ,
Potential registers zp ZP_BYTE:3 [ main::c#0 ] : zp ZP_BYTE:3 , reg byte a , reg byte x , reg byte y ,
@ -266,7 +264,7 @@ main: {
lda.z bp
clc
adc #1
// [7] *((const byte*) main::SCREEN#0 + (byte) main::b#2) ← (byte) main::c#0 -- pbuc1_derefidx_vbuz1=vbuaa
// [7] *((const byte*) main::SCREEN + (byte) main::b#2) ← (byte) main::c#0 -- pbuc1_derefidx_vbuz1=vbuaa
ldy.z b
sta SCREEN,y
// [8] (byte) main::b#1 ← ++ (byte) main::b#2 -- vbuz1=_inc_vbuz1
@ -312,8 +310,7 @@ FINAL SYMBOL TABLE
(void()) main()
(label) main::@1
(label) main::@return
(byte*) main::SCREEN
(const byte*) main::SCREEN#0 SCREEN = (byte*) 1024
(const byte*) main::SCREEN SCREEN = (byte*) 1024
(byte) main::b
(byte) main::b#0 b zp ZP_BYTE:2 4.0
(byte) main::b#1 b zp ZP_BYTE:2 16.5
@ -362,7 +359,7 @@ main: {
clc
adc #1
// SCREEN[b] = c
// [7] *((const byte*) main::SCREEN#0 + (byte) main::b#2) ← (byte) main::c#0 -- pbuc1_derefidx_vbuz1=vbuaa
// [7] *((const byte*) main::SCREEN + (byte) main::b#2) ← (byte) main::c#0 -- pbuc1_derefidx_vbuz1=vbuaa
ldy.z b
sta SCREEN,y
// for( byte b: 0..10)

View File

@ -4,8 +4,7 @@
(void()) main()
(label) main::@1
(label) main::@return
(byte*) main::SCREEN
(const byte*) main::SCREEN#0 SCREEN = (byte*) 1024
(const byte*) main::SCREEN SCREEN = (byte*) 1024
(byte) main::b
(byte) main::b#0 b zp ZP_BYTE:2 4.0
(byte) main::b#1 b zp ZP_BYTE:2 16.5

View File

@ -24,9 +24,9 @@ main::@2: scope:[main] from main::@1
[11] call setByte
to:main::@3
main::@3: scope:[main] from main::@2
[12] *((const byte*) main::SCREEN#0) ← (byte) main::b1#0
[13] *((const byte*) main::SCREEN#0+(byte) 1) ← (byte) main::b2#0
[14] *((const byte*) main::SCREEN#0+(byte) 2) ← (byte) main::b3#0
[12] *((const byte*) main::SCREEN) ← (byte) main::b1#0
[13] *((const byte*) main::SCREEN+(byte) 1) ← (byte) main::b2#0
[14] *((const byte*) main::SCREEN+(byte) 2) ← (byte) main::b3#0
to:main::@return
main::@return: scope:[main] from main::@3
[15] return

View File

@ -10,7 +10,7 @@ CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from @2
(byte*) main::SCREEN#0 ← ((byte*)) (number) $400
(byte*) main::SCREEN ← ((byte*)) (number) $400
(byte) main::b1#0 ← (number) 0
(byte) main::b2#0 ← (number) 0
(byte) main::b3#0 ← (number) 0
@ -41,9 +41,9 @@ main::@3: scope:[main] from main::@2
(byte) main::b3#2 ← phi( main::@2/(byte) main::b3#1 )
(byte) main::b2#2 ← phi( main::@2/(byte) main::b2#3 )
(byte) main::b1#1 ← phi( main::@2/(byte) main::b1#2 )
*((byte*) main::SCREEN#0 + (number) 0) ← (byte) main::b1#1
*((byte*) main::SCREEN#0 + (number) 1) ← (byte) main::b2#2
*((byte*) main::SCREEN#0 + (number) 2) ← (byte) main::b3#2
*((byte*) main::SCREEN + (number) 0) ← (byte) main::b1#1
*((byte*) main::SCREEN + (number) 1) ← (byte) main::b2#2
*((byte*) main::SCREEN + (number) 2) ← (byte) main::b3#2
to:main::@return
main::@return: scope:[main] from main::@3
return
@ -79,7 +79,6 @@ SYMBOL TABLE SSA
(label) main::@3
(label) main::@return
(byte*) main::SCREEN
(byte*) main::SCREEN#0
(byte) main::b1
(byte) main::b1#0
(byte) main::b1#1
@ -111,11 +110,11 @@ SYMBOL TABLE SSA
Adding number conversion cast (unumber) 0 in (byte) main::b1#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) main::b2#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) main::b3#0 ← (number) 0
Adding number conversion cast (unumber) 0 in *((byte*) main::SCREEN#0 + (number) 0) ← (byte) main::b1#1
Adding number conversion cast (unumber) 1 in *((byte*) main::SCREEN#0 + (number) 1) ← (byte) main::b2#2
Adding number conversion cast (unumber) 2 in *((byte*) main::SCREEN#0 + (number) 2) ← (byte) main::b3#2
Adding number conversion cast (unumber) 0 in *((byte*) main::SCREEN + (number) 0) ← (byte) main::b1#1
Adding number conversion cast (unumber) 1 in *((byte*) main::SCREEN + (number) 1) ← (byte) main::b2#2
Adding number conversion cast (unumber) 2 in *((byte*) main::SCREEN + (number) 2) ← (byte) main::b3#2
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) main::SCREEN#0 ← (byte*)(number) $400
Inlining cast (byte*) main::SCREEN ← (byte*)(number) $400
Inlining cast (byte) main::b1#0 ← (unumber)(number) 0
Inlining cast (byte) main::b2#0 ← (unumber)(number) 0
Inlining cast (byte) main::b3#0 ← (unumber)(number) 0
@ -146,7 +145,7 @@ Constant right-side identified [4] (byte*) setByte::ptr#0 ← & (byte) main::b1#
Constant right-side identified [9] (byte*) setByte::ptr#1 ← & (byte) main::b2#0
Constant right-side identified [14] (byte*) setByte::ptr#2 ← & (byte) main::b3#0
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte*) main::SCREEN#0 = (byte*) 1024
Constant (const byte*) main::SCREEN = (byte*) 1024
Constant (const byte*) setByte::ptr#0 = &main::b1#0
Constant (const byte) setByte::b#0 = 'c'
Constant (const byte*) setByte::ptr#1 = &main::b2#0
@ -154,7 +153,7 @@ Constant (const byte) setByte::b#1 = 'm'
Constant (const byte*) setByte::ptr#2 = &main::b3#0
Constant (const byte) setByte::b#2 = 'l'
Successful SSA optimization Pass2ConstantIdentification
Simplifying expression containing zero main::SCREEN#0 in [19] *((const byte*) main::SCREEN#0 + (byte) 0) ← (byte) main::b1#0
Simplifying expression containing zero main::SCREEN in [19] *((const byte*) main::SCREEN + (byte) 0) ← (byte) main::b1#0
Successful SSA optimization PassNSimplifyExpressionWithZero
Inlining constant with var siblings (const byte*) setByte::ptr#0
Inlining constant with var siblings (const byte) setByte::b#0
@ -169,8 +168,8 @@ Constant inlined setByte::b#2 = (byte) 'l'
Constant inlined setByte::b#1 = (byte) 'm'
Constant inlined setByte::b#0 = (byte) 'c'
Successful SSA optimization Pass2ConstantInlining
Consolidated array index constant in *(main::SCREEN#0+1)
Consolidated array index constant in *(main::SCREEN#0+2)
Consolidated array index constant in *(main::SCREEN+1)
Consolidated array index constant in *(main::SCREEN+2)
Successful SSA optimization Pass2ConstantAdditionElimination
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @2
@ -219,9 +218,9 @@ main::@2: scope:[main] from main::@1
[11] call setByte
to:main::@3
main::@3: scope:[main] from main::@2
[12] *((const byte*) main::SCREEN#0) ← (byte) main::b1#0
[13] *((const byte*) main::SCREEN#0+(byte) 1) ← (byte) main::b2#0
[14] *((const byte*) main::SCREEN#0+(byte) 2) ← (byte) main::b3#0
[12] *((const byte*) main::SCREEN) ← (byte) main::b1#0
[13] *((const byte*) main::SCREEN+(byte) 1) ← (byte) main::b2#0
[14] *((const byte*) main::SCREEN+(byte) 2) ← (byte) main::b3#0
to:main::@return
main::@return: scope:[main] from main::@3
[15] return
@ -240,7 +239,6 @@ setByte::@return: scope:[setByte] from setByte
VARIABLE REGISTER WEIGHTS
(void()) main()
(byte*) main::SCREEN
(byte) main::b1
(byte) main::b1#0 0.36363636363636365
(byte) main::b2
@ -355,13 +353,13 @@ main: {
jmp b3
// main::@3
b3:
// [12] *((const byte*) main::SCREEN#0) ← (byte) main::b1#0 -- _deref_pbuc1=vbuz1
// [12] *((const byte*) main::SCREEN) ← (byte) main::b1#0 -- _deref_pbuc1=vbuz1
lda.z b1
sta SCREEN
// [13] *((const byte*) main::SCREEN#0+(byte) 1) ← (byte) main::b2#0 -- _deref_pbuc1=vbuz1
// [13] *((const byte*) main::SCREEN+(byte) 1) ← (byte) main::b2#0 -- _deref_pbuc1=vbuz1
lda.z b2
sta SCREEN+1
// [14] *((const byte*) main::SCREEN#0+(byte) 2) ← (byte) main::b3#0 -- _deref_pbuc1=vbuz1
// [14] *((const byte*) main::SCREEN+(byte) 2) ← (byte) main::b3#0 -- _deref_pbuc1=vbuz1
lda.z b3
sta SCREEN+2
jmp breturn
@ -391,9 +389,9 @@ REGISTER UPLIFT POTENTIAL REGISTERS
Statement [4] (byte) main::b1#0 ← (byte) 0 [ main::b1#0 ] ( main:2 [ main::b1#0 ] ) always clobbers reg byte a
Statement [5] (byte) main::b2#0 ← (byte) 0 [ main::b1#0 main::b2#0 ] ( main:2 [ main::b1#0 main::b2#0 ] ) always clobbers reg byte a
Statement [6] (byte) main::b3#0 ← (byte) 0 [ main::b1#0 main::b2#0 main::b3#0 ] ( main:2 [ main::b1#0 main::b2#0 main::b3#0 ] ) always clobbers reg byte a
Statement [12] *((const byte*) main::SCREEN#0) ← (byte) main::b1#0 [ main::b2#0 main::b3#0 ] ( main:2 [ main::b2#0 main::b3#0 ] ) always clobbers reg byte a
Statement [13] *((const byte*) main::SCREEN#0+(byte) 1) ← (byte) main::b2#0 [ main::b3#0 ] ( main:2 [ main::b3#0 ] ) always clobbers reg byte a
Statement [14] *((const byte*) main::SCREEN#0+(byte) 2) ← (byte) main::b3#0 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [12] *((const byte*) main::SCREEN) ← (byte) main::b1#0 [ main::b2#0 main::b3#0 ] ( main:2 [ main::b2#0 main::b3#0 ] ) always clobbers reg byte a
Statement [13] *((const byte*) main::SCREEN+(byte) 1) ← (byte) main::b2#0 [ main::b3#0 ] ( main:2 [ main::b3#0 ] ) always clobbers reg byte a
Statement [14] *((const byte*) main::SCREEN+(byte) 2) ← (byte) main::b3#0 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [17] *((byte*) setByte::ptr#3) ← (byte) setByte::b#3 [ main::b1#0 main::b2#0 main::b3#0 ] ( main:2::setByte:7 [ main::b1#0 main::b2#0 main::b3#0 ] main:2::setByte:9 [ main::b1#0 main::b2#0 main::b3#0 ] main:2::setByte:11 [ main::b1#0 main::b2#0 main::b3#0 ] ) always clobbers reg byte y
Potential registers zp ZP_BYTE:2 [ setByte::b#3 ] : zp ZP_BYTE:2 , reg byte a , reg byte x , reg byte y ,
Potential registers zp ZP_WORD:3 [ setByte::ptr#3 ] : zp ZP_WORD:3 ,
@ -503,13 +501,13 @@ main: {
jmp b3
// main::@3
b3:
// [12] *((const byte*) main::SCREEN#0) ← (byte) main::b1#0 -- _deref_pbuc1=vbuz1
// [12] *((const byte*) main::SCREEN) ← (byte) main::b1#0 -- _deref_pbuc1=vbuz1
lda.z b1
sta SCREEN
// [13] *((const byte*) main::SCREEN#0+(byte) 1) ← (byte) main::b2#0 -- _deref_pbuc1=vbuz1
// [13] *((const byte*) main::SCREEN+(byte) 1) ← (byte) main::b2#0 -- _deref_pbuc1=vbuz1
lda.z b2
sta SCREEN+1
// [14] *((const byte*) main::SCREEN#0+(byte) 2) ← (byte) main::b3#0 -- _deref_pbuc1=vbuz1
// [14] *((const byte*) main::SCREEN+(byte) 2) ← (byte) main::b3#0 -- _deref_pbuc1=vbuz1
lda.z b3
sta SCREEN+2
jmp breturn
@ -577,8 +575,7 @@ FINAL SYMBOL TABLE
(label) main::@2
(label) main::@3
(label) main::@return
(byte*) main::SCREEN
(const byte*) main::SCREEN#0 SCREEN = (byte*) 1024
(const byte*) main::SCREEN SCREEN = (byte*) 1024
(byte) main::b1
(byte) main::b1#0 b1 zp ZP_BYTE:4 0.36363636363636365
(byte) main::b2
@ -670,15 +667,15 @@ main: {
jsr setByte
// main::@3
// SCREEN[0] = b1
// [12] *((const byte*) main::SCREEN#0) ← (byte) main::b1#0 -- _deref_pbuc1=vbuz1
// [12] *((const byte*) main::SCREEN) ← (byte) main::b1#0 -- _deref_pbuc1=vbuz1
lda.z b1
sta SCREEN
// SCREEN[1] = b2
// [13] *((const byte*) main::SCREEN#0+(byte) 1) ← (byte) main::b2#0 -- _deref_pbuc1=vbuz1
// [13] *((const byte*) main::SCREEN+(byte) 1) ← (byte) main::b2#0 -- _deref_pbuc1=vbuz1
lda.z b2
sta SCREEN+1
// SCREEN[2] = b3
// [14] *((const byte*) main::SCREEN#0+(byte) 2) ← (byte) main::b3#0 -- _deref_pbuc1=vbuz1
// [14] *((const byte*) main::SCREEN+(byte) 2) ← (byte) main::b3#0 -- _deref_pbuc1=vbuz1
lda.z b3
sta SCREEN+2
// main::@return

View File

@ -6,8 +6,7 @@
(label) main::@2
(label) main::@3
(label) main::@return
(byte*) main::SCREEN
(const byte*) main::SCREEN#0 SCREEN = (byte*) 1024
(const byte*) main::SCREEN SCREEN = (byte*) 1024
(byte) main::b1
(byte) main::b1#0 b1 zp ZP_BYTE:4 0.36363636363636365
(byte) main::b2

View File

@ -21,7 +21,7 @@ main::@1: scope:[main] from main main::@2
main::@2: scope:[main] from main::@1
[9] (word~) main::$0 ← (word) getValue::return#0
[10] (byte~) main::$2 ← (byte) main::idx#2 << (byte) 1
[11] *((const word*) main::SCREEN#0 + (byte~) main::$2) ← (word~) main::$0
[11] *((const word*) main::SCREEN + (byte~) main::$2) ← (word~) main::$0
[12] (byte) main::idx#1 ← ++ (byte) main::idx#2
[13] if((byte) main::idx#1!=(byte) $81) goto main::@1
to:main::@return

View File

@ -10,7 +10,7 @@ CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from @2
(word*) main::SCREEN#0 ← ((word*)) (number) $400
(word*) main::SCREEN ← ((word*)) (number) $400
(byte) main::idx#0 ← (byte) 0
to:main::@1
main::@1: scope:[main] from main main::@3
@ -24,7 +24,7 @@ main::@3: scope:[main] from main::@1
(word) getValue::return#3 ← phi( main::@1/(word) getValue::return#0 )
(word~) main::$0 ← (word) getValue::return#3
(byte~) main::$2 ← (byte) main::idx#3 * (const byte) SIZEOF_WORD
*((word*) main::SCREEN#0 + (byte~) main::$2) ← (word~) main::$0
*((word*) main::SCREEN + (byte~) main::$2) ← (word~) main::$0
(byte) main::idx#1 ← (byte) main::idx#3 + rangenext(0,$80)
(bool~) main::$1 ← (byte) main::idx#1 != rangelast(0,$80)
if((bool~) main::$1) goto main::@1
@ -90,7 +90,6 @@ SYMBOL TABLE SSA
(label) main::@3
(label) main::@return
(word*) main::SCREEN
(word*) main::SCREEN#0
(byte) main::idx
(byte) main::idx#0
(byte) main::idx#1
@ -105,7 +104,7 @@ Adding number conversion cast (unumber) getValue::$1 in (number~) getValue::$1
Adding number conversion cast (unumber) 1 in (number~) getValue::$2 ← (unumber~) getValue::$1 >> (number) 1
Adding number conversion cast (unumber) getValue::$2 in (number~) getValue::$2 ← (unumber~) getValue::$1 >> (unumber)(number) 1
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (word*) main::SCREEN#0 ← (word*)(number) $400
Inlining cast (word*) main::SCREEN ← (word*)(number) $400
Inlining cast (word~) getValue::$3 ← (word)(unumber~) getValue::$2
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (word*) 1024
@ -131,7 +130,7 @@ Simple Condition (bool~) main::$1 [12] if((byte) main::idx#1!=rangelast(0,$80))
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant right-side identified [14] (word[$80]) arr16 ← { fill( $80, 0) }
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const word*) main::SCREEN#0 = (word*) 1024
Constant (const word*) main::SCREEN = (word*) 1024
Constant (const byte) main::idx#0 = 0
Constant (const word[$80]) arr16 = { fill( $80, 0) }
Successful SSA optimization Pass2ConstantIdentification
@ -199,7 +198,7 @@ main::@1: scope:[main] from main main::@2
main::@2: scope:[main] from main::@1
[9] (word~) main::$0 ← (word) getValue::return#0
[10] (byte~) main::$2 ← (byte) main::idx#2 << (byte) 1
[11] *((const word*) main::SCREEN#0 + (byte~) main::$2) ← (word~) main::$0
[11] *((const word*) main::SCREEN + (byte~) main::$2) ← (word~) main::$0
[12] (byte) main::idx#1 ← ++ (byte) main::idx#2
[13] if((byte) main::idx#1!=(byte) $81) goto main::@1
to:main::@return
@ -234,7 +233,6 @@ VARIABLE REGISTER WEIGHTS
(void()) main()
(word~) main::$0 11.0
(byte~) main::$2 22.0
(word*) main::SCREEN
(byte) main::idx
(byte) main::idx#1 16.5
(byte) main::idx#2 6.285714285714286
@ -340,7 +338,7 @@ main: {
lda.z idx
asl
sta.z _2
// [11] *((const word*) main::SCREEN#0 + (byte~) main::$2) ← (word~) main::$0 -- pwuc1_derefidx_vbuz1=vwuz2
// [11] *((const word*) main::SCREEN + (byte~) main::$2) ← (word~) main::$0 -- pwuc1_derefidx_vbuz1=vwuz2
ldy.z _2
lda.z _0
sta SCREEN,y
@ -405,7 +403,7 @@ Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ ma
Statement [8] (word) getValue::return#0 ← (word) getValue::return#1 [ main::idx#2 getValue::return#0 ] ( main:2 [ main::idx#2 getValue::return#0 ] ) always clobbers reg byte a
Statement [9] (word~) main::$0 ← (word) getValue::return#0 [ main::idx#2 main::$0 ] ( main:2 [ main::idx#2 main::$0 ] ) always clobbers reg byte a
Statement [10] (byte~) main::$2 ← (byte) main::idx#2 << (byte) 1 [ main::idx#2 main::$0 main::$2 ] ( main:2 [ main::idx#2 main::$0 main::$2 ] ) always clobbers reg byte a
Statement [11] *((const word*) main::SCREEN#0 + (byte~) main::$2) ← (word~) main::$0 [ main::idx#2 ] ( main:2 [ main::idx#2 ] ) always clobbers reg byte a
Statement [11] *((const word*) main::SCREEN + (byte~) main::$2) ← (word~) main::$0 [ main::idx#2 ] ( main:2 [ main::idx#2 ] ) always clobbers reg byte a
Statement [15] (byte~) getValue::$0 ← (word) getValue::index#0 & (byte) $7f [ getValue::$0 ] ( main:2::getValue:7 [ main::idx#2 getValue::$0 ] ) always clobbers reg byte a
Statement [16] (byte~) getValue::$4 ← (byte~) getValue::$0 << (byte) 1 [ getValue::$4 ] ( main:2::getValue:7 [ main::idx#2 getValue::$4 ] ) always clobbers reg byte a
Statement [17] (byte~) getValue::$1 ← *((const word[$80]) arr16 + (byte~) getValue::$4) & (byte) $ff [ getValue::$1 ] ( main:2::getValue:7 [ main::idx#2 getValue::$1 ] ) always clobbers reg byte a
@ -415,7 +413,7 @@ Statement [6] (word) getValue::index#0 ← (byte) main::idx#2 [ main::idx#2 getV
Statement [8] (word) getValue::return#0 ← (word) getValue::return#1 [ main::idx#2 getValue::return#0 ] ( main:2 [ main::idx#2 getValue::return#0 ] ) always clobbers reg byte a
Statement [9] (word~) main::$0 ← (word) getValue::return#0 [ main::idx#2 main::$0 ] ( main:2 [ main::idx#2 main::$0 ] ) always clobbers reg byte a
Statement [10] (byte~) main::$2 ← (byte) main::idx#2 << (byte) 1 [ main::idx#2 main::$0 main::$2 ] ( main:2 [ main::idx#2 main::$0 main::$2 ] ) always clobbers reg byte a
Statement [11] *((const word*) main::SCREEN#0 + (byte~) main::$2) ← (word~) main::$0 [ main::idx#2 ] ( main:2 [ main::idx#2 ] ) always clobbers reg byte a
Statement [11] *((const word*) main::SCREEN + (byte~) main::$2) ← (word~) main::$0 [ main::idx#2 ] ( main:2 [ main::idx#2 ] ) always clobbers reg byte a
Statement [15] (byte~) getValue::$0 ← (word) getValue::index#0 & (byte) $7f [ getValue::$0 ] ( main:2::getValue:7 [ main::idx#2 getValue::$0 ] ) always clobbers reg byte a
Statement [16] (byte~) getValue::$4 ← (byte~) getValue::$0 << (byte) 1 [ getValue::$4 ] ( main:2::getValue:7 [ main::idx#2 getValue::$4 ] ) always clobbers reg byte a
Statement [17] (byte~) getValue::$1 ← *((const word[$80]) arr16 + (byte~) getValue::$4) & (byte) $ff [ getValue::$1 ] ( main:2::getValue:7 [ main::idx#2 getValue::$1 ] ) always clobbers reg byte a
@ -501,7 +499,7 @@ main: {
// [10] (byte~) main::$2 ← (byte) main::idx#2 << (byte) 1 -- vbuaa=vbuxx_rol_1
txa
asl
// [11] *((const word*) main::SCREEN#0 + (byte~) main::$2) ← (word~) main::$0 -- pwuc1_derefidx_vbuaa=vwuz1
// [11] *((const word*) main::SCREEN + (byte~) main::$2) ← (word~) main::$0 -- pwuc1_derefidx_vbuaa=vwuz1
tay
lda.z _0
sta SCREEN,y
@ -598,8 +596,7 @@ FINAL SYMBOL TABLE
(label) main::@1
(label) main::@2
(label) main::@return
(word*) main::SCREEN
(const word*) main::SCREEN#0 SCREEN = (word*) 1024
(const word*) main::SCREEN SCREEN = (word*) 1024
(byte) main::idx
(byte) main::idx#1 reg byte x 16.5
(byte) main::idx#2 reg byte x 6.285714285714286
@ -658,7 +655,7 @@ main: {
// [10] (byte~) main::$2 ← (byte) main::idx#2 << (byte) 1 -- vbuaa=vbuxx_rol_1
txa
asl
// [11] *((const word*) main::SCREEN#0 + (byte~) main::$2) ← (word~) main::$0 -- pwuc1_derefidx_vbuaa=vwuz1
// [11] *((const word*) main::SCREEN + (byte~) main::$2) ← (word~) main::$0 -- pwuc1_derefidx_vbuaa=vwuz1
tay
lda.z _0
sta SCREEN,y

View File

@ -19,8 +19,7 @@
(label) main::@1
(label) main::@2
(label) main::@return
(word*) main::SCREEN
(const word*) main::SCREEN#0 SCREEN = (word*) 1024
(const word*) main::SCREEN SCREEN = (word*) 1024
(byte) main::idx
(byte) main::idx#1 reg byte x 16.5
(byte) main::idx#2 reg byte x 6.285714285714286

View File

@ -14,9 +14,9 @@ main: scope:[main] from @1
to:main::@1
main::@1: scope:[main] from main main::@1
[5] (byte) main::sub#2 ← phi( main/(byte) 0 main::@1/(byte) main::sub#1 )
[6] *((const byte[SZ#0]) items + (byte) main::sub#2) ← (byte) main::sub#2
[6] *((const byte[SZ]) items + (byte) main::sub#2) ← (byte) main::sub#2
[7] (byte) main::sub#1 ← ++ (byte) main::sub#2
[8] if((byte) main::sub#1!=(const byte) SZ#0+(byte) 1) goto main::@1
[8] if((byte) main::sub#1!=(const byte) SZ+(byte) 1) goto main::@1
to:main::@return
main::@return: scope:[main] from main::@1
[9] return

View File

@ -3,21 +3,21 @@ Culled Empty Block (label) main::@2
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
(byte) SZ#0 ← (number) $f
(byte[SZ#0]) items ← { fill( SZ#0, 0) }
(byte) SZ ← (number) $f
(byte[SZ]) items ← { fill( SZ, 0) }
to:@1
(void()) main()
main: scope:[main] from @1
(byte*) main::cur_item#0 ← (byte[SZ#0]) items
(byte*) main::cur_item#0 ← (byte[SZ]) items
(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 )
(byte) main::sub#2 ← phi( main/(byte) main::sub#0 main::@1/(byte) main::sub#1 )
*((byte*) main::cur_item#1 + (byte) main::sub#2) ← (byte) main::sub#2
(byte) main::sub#1 ← (byte) main::sub#2 + rangenext(0,SZ#0)
(bool~) main::$0 ← (byte) main::sub#1 != rangelast(0,SZ#0)
(byte) main::sub#1 ← (byte) main::sub#2 + rangenext(0,SZ)
(bool~) main::$0 ← (byte) main::sub#1 != rangelast(0,SZ)
if((bool~) main::$0) goto main::@1
to:main::@return
main::@return: scope:[main] from main::@1
@ -36,8 +36,7 @@ SYMBOL TABLE SSA
(label) @begin
(label) @end
(byte) SZ
(byte) SZ#0
(byte[SZ#0]) items
(byte[SZ]) items
(void()) main()
(bool~) main::$0
(label) main::@1
@ -50,9 +49,9 @@ SYMBOL TABLE SSA
(byte) main::sub#1
(byte) main::sub#2
Adding number conversion cast (unumber) $f in (byte) SZ#0 ← (number) $f
Adding number conversion cast (unumber) $f in (byte) SZ ← (number) $f
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte) SZ#0 ← (unumber)(number) $f
Inlining cast (byte) SZ ← (unumber)(number) $f
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast $f
Successful SSA optimization PassNCastSimplification
@ -60,30 +59,30 @@ Finalized unsigned number type (byte) $f
Successful SSA optimization PassNFinalizeNumberTypeConversions
Identical Phi Values (byte*) main::cur_item#1 (byte*) main::cur_item#0
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) main::$0 [8] if((byte) main::sub#1!=rangelast(0,SZ#0)) goto main::@1
Simple Condition (bool~) main::$0 [8] if((byte) main::sub#1!=rangelast(0,SZ)) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant (const byte) SZ#0 = $f
Constant (const byte) SZ = $f
Constant (const byte) main::sub#0 = 0
Successful SSA optimization Pass2ConstantIdentification
Constant value identified { fill( SZ#0, 0) } in [1] (byte[SZ#0]) items ← { fill( SZ#0, 0) }
Constant value identified { fill( SZ, 0) } in [1] (byte[SZ]) items ← { fill( SZ, 0) }
Successful SSA optimization Pass2ConstantValues
Resolved ranged next value [6] main::sub#1 ← ++ main::sub#2 to ++
Resolved ranged comparison value [8] if(main::sub#1!=rangelast(0,SZ#0)) goto main::@1 to (const byte) SZ#0+(number) 1
Adding number conversion cast (unumber) SZ#0+1 in if((byte) main::sub#1!=(const byte) SZ#0+(number) 1) goto main::@1
Adding number conversion cast (unumber) 1 in if((byte) main::sub#1!=(unumber)(const byte) SZ#0+(number) 1) goto main::@1
Resolved ranged comparison value [8] if(main::sub#1!=rangelast(0,SZ)) goto main::@1 to (const byte) SZ+(number) 1
Adding number conversion cast (unumber) SZ+1 in if((byte) main::sub#1!=(const byte) SZ+(number) 1) goto main::@1
Adding number conversion cast (unumber) 1 in if((byte) main::sub#1!=(unumber)(const byte) SZ+(number) 1) goto main::@1
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant integer cast (const byte) SZ#0+(unumber)(number) 1
Simplifying constant integer cast (const byte) SZ+(unumber)(number) 1
Simplifying constant integer cast 1
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 1
Successful SSA optimization PassNFinalizeNumberTypeConversions
Constant (const byte[SZ#0]) items = { fill( SZ#0, 0) }
Constant (const byte[SZ]) items = { fill( SZ, 0) }
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte*) main::cur_item#0 = items
Successful SSA optimization Pass2ConstantIdentification
Inlining constant with var siblings (const byte) main::sub#0
Constant inlined main::sub#0 = (byte) 0
Constant inlined main::cur_item#0 = (const byte[SZ#0]) items
Constant inlined main::cur_item#0 = (const byte[SZ]) items
Successful SSA optimization Pass2ConstantInlining
Added new block during phi lifting main::@3(between main::@1 and main::@1)
Adding NOP phi() at start of @begin
@ -121,9 +120,9 @@ main: scope:[main] from @1
to:main::@1
main::@1: scope:[main] from main main::@1
[5] (byte) main::sub#2 ← phi( main/(byte) 0 main::@1/(byte) main::sub#1 )
[6] *((const byte[SZ#0]) items + (byte) main::sub#2) ← (byte) main::sub#2
[6] *((const byte[SZ]) items + (byte) main::sub#2) ← (byte) main::sub#2
[7] (byte) main::sub#1 ← ++ (byte) main::sub#2
[8] if((byte) main::sub#1!=(const byte) SZ#0+(byte) 1) goto main::@1
[8] if((byte) main::sub#1!=(const byte) SZ+(byte) 1) goto main::@1
to:main::@return
main::@return: scope:[main] from main::@1
[9] return
@ -131,7 +130,6 @@ main::@return: scope:[main] from main::@1
VARIABLE REGISTER WEIGHTS
(byte) SZ
(void()) main()
(byte*) main::cur_item
(byte) main::sub
@ -186,13 +184,13 @@ main: {
jmp b1
// main::@1
b1:
// [6] *((const byte[SZ#0]) items + (byte) main::sub#2) ← (byte) main::sub#2 -- pbuc1_derefidx_vbuz1=vbuz1
// [6] *((const byte[SZ]) items + (byte) main::sub#2) ← (byte) main::sub#2 -- pbuc1_derefidx_vbuz1=vbuz1
ldy.z sub
tya
sta items,y
// [7] (byte) main::sub#1 ← ++ (byte) main::sub#2 -- vbuz1=_inc_vbuz1
inc.z sub
// [8] if((byte) main::sub#1!=(const byte) SZ#0+(byte) 1) goto main::@1 -- vbuz1_neq_vbuc1_then_la1
// [8] if((byte) main::sub#1!=(const byte) SZ+(byte) 1) goto main::@1 -- vbuz1_neq_vbuc1_then_la1
lda #SZ+1
cmp.z sub
bne b1_from_b1
@ -254,12 +252,12 @@ main: {
jmp b1
// main::@1
b1:
// [6] *((const byte[SZ#0]) items + (byte) main::sub#2) ← (byte) main::sub#2 -- pbuc1_derefidx_vbuxx=vbuxx
// [6] *((const byte[SZ]) items + (byte) main::sub#2) ← (byte) main::sub#2 -- pbuc1_derefidx_vbuxx=vbuxx
txa
sta items,x
// [7] (byte) main::sub#1 ← ++ (byte) main::sub#2 -- vbuxx=_inc_vbuxx
inx
// [8] if((byte) main::sub#1!=(const byte) SZ#0+(byte) 1) goto main::@1 -- vbuxx_neq_vbuc1_then_la1
// [8] if((byte) main::sub#1!=(const byte) SZ+(byte) 1) goto main::@1 -- vbuxx_neq_vbuc1_then_la1
cpx #SZ+1
bne b1_from_b1
jmp breturn
@ -300,9 +298,8 @@ FINAL SYMBOL TABLE
(label) @1
(label) @begin
(label) @end
(byte) SZ
(const byte) SZ#0 SZ = (byte) $f
(const byte[SZ#0]) items items = { fill( SZ#0, 0) }
(const byte) SZ SZ = (byte) $f
(const byte[SZ]) items items = { fill( SZ, 0) }
(void()) main()
(label) main::@1
(label) main::@return
@ -343,13 +340,13 @@ main: {
// main::@1
b1:
// cur_item[sub] = sub
// [6] *((const byte[SZ#0]) items + (byte) main::sub#2) ← (byte) main::sub#2 -- pbuc1_derefidx_vbuxx=vbuxx
// [6] *((const byte[SZ]) items + (byte) main::sub#2) ← (byte) main::sub#2 -- pbuc1_derefidx_vbuxx=vbuxx
txa
sta items,x
// for( byte sub: 0..SZ)
// [7] (byte) main::sub#1 ← ++ (byte) main::sub#2 -- vbuxx=_inc_vbuxx
inx
// [8] if((byte) main::sub#1!=(const byte) SZ#0+(byte) 1) goto main::@1 -- vbuxx_neq_vbuc1_then_la1
// [8] if((byte) main::sub#1!=(const byte) SZ+(byte) 1) goto main::@1 -- vbuxx_neq_vbuc1_then_la1
cpx #SZ+1
bne b1
// main::@return

View File

@ -1,9 +1,8 @@
(label) @1
(label) @begin
(label) @end
(byte) SZ
(const byte) SZ#0 SZ = (byte) $f
(const byte[SZ#0]) items items = { fill( SZ#0, 0) }
(const byte) SZ SZ = (byte) $f
(const byte[SZ]) items items = { fill( SZ, 0) }
(void()) main()
(label) main::@1
(label) main::@return

View File

@ -13,7 +13,7 @@ main: scope:[main] from @1
[4] phi()
to:main::@1
main::@1: scope:[main] from main main::@3
[5] (byte*) main::cur_item#4 ← phi( main/(const byte[ITEM_COUNT#0*ITEM_SIZE#0]) items main::@3/(byte*) main::cur_item#1 )
[5] (byte*) main::cur_item#4 ← phi( main/(const byte[ITEM_COUNT*ITEM_SIZE]) items main::@3/(byte*) main::cur_item#1 )
[5] (byte) main::item#4 ← phi( main/(byte) 0 main::@3/(byte) main::item#1 )
to:main::@2
main::@2: scope:[main] from main::@1 main::@2
@ -22,12 +22,12 @@ main::@2: scope:[main] from main::@1 main::@2
[8] (byte~) main::$3 ← (byte~) main::$2 | (byte) main::sub#2
[9] *((byte*) main::cur_item#4 + (byte) main::sub#2) ← (byte~) main::$3
[10] (byte) main::sub#1 ← ++ (byte) main::sub#2
[11] if((byte) main::sub#1!=(const byte) ITEM_SIZE#0-(byte) 1+(byte) 1) goto main::@2
[11] if((byte) main::sub#1!=(const byte) ITEM_SIZE-(byte) 1+(byte) 1) goto main::@2
to:main::@3
main::@3: scope:[main] from main::@2
[12] (byte*) main::cur_item#1 ← (byte*) main::cur_item#4 + (const byte) ITEM_SIZE#0
[12] (byte*) main::cur_item#1 ← (byte*) main::cur_item#4 + (const byte) ITEM_SIZE
[13] (byte) main::item#1 ← ++ (byte) main::item#4
[14] if((byte) main::item#1!=(const byte) ITEM_COUNT#0-(byte) 1+(byte) 1) goto main::@1
[14] if((byte) main::item#1!=(const byte) ITEM_COUNT-(byte) 1+(byte) 1) goto main::@1
to:main::@return
main::@return: scope:[main] from main::@3
[15] return

View File

@ -4,22 +4,22 @@ Culled Empty Block (label) main::@4
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
(byte) ITEM_COUNT#0 ← (number) 3
(byte) ITEM_SIZE#0 ← (number) 5
(byte~) $0 ← (byte) ITEM_COUNT#0 * (byte) ITEM_SIZE#0
(byte) ITEM_COUNT ← (number) 3
(byte) ITEM_SIZE ← (number) 5
(byte~) $0 ← (byte) ITEM_COUNT * (byte) ITEM_SIZE
(byte[$0]) items ← { (number) 0, (number) 0, (number) 0, (number) 0, (number) 0, (number) 0, (number) 0, (number) 0, (number) 0, (number) 0, (number) 0, (number) 0, (number) 0, (number) 0, (number) 0 }
to:@1
(void()) main()
main: scope:[main] from @1
(byte*) main::cur_item#0 ← (byte[$0]) items
(number~) main::$0 ← (byte) ITEM_COUNT#0 - (number) 1
(number~) main::$0 ← (byte) ITEM_COUNT - (number) 1
(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
(number~) main::$1 ← (byte) ITEM_SIZE - (number) 1
(byte) main::sub#0 ← (byte) 0
to:main::@2
main::@2: scope:[main] from main::@1 main::@2
@ -36,7 +36,7 @@ main::@2: scope:[main] from main::@1 main::@2
main::@3: scope:[main] from main::@2
(byte) main::item#3 ← phi( main::@2/(byte) main::item#2 )
(byte*) main::cur_item#3 ← phi( main::@2/(byte*) main::cur_item#2 )
(byte*) main::cur_item#1 ← (byte*) main::cur_item#3 + (byte) ITEM_SIZE#0
(byte*) main::cur_item#1 ← (byte*) main::cur_item#3 + (byte) ITEM_SIZE
(byte) main::item#1 ← (byte) main::item#3 + rangenext(0,main::$0)
(bool~) main::$5 ← (byte) main::item#1 != rangelast(0,main::$0)
if((bool~) main::$5) goto main::@1
@ -58,9 +58,7 @@ SYMBOL TABLE SSA
(label) @begin
(label) @end
(byte) ITEM_COUNT
(byte) ITEM_COUNT#0
(byte) ITEM_SIZE
(byte) ITEM_SIZE#0
(byte[$0]) items
(void()) main()
(number~) main::$0
@ -90,20 +88,20 @@ SYMBOL TABLE SSA
(byte) main::sub#1
(byte) main::sub#2
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) 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) 3 in (byte) ITEM_COUNT ← (number) 3
Adding number conversion cast (unumber) 5 in (byte) ITEM_SIZE ← (number) 5
Adding number conversion cast (unumber) 1 in (number~) main::$0 ← (byte) ITEM_COUNT - (number) 1
Adding number conversion cast (unumber) main::$0 in (number~) main::$0 ← (byte) ITEM_COUNT - (unumber)(number) 1
Adding number conversion cast (unumber) 1 in (number~) main::$1 ← (byte) ITEM_SIZE - (number) 1
Adding number conversion cast (unumber) main::$1 in (number~) main::$1 ← (byte) ITEM_SIZE - (unumber)(number) 1
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
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (byte[$0]) items ← (byte[$0]){ (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0, (byte)(number) 0 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (byte) ITEM_COUNT#0 ← (unumber)(number) 3
Inlining cast (byte) ITEM_SIZE#0 ← (unumber)(number) 5
Inlining cast (byte) ITEM_COUNT ← (unumber)(number) 3
Inlining cast (byte) ITEM_SIZE ← (unumber)(number) 5
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast 3
Simplifying constant integer cast 5
@ -132,8 +130,8 @@ Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 1
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
Inferred type updated to byte in (unumber~) main::$1 ← (byte) ITEM_SIZE#0 - (byte) 1
Inferred type updated to byte in (unumber~) main::$0 ← (byte) ITEM_COUNT - (byte) 1
Inferred type updated to byte in (unumber~) main::$1 ← (byte) ITEM_SIZE - (byte) 1
Inferred type updated to byte in (unumber~) main::$2 ← (byte) main::item#2 * (byte) $10
Inferred type updated to byte in (unumber~) main::$3 ← (byte~) main::$2 | (byte) main::sub#2
Alias (byte*) main::cur_item#2 = (byte*) main::cur_item#3
@ -147,21 +145,21 @@ Simple Condition (bool~) main::$5 [21] if((byte) main::item#1!=rangelast(0,main:
Successful SSA optimization Pass2ConditionalJumpSimplification
Identified constant from value list (byte[$0]) { (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const byte) ITEM_COUNT#0 = 3
Constant (const byte) ITEM_SIZE#0 = 5
Constant (const byte) ITEM_COUNT = 3
Constant (const byte) ITEM_SIZE = 5
Constant (const byte[$0]) items = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
Constant (const byte) main::item#0 = 0
Constant (const byte) main::sub#0 = 0
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte*) main::cur_item#0 = items
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [0] (byte~) $0 ← (const byte) ITEM_COUNT#0 * (const byte) ITEM_SIZE#0
Constant right-side identified [1] (byte~) main::$0 ← (const byte) ITEM_COUNT#0 - (byte) 1
Constant right-side identified [3] (byte~) main::$1 ← (const byte) ITEM_SIZE#0 - (byte) 1
Constant right-side identified [0] (byte~) $0 ← (const byte) ITEM_COUNT * (const byte) ITEM_SIZE
Constant right-side identified [1] (byte~) main::$0 ← (const byte) ITEM_COUNT - (byte) 1
Constant right-side identified [3] (byte~) main::$1 ← (const byte) ITEM_SIZE - (byte) 1
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) $0 = ITEM_COUNT#0*ITEM_SIZE#0
Constant (const byte) main::$0 = ITEM_COUNT#0-1
Constant (const byte) main::$1 = ITEM_SIZE#0-1
Constant (const byte) $0 = ITEM_COUNT*ITEM_SIZE
Constant (const byte) main::$0 = ITEM_COUNT-1
Constant (const byte) main::$1 = ITEM_SIZE-1
Successful SSA optimization Pass2ConstantIdentification
Resolved ranged next value [8] main::sub#1 ← ++ main::sub#2 to ++
Resolved ranged comparison value [9] if(main::sub#1!=rangelast(0,main::$1)) goto main::@2 to (const byte) main::$1+(number) 1
@ -186,10 +184,10 @@ Inlining constant with var siblings (const byte) main::item#0
Inlining constant with var siblings (const byte) main::sub#0
Inlining constant with var siblings (const byte*) main::cur_item#0
Constant inlined main::sub#0 = (byte) 0
Constant inlined main::$1 = (const byte) ITEM_SIZE#0-(byte) 1
Constant inlined $0 = (const byte) ITEM_COUNT#0*(const byte) ITEM_SIZE#0
Constant inlined main::cur_item#0 = (const byte[ITEM_COUNT#0*ITEM_SIZE#0]) items
Constant inlined main::$0 = (const byte) ITEM_COUNT#0-(byte) 1
Constant inlined main::$1 = (const byte) ITEM_SIZE-(byte) 1
Constant inlined $0 = (const byte) ITEM_COUNT*(const byte) ITEM_SIZE
Constant inlined main::cur_item#0 = (const byte[ITEM_COUNT*ITEM_SIZE]) items
Constant inlined main::$0 = (const byte) ITEM_COUNT-(byte) 1
Constant inlined main::item#0 = (byte) 0
Successful SSA optimization Pass2ConstantInlining
Added new block during phi lifting main::@5(between main::@3 and main::@1)
@ -231,7 +229,7 @@ main: scope:[main] from @1
[4] phi()
to:main::@1
main::@1: scope:[main] from main main::@3
[5] (byte*) main::cur_item#4 ← phi( main/(const byte[ITEM_COUNT#0*ITEM_SIZE#0]) items main::@3/(byte*) main::cur_item#1 )
[5] (byte*) main::cur_item#4 ← phi( main/(const byte[ITEM_COUNT*ITEM_SIZE]) items main::@3/(byte*) main::cur_item#1 )
[5] (byte) main::item#4 ← phi( main/(byte) 0 main::@3/(byte) main::item#1 )
to:main::@2
main::@2: scope:[main] from main::@1 main::@2
@ -240,12 +238,12 @@ main::@2: scope:[main] from main::@1 main::@2
[8] (byte~) main::$3 ← (byte~) main::$2 | (byte) main::sub#2
[9] *((byte*) main::cur_item#4 + (byte) main::sub#2) ← (byte~) main::$3
[10] (byte) main::sub#1 ← ++ (byte) main::sub#2
[11] if((byte) main::sub#1!=(const byte) ITEM_SIZE#0-(byte) 1+(byte) 1) goto main::@2
[11] if((byte) main::sub#1!=(const byte) ITEM_SIZE-(byte) 1+(byte) 1) goto main::@2
to:main::@3
main::@3: scope:[main] from main::@2
[12] (byte*) main::cur_item#1 ← (byte*) main::cur_item#4 + (const byte) ITEM_SIZE#0
[12] (byte*) main::cur_item#1 ← (byte*) main::cur_item#4 + (const byte) ITEM_SIZE
[13] (byte) main::item#1 ← ++ (byte) main::item#4
[14] if((byte) main::item#1!=(const byte) ITEM_COUNT#0-(byte) 1+(byte) 1) goto main::@1
[14] if((byte) main::item#1!=(const byte) ITEM_COUNT-(byte) 1+(byte) 1) goto main::@1
to:main::@return
main::@return: scope:[main] from main::@3
[15] return
@ -253,8 +251,6 @@ main::@return: scope:[main] from main::@3
VARIABLE REGISTER WEIGHTS
(byte) ITEM_COUNT
(byte) ITEM_SIZE
(void()) main()
(byte~) main::$2 202.0
(byte~) main::$3 202.0
@ -323,7 +319,7 @@ main: {
.label item = 2
// [5] phi from main to main::@1 [phi:main->main::@1]
b1_from_main:
// [5] phi (byte*) main::cur_item#4 = (const byte[ITEM_COUNT#0*ITEM_SIZE#0]) items [phi:main->main::@1#0] -- pbuz1=pbuc1
// [5] phi (byte*) main::cur_item#4 = (const byte[ITEM_COUNT*ITEM_SIZE]) items [phi:main->main::@1#0] -- pbuz1=pbuc1
lda #<items
sta.z cur_item
lda #>items
@ -368,14 +364,14 @@ main: {
sta (cur_item),y
// [10] (byte) main::sub#1 ← ++ (byte) main::sub#2 -- vbuz1=_inc_vbuz1
inc.z sub
// [11] if((byte) main::sub#1!=(const byte) ITEM_SIZE#0-(byte) 1+(byte) 1) goto main::@2 -- vbuz1_neq_vbuc1_then_la1
// [11] if((byte) main::sub#1!=(const byte) ITEM_SIZE-(byte) 1+(byte) 1) goto main::@2 -- vbuz1_neq_vbuc1_then_la1
lda #ITEM_SIZE-1+1
cmp.z sub
bne b2_from_b2
jmp b3
// main::@3
b3:
// [12] (byte*) main::cur_item#1 ← (byte*) main::cur_item#4 + (const byte) ITEM_SIZE#0 -- pbuz1=pbuz1_plus_vbuc1
// [12] (byte*) main::cur_item#1 ← (byte*) main::cur_item#4 + (const byte) ITEM_SIZE -- pbuz1=pbuz1_plus_vbuc1
lda #ITEM_SIZE
clc
adc.z cur_item
@ -385,7 +381,7 @@ main: {
!:
// [13] (byte) main::item#1 ← ++ (byte) main::item#4 -- vbuz1=_inc_vbuz1
inc.z item
// [14] if((byte) main::item#1!=(const byte) ITEM_COUNT#0-(byte) 1+(byte) 1) goto main::@1 -- vbuz1_neq_vbuc1_then_la1
// [14] if((byte) main::item#1!=(const byte) ITEM_COUNT-(byte) 1+(byte) 1) goto main::@1 -- vbuz1_neq_vbuc1_then_la1
lda #ITEM_COUNT-1+1
cmp.z item
bne b1_from_b3
@ -402,9 +398,9 @@ REGISTER UPLIFT POTENTIAL REGISTERS
Statement [7] (byte~) main::$2 ← (byte) main::item#4 << (byte) 4 [ main::item#4 main::cur_item#4 main::sub#2 main::$2 ] ( main:2 [ main::item#4 main::cur_item#4 main::sub#2 main::$2 ] ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ main::item#4 main::item#1 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:5 [ main::sub#2 main::sub#1 ]
Statement [12] (byte*) main::cur_item#1 ← (byte*) main::cur_item#4 + (const byte) ITEM_SIZE#0 [ main::item#4 main::cur_item#1 ] ( main:2 [ main::item#4 main::cur_item#1 ] ) always clobbers reg byte a
Statement [12] (byte*) main::cur_item#1 ← (byte*) main::cur_item#4 + (const byte) ITEM_SIZE [ main::item#4 main::cur_item#1 ] ( main:2 [ main::item#4 main::cur_item#1 ] ) always clobbers reg byte a
Statement [7] (byte~) main::$2 ← (byte) main::item#4 << (byte) 4 [ main::item#4 main::cur_item#4 main::sub#2 main::$2 ] ( main:2 [ main::item#4 main::cur_item#4 main::sub#2 main::$2 ] ) always clobbers reg byte a
Statement [12] (byte*) main::cur_item#1 ← (byte*) main::cur_item#4 + (const byte) ITEM_SIZE#0 [ main::item#4 main::cur_item#1 ] ( main:2 [ main::item#4 main::cur_item#1 ] ) always clobbers reg byte a
Statement [12] (byte*) main::cur_item#1 ← (byte*) main::cur_item#4 + (const byte) ITEM_SIZE [ main::item#4 main::cur_item#1 ] ( main:2 [ main::item#4 main::cur_item#1 ] ) always clobbers reg byte a
Potential registers zp ZP_BYTE:2 [ main::item#4 main::item#1 ] : zp ZP_BYTE:2 , reg byte x , reg byte y ,
Potential registers zp ZP_WORD:3 [ main::cur_item#4 main::cur_item#1 ] : zp ZP_WORD:3 ,
Potential registers zp ZP_BYTE:5 [ main::sub#2 main::sub#1 ] : zp ZP_BYTE:5 , reg byte x , reg byte y ,
@ -452,7 +448,7 @@ main: {
.label cur_item = 2
// [5] phi from main to main::@1 [phi:main->main::@1]
b1_from_main:
// [5] phi (byte*) main::cur_item#4 = (const byte[ITEM_COUNT#0*ITEM_SIZE#0]) items [phi:main->main::@1#0] -- pbuz1=pbuc1
// [5] phi (byte*) main::cur_item#4 = (const byte[ITEM_COUNT*ITEM_SIZE]) items [phi:main->main::@1#0] -- pbuz1=pbuc1
lda #<items
sta.z cur_item
lda #>items
@ -491,13 +487,13 @@ main: {
sta (cur_item),y
// [10] (byte) main::sub#1 ← ++ (byte) main::sub#2 -- vbuyy=_inc_vbuyy
iny
// [11] if((byte) main::sub#1!=(const byte) ITEM_SIZE#0-(byte) 1+(byte) 1) goto main::@2 -- vbuyy_neq_vbuc1_then_la1
// [11] if((byte) main::sub#1!=(const byte) ITEM_SIZE-(byte) 1+(byte) 1) goto main::@2 -- vbuyy_neq_vbuc1_then_la1
cpy #ITEM_SIZE-1+1
bne b2_from_b2
jmp b3
// main::@3
b3:
// [12] (byte*) main::cur_item#1 ← (byte*) main::cur_item#4 + (const byte) ITEM_SIZE#0 -- pbuz1=pbuz1_plus_vbuc1
// [12] (byte*) main::cur_item#1 ← (byte*) main::cur_item#4 + (const byte) ITEM_SIZE -- pbuz1=pbuz1_plus_vbuc1
lda #ITEM_SIZE
clc
adc.z cur_item
@ -507,7 +503,7 @@ main: {
!:
// [13] (byte) main::item#1 ← ++ (byte) main::item#4 -- vbuxx=_inc_vbuxx
inx
// [14] if((byte) main::item#1!=(const byte) ITEM_COUNT#0-(byte) 1+(byte) 1) goto main::@1 -- vbuxx_neq_vbuc1_then_la1
// [14] if((byte) main::item#1!=(const byte) ITEM_COUNT-(byte) 1+(byte) 1) goto main::@1 -- vbuxx_neq_vbuc1_then_la1
cpx #ITEM_COUNT-1+1
bne b1_from_b3
jmp breturn
@ -555,11 +551,9 @@ FINAL SYMBOL TABLE
(label) @1
(label) @begin
(label) @end
(byte) ITEM_COUNT
(const byte) ITEM_COUNT#0 ITEM_COUNT = (byte) 3
(byte) ITEM_SIZE
(const byte) ITEM_SIZE#0 ITEM_SIZE = (byte) 5
(const byte[ITEM_COUNT#0*ITEM_SIZE#0]) items items = { (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0 }
(const byte) ITEM_COUNT ITEM_COUNT = (byte) 3
(const byte) ITEM_SIZE ITEM_SIZE = (byte) 5
(const byte[ITEM_COUNT*ITEM_SIZE]) items items = { (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0 }
(void()) main()
(byte~) main::$2 reg byte a 202.0
(byte~) main::$3 reg byte a 202.0
@ -608,7 +602,7 @@ Score: 3416
main: {
.label cur_item = 2
// [5] phi from main to main::@1 [phi:main->main::@1]
// [5] phi (byte*) main::cur_item#4 = (const byte[ITEM_COUNT#0*ITEM_SIZE#0]) items [phi:main->main::@1#0] -- pbuz1=pbuc1
// [5] phi (byte*) main::cur_item#4 = (const byte[ITEM_COUNT*ITEM_SIZE]) items [phi:main->main::@1#0] -- pbuz1=pbuc1
lda #<items
sta.z cur_item
lda #>items
@ -644,12 +638,12 @@ main: {
// for( byte sub: 0..ITEM_SIZE-1)
// [10] (byte) main::sub#1 ← ++ (byte) main::sub#2 -- vbuyy=_inc_vbuyy
iny
// [11] if((byte) main::sub#1!=(const byte) ITEM_SIZE#0-(byte) 1+(byte) 1) goto main::@2 -- vbuyy_neq_vbuc1_then_la1
// [11] if((byte) main::sub#1!=(const byte) ITEM_SIZE-(byte) 1+(byte) 1) goto main::@2 -- vbuyy_neq_vbuc1_then_la1
cpy #ITEM_SIZE-1+1
bne b2
// main::@3
// cur_item += ITEM_SIZE
// [12] (byte*) main::cur_item#1 ← (byte*) main::cur_item#4 + (const byte) ITEM_SIZE#0 -- pbuz1=pbuz1_plus_vbuc1
// [12] (byte*) main::cur_item#1 ← (byte*) main::cur_item#4 + (const byte) ITEM_SIZE -- pbuz1=pbuz1_plus_vbuc1
lda #ITEM_SIZE
clc
adc.z cur_item
@ -660,7 +654,7 @@ main: {
// for( byte item: 0..ITEM_COUNT-1)
// [13] (byte) main::item#1 ← ++ (byte) main::item#4 -- vbuxx=_inc_vbuxx
inx
// [14] if((byte) main::item#1!=(const byte) ITEM_COUNT#0-(byte) 1+(byte) 1) goto main::@1 -- vbuxx_neq_vbuc1_then_la1
// [14] if((byte) main::item#1!=(const byte) ITEM_COUNT-(byte) 1+(byte) 1) goto main::@1 -- vbuxx_neq_vbuc1_then_la1
cpx #ITEM_COUNT-1+1
bne b1
// main::@return

View File

@ -1,11 +1,9 @@
(label) @1
(label) @begin
(label) @end
(byte) ITEM_COUNT
(const byte) ITEM_COUNT#0 ITEM_COUNT = (byte) 3
(byte) ITEM_SIZE
(const byte) ITEM_SIZE#0 ITEM_SIZE = (byte) 5
(const byte[ITEM_COUNT#0*ITEM_SIZE#0]) items items = { (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0 }
(const byte) ITEM_COUNT ITEM_COUNT = (byte) 3
(const byte) ITEM_SIZE ITEM_SIZE = (byte) 5
(const byte[ITEM_COUNT*ITEM_SIZE]) items items = { (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0 }
(void()) main()
(byte~) main::$2 reg byte a 202.0
(byte~) main::$3 reg byte a 202.0

View File

@ -10,7 +10,7 @@
(void()) main()
main: scope:[main] from @1
[4] *((const byte*) SCREEN#0) ← *((const byte[$100]) SINTAB)
[4] *((const byte*) SCREEN) ← *((const byte[$100]) SINTAB)
to:main::@return
main::@return: scope:[main] from main
[5] return

View File

@ -4,12 +4,12 @@ CONTROL FLOW GRAPH SSA
@begin: scope:[] from
(byte[$100]) SINTAB ← kickasm {{ .fill 256, 128 + 128*sin(i*2*PI/256)
}}
(byte*) SCREEN#0 ← ((byte*)) (number) $400
(byte*) SCREEN ← ((byte*)) (number) $400
to:@1
(void()) main()
main: scope:[main] from @1
*((byte*) SCREEN#0 + (number) 0) ← *((byte[$100]) SINTAB + (number) 0)
*((byte*) SCREEN + (number) 0) ← *((byte[$100]) SINTAB + (number) 0)
to:main::@return
main::@return: scope:[main] from main
return
@ -27,15 +27,14 @@ SYMBOL TABLE SSA
(label) @begin
(label) @end
(byte*) SCREEN
(byte*) SCREEN#0
(byte[$100]) SINTAB
(void()) main()
(label) main::@return
Adding number conversion cast (unumber) 0 in *((byte*) SCREEN#0 + (number) 0) ← *((byte[$100]) SINTAB + (number) 0)
Adding number conversion cast (unumber) 0 in *((byte*) SCREEN#0 + (number) 0) ← *((byte[$100]) SINTAB + (unumber)(number) 0)
Adding number conversion cast (unumber) 0 in *((byte*) SCREEN + (number) 0) ← *((byte[$100]) SINTAB + (number) 0)
Adding number conversion cast (unumber) 0 in *((byte*) SCREEN + (number) 0) ← *((byte[$100]) SINTAB + (unumber)(number) 0)
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400
Inlining cast (byte*) SCREEN ← (byte*)(number) $400
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 0
@ -46,10 +45,10 @@ Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Constant (const byte[$100]) SINTAB = kickasm {{ .fill 256, 128 + 128*sin(i*2*PI/256)
}}
Constant (const byte*) SCREEN#0 = (byte*) 1024
Constant (const byte*) SCREEN = (byte*) 1024
Successful SSA optimization Pass2ConstantIdentification
Simplifying expression containing zero SINTAB in [2] *((const byte*) SCREEN#0 + (byte) 0) ← *((const byte[$100]) SINTAB + (byte) 0)
Simplifying expression containing zero SCREEN#0 in [2] *((const byte*) SCREEN#0 + (byte) 0) ← *((const byte[$100]) SINTAB)
Simplifying expression containing zero SINTAB in [2] *((const byte*) SCREEN + (byte) 0) ← *((const byte[$100]) SINTAB + (byte) 0)
Simplifying expression containing zero SCREEN in [2] *((const byte*) SCREEN + (byte) 0) ← *((const byte[$100]) SINTAB)
Successful SSA optimization PassNSimplifyExpressionWithZero
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @1
@ -78,7 +77,7 @@ FINAL CONTROL FLOW GRAPH
(void()) main()
main: scope:[main] from @1
[4] *((const byte*) SCREEN#0) ← *((const byte[$100]) SINTAB)
[4] *((const byte*) SCREEN) ← *((const byte[$100]) SINTAB)
to:main::@return
main::@return: scope:[main] from main
[5] return
@ -86,7 +85,6 @@ main::@return: scope:[main] from main
VARIABLE REGISTER WEIGHTS
(byte*) SCREEN
(void()) main()
Initial phi equivalence classes
@ -118,7 +116,7 @@ bend_from_b1:
bend:
// main
main: {
// [4] *((const byte*) SCREEN#0) ← *((const byte[$100]) SINTAB) -- _deref_pbuc1=_deref_pbuc2
// [4] *((const byte*) SCREEN) ← *((const byte[$100]) SINTAB) -- _deref_pbuc1=_deref_pbuc2
lda SINTAB
sta SCREEN
jmp breturn
@ -134,7 +132,7 @@ SINTAB:
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [4] *((const byte*) SCREEN#0) ← *((const byte[$100]) SINTAB) [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [4] *((const byte*) SCREEN) ← *((const byte[$100]) SINTAB) [ ] ( main:2 [ ] ) always clobbers reg byte a
REGISTER UPLIFT SCOPES
Uplift Scope [main]
@ -168,7 +166,7 @@ bend_from_b1:
bend:
// main
main: {
// [4] *((const byte*) SCREEN#0) ← *((const byte[$100]) SINTAB) -- _deref_pbuc1=_deref_pbuc2
// [4] *((const byte*) SCREEN) ← *((const byte[$100]) SINTAB) -- _deref_pbuc1=_deref_pbuc2
lda SINTAB
sta SCREEN
jmp breturn
@ -205,8 +203,7 @@ FINAL SYMBOL TABLE
(label) @1
(label) @begin
(label) @end
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = (byte*) 1024
(const byte*) SCREEN SCREEN = (byte*) 1024
(const byte[$100]) SINTAB SINTAB = kickasm {{ .fill 256, 128 + 128*sin(i*2*PI/256)
}}
(void()) main()
@ -234,7 +231,7 @@ Score: 14
// main
main: {
// SCREEN[0] = SINTAB[0]
// [4] *((const byte*) SCREEN#0) ← *((const byte[$100]) SINTAB) -- _deref_pbuc1=_deref_pbuc2
// [4] *((const byte*) SCREEN) ← *((const byte[$100]) SINTAB) -- _deref_pbuc1=_deref_pbuc2
lda SINTAB
sta SCREEN
// main::@return

View File

@ -1,8 +1,7 @@
(label) @1
(label) @begin
(label) @end
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = (byte*) 1024
(const byte*) SCREEN SCREEN = (byte*) 1024
(const byte[$100]) SINTAB SINTAB = kickasm {{ .fill 256, 128 + 128*sin(i*2*PI/256)
}}
(void()) main()

View File

@ -11,9 +11,9 @@
(void()) main()
main: scope:[main] from @1
[4] *((const byte[3]) b) ← (byte) 'c'
[5] *((const byte*) SCREEN#0) ← *((const byte[3]) b)
[6] *((const byte*) SCREEN#0+(byte) 1) ← *((const byte[]) c+(byte) 1)
[7] *((const byte*) SCREEN#0+(byte) 2) ← *((const byte[]) d+(byte) 2)
[5] *((const byte*) SCREEN) ← *((const byte[3]) b)
[6] *((const byte*) SCREEN+(byte) 1) ← *((const byte[]) c+(byte) 1)
[7] *((const byte*) SCREEN+(byte) 2) ← *((const byte[]) d+(byte) 2)
to:main::@return
main::@return: scope:[main] from main
[8] return

View File

@ -5,16 +5,16 @@ CONTROL FLOW GRAPH SSA
(byte[3]) b ← { fill( 3, 0) }
(byte[]) c ← { (byte) 'c', (byte) 'm', (byte) 'l' }
(byte[]) d ← (const string) $0
(byte*) SCREEN#0 ← ((byte*)) (number) $400
(byte*) SCREEN ← ((byte*)) (number) $400
to:@1
(void()) main()
main: scope:[main] from @1
*((byte[3]) b + (number) 0) ← (byte) 'c'
*((byte*) SCREEN#0) ← *((byte[3]) b + (number) 0)
(byte*~) main::$0 ← (byte*) SCREEN#0 + (number) 1
*((byte*) SCREEN) ← *((byte[3]) b + (number) 0)
(byte*~) main::$0 ← (byte*) SCREEN + (number) 1
*((byte*~) main::$0) ← *((byte[]) c + (number) 1)
(byte*~) main::$1 ← (byte*) SCREEN#0 + (number) 2
(byte*~) main::$1 ← (byte*) SCREEN + (number) 2
*((byte*~) main::$1) ← *((byte[]) d + (number) 2)
to:main::@return
main::@return: scope:[main] from main
@ -34,7 +34,6 @@ SYMBOL TABLE SSA
(label) @begin
(label) @end
(byte*) SCREEN
(byte*) SCREEN#0
(byte[3]) b
(byte[]) c
(byte[]) d
@ -44,13 +43,13 @@ SYMBOL TABLE SSA
(label) main::@return
Adding number conversion cast (unumber) 0 in *((byte[3]) b + (number) 0) ← (byte) 'c'
Adding number conversion cast (unumber) 0 in *((byte*) SCREEN#0) ← *((byte[3]) b + (number) 0)
Adding number conversion cast (unumber) 1 in (byte*~) main::$0 ← (byte*) SCREEN#0 + (number) 1
Adding number conversion cast (unumber) 0 in *((byte*) SCREEN) ← *((byte[3]) b + (number) 0)
Adding number conversion cast (unumber) 1 in (byte*~) main::$0 ← (byte*) SCREEN + (number) 1
Adding number conversion cast (unumber) 1 in *((byte*~) main::$0) ← *((byte[]) c + (number) 1)
Adding number conversion cast (unumber) 2 in (byte*~) main::$1 ← (byte*) SCREEN#0 + (number) 2
Adding number conversion cast (unumber) 2 in (byte*~) main::$1 ← (byte*) SCREEN + (number) 2
Adding number conversion cast (unumber) 2 in *((byte*~) main::$1) ← *((byte[]) d + (number) 2)
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400
Inlining cast (byte*) SCREEN ← (byte*)(number) $400
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 0
@ -74,23 +73,23 @@ Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const byte[3]) b = { fill( 3, 0) }
Constant (const byte[]) c = { 'c', 'm', 'l' }
Constant (const byte[]) d = $0
Constant (const byte*) SCREEN#0 = (byte*) 1024
Constant (const byte*) SCREEN = (byte*) 1024
Successful SSA optimization Pass2ConstantIdentification
Converting *(pointer+n) to pointer[n] [7] *((byte*~) main::$0) ← *((const byte[]) c + (byte) 1) -- *(SCREEN#0 + 1)
Converting *(pointer+n) to pointer[n] [9] *((byte*~) main::$1) ← *((const byte[]) d + (byte) 2) -- *(SCREEN#0 + 2)
Converting *(pointer+n) to pointer[n] [7] *((byte*~) main::$0) ← *((const byte[]) c + (byte) 1) -- *(SCREEN + 1)
Converting *(pointer+n) to pointer[n] [9] *((byte*~) main::$1) ← *((const byte[]) d + (byte) 2) -- *(SCREEN + 2)
Successful SSA optimization Pass2InlineDerefIdx
Simplifying expression containing zero b in [4] *((const byte[3]) b + (byte) 0) ← (byte) 'c'
Simplifying expression containing zero b in [5] *((const byte*) SCREEN#0) ← *((const byte[3]) b + (byte) 0)
Simplifying expression containing zero b in [5] *((const byte*) SCREEN) ← *((const byte[3]) b + (byte) 0)
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused variable (byte*~) main::$0 and assignment [2] (byte*~) main::$0 ← (const byte*) SCREEN#0 + (byte) 1
Eliminating unused variable (byte*~) main::$1 and assignment [4] (byte*~) main::$1 ← (const byte*) SCREEN#0 + (byte) 2
Eliminating unused variable (byte*~) main::$0 and assignment [2] (byte*~) main::$0 ← (const byte*) SCREEN + (byte) 1
Eliminating unused variable (byte*~) main::$1 and assignment [4] (byte*~) main::$1 ← (const byte*) SCREEN + (byte) 2
Successful SSA optimization PassNEliminateUnusedVars
Constant inlined $0 = (const byte[]) d
Successful SSA optimization Pass2ConstantInlining
Consolidated array index constant in *(c+1)
Consolidated array index constant in *(SCREEN#0+1)
Consolidated array index constant in *(SCREEN+1)
Consolidated array index constant in *(d+2)
Consolidated array index constant in *(SCREEN#0+2)
Consolidated array index constant in *(SCREEN+2)
Successful SSA optimization Pass2ConstantAdditionElimination
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @1
@ -120,9 +119,9 @@ FINAL CONTROL FLOW GRAPH
(void()) main()
main: scope:[main] from @1
[4] *((const byte[3]) b) ← (byte) 'c'
[5] *((const byte*) SCREEN#0) ← *((const byte[3]) b)
[6] *((const byte*) SCREEN#0+(byte) 1) ← *((const byte[]) c+(byte) 1)
[7] *((const byte*) SCREEN#0+(byte) 2) ← *((const byte[]) d+(byte) 2)
[5] *((const byte*) SCREEN) ← *((const byte[3]) b)
[6] *((const byte*) SCREEN+(byte) 1) ← *((const byte[]) c+(byte) 1)
[7] *((const byte*) SCREEN+(byte) 2) ← *((const byte[]) d+(byte) 2)
to:main::@return
main::@return: scope:[main] from main
[8] return
@ -130,7 +129,6 @@ main::@return: scope:[main] from main
VARIABLE REGISTER WEIGHTS
(byte*) SCREEN
(void()) main()
Initial phi equivalence classes
@ -164,13 +162,13 @@ main: {
// [4] *((const byte[3]) b) ← (byte) 'c' -- _deref_pbuc1=vbuc2
lda #'c'
sta b
// [5] *((const byte*) SCREEN#0) ← *((const byte[3]) b) -- _deref_pbuc1=_deref_pbuc2
// [5] *((const byte*) SCREEN) ← *((const byte[3]) b) -- _deref_pbuc1=_deref_pbuc2
lda b
sta SCREEN
// [6] *((const byte*) SCREEN#0+(byte) 1) ← *((const byte[]) c+(byte) 1) -- _deref_pbuc1=_deref_pbuc2
// [6] *((const byte*) SCREEN+(byte) 1) ← *((const byte[]) c+(byte) 1) -- _deref_pbuc1=_deref_pbuc2
lda c+1
sta SCREEN+1
// [7] *((const byte*) SCREEN#0+(byte) 2) ← *((const byte[]) d+(byte) 2) -- _deref_pbuc1=_deref_pbuc2
// [7] *((const byte*) SCREEN+(byte) 2) ← *((const byte[]) d+(byte) 2) -- _deref_pbuc1=_deref_pbuc2
lda d+2
sta SCREEN+2
jmp breturn
@ -186,9 +184,9 @@ main: {
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [4] *((const byte[3]) b) ← (byte) 'c' [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [5] *((const byte*) SCREEN#0) ← *((const byte[3]) b) [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [6] *((const byte*) SCREEN#0+(byte) 1) ← *((const byte[]) c+(byte) 1) [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [7] *((const byte*) SCREEN#0+(byte) 2) ← *((const byte[]) d+(byte) 2) [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [5] *((const byte*) SCREEN) ← *((const byte[3]) b) [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [6] *((const byte*) SCREEN+(byte) 1) ← *((const byte[]) c+(byte) 1) [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [7] *((const byte*) SCREEN+(byte) 2) ← *((const byte[]) d+(byte) 2) [ ] ( main:2 [ ] ) always clobbers reg byte a
REGISTER UPLIFT SCOPES
Uplift Scope [main]
@ -224,13 +222,13 @@ main: {
// [4] *((const byte[3]) b) ← (byte) 'c' -- _deref_pbuc1=vbuc2
lda #'c'
sta b
// [5] *((const byte*) SCREEN#0) ← *((const byte[3]) b) -- _deref_pbuc1=_deref_pbuc2
// [5] *((const byte*) SCREEN) ← *((const byte[3]) b) -- _deref_pbuc1=_deref_pbuc2
lda b
sta SCREEN
// [6] *((const byte*) SCREEN#0+(byte) 1) ← *((const byte[]) c+(byte) 1) -- _deref_pbuc1=_deref_pbuc2
// [6] *((const byte*) SCREEN+(byte) 1) ← *((const byte[]) c+(byte) 1) -- _deref_pbuc1=_deref_pbuc2
lda c+1
sta SCREEN+1
// [7] *((const byte*) SCREEN#0+(byte) 2) ← *((const byte[]) d+(byte) 2) -- _deref_pbuc1=_deref_pbuc2
// [7] *((const byte*) SCREEN+(byte) 2) ← *((const byte[]) d+(byte) 2) -- _deref_pbuc1=_deref_pbuc2
lda d+2
sta SCREEN+2
jmp breturn
@ -268,8 +266,7 @@ FINAL SYMBOL TABLE
(label) @1
(label) @begin
(label) @end
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = (byte*) 1024
(const byte*) SCREEN SCREEN = (byte*) 1024
(const byte[3]) b b = { fill( 3, 0) }
(const byte[]) c c = { (byte) 'c', (byte) 'm', (byte) 'l' }
(const byte[]) d d = (string) "cml"z
@ -301,14 +298,14 @@ main: {
lda #'c'
sta b
// *SCREEN = b[0]
// [5] *((const byte*) SCREEN#0) ← *((const byte[3]) b) -- _deref_pbuc1=_deref_pbuc2
// [5] *((const byte*) SCREEN) ← *((const byte[3]) b) -- _deref_pbuc1=_deref_pbuc2
sta SCREEN
// *(SCREEN+1) = c[1]
// [6] *((const byte*) SCREEN#0+(byte) 1) ← *((const byte[]) c+(byte) 1) -- _deref_pbuc1=_deref_pbuc2
// [6] *((const byte*) SCREEN+(byte) 1) ← *((const byte[]) c+(byte) 1) -- _deref_pbuc1=_deref_pbuc2
lda c+1
sta SCREEN+1
// *(SCREEN+2) = d[2]
// [7] *((const byte*) SCREEN#0+(byte) 2) ← *((const byte[]) d+(byte) 2) -- _deref_pbuc1=_deref_pbuc2
// [7] *((const byte*) SCREEN+(byte) 2) ← *((const byte[]) d+(byte) 2) -- _deref_pbuc1=_deref_pbuc2
lda d+2
sta SCREEN+2
// main::@return

View File

@ -1,8 +1,7 @@
(label) @1
(label) @begin
(label) @end
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = (byte*) 1024
(const byte*) SCREEN SCREEN = (byte*) 1024
(const byte[3]) b b = { fill( 3, 0) }
(const byte[]) c c = { (byte) 'c', (byte) 'm', (byte) 'l' }
(const byte[]) d d = (string) "cml"z

View File

@ -10,7 +10,7 @@
(void()) main()
main: scope:[main] from @1
[4] *((const byte*) lda) ← (const byte) main::jmp#0
[4] *((const byte*) lda) ← (const byte) main::jmp
[5] call bne
to:main::@1
main::@1: scope:[main] from main
@ -22,7 +22,7 @@ main::@return: scope:[main] from main::@1
(void()) bne((byte) bne::jsr)
bne: scope:[bne] from main
[8] *((const byte*) lda+(byte) 1) ← (const byte) main::jmp#0
[8] *((const byte*) lda+(byte) 1) ← (const byte) main::jmp
to:bne::@return
bne::@return: scope:[bne] from bne
[9] return

View File

@ -8,9 +8,9 @@ CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from @2
(byte) main::jmp#0 ← (number) 1
*((byte*) lda) ← (byte) main::jmp#0
(byte) bne::jsr#0 ← (byte) main::jmp#0
(byte) main::jmp ← (number) 1
*((byte*) lda) ← (byte) main::jmp
(byte) bne::jsr#0 ← (byte) main::jmp
call bne
to:main::@1
main::@1: scope:[main] from main
@ -50,13 +50,12 @@ SYMBOL TABLE SSA
(label) main::@1
(label) main::@return
(byte) main::jmp
(byte) main::jmp#0
Adding number conversion cast (unumber) 1 in (byte) main::jmp#0 ← (number) 1
Adding number conversion cast (unumber) 1 in (byte) main::jmp ← (number) 1
Adding number conversion cast (unumber) 1 in *((byte*) lda + (number) 1) ← (byte) bne::jsr#1
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) lda ← (byte*)(number) $400
Inlining cast (byte) main::jmp#0 ← (unumber)(number) 1
Inlining cast (byte) main::jmp ← (unumber)(number) 1
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 1
@ -68,11 +67,11 @@ Successful SSA optimization PassNFinalizeNumberTypeConversions
Identical Phi Values (byte) bne::jsr#1 (byte) bne::jsr#0
Successful SSA optimization Pass2IdenticalPhiElimination
Constant (const byte*) lda = (byte*) 1024
Constant (const byte) main::jmp#0 = 1
Constant (const byte) main::jmp = 1
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte) bne::jsr#0 = main::jmp#0
Constant (const byte) bne::jsr#0 = main::jmp
Successful SSA optimization Pass2ConstantIdentification
Constant inlined bne::jsr#0 = (const byte) main::jmp#0
Constant inlined bne::jsr#0 = (const byte) main::jmp
Successful SSA optimization Pass2ConstantInlining
Consolidated array index constant in *(lda+1)
Successful SSA optimization Pass2ConstantAdditionElimination
@ -105,7 +104,7 @@ FINAL CONTROL FLOW GRAPH
(void()) main()
main: scope:[main] from @1
[4] *((const byte*) lda) ← (const byte) main::jmp#0
[4] *((const byte*) lda) ← (const byte) main::jmp
[5] call bne
to:main::@1
main::@1: scope:[main] from main
@ -117,7 +116,7 @@ main::@return: scope:[main] from main::@1
(void()) bne((byte) bne::jsr)
bne: scope:[bne] from main
[8] *((const byte*) lda+(byte) 1) ← (const byte) main::jmp#0
[8] *((const byte*) lda+(byte) 1) ← (const byte) main::jmp
to:bne::@return
bne::@return: scope:[bne] from bne
[9] return
@ -128,7 +127,6 @@ VARIABLE REGISTER WEIGHTS
(void()) bne((byte) bne::jsr)
(byte) bne::jsr
(void()) main()
(byte) main::jmp
Initial phi equivalence classes
Complete equivalence classes
@ -161,7 +159,7 @@ bend:
// main
main: {
.label jmp = 1
// [4] *((const byte*) lda) ← (const byte) main::jmp#0 -- _deref_pbuc1=vbuc2
// [4] *((const byte*) lda) ← (const byte) main::jmp -- _deref_pbuc1=vbuc2
lda #jmp
sta lda
// [5] call bne
@ -183,7 +181,7 @@ main: {
}
// bne
bne: {
// [8] *((const byte*) lda+(byte) 1) ← (const byte) main::jmp#0 -- _deref_pbuc1=vbuc2
// [8] *((const byte*) lda+(byte) 1) ← (const byte) main::jmp -- _deref_pbuc1=vbuc2
lda #main.jmp
sta lda+1
jmp breturn
@ -195,9 +193,9 @@ bne: {
// File Data
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [4] *((const byte*) lda) ← (const byte) main::jmp#0 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [4] *((const byte*) lda) ← (const byte) main::jmp [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement asm { ldaa jmpa bnea a: } always clobbers reg byte a
Statement [8] *((const byte*) lda+(byte) 1) ← (const byte) main::jmp#0 [ ] ( main:2::bne:5 [ ] ) always clobbers reg byte a
Statement [8] *((const byte*) lda+(byte) 1) ← (const byte) main::jmp [ ] ( main:2::bne:5 [ ] ) always clobbers reg byte a
REGISTER UPLIFT SCOPES
Uplift Scope [main]
@ -235,7 +233,7 @@ bend:
// main
main: {
.label jmp = 1
// [4] *((const byte*) lda) ← (const byte) main::jmp#0 -- _deref_pbuc1=vbuc2
// [4] *((const byte*) lda) ← (const byte) main::jmp -- _deref_pbuc1=vbuc2
lda #jmp
sta lda
// [5] call bne
@ -257,7 +255,7 @@ main: {
}
// bne
bne: {
// [8] *((const byte*) lda+(byte) 1) ← (const byte) main::jmp#0 -- _deref_pbuc1=vbuc2
// [8] *((const byte*) lda+(byte) 1) ← (const byte) main::jmp -- _deref_pbuc1=vbuc2
lda #main.jmp
sta lda+1
jmp breturn
@ -304,8 +302,7 @@ FINAL SYMBOL TABLE
(void()) main()
(label) main::@1
(label) main::@return
(byte) main::jmp
(const byte) main::jmp#0 jmp = (byte) 1
(const byte) main::jmp jmp = (byte) 1
@ -331,7 +328,7 @@ Score: 40
main: {
.label jmp = 1
// *lda = jmp
// [4] *((const byte*) lda) ← (const byte) main::jmp#0 -- _deref_pbuc1=vbuc2
// [4] *((const byte*) lda) ← (const byte) main::jmp -- _deref_pbuc1=vbuc2
lda #jmp
sta lda
// bne(jmp)
@ -352,7 +349,7 @@ main: {
// bne
bne: {
// lda[1] = jsr
// [8] *((const byte*) lda+(byte) 1) ← (const byte) main::jmp#0 -- _deref_pbuc1=vbuc2
// [8] *((const byte*) lda+(byte) 1) ← (const byte) main::jmp -- _deref_pbuc1=vbuc2
lda #main.jmp
sta lda+1
// bne::@return

View File

@ -8,6 +8,5 @@
(void()) main()
(label) main::@1
(label) main::@return
(byte) main::jmp
(const byte) main::jmp#0 jmp = (byte) 1
(const byte) main::jmp jmp = (byte) 1

View File

@ -10,13 +10,13 @@
(void()) main()
main: scope:[main] from @1
[4] *((const byte*) main::screen#0) ← (byte) 'c'
[5] *((const byte*) main::screen#0+(byte) $28) ← (byte) 'c'
[6] *((const byte*) main::screen#0+(byte) 1) ← (byte) 'm'
[7] (byte) main::a#2 ← *((const byte*) main::screen#0+(byte) 1)
[8] *((const byte*) main::screen#0+(byte) $29) ← (byte) main::a#2
[9] *((const byte*) main::screen#0+(byte) 2) ← (byte) 1+(byte) 'l'
[10] *((const byte*) main::screen#0+(byte) $2a) ← (byte) 'l'
[4] *((const byte*) main::screen) ← (byte) 'c'
[5] *((const byte*) main::screen+(byte) $28) ← (byte) 'c'
[6] *((const byte*) main::screen+(byte) 1) ← (byte) 'm'
[7] (byte) main::a#2 ← *((const byte*) main::screen+(byte) 1)
[8] *((const byte*) main::screen+(byte) $29) ← (byte) main::a#2
[9] *((const byte*) main::screen+(byte) 2) ← (byte) 1+(byte) 'l'
[10] *((const byte*) main::screen+(byte) $2a) ← (byte) 'l'
to:main::@return
main::@return: scope:[main] from main
[11] return

View File

@ -6,18 +6,18 @@ CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from @1
(byte*) main::screen#0 ← ((byte*)) (number) $400
(byte*) main::screen ← ((byte*)) (number) $400
(byte) main::a#0 ← (byte) 0
(byte) main::a#1 ← (byte) 'c'
*((byte*) main::screen#0 + (number) 0) ← (byte) main::a#1
*((byte*) main::screen#0 + (number) $28) ← (byte) main::a#1
*((byte*) main::screen#0 + (number) 1) ← (byte) 'm'
(byte) main::a#2 ← *((byte*) main::screen#0 + (number) 1)
*((byte*) main::screen#0 + (number) $29) ← (byte) main::a#2
*((byte*) main::screen + (number) 0) ← (byte) main::a#1
*((byte*) main::screen + (number) $28) ← (byte) main::a#1
*((byte*) main::screen + (number) 1) ← (byte) 'm'
(byte) main::a#2 ← *((byte*) main::screen + (number) 1)
*((byte*) main::screen + (number) $29) ← (byte) main::a#2
(byte) main::a#3 ← (byte) 'l'
(number~) main::$0 ← (number) 1 + (byte) main::a#3
*((byte*) main::screen#0 + (number) 2) ← (number~) main::$0
*((byte*) main::screen#0 + (number) $2a) ← (byte) main::a#3
*((byte*) main::screen + (number) 2) ← (number~) main::$0
*((byte*) main::screen + (number) $2a) ← (byte) main::a#3
to:main::@return
main::@return: scope:[main] from main
return
@ -43,18 +43,17 @@ SYMBOL TABLE SSA
(byte) main::a#2
(byte) main::a#3
(byte*) main::screen
(byte*) main::screen#0
Adding number conversion cast (unumber) 0 in *((byte*) main::screen#0 + (number) 0) ← (byte) main::a#1
Adding number conversion cast (unumber) $28 in *((byte*) main::screen#0 + (number) $28) ← (byte) main::a#1
Adding number conversion cast (unumber) 1 in *((byte*) main::screen#0 + (number) 1) ← (byte) 'm'
Adding number conversion cast (unumber) $29 in *((byte*) main::screen#0 + (number) $29) ← (byte) main::a#2
Adding number conversion cast (unumber) 0 in *((byte*) main::screen + (number) 0) ← (byte) main::a#1
Adding number conversion cast (unumber) $28 in *((byte*) main::screen + (number) $28) ← (byte) main::a#1
Adding number conversion cast (unumber) 1 in *((byte*) main::screen + (number) 1) ← (byte) 'm'
Adding number conversion cast (unumber) $29 in *((byte*) main::screen + (number) $29) ← (byte) main::a#2
Adding number conversion cast (unumber) 1 in (number~) main::$0 ← (number) 1 + (byte) main::a#3
Adding number conversion cast (unumber) main::$0 in (number~) main::$0 ← (unumber)(number) 1 + (byte) main::a#3
Adding number conversion cast (unumber) 2 in *((byte*) main::screen#0 + (number) 2) ← (unumber~) main::$0
Adding number conversion cast (unumber) $2a in *((byte*) main::screen#0 + (number) $2a) ← (byte) main::a#3
Adding number conversion cast (unumber) 2 in *((byte*) main::screen + (number) 2) ← (unumber~) main::$0
Adding number conversion cast (unumber) $2a in *((byte*) main::screen + (number) $2a) ← (byte) main::a#3
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) main::screen#0 ← (byte*)(number) $400
Inlining cast (byte*) main::screen ← (byte*)(number) $400
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 0
@ -74,12 +73,12 @@ Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) $2a
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in (unumber~) main::$0 ← (byte) 1 + (byte) main::a#3
Constant (const byte*) main::screen#0 = (byte*) 1024
Constant (const byte*) main::screen = (byte*) 1024
Constant (const byte) main::a#0 = 0
Constant (const byte) main::a#1 = 'c'
Constant (const byte) main::a#3 = 'l'
Successful SSA optimization Pass2ConstantIdentification
Simplifying expression containing zero main::screen#0 in [3] *((const byte*) main::screen#0 + (byte) 0) ← (const byte) main::a#1
Simplifying expression containing zero main::screen in [3] *((const byte*) main::screen + (byte) 0) ← (const byte) main::a#1
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused constant (const byte) main::a#0
Successful SSA optimization PassNEliminateUnusedVars
@ -93,12 +92,12 @@ Constant inlined main::a#3 = (byte) 'l'
Constant inlined main::$0 = (byte) 1+(byte) 'l'
Constant inlined main::a#1 = (byte) 'c'
Successful SSA optimization Pass2ConstantInlining
Consolidated array index constant in *(main::screen#0+$28)
Consolidated array index constant in *(main::screen#0+1)
Consolidated array index constant in *(main::screen#0+1)
Consolidated array index constant in *(main::screen#0+$29)
Consolidated array index constant in *(main::screen#0+2)
Consolidated array index constant in *(main::screen#0+$2a)
Consolidated array index constant in *(main::screen+$28)
Consolidated array index constant in *(main::screen+1)
Consolidated array index constant in *(main::screen+1)
Consolidated array index constant in *(main::screen+$29)
Consolidated array index constant in *(main::screen+2)
Consolidated array index constant in *(main::screen+$2a)
Successful SSA optimization Pass2ConstantAdditionElimination
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @1
@ -127,13 +126,13 @@ FINAL CONTROL FLOW GRAPH
(void()) main()
main: scope:[main] from @1
[4] *((const byte*) main::screen#0) ← (byte) 'c'
[5] *((const byte*) main::screen#0+(byte) $28) ← (byte) 'c'
[6] *((const byte*) main::screen#0+(byte) 1) ← (byte) 'm'
[7] (byte) main::a#2 ← *((const byte*) main::screen#0+(byte) 1)
[8] *((const byte*) main::screen#0+(byte) $29) ← (byte) main::a#2
[9] *((const byte*) main::screen#0+(byte) 2) ← (byte) 1+(byte) 'l'
[10] *((const byte*) main::screen#0+(byte) $2a) ← (byte) 'l'
[4] *((const byte*) main::screen) ← (byte) 'c'
[5] *((const byte*) main::screen+(byte) $28) ← (byte) 'c'
[6] *((const byte*) main::screen+(byte) 1) ← (byte) 'm'
[7] (byte) main::a#2 ← *((const byte*) main::screen+(byte) 1)
[8] *((const byte*) main::screen+(byte) $29) ← (byte) main::a#2
[9] *((const byte*) main::screen+(byte) 2) ← (byte) 1+(byte) 'l'
[10] *((const byte*) main::screen+(byte) $2a) ← (byte) 'l'
to:main::@return
main::@return: scope:[main] from main
[11] return
@ -144,7 +143,6 @@ VARIABLE REGISTER WEIGHTS
(void()) main()
(byte) main::a
(byte) main::a#2 4.0
(byte*) main::screen
Initial phi equivalence classes
Added variable main::a#2 to zero page equivalence class [ main::a#2 ]
@ -179,25 +177,25 @@ bend:
main: {
.label screen = $400
.label a = 2
// [4] *((const byte*) main::screen#0) ← (byte) 'c' -- _deref_pbuc1=vbuc2
// [4] *((const byte*) main::screen) ← (byte) 'c' -- _deref_pbuc1=vbuc2
lda #'c'
sta screen
// [5] *((const byte*) main::screen#0+(byte) $28) ← (byte) 'c' -- _deref_pbuc1=vbuc2
// [5] *((const byte*) main::screen+(byte) $28) ← (byte) 'c' -- _deref_pbuc1=vbuc2
lda #'c'
sta screen+$28
// [6] *((const byte*) main::screen#0+(byte) 1) ← (byte) 'm' -- _deref_pbuc1=vbuc2
// [6] *((const byte*) main::screen+(byte) 1) ← (byte) 'm' -- _deref_pbuc1=vbuc2
lda #'m'
sta screen+1
// [7] (byte) main::a#2 ← *((const byte*) main::screen#0+(byte) 1) -- vbuz1=_deref_pbuc1
// [7] (byte) main::a#2 ← *((const byte*) main::screen+(byte) 1) -- vbuz1=_deref_pbuc1
lda screen+1
sta.z a
// [8] *((const byte*) main::screen#0+(byte) $29) ← (byte) main::a#2 -- _deref_pbuc1=vbuz1
// [8] *((const byte*) main::screen+(byte) $29) ← (byte) main::a#2 -- _deref_pbuc1=vbuz1
lda.z a
sta screen+$29
// [9] *((const byte*) main::screen#0+(byte) 2) ← (byte) 1+(byte) 'l' -- _deref_pbuc1=vbuc2
// [9] *((const byte*) main::screen+(byte) 2) ← (byte) 1+(byte) 'l' -- _deref_pbuc1=vbuc2
lda #1+'l'
sta screen+2
// [10] *((const byte*) main::screen#0+(byte) $2a) ← (byte) 'l' -- _deref_pbuc1=vbuc2
// [10] *((const byte*) main::screen+(byte) $2a) ← (byte) 'l' -- _deref_pbuc1=vbuc2
// Chained assignment with a modification of the result
lda #'l'
sta screen+$2a
@ -210,11 +208,11 @@ main: {
// File Data
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [4] *((const byte*) main::screen#0) ← (byte) 'c' [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [5] *((const byte*) main::screen#0+(byte) $28) ← (byte) 'c' [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [6] *((const byte*) main::screen#0+(byte) 1) ← (byte) 'm' [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [9] *((const byte*) main::screen#0+(byte) 2) ← (byte) 1+(byte) 'l' [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [10] *((const byte*) main::screen#0+(byte) $2a) ← (byte) 'l' [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [4] *((const byte*) main::screen) ← (byte) 'c' [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [5] *((const byte*) main::screen+(byte) $28) ← (byte) 'c' [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [6] *((const byte*) main::screen+(byte) 1) ← (byte) 'm' [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [9] *((const byte*) main::screen+(byte) 2) ← (byte) 1+(byte) 'l' [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [10] *((const byte*) main::screen+(byte) $2a) ← (byte) 'l' [ ] ( main:2 [ ] ) always clobbers reg byte a
Potential registers zp ZP_BYTE:2 [ main::a#2 ] : zp ZP_BYTE:2 , reg byte a , reg byte x , reg byte y ,
REGISTER UPLIFT SCOPES
@ -249,23 +247,23 @@ bend:
// main
main: {
.label screen = $400
// [4] *((const byte*) main::screen#0) ← (byte) 'c' -- _deref_pbuc1=vbuc2
// [4] *((const byte*) main::screen) ← (byte) 'c' -- _deref_pbuc1=vbuc2
lda #'c'
sta screen
// [5] *((const byte*) main::screen#0+(byte) $28) ← (byte) 'c' -- _deref_pbuc1=vbuc2
// [5] *((const byte*) main::screen+(byte) $28) ← (byte) 'c' -- _deref_pbuc1=vbuc2
lda #'c'
sta screen+$28
// [6] *((const byte*) main::screen#0+(byte) 1) ← (byte) 'm' -- _deref_pbuc1=vbuc2
// [6] *((const byte*) main::screen+(byte) 1) ← (byte) 'm' -- _deref_pbuc1=vbuc2
lda #'m'
sta screen+1
// [7] (byte) main::a#2 ← *((const byte*) main::screen#0+(byte) 1) -- vbuaa=_deref_pbuc1
// [7] (byte) main::a#2 ← *((const byte*) main::screen+(byte) 1) -- vbuaa=_deref_pbuc1
lda screen+1
// [8] *((const byte*) main::screen#0+(byte) $29) ← (byte) main::a#2 -- _deref_pbuc1=vbuaa
// [8] *((const byte*) main::screen+(byte) $29) ← (byte) main::a#2 -- _deref_pbuc1=vbuaa
sta screen+$29
// [9] *((const byte*) main::screen#0+(byte) 2) ← (byte) 1+(byte) 'l' -- _deref_pbuc1=vbuc2
// [9] *((const byte*) main::screen+(byte) 2) ← (byte) 1+(byte) 'l' -- _deref_pbuc1=vbuc2
lda #1+'l'
sta screen+2
// [10] *((const byte*) main::screen#0+(byte) $2a) ← (byte) 'l' -- _deref_pbuc1=vbuc2
// [10] *((const byte*) main::screen+(byte) $2a) ← (byte) 'l' -- _deref_pbuc1=vbuc2
// Chained assignment with a modification of the result
lda #'l'
sta screen+$2a
@ -306,8 +304,7 @@ FINAL SYMBOL TABLE
(label) main::@return
(byte) main::a
(byte) main::a#2 reg byte a 4.0
(byte*) main::screen
(const byte*) main::screen#0 screen = (byte*) 1024
(const byte*) main::screen screen = (byte*) 1024
reg byte a [ main::a#2 ]
@ -332,27 +329,27 @@ Score: 38
main: {
.label screen = $400
// screen[0] = a = 'c'
// [4] *((const byte*) main::screen#0) ← (byte) 'c' -- _deref_pbuc1=vbuc2
// [4] *((const byte*) main::screen) ← (byte) 'c' -- _deref_pbuc1=vbuc2
lda #'c'
sta screen
// screen[40] = a
// [5] *((const byte*) main::screen#0+(byte) $28) ← (byte) 'c' -- _deref_pbuc1=vbuc2
// [5] *((const byte*) main::screen+(byte) $28) ← (byte) 'c' -- _deref_pbuc1=vbuc2
sta screen+$28
// screen[1] = 'm'
// [6] *((const byte*) main::screen#0+(byte) 1) ← (byte) 'm' -- _deref_pbuc1=vbuc2
// [6] *((const byte*) main::screen+(byte) 1) ← (byte) 'm' -- _deref_pbuc1=vbuc2
lda #'m'
sta screen+1
// a = screen[1] = 'm'
// [7] (byte) main::a#2 ← *((const byte*) main::screen#0+(byte) 1) -- vbuaa=_deref_pbuc1
// [7] (byte) main::a#2 ← *((const byte*) main::screen+(byte) 1) -- vbuaa=_deref_pbuc1
// screen[41] = a
// [8] *((const byte*) main::screen#0+(byte) $29) ← (byte) main::a#2 -- _deref_pbuc1=vbuaa
// [8] *((const byte*) main::screen+(byte) $29) ← (byte) main::a#2 -- _deref_pbuc1=vbuaa
sta screen+$29
// screen[2] = 1 + (a = 'l')
// [9] *((const byte*) main::screen#0+(byte) 2) ← (byte) 1+(byte) 'l' -- _deref_pbuc1=vbuc2
// [9] *((const byte*) main::screen+(byte) 2) ← (byte) 1+(byte) 'l' -- _deref_pbuc1=vbuc2
lda #1+'l'
sta screen+2
// screen[42] = a
// [10] *((const byte*) main::screen#0+(byte) $2a) ← (byte) 'l' -- _deref_pbuc1=vbuc2
// [10] *((const byte*) main::screen+(byte) $2a) ← (byte) 'l' -- _deref_pbuc1=vbuc2
// Chained assignment with a modification of the result
lda #'l'
sta screen+$2a

View File

@ -5,7 +5,6 @@
(label) main::@return
(byte) main::a
(byte) main::a#2 reg byte a 4.0
(byte*) main::screen
(const byte*) main::screen#0 screen = (byte*) 1024
(const byte*) main::screen screen = (byte*) 1024
reg byte a [ main::a#2 ]

View File

@ -61,16 +61,16 @@ main::@return: scope:[main] from main::@10
test: scope:[test] from main main::@1 main::@10 main::@2 main::@3 main::@4 main::@5 main::@6 main::@7 main::@8 main::@9
[27] (byte) test::i#11 ← phi( main/(byte) 0 main::@1/(byte) 1 main::@10/(byte) $a main::@2/(byte) 2 main::@3/(byte) 3 main::@4/(byte) 4 main::@5/(byte) 5 main::@6/(byte) 6 main::@7/(byte) 7 main::@8/(byte) 8 main::@9/(byte) 9 )
[27] (byte) test::a#11 ← phi( main/(byte) 3 main::@1/(byte) 3+(byte) 1 main::@10/(byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2>>(byte) 1^(byte) 6|(byte) 1&(byte) 1 main::@2/(byte) 3+(byte) 1-(byte) 1 main::@3/(byte) 3+(byte) 1-(byte) 1*(byte) 6 main::@4/(byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2 main::@5/(byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2 main::@6/(byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2 main::@7/(byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2>>(byte) 1 main::@8/(byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2>>(byte) 1^(byte) 6 main::@9/(byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2>>(byte) 1^(byte) 6|(byte) 1 )
[28] *((const byte*) screen1#0 + (byte) test::i#11) ← (byte) test::a#11
[28] *((const byte*) screen1 + (byte) test::i#11) ← (byte) test::a#11
[29] *((const byte*) screen2#0 + (byte) test::i#11) ← *((const byte[]) ref + (byte) test::i#11)
[30] if(*((const byte[]) ref + (byte) test::i#11)==(byte) test::a#11) goto test::@1
to:test::@2
test::@2: scope:[test] from test
[31] *((const byte*) cols#0 + (byte) test::i#11) ← (const byte) RED#0
[31] *((const byte*) cols + (byte) test::i#11) ← (const byte) RED
to:test::@return
test::@return: scope:[test] from test::@1 test::@2
[32] return
to:@return
test::@1: scope:[test] from test
[33] *((const byte*) cols#0 + (byte) test::i#11) ← (const byte) GREEN#0
[33] *((const byte*) cols + (byte) test::i#11) ← (const byte) GREEN
to:test::@return

View File

@ -9,12 +9,12 @@ Culled Empty Block (label) test::@4
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
(byte[]) ref ← { (number) 3, (number) 4, (number) 3, (number) $12, (number) 9, (number) 1, (number) 4, (number) 2, (number) 4, (number) 5, (number) 1, (number) 0 }
(byte*) screen1#0 ← ((byte*)) (number) $400
(byte*~) $0 ← (byte*) screen1#0 + (number) $28
(byte*) screen1 ← ((byte*)) (number) $400
(byte*~) $0 ← (byte*) screen1 + (number) $28
(byte*) screen2#0 ← (byte*~) $0
(byte*) cols#0 ← ((byte*)) (number) $d800
(byte) GREEN#0 ← (number) 5
(byte) RED#0 ← (number) 2
(byte*) cols ← ((byte*)) (number) $d800
(byte) GREEN ← (number) 5
(byte) RED ← (number) 2
to:@2
(void()) main()
@ -139,18 +139,18 @@ test: scope:[test] from main main::@1 main::@10 main::@2 main::@3 main::@4 main
(byte*) screen2#1 ← phi( main/(byte*) screen2#2 main::@1/(byte*) screen2#3 main::@10/(byte*) screen2#4 main::@2/(byte*) screen2#5 main::@3/(byte*) screen2#6 main::@4/(byte*) screen2#7 main::@5/(byte*) screen2#8 main::@6/(byte*) screen2#9 main::@7/(byte*) screen2#10 main::@8/(byte*) screen2#11 main::@9/(byte*) screen2#12 )
(byte) test::i#11 ← phi( main/(byte) test::i#0 main::@1/(byte) test::i#1 main::@10/(byte) test::i#10 main::@2/(byte) test::i#2 main::@3/(byte) test::i#3 main::@4/(byte) test::i#4 main::@5/(byte) test::i#5 main::@6/(byte) test::i#6 main::@7/(byte) test::i#7 main::@8/(byte) test::i#8 main::@9/(byte) test::i#9 )
(byte) test::a#11 ← phi( main/(byte) test::a#0 main::@1/(byte) test::a#1 main::@10/(byte) test::a#10 main::@2/(byte) test::a#2 main::@3/(byte) test::a#3 main::@4/(byte) test::a#4 main::@5/(byte) test::a#5 main::@6/(byte) test::a#6 main::@7/(byte) test::a#7 main::@8/(byte) test::a#8 main::@9/(byte) test::a#9 )
*((byte*) screen1#0 + (byte) test::i#11) ← (byte) test::a#11
*((byte*) screen1 + (byte) test::i#11) ← (byte) test::a#11
*((byte*) screen2#1 + (byte) test::i#11) ← *((byte[]) ref + (byte) test::i#11)
(bool~) test::$0 ← *((byte[]) ref + (byte) test::i#11) == (byte) test::a#11
if((bool~) test::$0) goto test::@1
to:test::@3
test::@1: scope:[test] from test
(byte) test::i#12 ← phi( test/(byte) test::i#11 )
*((byte*) cols#0 + (byte) test::i#12) ← (byte) GREEN#0
*((byte*) cols + (byte) test::i#12) ← (byte) GREEN
to:test::@return
test::@3: scope:[test] from test
(byte) test::i#13 ← phi( test/(byte) test::i#11 )
*((byte*) cols#0 + (byte) test::i#13) ← (byte) RED#0
*((byte*) cols + (byte) test::i#13) ← (byte) RED
to:test::@return
test::@return: scope:[test] from test::@1 test::@3
return
@ -170,11 +170,8 @@ SYMBOL TABLE SSA
(label) @begin
(label) @end
(byte) GREEN
(byte) GREEN#0
(byte) RED
(byte) RED#0
(byte*) cols
(byte*) cols#0
(void()) main()
(label) main::@1
(label) main::@10
@ -236,7 +233,6 @@ SYMBOL TABLE SSA
(byte) main::i#9
(byte[]) ref
(byte*) screen1
(byte*) screen1#0
(byte*) screen2
(byte*) screen2#0
(byte*) screen2#1
@ -286,9 +282,9 @@ SYMBOL TABLE SSA
(byte) test::i#8
(byte) test::i#9
Adding number conversion cast (unumber) $28 in (byte*~) $0 ← (byte*) screen1#0 + (number) $28
Adding number conversion cast (unumber) 5 in (byte) GREEN#0 ← (number) 5
Adding number conversion cast (unumber) 2 in (byte) RED#0 ← (number) 2
Adding number conversion cast (unumber) $28 in (byte*~) $0 ← (byte*) screen1 + (number) $28
Adding number conversion cast (unumber) 5 in (byte) GREEN ← (number) 5
Adding number conversion cast (unumber) 2 in (byte) RED ← (number) 2
Adding number conversion cast (unumber) 0 in (byte) main::i#0 ← (number) 0
Adding number conversion cast (unumber) 3 in (byte) main::a#0 ← (number) 3
Adding number conversion cast (unumber) 1 in (byte) main::a#1 ← (byte) main::a#11 + (number) 1
@ -304,10 +300,10 @@ Adding number conversion cast (unumber) 1 in (byte) main::a#10 ← (byte) main::
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (byte[]) ref ← (byte[]){ (byte)(number) 3, (byte)(number) 4, (byte)(number) 3, (byte)(number) $12, (byte)(number) 9, (byte)(number) 1, (byte)(number) 4, (byte)(number) 2, (byte)(number) 4, (byte)(number) 5, (byte)(number) 1, (byte)(number) 0 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (byte*) screen1#0 ← (byte*)(number) $400
Inlining cast (byte*) cols#0 ← (byte*)(number) $d800
Inlining cast (byte) GREEN#0 ← (unumber)(number) 5
Inlining cast (byte) RED#0 ← (unumber)(number) 2
Inlining cast (byte*) screen1 ← (byte*)(number) $400
Inlining cast (byte*) cols ← (byte*)(number) $d800
Inlining cast (byte) GREEN ← (unumber)(number) 5
Inlining cast (byte) RED ← (unumber)(number) 2
Inlining cast (byte) main::i#0 ← (unumber)(number) 0
Inlining cast (byte) main::a#0 ← (unumber)(number) 3
Successful SSA optimization Pass2InlineCast
@ -390,10 +386,10 @@ Successful SSA optimization Pass2ConditionalJumpSimplification
Identified constant from value list (byte[]) { (byte) 3, (byte) 4, (byte) 3, (byte) $12, (byte) 9, (byte) 1, (byte) 4, (byte) 2, (byte) 4, (byte) 5, (byte) 1, (byte) 0 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const byte[]) ref = { 3, 4, 3, $12, 9, 1, 4, 2, 4, 5, 1, 0 }
Constant (const byte*) screen1#0 = (byte*) 1024
Constant (const byte*) cols#0 = (byte*) 55296
Constant (const byte) GREEN#0 = 5
Constant (const byte) RED#0 = 2
Constant (const byte*) screen1 = (byte*) 1024
Constant (const byte*) cols = (byte*) 55296
Constant (const byte) GREEN = 5
Constant (const byte) RED = 2
Constant (const byte) main::i#0 = 0
Constant (const byte) main::a#0 = 3
Successful SSA optimization Pass2ConstantIdentification
@ -402,11 +398,11 @@ Constant (const byte) test::a#0 = main::a#0
Successful SSA optimization Pass2ConstantIdentification
Eliminating unused variable (byte) main::i#11 and assignment [52] (byte) main::i#11 ← ++ (byte) main::i#10
Successful SSA optimization PassNEliminateUnusedVars
Constant right-side identified [0] (byte*) screen2#0 ← (const byte*) screen1#0 + (byte) $28
Constant right-side identified [0] (byte*) screen2#0 ← (const byte*) screen1 + (byte) $28
Constant right-side identified [2] (byte) main::i#1 ← ++ (const byte) main::i#0
Constant right-side identified [3] (byte) main::a#1 ← (const byte) main::a#0 + (byte) 1
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte*) screen2#0 = screen1#0+$28
Constant (const byte*) screen2#0 = screen1+$28
Constant (const byte) main::i#1 = ++main::i#0
Constant (const byte) main::a#1 = main::a#0+1
Successful SSA optimization Pass2ConstantIdentification
@ -710,29 +706,25 @@ main::@return: scope:[main] from main::@10
test: scope:[test] from main main::@1 main::@10 main::@2 main::@3 main::@4 main::@5 main::@6 main::@7 main::@8 main::@9
[27] (byte) test::i#11 ← phi( main/(byte) 0 main::@1/(byte) 1 main::@10/(byte) $a main::@2/(byte) 2 main::@3/(byte) 3 main::@4/(byte) 4 main::@5/(byte) 5 main::@6/(byte) 6 main::@7/(byte) 7 main::@8/(byte) 8 main::@9/(byte) 9 )
[27] (byte) test::a#11 ← phi( main/(byte) 3 main::@1/(byte) 3+(byte) 1 main::@10/(byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2>>(byte) 1^(byte) 6|(byte) 1&(byte) 1 main::@2/(byte) 3+(byte) 1-(byte) 1 main::@3/(byte) 3+(byte) 1-(byte) 1*(byte) 6 main::@4/(byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2 main::@5/(byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2 main::@6/(byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2 main::@7/(byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2>>(byte) 1 main::@8/(byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2>>(byte) 1^(byte) 6 main::@9/(byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2>>(byte) 1^(byte) 6|(byte) 1 )
[28] *((const byte*) screen1#0 + (byte) test::i#11) ← (byte) test::a#11
[28] *((const byte*) screen1 + (byte) test::i#11) ← (byte) test::a#11
[29] *((const byte*) screen2#0 + (byte) test::i#11) ← *((const byte[]) ref + (byte) test::i#11)
[30] if(*((const byte[]) ref + (byte) test::i#11)==(byte) test::a#11) goto test::@1
to:test::@2
test::@2: scope:[test] from test
[31] *((const byte*) cols#0 + (byte) test::i#11) ← (const byte) RED#0
[31] *((const byte*) cols + (byte) test::i#11) ← (const byte) RED
to:test::@return
test::@return: scope:[test] from test::@1 test::@2
[32] return
to:@return
test::@1: scope:[test] from test
[33] *((const byte*) cols#0 + (byte) test::i#11) ← (const byte) GREEN#0
[33] *((const byte*) cols + (byte) test::i#11) ← (const byte) GREEN
to:test::@return
VARIABLE REGISTER WEIGHTS
(byte) GREEN
(byte) RED
(byte*) cols
(void()) main()
(byte) main::a
(byte) main::i
(byte*) screen1
(byte*) screen2
(void()) test((byte) test::i , (byte) test::a)
(byte) test::a
@ -952,7 +944,7 @@ main: {
test: {
.label a = 2
.label i = 3
// [28] *((const byte*) screen1#0 + (byte) test::i#11) ← (byte) test::a#11 -- pbuc1_derefidx_vbuz1=vbuz2
// [28] *((const byte*) screen1 + (byte) test::i#11) ← (byte) test::a#11 -- pbuc1_derefidx_vbuz1=vbuz2
lda.z a
ldy.z i
sta screen1,y
@ -968,7 +960,7 @@ test: {
jmp b2
// test::@2
b2:
// [31] *((const byte*) cols#0 + (byte) test::i#11) ← (const byte) RED#0 -- pbuc1_derefidx_vbuz1=vbuc2
// [31] *((const byte*) cols + (byte) test::i#11) ← (const byte) RED -- pbuc1_derefidx_vbuz1=vbuc2
lda #RED
ldy.z i
sta cols,y
@ -979,7 +971,7 @@ test: {
rts
// test::@1
b1:
// [33] *((const byte*) cols#0 + (byte) test::i#11) ← (const byte) GREEN#0 -- pbuc1_derefidx_vbuz1=vbuc2
// [33] *((const byte*) cols + (byte) test::i#11) ← (const byte) GREEN -- pbuc1_derefidx_vbuz1=vbuc2
lda #GREEN
ldy.z i
sta cols,y
@ -993,13 +985,13 @@ Statement [29] *((const byte*) screen2#0 + (byte) test::i#11) ← *((const byte[
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ test::a#11 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:3 [ test::i#11 ]
Statement [30] if(*((const byte[]) ref + (byte) test::i#11)==(byte) test::a#11) goto test::@1 [ test::i#11 ] ( main:2::test:5 [ test::i#11 ] main:2::test:7 [ test::i#11 ] main:2::test:9 [ test::i#11 ] main:2::test:11 [ test::i#11 ] main:2::test:13 [ test::i#11 ] main:2::test:15 [ test::i#11 ] main:2::test:17 [ test::i#11 ] main:2::test:19 [ test::i#11 ] main:2::test:21 [ test::i#11 ] main:2::test:23 [ test::i#11 ] main:2::test:25 [ test::i#11 ] ) always clobbers reg byte a
Statement [31] *((const byte*) cols#0 + (byte) test::i#11) ← (const byte) RED#0 [ ] ( main:2::test:5 [ ] main:2::test:7 [ ] main:2::test:9 [ ] main:2::test:11 [ ] main:2::test:13 [ ] main:2::test:15 [ ] main:2::test:17 [ ] main:2::test:19 [ ] main:2::test:21 [ ] main:2::test:23 [ ] main:2::test:25 [ ] ) always clobbers reg byte a
Statement [33] *((const byte*) cols#0 + (byte) test::i#11) ← (const byte) GREEN#0 [ ] ( main:2::test:5 [ ] main:2::test:7 [ ] main:2::test:9 [ ] main:2::test:11 [ ] main:2::test:13 [ ] main:2::test:15 [ ] main:2::test:17 [ ] main:2::test:19 [ ] main:2::test:21 [ ] main:2::test:23 [ ] main:2::test:25 [ ] ) always clobbers reg byte a
Statement [28] *((const byte*) screen1#0 + (byte) test::i#11) ← (byte) test::a#11 [ test::a#11 test::i#11 ] ( main:2::test:5 [ test::a#11 test::i#11 ] main:2::test:7 [ test::a#11 test::i#11 ] main:2::test:9 [ test::a#11 test::i#11 ] main:2::test:11 [ test::a#11 test::i#11 ] main:2::test:13 [ test::a#11 test::i#11 ] main:2::test:15 [ test::a#11 test::i#11 ] main:2::test:17 [ test::a#11 test::i#11 ] main:2::test:19 [ test::a#11 test::i#11 ] main:2::test:21 [ test::a#11 test::i#11 ] main:2::test:23 [ test::a#11 test::i#11 ] main:2::test:25 [ test::a#11 test::i#11 ] ) always clobbers reg byte a
Statement [31] *((const byte*) cols + (byte) test::i#11) ← (const byte) RED [ ] ( main:2::test:5 [ ] main:2::test:7 [ ] main:2::test:9 [ ] main:2::test:11 [ ] main:2::test:13 [ ] main:2::test:15 [ ] main:2::test:17 [ ] main:2::test:19 [ ] main:2::test:21 [ ] main:2::test:23 [ ] main:2::test:25 [ ] ) always clobbers reg byte a
Statement [33] *((const byte*) cols + (byte) test::i#11) ← (const byte) GREEN [ ] ( main:2::test:5 [ ] main:2::test:7 [ ] main:2::test:9 [ ] main:2::test:11 [ ] main:2::test:13 [ ] main:2::test:15 [ ] main:2::test:17 [ ] main:2::test:19 [ ] main:2::test:21 [ ] main:2::test:23 [ ] main:2::test:25 [ ] ) always clobbers reg byte a
Statement [28] *((const byte*) screen1 + (byte) test::i#11) ← (byte) test::a#11 [ test::a#11 test::i#11 ] ( main:2::test:5 [ test::a#11 test::i#11 ] main:2::test:7 [ test::a#11 test::i#11 ] main:2::test:9 [ test::a#11 test::i#11 ] main:2::test:11 [ test::a#11 test::i#11 ] main:2::test:13 [ test::a#11 test::i#11 ] main:2::test:15 [ test::a#11 test::i#11 ] main:2::test:17 [ test::a#11 test::i#11 ] main:2::test:19 [ test::a#11 test::i#11 ] main:2::test:21 [ test::a#11 test::i#11 ] main:2::test:23 [ test::a#11 test::i#11 ] main:2::test:25 [ test::a#11 test::i#11 ] ) always clobbers reg byte a
Statement [29] *((const byte*) screen2#0 + (byte) test::i#11) ← *((const byte[]) ref + (byte) test::i#11) [ test::a#11 test::i#11 ] ( main:2::test:5 [ test::a#11 test::i#11 ] main:2::test:7 [ test::a#11 test::i#11 ] main:2::test:9 [ test::a#11 test::i#11 ] main:2::test:11 [ test::a#11 test::i#11 ] main:2::test:13 [ test::a#11 test::i#11 ] main:2::test:15 [ test::a#11 test::i#11 ] main:2::test:17 [ test::a#11 test::i#11 ] main:2::test:19 [ test::a#11 test::i#11 ] main:2::test:21 [ test::a#11 test::i#11 ] main:2::test:23 [ test::a#11 test::i#11 ] main:2::test:25 [ test::a#11 test::i#11 ] ) always clobbers reg byte a
Statement [30] if(*((const byte[]) ref + (byte) test::i#11)==(byte) test::a#11) goto test::@1 [ test::i#11 ] ( main:2::test:5 [ test::i#11 ] main:2::test:7 [ test::i#11 ] main:2::test:9 [ test::i#11 ] main:2::test:11 [ test::i#11 ] main:2::test:13 [ test::i#11 ] main:2::test:15 [ test::i#11 ] main:2::test:17 [ test::i#11 ] main:2::test:19 [ test::i#11 ] main:2::test:21 [ test::i#11 ] main:2::test:23 [ test::i#11 ] main:2::test:25 [ test::i#11 ] ) always clobbers reg byte a
Statement [31] *((const byte*) cols#0 + (byte) test::i#11) ← (const byte) RED#0 [ ] ( main:2::test:5 [ ] main:2::test:7 [ ] main:2::test:9 [ ] main:2::test:11 [ ] main:2::test:13 [ ] main:2::test:15 [ ] main:2::test:17 [ ] main:2::test:19 [ ] main:2::test:21 [ ] main:2::test:23 [ ] main:2::test:25 [ ] ) always clobbers reg byte a
Statement [33] *((const byte*) cols#0 + (byte) test::i#11) ← (const byte) GREEN#0 [ ] ( main:2::test:5 [ ] main:2::test:7 [ ] main:2::test:9 [ ] main:2::test:11 [ ] main:2::test:13 [ ] main:2::test:15 [ ] main:2::test:17 [ ] main:2::test:19 [ ] main:2::test:21 [ ] main:2::test:23 [ ] main:2::test:25 [ ] ) always clobbers reg byte a
Statement [31] *((const byte*) cols + (byte) test::i#11) ← (const byte) RED [ ] ( main:2::test:5 [ ] main:2::test:7 [ ] main:2::test:9 [ ] main:2::test:11 [ ] main:2::test:13 [ ] main:2::test:15 [ ] main:2::test:17 [ ] main:2::test:19 [ ] main:2::test:21 [ ] main:2::test:23 [ ] main:2::test:25 [ ] ) always clobbers reg byte a
Statement [33] *((const byte*) cols + (byte) test::i#11) ← (const byte) GREEN [ ] ( main:2::test:5 [ ] main:2::test:7 [ ] main:2::test:9 [ ] main:2::test:11 [ ] main:2::test:13 [ ] main:2::test:15 [ ] main:2::test:17 [ ] main:2::test:19 [ ] main:2::test:21 [ ] main:2::test:23 [ ] main:2::test:25 [ ] ) always clobbers reg byte a
Potential registers zp ZP_BYTE:2 [ test::a#11 ] : zp ZP_BYTE:2 , reg byte x , reg byte y ,
Potential registers zp ZP_BYTE:3 [ test::i#11 ] : zp ZP_BYTE:3 , reg byte x , reg byte y ,
@ -1204,7 +1196,7 @@ main: {
// test(byte register(X) i, byte zeropage(2) a)
test: {
.label a = 2
// [28] *((const byte*) screen1#0 + (byte) test::i#11) ← (byte) test::a#11 -- pbuc1_derefidx_vbuxx=vbuz1
// [28] *((const byte*) screen1 + (byte) test::i#11) ← (byte) test::a#11 -- pbuc1_derefidx_vbuxx=vbuz1
lda.z a
sta screen1,x
// [29] *((const byte*) screen2#0 + (byte) test::i#11) ← *((const byte[]) ref + (byte) test::i#11) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx
@ -1217,7 +1209,7 @@ test: {
jmp b2
// test::@2
b2:
// [31] *((const byte*) cols#0 + (byte) test::i#11) ← (const byte) RED#0 -- pbuc1_derefidx_vbuxx=vbuc2
// [31] *((const byte*) cols + (byte) test::i#11) ← (const byte) RED -- pbuc1_derefidx_vbuxx=vbuc2
lda #RED
sta cols,x
jmp breturn
@ -1227,7 +1219,7 @@ test: {
rts
// test::@1
b1:
// [33] *((const byte*) cols#0 + (byte) test::i#11) ← (const byte) GREEN#0 -- pbuc1_derefidx_vbuxx=vbuc2
// [33] *((const byte*) cols + (byte) test::i#11) ← (const byte) GREEN -- pbuc1_derefidx_vbuxx=vbuc2
lda #GREEN
sta cols,x
jmp breturn
@ -1305,12 +1297,9 @@ FINAL SYMBOL TABLE
(label) @1
(label) @begin
(label) @end
(byte) GREEN
(const byte) GREEN#0 GREEN = (byte) 5
(byte) RED
(const byte) RED#0 RED = (byte) 2
(byte*) cols
(const byte*) cols#0 cols = (byte*) 55296
(const byte) GREEN GREEN = (byte) 5
(const byte) RED RED = (byte) 2
(const byte*) cols cols = (byte*) 55296
(void()) main()
(label) main::@1
(label) main::@10
@ -1326,10 +1315,9 @@ FINAL SYMBOL TABLE
(byte) main::a
(byte) main::i
(const byte[]) ref ref = { (byte) 3, (byte) 4, (byte) 3, (byte) $12, (byte) 9, (byte) 1, (byte) 4, (byte) 2, (byte) 4, (byte) 5, (byte) 1, (byte) 0 }
(byte*) screen1
(const byte*) screen1#0 screen1 = (byte*) 1024
(const byte*) screen1 screen1 = (byte*) 1024
(byte*) screen2
(const byte*) screen2#0 screen2 = (const byte*) screen1#0+(byte) $28
(const byte*) screen2#0 screen2 = (const byte*) screen1+(byte) $28
(void()) test((byte) test::i , (byte) test::a)
(label) test::@1
(label) test::@2
@ -1496,7 +1484,7 @@ main: {
test: {
.label a = 2
// screen1[i] = a
// [28] *((const byte*) screen1#0 + (byte) test::i#11) ← (byte) test::a#11 -- pbuc1_derefidx_vbuxx=vbuz1
// [28] *((const byte*) screen1 + (byte) test::i#11) ← (byte) test::a#11 -- pbuc1_derefidx_vbuxx=vbuz1
lda.z a
sta screen1,x
// screen2[i] = ref[i]
@ -1510,7 +1498,7 @@ test: {
beq b1
// test::@2
// cols[i] = RED
// [31] *((const byte*) cols#0 + (byte) test::i#11) ← (const byte) RED#0 -- pbuc1_derefidx_vbuxx=vbuc2
// [31] *((const byte*) cols + (byte) test::i#11) ← (const byte) RED -- pbuc1_derefidx_vbuxx=vbuc2
lda #RED
sta cols,x
// test::@return
@ -1520,7 +1508,7 @@ test: {
// test::@1
b1:
// cols[i] = GREEN
// [33] *((const byte*) cols#0 + (byte) test::i#11) ← (const byte) GREEN#0 -- pbuc1_derefidx_vbuxx=vbuc2
// [33] *((const byte*) cols + (byte) test::i#11) ← (const byte) GREEN -- pbuc1_derefidx_vbuxx=vbuc2
lda #GREEN
sta cols,x
rts

View File

@ -1,12 +1,9 @@
(label) @1
(label) @begin
(label) @end
(byte) GREEN
(const byte) GREEN#0 GREEN = (byte) 5
(byte) RED
(const byte) RED#0 RED = (byte) 2
(byte*) cols
(const byte*) cols#0 cols = (byte*) 55296
(const byte) GREEN GREEN = (byte) 5
(const byte) RED RED = (byte) 2
(const byte*) cols cols = (byte*) 55296
(void()) main()
(label) main::@1
(label) main::@10
@ -22,10 +19,9 @@
(byte) main::a
(byte) main::i
(const byte[]) ref ref = { (byte) 3, (byte) 4, (byte) 3, (byte) $12, (byte) 9, (byte) 1, (byte) 4, (byte) 2, (byte) 4, (byte) 5, (byte) 1, (byte) 0 }
(byte*) screen1
(const byte*) screen1#0 screen1 = (byte*) 1024
(const byte*) screen1 screen1 = (byte*) 1024
(byte*) screen2
(const byte*) screen2#0 screen2 = (const byte*) screen1#0+(byte) $28
(const byte*) screen2#0 screen2 = (const byte*) screen1+(byte) $28
(void()) test((byte) test::i , (byte) test::a)
(label) test::@1
(label) test::@2

View File

@ -111,7 +111,7 @@ bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@1
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
memset: scope:[memset] from bitmap_clear bitmap_clear::@1
[49] (byte) memset::c#4 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 )
[49] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 )
[49] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) SCREEN bitmap_clear::@1/(void*)(const byte*) BITMAP )
[49] (word) memset::num#2 ← phi( bitmap_clear/(word) $3e8 bitmap_clear::@1/(word) $1f40 )
[50] if((word) memset::num#2<=(byte) 0) goto memset::@return
to:memset::@1
@ -151,7 +151,7 @@ bitmap_init::@2: scope:[bitmap_init] from bitmap_init::@1 bitmap_init::@6
[66] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1
to:bitmap_init::@3
bitmap_init::@3: scope:[bitmap_init] from bitmap_init::@2 bitmap_init::@4
[67] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP#0 bitmap_init::@4/(byte*) bitmap_init::yoffs#4 )
[67] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP bitmap_init::@4/(byte*) bitmap_init::yoffs#4 )
[67] (byte) bitmap_init::y#2 ← phi( bitmap_init::@2/(byte) 0 bitmap_init::@4/(byte) bitmap_init::y#1 )
[68] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7
[69] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2

View File

@ -242,8 +242,8 @@ bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot
@14: scope:[] from @8
(byte*) bitmap_screen#24 ← phi( @8/(byte*) bitmap_screen#0 )
(byte*) bitmap_gfx#25 ← phi( @8/(byte*) bitmap_gfx#0 )
(byte*) BITMAP#0 ← ((byte*)) (number) $2000
(byte*) SCREEN#0 ← ((byte*)) (number) $400
(byte*) BITMAP ← ((byte*)) (number) $2000
(byte*) SCREEN ← ((byte*)) (number) $400
(byte[$100]) plots_per_frame ← { fill( $100, 0) }
to:@15
@ -252,8 +252,8 @@ main: scope:[main] from @17
(byte) frame_cnt#21 ← phi( @17/(byte) frame_cnt#9 )
(byte*) bitmap_screen#12 ← phi( @17/(byte*) bitmap_screen#14 )
(byte*) bitmap_gfx#13 ← phi( @17/(byte*) bitmap_gfx#15 )
(byte*) bitmap_init::gfx#0 ← (byte*) BITMAP#0
(byte*) bitmap_init::screen#0 ← (byte*) SCREEN#0
(byte*) bitmap_init::gfx#0 ← (byte*) BITMAP
(byte*) bitmap_init::screen#0 ← (byte*) SCREEN
call bitmap_init
to:main::@12
main::@12: scope:[main] from main
@ -274,8 +274,8 @@ main::@13: scope:[main] from main::@12
(byte~) main::$3 ← (byte~) main::$2 | (byte) VIC_RSEL
(number~) main::$4 ← (byte~) main::$3 | (number) 3
*((byte*) D011) ← (number~) main::$4
(byte*) main::toD0181_screen#0 ← (byte*) SCREEN#0
(byte*) main::toD0181_gfx#0 ← (byte*) BITMAP#0
(byte*) main::toD0181_screen#0 ← (byte*) SCREEN
(byte*) main::toD0181_gfx#0 ← (byte*) BITMAP
to:main::toD0181
main::toD0181: scope:[main] from main::@13
(byte) frame_cnt#18 ← phi( main::@13/(byte) frame_cnt#19 )
@ -479,7 +479,6 @@ SYMBOL TABLE SSA
(label) @end
(byte*) BGCOL
(byte*) BITMAP
(byte*) BITMAP#0
(byte) BLACK
(byte*) CIA1_INTERRUPT
(byte) CIA_INTERRUPT_CLEAR
@ -495,7 +494,6 @@ SYMBOL TABLE SSA
(byte) PROCPORT_RAM_IO
(byte*) RASTER
(byte*) SCREEN
(byte*) SCREEN#0
(byte) VIC_BMM
(byte*) VIC_CONTROL
(byte) VIC_DEN
@ -906,8 +904,8 @@ Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#3
Inlining cast (byte) bitmap_init::bits#0 ← (unumber)(number) $80
Inlining cast (byte) bitmap_init::bits#2 ← (unumber)(number) $80
Inlining cast (byte) memset::c#1 ← (unumber)(number) 0
Inlining cast (byte*) BITMAP#0 ← (byte*)(number) $2000
Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400
Inlining cast (byte*) BITMAP ← (byte*)(number) $2000
Inlining cast (byte*) SCREEN ← (byte*)(number) $400
Inlining cast (word~) main::toD0181_$0 ← (word)(byte*) main::toD0181_screen#1
Inlining cast (word~) main::toD0181_$4 ← (word)(byte*) main::toD0181_gfx#1
Inlining cast (word) main::x#0 ← (unumber)(number) 0
@ -1184,8 +1182,8 @@ Constant (const byte) bitmap_init::y#0 = 0
Constant (const word) memset::num#0 = $3e8
Constant (const byte) memset::c#1 = 0
Constant (const word) memset::num#1 = $1f40
Constant (const byte*) BITMAP#0 = (byte*) 8192
Constant (const byte*) SCREEN#0 = (byte*) 1024
Constant (const byte*) BITMAP = (byte*) 8192
Constant (const byte*) SCREEN = (byte*) 1024
Constant (const byte[$100]) plots_per_frame = { fill( $100, 0) }
Constant (const word) main::x#0 = 0
Constant (const byte) main::y#0 = 0
@ -1193,12 +1191,12 @@ Constant (const word) main::vx#0 = 1
Constant (const byte) main::vy#0 = 1
Constant (const void()*) init_irq::$0 = &irq
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte*) bitmap_init::gfx#0 = BITMAP#0
Constant (const byte*) bitmap_init::screen#0 = SCREEN#0
Constant (const byte*) bitmap_init::gfx#0 = BITMAP
Constant (const byte*) bitmap_init::screen#0 = SCREEN
Constant (const byte) bitmap_clear::bgcol#0 = BLACK
Constant (const byte) bitmap_clear::fgcol#0 = WHITE
Constant (const byte*) main::toD0181_screen#0 = SCREEN#0
Constant (const byte*) main::toD0181_gfx#0 = BITMAP#0
Constant (const byte*) main::toD0181_screen#0 = SCREEN
Constant (const byte*) main::toD0181_gfx#0 = BITMAP
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte*) bitmap_gfx#1 = bitmap_init::gfx#0
Constant (const byte*) bitmap_screen#1 = bitmap_init::screen#0
@ -1303,30 +1301,30 @@ Inlining constant with var siblings (const word) main::x#0
Inlining constant with var siblings (const byte) main::y#0
Inlining constant with var siblings (const word) main::vx#0
Inlining constant with var siblings (const byte) main::vy#0
Constant inlined bitmap_init::screen#0 = (const byte*) SCREEN#0
Constant inlined main::toD0181_screen#0 = (const byte*) SCREEN#0
Constant inlined main::toD0181_gfx#0 = (const byte*) BITMAP#0
Constant inlined bitmap_init::gfx#0 = (const byte*) BITMAP#0
Constant inlined bitmap_init::screen#0 = (const byte*) SCREEN
Constant inlined main::toD0181_screen#0 = (const byte*) SCREEN
Constant inlined main::toD0181_gfx#0 = (const byte*) BITMAP
Constant inlined bitmap_init::gfx#0 = (const byte*) BITMAP
Constant inlined memset::num#1 = (word) $1f40
Constant inlined memset::num#0 = (word) $3e8
Constant inlined bitmap_init::bits#0 = (byte) $80
Constant inlined bitmap_init::bits#2 = (byte) $80
Constant inlined init_irq::$0 = &interrupt(HARDWARE_CLOBBER)(void()) irq()
Constant inlined memset::str#1 = (void*)(const byte*) BITMAP#0
Constant inlined memset::str#0 = (void*)(const byte*) SCREEN#0
Constant inlined main::toD0181_$7 = >(word)(const byte*) BITMAP#0/(byte) 4&(byte) $f
Constant inlined main::toD0181_$2 = (word)(const byte*) SCREEN#0&(word) $3fff*(byte) 4
Constant inlined main::toD0181_$1 = (word)(const byte*) SCREEN#0&(word) $3fff
Constant inlined bitmap_gfx#1 = (const byte*) BITMAP#0
Constant inlined main::toD0181_$0 = (word)(const byte*) SCREEN#0
Constant inlined memset::str#1 = (void*)(const byte*) BITMAP
Constant inlined memset::str#0 = (void*)(const byte*) SCREEN
Constant inlined main::toD0181_$7 = >(word)(const byte*) BITMAP/(byte) 4&(byte) $f
Constant inlined main::toD0181_$2 = (word)(const byte*) SCREEN&(word) $3fff*(byte) 4
Constant inlined main::toD0181_$1 = (word)(const byte*) SCREEN&(word) $3fff
Constant inlined bitmap_gfx#1 = (const byte*) BITMAP
Constant inlined main::toD0181_$0 = (word)(const byte*) SCREEN
Constant inlined main::x#0 = (byte) 0
Constant inlined bitmap_clear::fgcol#0 = (const byte) WHITE
Constant inlined main::y#0 = (byte) 0
Constant inlined main::toD0181_$6 = >(word)(const byte*) BITMAP#0/(byte) 4
Constant inlined main::toD0181_$5 = >(word)(const byte*) BITMAP#0
Constant inlined main::toD0181_$4 = (word)(const byte*) BITMAP#0
Constant inlined main::toD0181_$3 = >(word)(const byte*) SCREEN#0&(word) $3fff*(byte) 4
Constant inlined bitmap_screen#1 = (const byte*) SCREEN#0
Constant inlined main::toD0181_$6 = >(word)(const byte*) BITMAP/(byte) 4
Constant inlined main::toD0181_$5 = >(word)(const byte*) BITMAP
Constant inlined main::toD0181_$4 = (word)(const byte*) BITMAP
Constant inlined main::toD0181_$3 = >(word)(const byte*) SCREEN&(word) $3fff*(byte) 4
Constant inlined bitmap_screen#1 = (const byte*) SCREEN
Constant inlined main::vy#0 = (byte) 1
Constant inlined main::$2 = (const byte) VIC_BMM|(const byte) VIC_DEN
Constant inlined main::vx#0 = (byte) 1
@ -1546,7 +1544,7 @@ bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@1
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
memset: scope:[memset] from bitmap_clear bitmap_clear::@1
[49] (byte) memset::c#4 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 )
[49] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 )
[49] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) SCREEN bitmap_clear::@1/(void*)(const byte*) BITMAP )
[49] (word) memset::num#2 ← phi( bitmap_clear/(word) $3e8 bitmap_clear::@1/(word) $1f40 )
[50] if((word) memset::num#2<=(byte) 0) goto memset::@return
to:memset::@1
@ -1586,7 +1584,7 @@ bitmap_init::@2: scope:[bitmap_init] from bitmap_init::@1 bitmap_init::@6
[66] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1
to:bitmap_init::@3
bitmap_init::@3: scope:[bitmap_init] from bitmap_init::@2 bitmap_init::@4
[67] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP#0 bitmap_init::@4/(byte*) bitmap_init::yoffs#4 )
[67] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP bitmap_init::@4/(byte*) bitmap_init::yoffs#4 )
[67] (byte) bitmap_init::y#2 ← phi( bitmap_init::@2/(byte) 0 bitmap_init::@4/(byte) bitmap_init::y#1 )
[68] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7
[69] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2
@ -1627,8 +1625,6 @@ irq::@return: scope:[irq] from irq::@1
VARIABLE REGISTER WEIGHTS
(byte*) BITMAP
(byte*) SCREEN
(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol)
(byte) bitmap_clear::bgcol
(byte) bitmap_clear::col
@ -2109,7 +2105,7 @@ bitmap_clear: {
// [49] phi (byte) memset::c#4 = (const byte) bitmap_clear::col#0 [phi:bitmap_clear->memset#0] -- vbuz1=vbuc1
lda #col
sta.z memset.c
// [49] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#1] -- pvoz1=pvoc1
// [49] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN [phi:bitmap_clear->memset#1] -- pvoz1=pvoc1
lda #<SCREEN
sta.z memset.str
lda #>SCREEN
@ -2131,7 +2127,7 @@ bitmap_clear: {
// [49] phi (byte) memset::c#4 = (byte) 0 [phi:bitmap_clear::@1->memset#0] -- vbuz1=vbuc1
lda #0
sta.z memset.c
// [49] phi (void*) memset::str#3 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#1] -- pvoz1=pvoc1
// [49] phi (void*) memset::str#3 = (void*)(const byte*) BITMAP [phi:bitmap_clear::@1->memset#1] -- pvoz1=pvoc1
lda #<BITMAP
sta.z memset.str
lda #>BITMAP
@ -2273,7 +2269,7 @@ bitmap_init: {
bne b1_from_b2
// [67] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3]
b3_from_b2:
// [67] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1
// [67] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1
lda #<BITMAP
sta.z yoffs
lda #>BITMAP
@ -2875,7 +2871,7 @@ bitmap_clear: {
memset_from_bitmap_clear:
// [49] phi (byte) memset::c#4 = (const byte) bitmap_clear::col#0 [phi:bitmap_clear->memset#0] -- vbuxx=vbuc1
ldx #col
// [49] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#1] -- pvoz1=pvoc1
// [49] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN [phi:bitmap_clear->memset#1] -- pvoz1=pvoc1
lda #<SCREEN
sta.z memset.str
lda #>SCREEN
@ -2896,7 +2892,7 @@ bitmap_clear: {
memset_from_b1:
// [49] phi (byte) memset::c#4 = (byte) 0 [phi:bitmap_clear::@1->memset#0] -- vbuxx=vbuc1
ldx #0
// [49] phi (void*) memset::str#3 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#1] -- pvoz1=pvoc1
// [49] phi (void*) memset::str#3 = (void*)(const byte*) BITMAP [phi:bitmap_clear::@1->memset#1] -- pvoz1=pvoc1
lda #<BITMAP
sta.z memset.str
lda #>BITMAP
@ -3020,7 +3016,7 @@ bitmap_init: {
bne b1_from_b2
// [67] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3]
b3_from_b2:
// [67] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1
// [67] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1
lda #<BITMAP
sta.z yoffs
lda #>BITMAP
@ -3243,8 +3239,7 @@ FINAL SYMBOL TABLE
(label) @begin
(label) @end
(const byte*) BGCOL BGCOL = (byte*) 53281
(byte*) BITMAP
(const byte*) BITMAP#0 BITMAP = (byte*) 8192
(const byte*) BITMAP BITMAP = (byte*) 8192
(const byte) BLACK BLACK = (byte) 0
(const byte*) CIA1_INTERRUPT CIA1_INTERRUPT = (byte*) 56333
(const byte) CIA_INTERRUPT_CLEAR CIA_INTERRUPT_CLEAR = (byte) $7f
@ -3259,8 +3254,7 @@ FINAL SYMBOL TABLE
(const byte) PROCPORT_DDR_MEMORY_MASK PROCPORT_DDR_MEMORY_MASK = (byte) 7
(const byte) PROCPORT_RAM_IO PROCPORT_RAM_IO = (byte) 5
(const byte*) RASTER RASTER = (byte*) 53266
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = (byte*) 1024
(const byte*) SCREEN SCREEN = (byte*) 1024
(const byte) VIC_BMM VIC_BMM = (byte) $20
(const byte*) VIC_CONTROL VIC_CONTROL = (byte*) 53265
(const byte) VIC_DEN VIC_DEN = (byte) $10
@ -3343,7 +3337,7 @@ interrupt(HARDWARE_CLOBBER)(void()) irq()
(label) main::toD0181
(byte*) main::toD0181_gfx
(byte) main::toD0181_return
(const byte) main::toD0181_return#0 toD0181_return = >(word)(const byte*) SCREEN#0&(word) $3fff*(byte) 4|>(word)(const byte*) BITMAP#0/(byte) 4&(byte) $f
(const byte) main::toD0181_return#0 toD0181_return = >(word)(const byte*) SCREEN&(word) $3fff*(byte) 4|>(word)(const byte*) BITMAP/(byte) 4&(byte) $f
(byte*) main::toD0181_screen
(word) main::vx
(word) main::vx#1 vx zp ZP_WORD:5 22.0
@ -3698,7 +3692,7 @@ bitmap_clear: {
// [49] phi from bitmap_clear to memset [phi:bitmap_clear->memset]
// [49] phi (byte) memset::c#4 = (const byte) bitmap_clear::col#0 [phi:bitmap_clear->memset#0] -- vbuxx=vbuc1
ldx #col
// [49] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#1] -- pvoz1=pvoc1
// [49] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN [phi:bitmap_clear->memset#1] -- pvoz1=pvoc1
lda #<SCREEN
sta.z memset.str
lda #>SCREEN
@ -3716,7 +3710,7 @@ bitmap_clear: {
// [49] phi from bitmap_clear::@1 to memset [phi:bitmap_clear::@1->memset]
// [49] phi (byte) memset::c#4 = (byte) 0 [phi:bitmap_clear::@1->memset#0] -- vbuxx=vbuc1
ldx #0
// [49] phi (void*) memset::str#3 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#1] -- pvoz1=pvoc1
// [49] phi (void*) memset::str#3 = (void*)(const byte*) BITMAP [phi:bitmap_clear::@1->memset#1] -- pvoz1=pvoc1
lda #<BITMAP
sta.z memset.str
lda #>BITMAP
@ -3831,7 +3825,7 @@ bitmap_init: {
cpx #0
bne b1
// [67] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3]
// [67] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1
// [67] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1
lda #<BITMAP
sta.z yoffs
lda #>BITMAP

View File

@ -3,8 +3,7 @@
(label) @begin
(label) @end
(const byte*) BGCOL BGCOL = (byte*) 53281
(byte*) BITMAP
(const byte*) BITMAP#0 BITMAP = (byte*) 8192
(const byte*) BITMAP BITMAP = (byte*) 8192
(const byte) BLACK BLACK = (byte) 0
(const byte*) CIA1_INTERRUPT CIA1_INTERRUPT = (byte*) 56333
(const byte) CIA_INTERRUPT_CLEAR CIA_INTERRUPT_CLEAR = (byte) $7f
@ -19,8 +18,7 @@
(const byte) PROCPORT_DDR_MEMORY_MASK PROCPORT_DDR_MEMORY_MASK = (byte) 7
(const byte) PROCPORT_RAM_IO PROCPORT_RAM_IO = (byte) 5
(const byte*) RASTER RASTER = (byte*) 53266
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = (byte*) 1024
(const byte*) SCREEN SCREEN = (byte*) 1024
(const byte) VIC_BMM VIC_BMM = (byte) $20
(const byte*) VIC_CONTROL VIC_CONTROL = (byte*) 53265
(const byte) VIC_DEN VIC_DEN = (byte) $10
@ -103,7 +101,7 @@ interrupt(HARDWARE_CLOBBER)(void()) irq()
(label) main::toD0181
(byte*) main::toD0181_gfx
(byte) main::toD0181_return
(const byte) main::toD0181_return#0 toD0181_return = >(word)(const byte*) SCREEN#0&(word) $3fff*(byte) 4|>(word)(const byte*) BITMAP#0/(byte) 4&(byte) $f
(const byte) main::toD0181_return#0 toD0181_return = >(word)(const byte*) SCREEN&(word) $3fff*(byte) 4|>(word)(const byte*) BITMAP/(byte) 4&(byte) $f
(byte*) main::toD0181_screen
(word) main::vx
(word) main::vx#1 vx zp ZP_WORD:5 22.0

View File

@ -193,7 +193,7 @@ bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@1
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
memset: scope:[memset] from bitmap_clear bitmap_clear::@1
[97] (byte) memset::c#4 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 )
[97] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 )
[97] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) SCREEN bitmap_clear::@1/(void*)(const byte*) BITMAP )
[97] (word) memset::num#2 ← phi( bitmap_clear/(word) $3e8 bitmap_clear::@1/(word) $1f40 )
[98] if((word) memset::num#2<=(byte) 0) goto memset::@return
to:memset::@1
@ -233,7 +233,7 @@ bitmap_init::@2: scope:[bitmap_init] from bitmap_init::@1 bitmap_init::@6
[114] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1
to:bitmap_init::@3
bitmap_init::@3: scope:[bitmap_init] from bitmap_init::@2 bitmap_init::@4
[115] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP#0 bitmap_init::@4/(byte*) bitmap_init::yoffs#4 )
[115] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP bitmap_init::@4/(byte*) bitmap_init::yoffs#4 )
[115] (byte) bitmap_init::y#2 ← phi( bitmap_init::@2/(byte) 0 bitmap_init::@4/(byte) bitmap_init::y#1 )
[116] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7
[117] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2

View File

@ -764,8 +764,8 @@ bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot
(byte*) bitmap_screen#25 ← phi( @28/(byte*) bitmap_screen#0 )
(byte*) bitmap_gfx#26 ← phi( @28/(byte*) bitmap_gfx#0 )
(word) rem16u#34 ← phi( @28/(word) rem16u#36 )
(byte*) BITMAP#0 ← ((byte*)) (number) $2000
(byte*) SCREEN#0 ← ((byte*)) (number) $400
(byte*) BITMAP ← ((byte*)) (number) $2000
(byte*) SCREEN ← ((byte*)) (number) $400
(byte[$100]) plots_per_frame ← { fill( $100, 0) }
(signed word[$200]) SINUS ← { fill( $200, 0) }
to:@35
@ -788,8 +788,8 @@ main::@12: scope:[main] from main
(byte*) bitmap_gfx#13 ← phi( main/(byte*) bitmap_gfx#18 )
(word) rem16u#17 ← phi( main/(word) rem16u#7 )
(word) rem16u#8 ← (word) rem16u#17
(byte*) bitmap_init::gfx#0 ← (byte*) BITMAP#0
(byte*) bitmap_init::screen#0 ← (byte*) SCREEN#0
(byte*) bitmap_init::gfx#0 ← (byte*) BITMAP
(byte*) bitmap_init::screen#0 ← (byte*) SCREEN
call bitmap_init
to:main::@13
main::@13: scope:[main] from main::@12
@ -812,8 +812,8 @@ main::@14: scope:[main] from main::@13
(byte~) main::$4 ← (byte~) main::$3 | (byte) VIC_RSEL
(number~) main::$5 ← (byte~) main::$4 | (number) 3
*((byte*) D011) ← (number~) main::$5
(byte*) main::toD0181_screen#0 ← (byte*) SCREEN#0
(byte*) main::toD0181_gfx#0 ← (byte*) BITMAP#0
(byte*) main::toD0181_screen#0 ← (byte*) SCREEN
(byte*) main::toD0181_gfx#0 ← (byte*) BITMAP
to:main::toD0181
main::toD0181: scope:[main] from main::@14
(byte) frame_cnt#20 ← phi( main::@14/(byte) frame_cnt#21 )
@ -1058,7 +1058,6 @@ SYMBOL TABLE SSA
(label) @end
(byte*) BGCOL
(byte*) BITMAP
(byte*) BITMAP#0
(byte) BLACK
(byte*) CIA1_INTERRUPT
(byte) CIA_INTERRUPT_CLEAR
@ -1077,7 +1076,6 @@ SYMBOL TABLE SSA
(byte) PROCPORT_RAM_IO
(byte*) RASTER
(byte*) SCREEN
(byte*) SCREEN#0
(signed word[$200]) SINUS
(const byte) SIZEOF_SIGNED_WORD = (byte) 2
(byte) VIC_BMM
@ -2047,8 +2045,8 @@ Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#3
Inlining cast (byte) bitmap_init::bits#0 ← (unumber)(number) $80
Inlining cast (byte) bitmap_init::bits#2 ← (unumber)(number) $80
Inlining cast (byte) memset::c#1 ← (unumber)(number) 0
Inlining cast (byte*) BITMAP#0 ← (byte*)(number) $2000
Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400
Inlining cast (byte*) BITMAP ← (byte*)(number) $2000
Inlining cast (byte*) SCREEN ← (byte*)(number) $400
Inlining cast (word) sin16s_gen2::wavelength#0 ← (unumber)(number) $200
Inlining cast (signed word) sin16s_gen2::min#0 ← (snumber)(number) -$1001
Inlining cast (signed word) sin16s_gen2::max#0 ← (snumber)(number) $1001
@ -2583,8 +2581,8 @@ Constant (const byte) bitmap_init::y#0 = 0
Constant (const word) memset::num#0 = $3e8
Constant (const byte) memset::c#1 = 0
Constant (const word) memset::num#1 = $1f40
Constant (const byte*) BITMAP#0 = (byte*) 8192
Constant (const byte*) SCREEN#0 = (byte*) 1024
Constant (const byte*) BITMAP = (byte*) 8192
Constant (const byte*) SCREEN = (byte*) 1024
Constant (const byte[$100]) plots_per_frame = { fill( $100, 0) }
Constant (const signed word[$200]) SINUS = { fill( $200, 0) }
Constant (const word) sin16s_gen2::wavelength#0 = $200
@ -2601,12 +2599,12 @@ Successful SSA optimization Pass2ConstantIdentification
Constant (const dword) div32u16u::dividend#0 = PI2_u4f28
Constant (const word) div32u16u::divisor#0 = sin16s_gen2::wavelength#0
Constant (const signed word*) sin16s_gen2::sintab#1 = SINUS
Constant (const byte*) bitmap_init::gfx#0 = BITMAP#0
Constant (const byte*) bitmap_init::screen#0 = SCREEN#0
Constant (const byte*) bitmap_init::gfx#0 = BITMAP
Constant (const byte*) bitmap_init::screen#0 = SCREEN
Constant (const byte) bitmap_clear::bgcol#0 = BLACK
Constant (const byte) bitmap_clear::fgcol#0 = WHITE
Constant (const byte*) main::toD0181_screen#0 = SCREEN#0
Constant (const byte*) main::toD0181_gfx#0 = BITMAP#0
Constant (const byte*) main::toD0181_screen#0 = SCREEN
Constant (const byte*) main::toD0181_gfx#0 = BITMAP
Successful SSA optimization Pass2ConstantIdentification
Constant (const word) divr16u::divisor#0 = div32u16u::divisor#0
Constant (const word) divr16u::divisor#1 = div32u16u::divisor#0
@ -2768,9 +2766,9 @@ Inlining constant with var siblings (const word) main::idx_x#0
Inlining constant with var siblings (const word) main::idx_y#0
Inlining constant with var siblings (const word) main::idx_x#2
Inlining constant with var siblings (const word) main::idx_y#2
Constant inlined bitmap_init::screen#0 = (const byte*) SCREEN#0
Constant inlined bitmap_init::screen#0 = (const byte*) SCREEN
Constant inlined divr16u::rem#3 = (byte) 0
Constant inlined bitmap_init::gfx#0 = (const byte*) BITMAP#0
Constant inlined bitmap_init::gfx#0 = (const byte*) BITMAP
Constant inlined sin16s_gen2::i#0 = (byte) 0
Constant inlined sin16s::isUpper#0 = (byte) 0
Constant inlined memset::num#1 = (word) $1f40
@ -2785,21 +2783,21 @@ Constant inlined init_irq::$0 = &interrupt(HARDWARE_CLOBBER)(void()) irq()
Constant inlined main::idx_y#2 = (byte) 0
Constant inlined main::idx_y#0 = (byte) $80
Constant inlined mul16s::b#0 = (const signed word) sin16s_gen2::ampl#0
Constant inlined main::toD0181_$7 = >(word)(const byte*) BITMAP#0/(byte) 4&(byte) $f
Constant inlined main::toD0181_$2 = (word)(const byte*) SCREEN#0&(word) $3fff*(byte) 4
Constant inlined main::toD0181_$1 = (word)(const byte*) SCREEN#0&(word) $3fff
Constant inlined bitmap_gfx#1 = (const byte*) BITMAP#0
Constant inlined main::toD0181_$0 = (word)(const byte*) SCREEN#0
Constant inlined main::toD0181_$6 = >(word)(const byte*) BITMAP#0/(byte) 4
Constant inlined main::toD0181_$5 = >(word)(const byte*) BITMAP#0
Constant inlined main::toD0181_$4 = (word)(const byte*) BITMAP#0
Constant inlined main::toD0181_$3 = >(word)(const byte*) SCREEN#0&(word) $3fff*(byte) 4
Constant inlined main::toD0181_$7 = >(word)(const byte*) BITMAP/(byte) 4&(byte) $f
Constant inlined main::toD0181_$2 = (word)(const byte*) SCREEN&(word) $3fff*(byte) 4
Constant inlined main::toD0181_$1 = (word)(const byte*) SCREEN&(word) $3fff
Constant inlined bitmap_gfx#1 = (const byte*) BITMAP
Constant inlined main::toD0181_$0 = (word)(const byte*) SCREEN
Constant inlined main::toD0181_$6 = >(word)(const byte*) BITMAP/(byte) 4
Constant inlined main::toD0181_$5 = >(word)(const byte*) BITMAP
Constant inlined main::toD0181_$4 = (word)(const byte*) BITMAP
Constant inlined main::toD0181_$3 = >(word)(const byte*) SCREEN&(word) $3fff*(byte) 4
Constant inlined sin16s_gen2::sintab#1 = (const signed word[$200]) SINUS
Constant inlined memset::c#0 = (const byte) bitmap_clear::col#0
Constant inlined bitmap_init::x#0 = (byte) 0
Constant inlined memset::c#1 = (byte) 0
Constant inlined main::toD0181_screen#0 = (const byte*) SCREEN#0
Constant inlined main::toD0181_gfx#0 = (const byte*) BITMAP#0
Constant inlined main::toD0181_screen#0 = (const byte*) SCREEN
Constant inlined main::toD0181_gfx#0 = (const byte*) BITMAP
Constant inlined divr16u::i#0 = (byte) 0
Constant inlined div32u16u::dividend#0 = (const dword) PI2_u4f28
Constant inlined bitmap_init::bits#0 = (byte) $80
@ -2812,13 +2810,13 @@ Constant inlined divr16u::divisor#1 = (const word) sin16s_gen2::wavelength#0
Constant inlined divr16u::divisor#0 = (const word) sin16s_gen2::wavelength#0
Constant inlined main::idx_x#0 = (byte) 0
Constant inlined mul16s::a#1 = (signed word) $a0
Constant inlined memset::str#1 = (void*)(const byte*) BITMAP#0
Constant inlined memset::str#1 = (void*)(const byte*) BITMAP
Constant inlined mul16s::a#2 = (signed byte) $64
Constant inlined memset::str#0 = (void*)(const byte*) SCREEN#0
Constant inlined memset::str#0 = (void*)(const byte*) SCREEN
Constant inlined bitmap_clear::fgcol#0 = (const byte) WHITE
Constant inlined divr16u::dividend#1 = >(const dword) PI2_u4f28
Constant inlined divr16u::dividend#2 = <(const dword) PI2_u4f28
Constant inlined bitmap_screen#1 = (const byte*) SCREEN#0
Constant inlined bitmap_screen#1 = (const byte*) SCREEN
Constant inlined mulu16_sel::v2#2 = (word)(number) $10000/(number) 6
Constant inlined main::$5 = (const byte) VIC_BMM|(const byte) VIC_DEN|(const byte) VIC_RSEL|(byte) 3
Constant inlined bitmap_init::y#0 = (byte) 0
@ -3218,7 +3216,7 @@ bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@1
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
memset: scope:[memset] from bitmap_clear bitmap_clear::@1
[97] (byte) memset::c#4 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 )
[97] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 )
[97] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) SCREEN bitmap_clear::@1/(void*)(const byte*) BITMAP )
[97] (word) memset::num#2 ← phi( bitmap_clear/(word) $3e8 bitmap_clear::@1/(word) $1f40 )
[98] if((word) memset::num#2<=(byte) 0) goto memset::@return
to:memset::@1
@ -3258,7 +3256,7 @@ bitmap_init::@2: scope:[bitmap_init] from bitmap_init::@1 bitmap_init::@6
[114] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1
to:bitmap_init::@3
bitmap_init::@3: scope:[bitmap_init] from bitmap_init::@2 bitmap_init::@4
[115] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP#0 bitmap_init::@4/(byte*) bitmap_init::yoffs#4 )
[115] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP bitmap_init::@4/(byte*) bitmap_init::yoffs#4 )
[115] (byte) bitmap_init::y#2 ← phi( bitmap_init::@2/(byte) 0 bitmap_init::@4/(byte) bitmap_init::y#1 )
[116] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7
[117] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2
@ -3487,8 +3485,6 @@ irq::@return: scope:[irq] from irq::@1
VARIABLE REGISTER WEIGHTS
(byte*) BITMAP
(byte*) SCREEN
(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol)
(byte) bitmap_clear::bgcol
(byte) bitmap_clear::col
@ -4796,7 +4792,7 @@ bitmap_clear: {
// [97] phi (byte) memset::c#4 = (const byte) bitmap_clear::col#0 [phi:bitmap_clear->memset#0] -- vbuz1=vbuc1
lda #col
sta.z memset.c
// [97] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#1] -- pvoz1=pvoc1
// [97] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN [phi:bitmap_clear->memset#1] -- pvoz1=pvoc1
lda #<SCREEN
sta.z memset.str
lda #>SCREEN
@ -4818,7 +4814,7 @@ bitmap_clear: {
// [97] phi (byte) memset::c#4 = (byte) 0 [phi:bitmap_clear::@1->memset#0] -- vbuz1=vbuc1
lda #0
sta.z memset.c
// [97] phi (void*) memset::str#3 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#1] -- pvoz1=pvoc1
// [97] phi (void*) memset::str#3 = (void*)(const byte*) BITMAP [phi:bitmap_clear::@1->memset#1] -- pvoz1=pvoc1
lda #<BITMAP
sta.z memset.str
lda #>BITMAP
@ -4960,7 +4956,7 @@ bitmap_init: {
bne b1_from_b2
// [115] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3]
b3_from_b2:
// [115] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1
// [115] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1
lda #<BITMAP
sta.z yoffs
lda #>BITMAP
@ -7056,7 +7052,7 @@ bitmap_clear: {
memset_from_bitmap_clear:
// [97] phi (byte) memset::c#4 = (const byte) bitmap_clear::col#0 [phi:bitmap_clear->memset#0] -- vbuxx=vbuc1
ldx #col
// [97] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#1] -- pvoz1=pvoc1
// [97] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN [phi:bitmap_clear->memset#1] -- pvoz1=pvoc1
lda #<SCREEN
sta.z memset.str
lda #>SCREEN
@ -7077,7 +7073,7 @@ bitmap_clear: {
memset_from_b1:
// [97] phi (byte) memset::c#4 = (byte) 0 [phi:bitmap_clear::@1->memset#0] -- vbuxx=vbuc1
ldx #0
// [97] phi (void*) memset::str#3 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#1] -- pvoz1=pvoc1
// [97] phi (void*) memset::str#3 = (void*)(const byte*) BITMAP [phi:bitmap_clear::@1->memset#1] -- pvoz1=pvoc1
lda #<BITMAP
sta.z memset.str
lda #>BITMAP
@ -7201,7 +7197,7 @@ bitmap_init: {
bne b1_from_b2
// [115] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3]
b3_from_b2:
// [115] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1
// [115] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1
lda #<BITMAP
sta.z yoffs
lda #>BITMAP
@ -8227,8 +8223,7 @@ FINAL SYMBOL TABLE
(label) @begin
(label) @end
(const byte*) BGCOL BGCOL = (byte*) 53281
(byte*) BITMAP
(const byte*) BITMAP#0 BITMAP = (byte*) 8192
(const byte*) BITMAP BITMAP = (byte*) 8192
(const byte) BLACK BLACK = (byte) 0
(const byte*) CIA1_INTERRUPT CIA1_INTERRUPT = (byte*) 56333
(const byte) CIA_INTERRUPT_CLEAR CIA_INTERRUPT_CLEAR = (byte) $7f
@ -8246,8 +8241,7 @@ FINAL SYMBOL TABLE
(const byte) PROCPORT_DDR_MEMORY_MASK PROCPORT_DDR_MEMORY_MASK = (byte) 7
(const byte) PROCPORT_RAM_IO PROCPORT_RAM_IO = (byte) 5
(const byte*) RASTER RASTER = (byte*) 53266
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = (byte*) 1024
(const byte*) SCREEN SCREEN = (byte*) 1024
(const signed word[$200]) SINUS SINUS = { fill( $200, 0) }
(const byte) SIZEOF_SIGNED_WORD SIZEOF_SIGNED_WORD = (byte) 2
(const byte) VIC_BMM VIC_BMM = (byte) $20
@ -8402,7 +8396,7 @@ interrupt(HARDWARE_CLOBBER)(void()) irq()
(label) main::toD0181
(byte*) main::toD0181_gfx
(byte) main::toD0181_return
(const byte) main::toD0181_return#0 toD0181_return = >(word)(const byte*) SCREEN#0&(word) $3fff*(byte) 4|>(word)(const byte*) BITMAP#0/(byte) 4&(byte) $f
(const byte) main::toD0181_return#0 toD0181_return = >(word)(const byte*) SCREEN&(word) $3fff*(byte) 4|>(word)(const byte*) BITMAP/(byte) 4&(byte) $f
(byte*) main::toD0181_screen
(word) main::x
(word) main::x#0 x zp ZP_WORD:32 1.8333333333333333
@ -9247,7 +9241,7 @@ bitmap_clear: {
// [97] phi from bitmap_clear to memset [phi:bitmap_clear->memset]
// [97] phi (byte) memset::c#4 = (const byte) bitmap_clear::col#0 [phi:bitmap_clear->memset#0] -- vbuxx=vbuc1
ldx #col
// [97] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#1] -- pvoz1=pvoc1
// [97] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN [phi:bitmap_clear->memset#1] -- pvoz1=pvoc1
lda #<SCREEN
sta.z memset.str
lda #>SCREEN
@ -9265,7 +9259,7 @@ bitmap_clear: {
// [97] phi from bitmap_clear::@1 to memset [phi:bitmap_clear::@1->memset]
// [97] phi (byte) memset::c#4 = (byte) 0 [phi:bitmap_clear::@1->memset#0] -- vbuxx=vbuc1
ldx #0
// [97] phi (void*) memset::str#3 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#1] -- pvoz1=pvoc1
// [97] phi (void*) memset::str#3 = (void*)(const byte*) BITMAP [phi:bitmap_clear::@1->memset#1] -- pvoz1=pvoc1
lda #<BITMAP
sta.z memset.str
lda #>BITMAP
@ -9380,7 +9374,7 @@ bitmap_init: {
cpx #0
bne b1
// [115] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3]
// [115] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1
// [115] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1
lda #<BITMAP
sta.z yoffs
lda #>BITMAP

View File

@ -3,8 +3,7 @@
(label) @begin
(label) @end
(const byte*) BGCOL BGCOL = (byte*) 53281
(byte*) BITMAP
(const byte*) BITMAP#0 BITMAP = (byte*) 8192
(const byte*) BITMAP BITMAP = (byte*) 8192
(const byte) BLACK BLACK = (byte) 0
(const byte*) CIA1_INTERRUPT CIA1_INTERRUPT = (byte*) 56333
(const byte) CIA_INTERRUPT_CLEAR CIA_INTERRUPT_CLEAR = (byte) $7f
@ -22,8 +21,7 @@
(const byte) PROCPORT_DDR_MEMORY_MASK PROCPORT_DDR_MEMORY_MASK = (byte) 7
(const byte) PROCPORT_RAM_IO PROCPORT_RAM_IO = (byte) 5
(const byte*) RASTER RASTER = (byte*) 53266
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = (byte*) 1024
(const byte*) SCREEN SCREEN = (byte*) 1024
(const signed word[$200]) SINUS SINUS = { fill( $200, 0) }
(const byte) SIZEOF_SIGNED_WORD SIZEOF_SIGNED_WORD = (byte) 2
(const byte) VIC_BMM VIC_BMM = (byte) $20
@ -178,7 +176,7 @@ interrupt(HARDWARE_CLOBBER)(void()) irq()
(label) main::toD0181
(byte*) main::toD0181_gfx
(byte) main::toD0181_return
(const byte) main::toD0181_return#0 toD0181_return = >(word)(const byte*) SCREEN#0&(word) $3fff*(byte) 4|>(word)(const byte*) BITMAP#0/(byte) 4&(byte) $f
(const byte) main::toD0181_return#0 toD0181_return = >(word)(const byte*) SCREEN&(word) $3fff*(byte) 4|>(word)(const byte*) BITMAP/(byte) 4&(byte) $f
(byte*) main::toD0181_screen
(word) main::x
(word) main::x#0 x zp ZP_WORD:32 1.8333333333333333

View File

@ -212,7 +212,7 @@ bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@1
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
memset: scope:[memset] from bitmap_clear bitmap_clear::@1
[106] (byte) memset::c#4 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 )
[106] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 )
[106] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) SCREEN bitmap_clear::@1/(void*)(const byte*) BITMAP )
[106] (word) memset::num#2 ← phi( bitmap_clear/(word) $3e8 bitmap_clear::@1/(word) $1f40 )
[107] if((word) memset::num#2<=(byte) 0) goto memset::@return
to:memset::@1
@ -252,7 +252,7 @@ bitmap_init::@2: scope:[bitmap_init] from bitmap_init::@1 bitmap_init::@6
[123] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1
to:bitmap_init::@3
bitmap_init::@3: scope:[bitmap_init] from bitmap_init::@2 bitmap_init::@4
[124] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP#0 bitmap_init::@4/(byte*) bitmap_init::yoffs#4 )
[124] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP bitmap_init::@4/(byte*) bitmap_init::yoffs#4 )
[124] (byte) bitmap_init::y#2 ← phi( bitmap_init::@2/(byte) 0 bitmap_init::@4/(byte) bitmap_init::y#1 )
[125] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7
[126] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2

View File

@ -773,8 +773,8 @@ bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot
(byte*) bitmap_screen#26 ← phi( @28/(byte*) bitmap_screen#0 )
(byte*) bitmap_gfx#27 ← phi( @28/(byte*) bitmap_gfx#0 )
(word) rem16u#35 ← phi( @28/(word) rem16u#37 )
(byte*) BITMAP#0 ← ((byte*)) (number) $2000
(byte*) SCREEN#0 ← ((byte*)) (number) $400
(byte*) BITMAP ← ((byte*)) (number) $2000
(byte*) SCREEN ← ((byte*)) (number) $400
(byte[$100]) plots_per_frame ← { fill( $100, 0) }
(signed word[$200]) SINUS ← { fill( $200, 0) }
to:@35
@ -797,8 +797,8 @@ main::@24: scope:[main] from main
(byte*) bitmap_gfx#13 ← phi( main/(byte*) bitmap_gfx#18 )
(word) rem16u#17 ← phi( main/(word) rem16u#7 )
(word) rem16u#8 ← (word) rem16u#17
(byte*) bitmap_init::gfx#0 ← (byte*) BITMAP#0
(byte*) bitmap_init::screen#0 ← (byte*) SCREEN#0
(byte*) bitmap_init::gfx#0 ← (byte*) BITMAP
(byte*) bitmap_init::screen#0 ← (byte*) SCREEN
call bitmap_init
to:main::@25
main::@25: scope:[main] from main::@24
@ -821,8 +821,8 @@ main::@26: scope:[main] from main::@25
(byte~) main::$4 ← (byte~) main::$3 | (byte) VIC_RSEL
(number~) main::$5 ← (byte~) main::$4 | (number) 3
*((byte*) D011) ← (number~) main::$5
(byte*) main::toD0181_screen#0 ← (byte*) SCREEN#0
(byte*) main::toD0181_gfx#0 ← (byte*) BITMAP#0
(byte*) main::toD0181_screen#0 ← (byte*) SCREEN
(byte*) main::toD0181_gfx#0 ← (byte*) BITMAP
to:main::toD0181
main::toD0181: scope:[main] from main::@26
(byte) frame_cnt#21 ← phi( main::@26/(byte) frame_cnt#23 )
@ -1131,7 +1131,6 @@ SYMBOL TABLE SSA
(label) @end
(byte*) BGCOL
(byte*) BITMAP
(byte*) BITMAP#0
(byte) BLACK
(byte*) BORDERCOL
(byte*) CIA1_INTERRUPT
@ -1151,7 +1150,6 @@ SYMBOL TABLE SSA
(byte) PROCPORT_RAM_IO
(byte*) RASTER
(byte*) SCREEN
(byte*) SCREEN#0
(signed word[$200]) SINUS
(const byte) SIZEOF_SIGNED_WORD = (byte) 2
(byte) VIC_BMM
@ -2184,8 +2182,8 @@ Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#3
Inlining cast (byte) bitmap_init::bits#0 ← (unumber)(number) $80
Inlining cast (byte) bitmap_init::bits#2 ← (unumber)(number) $80
Inlining cast (byte) memset::c#1 ← (unumber)(number) 0
Inlining cast (byte*) BITMAP#0 ← (byte*)(number) $2000
Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400
Inlining cast (byte*) BITMAP ← (byte*)(number) $2000
Inlining cast (byte*) SCREEN ← (byte*)(number) $400
Inlining cast (word) sin16s_gen2::wavelength#0 ← (unumber)(number) $200
Inlining cast (signed word) sin16s_gen2::min#0 ← (snumber)(number) -$1001
Inlining cast (signed word) sin16s_gen2::max#0 ← (snumber)(number) $1001
@ -2758,8 +2756,8 @@ Constant (const byte) bitmap_init::y#0 = 0
Constant (const word) memset::num#0 = $3e8
Constant (const byte) memset::c#1 = 0
Constant (const word) memset::num#1 = $1f40
Constant (const byte*) BITMAP#0 = (byte*) 8192
Constant (const byte*) SCREEN#0 = (byte*) 1024
Constant (const byte*) BITMAP = (byte*) 8192
Constant (const byte*) SCREEN = (byte*) 1024
Constant (const byte[$100]) plots_per_frame = { fill( $100, 0) }
Constant (const signed word[$200]) SINUS = { fill( $200, 0) }
Constant (const word) sin16s_gen2::wavelength#0 = $200
@ -2776,12 +2774,12 @@ Successful SSA optimization Pass2ConstantIdentification
Constant (const dword) div32u16u::dividend#0 = PI2_u4f28
Constant (const word) div32u16u::divisor#0 = sin16s_gen2::wavelength#0
Constant (const signed word*) sin16s_gen2::sintab#1 = SINUS
Constant (const byte*) bitmap_init::gfx#0 = BITMAP#0
Constant (const byte*) bitmap_init::screen#0 = SCREEN#0
Constant (const byte*) bitmap_init::gfx#0 = BITMAP
Constant (const byte*) bitmap_init::screen#0 = SCREEN
Constant (const byte) bitmap_clear::bgcol#0 = BLACK
Constant (const byte) bitmap_clear::fgcol#0 = WHITE
Constant (const byte*) main::toD0181_screen#0 = SCREEN#0
Constant (const byte*) main::toD0181_gfx#0 = BITMAP#0
Constant (const byte*) main::toD0181_screen#0 = SCREEN
Constant (const byte*) main::toD0181_gfx#0 = BITMAP
Successful SSA optimization Pass2ConstantIdentification
Constant (const word) divr16u::divisor#0 = div32u16u::divisor#0
Constant (const word) divr16u::divisor#1 = div32u16u::divisor#0
@ -2951,9 +2949,9 @@ Inlining constant with var siblings (const signed word) main::r#0
Inlining constant with var siblings (const byte) main::r_add#0
Inlining constant with var siblings (const word) main::idx_x#2
Inlining constant with var siblings (const word) main::idx_y#2
Constant inlined bitmap_init::screen#0 = (const byte*) SCREEN#0
Constant inlined bitmap_init::screen#0 = (const byte*) SCREEN
Constant inlined divr16u::rem#3 = (byte) 0
Constant inlined bitmap_init::gfx#0 = (const byte*) BITMAP#0
Constant inlined bitmap_init::gfx#0 = (const byte*) BITMAP
Constant inlined sin16s_gen2::i#0 = (byte) 0
Constant inlined sin16s::isUpper#0 = (byte) 0
Constant inlined memset::num#1 = (word) $1f40
@ -2968,21 +2966,21 @@ Constant inlined init_irq::$0 = &interrupt(HARDWARE_CLOBBER)(void()) irq()
Constant inlined main::idx_y#2 = (byte) 0
Constant inlined main::idx_y#0 = (byte) $80
Constant inlined mul16s::b#0 = (const signed word) sin16s_gen2::ampl#0
Constant inlined main::toD0181_$7 = >(word)(const byte*) BITMAP#0/(byte) 4&(byte) $f
Constant inlined main::toD0181_$2 = (word)(const byte*) SCREEN#0&(word) $3fff*(byte) 4
Constant inlined main::toD0181_$1 = (word)(const byte*) SCREEN#0&(word) $3fff
Constant inlined bitmap_gfx#1 = (const byte*) BITMAP#0
Constant inlined main::toD0181_$0 = (word)(const byte*) SCREEN#0
Constant inlined main::toD0181_$6 = >(word)(const byte*) BITMAP#0/(byte) 4
Constant inlined main::toD0181_$5 = >(word)(const byte*) BITMAP#0
Constant inlined main::toD0181_$4 = (word)(const byte*) BITMAP#0
Constant inlined main::toD0181_$3 = >(word)(const byte*) SCREEN#0&(word) $3fff*(byte) 4
Constant inlined main::toD0181_$7 = >(word)(const byte*) BITMAP/(byte) 4&(byte) $f
Constant inlined main::toD0181_$2 = (word)(const byte*) SCREEN&(word) $3fff*(byte) 4
Constant inlined main::toD0181_$1 = (word)(const byte*) SCREEN&(word) $3fff
Constant inlined bitmap_gfx#1 = (const byte*) BITMAP
Constant inlined main::toD0181_$0 = (word)(const byte*) SCREEN
Constant inlined main::toD0181_$6 = >(word)(const byte*) BITMAP/(byte) 4
Constant inlined main::toD0181_$5 = >(word)(const byte*) BITMAP
Constant inlined main::toD0181_$4 = (word)(const byte*) BITMAP
Constant inlined main::toD0181_$3 = >(word)(const byte*) SCREEN&(word) $3fff*(byte) 4
Constant inlined sin16s_gen2::sintab#1 = (const signed word[$200]) SINUS
Constant inlined memset::c#0 = (const byte) bitmap_clear::col#0
Constant inlined bitmap_init::x#0 = (byte) 0
Constant inlined memset::c#1 = (byte) 0
Constant inlined main::toD0181_screen#0 = (const byte*) SCREEN#0
Constant inlined main::toD0181_gfx#0 = (const byte*) BITMAP#0
Constant inlined main::toD0181_screen#0 = (const byte*) SCREEN
Constant inlined main::toD0181_gfx#0 = (const byte*) BITMAP
Constant inlined divr16u::i#0 = (byte) 0
Constant inlined div32u16u::dividend#0 = (const dword) PI2_u4f28
Constant inlined bitmap_init::bits#0 = (byte) $80
@ -2996,12 +2994,12 @@ Constant inlined divr16u::divisor#1 = (const word) sin16s_gen2::wavelength#0
Constant inlined divr16u::divisor#0 = (const word) sin16s_gen2::wavelength#0
Constant inlined main::idx_x#0 = (byte) 0
Constant inlined main::r#0 = (signed byte) 0
Constant inlined memset::str#1 = (void*)(const byte*) BITMAP#0
Constant inlined memset::str#0 = (void*)(const byte*) SCREEN#0
Constant inlined memset::str#1 = (void*)(const byte*) BITMAP
Constant inlined memset::str#0 = (void*)(const byte*) SCREEN
Constant inlined bitmap_clear::fgcol#0 = (const byte) WHITE
Constant inlined divr16u::dividend#1 = >(const dword) PI2_u4f28
Constant inlined divr16u::dividend#2 = <(const dword) PI2_u4f28
Constant inlined bitmap_screen#1 = (const byte*) SCREEN#0
Constant inlined bitmap_screen#1 = (const byte*) SCREEN
Constant inlined mulu16_sel::v2#2 = (word)(number) $10000/(number) 6
Constant inlined main::$5 = (const byte) VIC_BMM|(const byte) VIC_DEN|(const byte) VIC_RSEL|(byte) 3
Constant inlined bitmap_init::y#0 = (byte) 0
@ -3436,7 +3434,7 @@ bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@1
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
memset: scope:[memset] from bitmap_clear bitmap_clear::@1
[106] (byte) memset::c#4 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 )
[106] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 )
[106] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) SCREEN bitmap_clear::@1/(void*)(const byte*) BITMAP )
[106] (word) memset::num#2 ← phi( bitmap_clear/(word) $3e8 bitmap_clear::@1/(word) $1f40 )
[107] if((word) memset::num#2<=(byte) 0) goto memset::@return
to:memset::@1
@ -3476,7 +3474,7 @@ bitmap_init::@2: scope:[bitmap_init] from bitmap_init::@1 bitmap_init::@6
[123] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1
to:bitmap_init::@3
bitmap_init::@3: scope:[bitmap_init] from bitmap_init::@2 bitmap_init::@4
[124] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP#0 bitmap_init::@4/(byte*) bitmap_init::yoffs#4 )
[124] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP bitmap_init::@4/(byte*) bitmap_init::yoffs#4 )
[124] (byte) bitmap_init::y#2 ← phi( bitmap_init::@2/(byte) 0 bitmap_init::@4/(byte) bitmap_init::y#1 )
[125] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7
[126] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2
@ -3705,8 +3703,6 @@ irq::@return: scope:[irq] from irq::@1
VARIABLE REGISTER WEIGHTS
(byte*) BITMAP
(byte*) SCREEN
(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol)
(byte) bitmap_clear::bgcol
(byte) bitmap_clear::col
@ -5077,7 +5073,7 @@ bitmap_clear: {
// [106] phi (byte) memset::c#4 = (const byte) bitmap_clear::col#0 [phi:bitmap_clear->memset#0] -- vbuz1=vbuc1
lda #col
sta.z memset.c
// [106] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#1] -- pvoz1=pvoc1
// [106] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN [phi:bitmap_clear->memset#1] -- pvoz1=pvoc1
lda #<SCREEN
sta.z memset.str
lda #>SCREEN
@ -5099,7 +5095,7 @@ bitmap_clear: {
// [106] phi (byte) memset::c#4 = (byte) 0 [phi:bitmap_clear::@1->memset#0] -- vbuz1=vbuc1
lda #0
sta.z memset.c
// [106] phi (void*) memset::str#3 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#1] -- pvoz1=pvoc1
// [106] phi (void*) memset::str#3 = (void*)(const byte*) BITMAP [phi:bitmap_clear::@1->memset#1] -- pvoz1=pvoc1
lda #<BITMAP
sta.z memset.str
lda #>BITMAP
@ -5241,7 +5237,7 @@ bitmap_init: {
bne b1_from_b2
// [124] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3]
b3_from_b2:
// [124] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1
// [124] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1
lda #<BITMAP
sta.z yoffs
lda #>BITMAP
@ -7426,7 +7422,7 @@ bitmap_clear: {
memset_from_bitmap_clear:
// [106] phi (byte) memset::c#4 = (const byte) bitmap_clear::col#0 [phi:bitmap_clear->memset#0] -- vbuxx=vbuc1
ldx #col
// [106] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#1] -- pvoz1=pvoc1
// [106] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN [phi:bitmap_clear->memset#1] -- pvoz1=pvoc1
lda #<SCREEN
sta.z memset.str
lda #>SCREEN
@ -7447,7 +7443,7 @@ bitmap_clear: {
memset_from_b1:
// [106] phi (byte) memset::c#4 = (byte) 0 [phi:bitmap_clear::@1->memset#0] -- vbuxx=vbuc1
ldx #0
// [106] phi (void*) memset::str#3 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#1] -- pvoz1=pvoc1
// [106] phi (void*) memset::str#3 = (void*)(const byte*) BITMAP [phi:bitmap_clear::@1->memset#1] -- pvoz1=pvoc1
lda #<BITMAP
sta.z memset.str
lda #>BITMAP
@ -7571,7 +7567,7 @@ bitmap_init: {
bne b1_from_b2
// [124] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3]
b3_from_b2:
// [124] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1
// [124] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1
lda #<BITMAP
sta.z yoffs
lda #>BITMAP
@ -8615,8 +8611,7 @@ FINAL SYMBOL TABLE
(label) @begin
(label) @end
(const byte*) BGCOL BGCOL = (byte*) 53281
(byte*) BITMAP
(const byte*) BITMAP#0 BITMAP = (byte*) 8192
(const byte*) BITMAP BITMAP = (byte*) 8192
(const byte) BLACK BLACK = (byte) 0
(const byte*) BORDERCOL BORDERCOL = (byte*) 53280
(const byte*) CIA1_INTERRUPT CIA1_INTERRUPT = (byte*) 56333
@ -8635,8 +8630,7 @@ FINAL SYMBOL TABLE
(const byte) PROCPORT_DDR_MEMORY_MASK PROCPORT_DDR_MEMORY_MASK = (byte) 7
(const byte) PROCPORT_RAM_IO PROCPORT_RAM_IO = (byte) 5
(const byte*) RASTER RASTER = (byte*) 53266
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = (byte*) 1024
(const byte*) SCREEN SCREEN = (byte*) 1024
(const signed word[$200]) SINUS SINUS = { fill( $200, 0) }
(const byte) SIZEOF_SIGNED_WORD SIZEOF_SIGNED_WORD = (byte) 2
(const byte) VIC_BMM VIC_BMM = (byte) $20
@ -8802,7 +8796,7 @@ interrupt(HARDWARE_CLOBBER)(void()) irq()
(label) main::toD0181
(byte*) main::toD0181_gfx
(byte) main::toD0181_return
(const byte) main::toD0181_return#0 toD0181_return = >(word)(const byte*) SCREEN#0&(word) $3fff*(byte) 4|>(word)(const byte*) BITMAP#0/(byte) 4&(byte) $f
(const byte) main::toD0181_return#0 toD0181_return = >(word)(const byte*) SCREEN&(word) $3fff*(byte) 4|>(word)(const byte*) BITMAP/(byte) 4&(byte) $f
(byte*) main::toD0181_screen
(word) main::x
(signed word) main::x#0 x zp ZP_WORD:32 0.8461538461538461
@ -9703,7 +9697,7 @@ bitmap_clear: {
// [106] phi from bitmap_clear to memset [phi:bitmap_clear->memset]
// [106] phi (byte) memset::c#4 = (const byte) bitmap_clear::col#0 [phi:bitmap_clear->memset#0] -- vbuxx=vbuc1
ldx #col
// [106] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#1] -- pvoz1=pvoc1
// [106] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN [phi:bitmap_clear->memset#1] -- pvoz1=pvoc1
lda #<SCREEN
sta.z memset.str
lda #>SCREEN
@ -9721,7 +9715,7 @@ bitmap_clear: {
// [106] phi from bitmap_clear::@1 to memset [phi:bitmap_clear::@1->memset]
// [106] phi (byte) memset::c#4 = (byte) 0 [phi:bitmap_clear::@1->memset#0] -- vbuxx=vbuc1
ldx #0
// [106] phi (void*) memset::str#3 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#1] -- pvoz1=pvoc1
// [106] phi (void*) memset::str#3 = (void*)(const byte*) BITMAP [phi:bitmap_clear::@1->memset#1] -- pvoz1=pvoc1
lda #<BITMAP
sta.z memset.str
lda #>BITMAP
@ -9836,7 +9830,7 @@ bitmap_init: {
cpx #0
bne b1
// [124] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3]
// [124] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1
// [124] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1
lda #<BITMAP
sta.z yoffs
lda #>BITMAP

View File

@ -3,8 +3,7 @@
(label) @begin
(label) @end
(const byte*) BGCOL BGCOL = (byte*) 53281
(byte*) BITMAP
(const byte*) BITMAP#0 BITMAP = (byte*) 8192
(const byte*) BITMAP BITMAP = (byte*) 8192
(const byte) BLACK BLACK = (byte) 0
(const byte*) BORDERCOL BORDERCOL = (byte*) 53280
(const byte*) CIA1_INTERRUPT CIA1_INTERRUPT = (byte*) 56333
@ -23,8 +22,7 @@
(const byte) PROCPORT_DDR_MEMORY_MASK PROCPORT_DDR_MEMORY_MASK = (byte) 7
(const byte) PROCPORT_RAM_IO PROCPORT_RAM_IO = (byte) 5
(const byte*) RASTER RASTER = (byte*) 53266
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = (byte*) 1024
(const byte*) SCREEN SCREEN = (byte*) 1024
(const signed word[$200]) SINUS SINUS = { fill( $200, 0) }
(const byte) SIZEOF_SIGNED_WORD SIZEOF_SIGNED_WORD = (byte) 2
(const byte) VIC_BMM VIC_BMM = (byte) $20
@ -190,7 +188,7 @@ interrupt(HARDWARE_CLOBBER)(void()) irq()
(label) main::toD0181
(byte*) main::toD0181_gfx
(byte) main::toD0181_return
(const byte) main::toD0181_return#0 toD0181_return = >(word)(const byte*) SCREEN#0&(word) $3fff*(byte) 4|>(word)(const byte*) BITMAP#0/(byte) 4&(byte) $f
(const byte) main::toD0181_return#0 toD0181_return = >(word)(const byte*) SCREEN&(word) $3fff*(byte) 4|>(word)(const byte*) BITMAP/(byte) 4&(byte) $f
(byte*) main::toD0181_screen
(word) main::x
(signed word) main::x#0 x zp ZP_WORD:32 0.8461538461538461

View File

@ -32,7 +32,7 @@ main::@1: scope:[main] from main::@4 main::@7
[12] if((byte) main::i#2!=(byte) 8) goto main::@2
to:main::@3
main::@3: scope:[main] from main::@1 main::@3
[13] *((const byte*) SCREEN#0+(word) $3e7) ← ++ *((const byte*) SCREEN#0+(word) $3e7)
[13] *((const byte*) SCREEN+(word) $3e7) ← ++ *((const byte*) SCREEN+(word) $3e7)
to:main::@3
main::@2: scope:[main] from main::@1
[14] (word~) main::$7 ← (word)*((const byte*) COSTAB#0 + (byte) main::a#2)
@ -208,7 +208,7 @@ bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@1
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
memset: scope:[memset] from bitmap_clear bitmap_clear::@1
[100] (byte) memset::c#4 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 )
[100] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 )
[100] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) SCREEN bitmap_clear::@1/(void*)(const byte*) BITMAP )
[100] (word) memset::num#2 ← phi( bitmap_clear/(word) $3e8 bitmap_clear::@1/(word) $1f40 )
[101] if((word) memset::num#2<=(byte) 0) goto memset::@return
to:memset::@1
@ -248,7 +248,7 @@ bitmap_init::@2: scope:[bitmap_init] from bitmap_init::@1 bitmap_init::@6
[117] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1
to:bitmap_init::@3
bitmap_init::@3: scope:[bitmap_init] from bitmap_init::@2 bitmap_init::@4
[118] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP#0 bitmap_init::@4/(byte*) bitmap_init::yoffs#4 )
[118] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP bitmap_init::@4/(byte*) bitmap_init::yoffs#4 )
[118] (byte) bitmap_init::y#2 ← phi( bitmap_init::@2/(byte) 0 bitmap_init::@4/(byte) bitmap_init::y#1 )
[119] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7
[120] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2

View File

@ -566,8 +566,8 @@ sgn_u16::@return: scope:[sgn_u16] from sgn_u16::@1 sgn_u16::@3
@46: scope:[] from @8
(byte*) bitmap_screen#19 ← phi( @8/(byte*) bitmap_screen#0 )
(byte*) bitmap_gfx#20 ← phi( @8/(byte*) bitmap_gfx#0 )
(byte*) BITMAP#0 ← ((byte*)) (number) $2000
(byte*) SCREEN#0 ← ((byte*)) (number) $400
(byte*) BITMAP ← ((byte*)) (number) $2000
(byte*) SCREEN ← ((byte*)) (number) $400
(byte[$180]) SINTAB ← kickasm {{ .fill $180, 99.5+99.5*sin(i*2*PI/256) }}
(byte*~) $0 ← (byte[$180]) SINTAB + (number) $40
(byte*) COSTAB#0 ← (byte*~) $0
@ -578,8 +578,8 @@ main: scope:[main] from @47
(byte*) COSTAB#9 ← phi( @47/(byte*) COSTAB#10 )
(byte*) bitmap_screen#12 ← phi( @47/(byte*) bitmap_screen#14 )
(byte*) bitmap_gfx#13 ← phi( @47/(byte*) bitmap_gfx#15 )
(byte*) bitmap_init::gfx#0 ← (byte*) BITMAP#0
(byte*) bitmap_init::screen#0 ← (byte*) SCREEN#0
(byte*) bitmap_init::gfx#0 ← (byte*) BITMAP
(byte*) bitmap_init::screen#0 ← (byte*) SCREEN
call bitmap_init
to:main::@14
main::@14: scope:[main] from main
@ -600,8 +600,8 @@ main::@15: scope:[main] from main::@14
(byte~) main::$3 ← (byte~) main::$2 | (byte) VIC_RSEL
(number~) main::$4 ← (byte~) main::$3 | (number) 3
*((byte*) D011) ← (number~) main::$4
(byte*) main::toD0181_screen#0 ← (byte*) SCREEN#0
(byte*) main::toD0181_gfx#0 ← (byte*) BITMAP#0
(byte*) main::toD0181_screen#0 ← (byte*) SCREEN
(byte*) main::toD0181_gfx#0 ← (byte*) BITMAP
to:main::toD0181
main::toD0181: scope:[main] from main::@15
(byte*) bitmap_screen#28 ← phi( main::@15/(byte*) bitmap_screen#29 )
@ -683,7 +683,7 @@ main::@7: scope:[main] from main::@1 main::@8
main::@8: scope:[main] from main::@7
(byte*) bitmap_screen#18 ← phi( main::@7/(byte*) bitmap_screen#13 )
(byte*) bitmap_gfx#19 ← phi( main::@7/(byte*) bitmap_gfx#14 )
(byte*~) main::$19 ← (byte*) SCREEN#0 + (number) $3e7
(byte*~) main::$19 ← (byte*) SCREEN + (number) $3e7
*((byte*~) main::$19) ← ++ *((byte*~) main::$19)
to:main::@7
main::@return: scope:[main] from main::@7
@ -716,7 +716,6 @@ SYMBOL TABLE SSA
(label) @begin
(label) @end
(byte*) BITMAP
(byte*) BITMAP#0
(byte) BLACK
(byte*) COSTAB
(byte*) COSTAB#0
@ -737,7 +736,6 @@ SYMBOL TABLE SSA
(const byte) RADIX::HEXADECIMAL = (number) $10
(const byte) RADIX::OCTAL = (number) 8
(byte*) SCREEN
(byte*) SCREEN#0
(byte[$180]) SINTAB
(byte) VIC_BMM
(byte) VIC_DEN
@ -1309,7 +1307,7 @@ Adding number conversion cast (unumber) main::$12 in (number~) main::$12 ← (wo
Adding number conversion cast (unumber) $20 in (number~) main::$13 ← (byte) main::a#2 + (number) $20
Adding number conversion cast (unumber) main::$13 in (number~) main::$13 ← (byte) main::a#2 + (unumber)(number) $20
Adding number conversion cast (unumber) $20 in (byte) main::a#1 ← (byte) main::a#3 + (number) $20
Adding number conversion cast (unumber) $3e7 in (byte*~) main::$19 ← (byte*) SCREEN#0 + (number) $3e7
Adding number conversion cast (unumber) $3e7 in (byte*~) main::$19 ← (byte*) SCREEN + (number) $3e7
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) D011 ← (byte*)(number) $d011
Inlining cast (byte) VIC_BMM ← (unumber)(number) $20
@ -1329,8 +1327,8 @@ Inlining cast (byte~) bitmap_line::$13 ← (byte)(word) bitmap_line::y#7
Inlining cast (byte~) bitmap_line::$24 ← (byte)(word) bitmap_line::y#8
Inlining cast (word) sgn_u16::return#2 ← (unumber)(number) -1
Inlining cast (word) sgn_u16::return#3 ← (unumber)(number) 1
Inlining cast (byte*) BITMAP#0 ← (byte*)(number) $2000
Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400
Inlining cast (byte*) BITMAP ← (byte*)(number) $2000
Inlining cast (byte*) SCREEN ← (byte*)(number) $400
Inlining cast (word~) main::toD0181_$0 ← (word)(byte*) main::toD0181_screen#1
Inlining cast (word~) main::toD0181_$4 ← (word)(byte*) main::toD0181_gfx#1
Inlining cast (byte) main::i#0 ← (unumber)(number) 0
@ -1662,18 +1660,18 @@ Constant (const byte) memset::c#1 = 0
Constant (const word) memset::num#1 = $1f40
Constant (const word) sgn_u16::return#2 = -1
Constant (const word) sgn_u16::return#3 = 1
Constant (const byte*) BITMAP#0 = (byte*) 8192
Constant (const byte*) SCREEN#0 = (byte*) 1024
Constant (const byte*) BITMAP = (byte*) 8192
Constant (const byte*) SCREEN = (byte*) 1024
Constant (const byte[$180]) SINTAB = kickasm {{ .fill $180, 99.5+99.5*sin(i*2*PI/256) }}
Constant (const byte) main::i#0 = 0
Constant (const byte) main::a#0 = 0
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte*) bitmap_init::gfx#0 = BITMAP#0
Constant (const byte*) bitmap_init::screen#0 = SCREEN#0
Constant (const byte*) bitmap_init::gfx#0 = BITMAP
Constant (const byte*) bitmap_init::screen#0 = SCREEN
Constant (const byte) bitmap_clear::bgcol#0 = BLACK
Constant (const byte) bitmap_clear::fgcol#0 = WHITE
Constant (const byte*) main::toD0181_screen#0 = SCREEN#0
Constant (const byte*) main::toD0181_gfx#0 = BITMAP#0
Constant (const byte*) main::toD0181_screen#0 = SCREEN
Constant (const byte*) main::toD0181_gfx#0 = BITMAP
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte*) bitmap_gfx#1 = bitmap_init::gfx#0
Constant (const byte*) bitmap_screen#1 = bitmap_init::screen#0
@ -1723,7 +1721,7 @@ Successful SSA optimization Pass2ConditionalJumpSequenceImprovement
Constant right-side identified [31] (byte) bitmap_clear::col#0 ← (const byte) bitmap_clear::fgcol#0 * (byte) $10
Constant right-side identified [112] (byte*) COSTAB#0 ← (const byte[$180]) SINTAB + (byte) $40
Constant right-side identified [115] (byte~) main::$2 ← (const byte) VIC_BMM | (const byte) VIC_DEN
Constant right-side identified [142] (byte*~) main::$19 ← (const byte*) SCREEN#0 + (word) $3e7
Constant right-side identified [142] (byte*~) main::$19 ← (const byte*) SCREEN + (word) $3e7
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) bitmap_clear::col#0 = bitmap_clear::fgcol#0*$10
Constant (const void*) memset::str#0 = (void*)bitmap_screen#1
@ -1732,7 +1730,7 @@ Constant (const byte*) COSTAB#0 = SINTAB+$40
Constant (const byte) main::$2 = VIC_BMM|VIC_DEN
Constant (const word) main::toD0181_$0 = (word)main::toD0181_screen#0
Constant (const word) main::toD0181_$4 = (word)main::toD0181_gfx#0
Constant (const byte*) main::$19 = SCREEN#0+$3e7
Constant (const byte*) main::$19 = SCREEN+$3e7
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte) memset::c#0 = bitmap_clear::col#0
Successful SSA optimization Pass2ConstantIdentification
@ -1784,32 +1782,32 @@ Inlining constant with var siblings (const word) sgn_u16::return#2
Inlining constant with var siblings (const word) sgn_u16::return#3
Inlining constant with var siblings (const byte) main::i#0
Inlining constant with var siblings (const byte) main::a#0
Constant inlined bitmap_init::screen#0 = (const byte*) SCREEN#0
Constant inlined main::toD0181_screen#0 = (const byte*) SCREEN#0
Constant inlined main::toD0181_gfx#0 = (const byte*) BITMAP#0
Constant inlined bitmap_init::gfx#0 = (const byte*) BITMAP#0
Constant inlined bitmap_init::screen#0 = (const byte*) SCREEN
Constant inlined main::toD0181_screen#0 = (const byte*) SCREEN
Constant inlined main::toD0181_gfx#0 = (const byte*) BITMAP
Constant inlined bitmap_init::gfx#0 = (const byte*) BITMAP
Constant inlined memset::num#1 = (word) $1f40
Constant inlined memset::num#0 = (word) $3e8
Constant inlined bitmap_init::bits#0 = (byte) $80
Constant inlined bitmap_init::bits#2 = (byte) $80
Constant inlined main::a#0 = (byte) 0
Constant inlined main::$19 = (const byte*) SCREEN#0+(word) $3e7
Constant inlined main::$19 = (const byte*) SCREEN+(word) $3e7
Constant inlined sgn_u16::return#3 = (byte) 1
Constant inlined main::i#0 = (byte) 0
Constant inlined sgn_u16::return#2 = (byte) -1
Constant inlined memset::str#1 = (void*)(const byte*) BITMAP#0
Constant inlined memset::str#0 = (void*)(const byte*) SCREEN#0
Constant inlined main::toD0181_$7 = >(word)(const byte*) BITMAP#0/(byte) 4&(byte) $f
Constant inlined main::toD0181_$2 = (word)(const byte*) SCREEN#0&(word) $3fff*(byte) 4
Constant inlined main::toD0181_$1 = (word)(const byte*) SCREEN#0&(word) $3fff
Constant inlined bitmap_gfx#1 = (const byte*) BITMAP#0
Constant inlined main::toD0181_$0 = (word)(const byte*) SCREEN#0
Constant inlined memset::str#1 = (void*)(const byte*) BITMAP
Constant inlined memset::str#0 = (void*)(const byte*) SCREEN
Constant inlined main::toD0181_$7 = >(word)(const byte*) BITMAP/(byte) 4&(byte) $f
Constant inlined main::toD0181_$2 = (word)(const byte*) SCREEN&(word) $3fff*(byte) 4
Constant inlined main::toD0181_$1 = (word)(const byte*) SCREEN&(word) $3fff
Constant inlined bitmap_gfx#1 = (const byte*) BITMAP
Constant inlined main::toD0181_$0 = (word)(const byte*) SCREEN
Constant inlined bitmap_clear::fgcol#0 = (const byte) WHITE
Constant inlined main::toD0181_$6 = >(word)(const byte*) BITMAP#0/(byte) 4
Constant inlined main::toD0181_$5 = >(word)(const byte*) BITMAP#0
Constant inlined main::toD0181_$4 = (word)(const byte*) BITMAP#0
Constant inlined main::toD0181_$3 = >(word)(const byte*) SCREEN#0&(word) $3fff*(byte) 4
Constant inlined bitmap_screen#1 = (const byte*) SCREEN#0
Constant inlined main::toD0181_$6 = >(word)(const byte*) BITMAP/(byte) 4
Constant inlined main::toD0181_$5 = >(word)(const byte*) BITMAP
Constant inlined main::toD0181_$4 = (word)(const byte*) BITMAP
Constant inlined main::toD0181_$3 = >(word)(const byte*) SCREEN&(word) $3fff*(byte) 4
Constant inlined bitmap_screen#1 = (const byte*) SCREEN
Constant inlined main::$2 = (const byte) VIC_BMM|(const byte) VIC_DEN
Constant inlined bitmap_init::y#0 = (byte) 0
Constant inlined main::$3 = (const byte) VIC_BMM|(const byte) VIC_DEN|(const byte) VIC_RSEL
@ -2007,7 +2005,7 @@ main::@1: scope:[main] from main::@4 main::@7
[12] if((byte) main::i#2!=(byte) 8) goto main::@2
to:main::@3
main::@3: scope:[main] from main::@1 main::@3
[13] *((const byte*) SCREEN#0+(word) $3e7) ← ++ *((const byte*) SCREEN#0+(word) $3e7)
[13] *((const byte*) SCREEN+(word) $3e7) ← ++ *((const byte*) SCREEN+(word) $3e7)
to:main::@3
main::@2: scope:[main] from main::@1
[14] (word~) main::$7 ← (word)*((const byte*) COSTAB#0 + (byte) main::a#2)
@ -2183,7 +2181,7 @@ bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@1
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
memset: scope:[memset] from bitmap_clear bitmap_clear::@1
[100] (byte) memset::c#4 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 )
[100] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 )
[100] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) SCREEN bitmap_clear::@1/(void*)(const byte*) BITMAP )
[100] (word) memset::num#2 ← phi( bitmap_clear/(word) $3e8 bitmap_clear::@1/(word) $1f40 )
[101] if((word) memset::num#2<=(byte) 0) goto memset::@return
to:memset::@1
@ -2223,7 +2221,7 @@ bitmap_init::@2: scope:[bitmap_init] from bitmap_init::@1 bitmap_init::@6
[117] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1
to:bitmap_init::@3
bitmap_init::@3: scope:[bitmap_init] from bitmap_init::@2 bitmap_init::@4
[118] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP#0 bitmap_init::@4/(byte*) bitmap_init::yoffs#4 )
[118] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP bitmap_init::@4/(byte*) bitmap_init::yoffs#4 )
[118] (byte) bitmap_init::y#2 ← phi( bitmap_init::@2/(byte) 0 bitmap_init::@4/(byte) bitmap_init::y#1 )
[119] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7
[120] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2
@ -2247,9 +2245,7 @@ bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@4
VARIABLE REGISTER WEIGHTS
(byte*) BITMAP
(byte*) COSTAB
(byte*) SCREEN
(word()) abs_u16((word) abs_u16::w)
(byte~) abs_u16::$0 4.0
(byte~) abs_u16::$1 4.0
@ -2613,7 +2609,7 @@ main: {
jmp b3
// main::@3
b3:
// [13] *((const byte*) SCREEN#0+(word) $3e7) ← ++ *((const byte*) SCREEN#0+(word) $3e7) -- _deref_pbuc1=_inc__deref_pbuc1
// [13] *((const byte*) SCREEN+(word) $3e7) ← ++ *((const byte*) SCREEN+(word) $3e7) -- _deref_pbuc1=_inc__deref_pbuc1
inc SCREEN+$3e7
jmp b3
// main::@2
@ -3206,7 +3202,7 @@ bitmap_clear: {
// [100] phi (byte) memset::c#4 = (const byte) bitmap_clear::col#0 [phi:bitmap_clear->memset#0] -- vbuz1=vbuc1
lda #col
sta.z memset.c
// [100] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#1] -- pvoz1=pvoc1
// [100] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN [phi:bitmap_clear->memset#1] -- pvoz1=pvoc1
lda #<SCREEN
sta.z memset.str
lda #>SCREEN
@ -3228,7 +3224,7 @@ bitmap_clear: {
// [100] phi (byte) memset::c#4 = (byte) 0 [phi:bitmap_clear::@1->memset#0] -- vbuz1=vbuc1
lda #0
sta.z memset.c
// [100] phi (void*) memset::str#3 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#1] -- pvoz1=pvoc1
// [100] phi (void*) memset::str#3 = (void*)(const byte*) BITMAP [phi:bitmap_clear::@1->memset#1] -- pvoz1=pvoc1
lda #<BITMAP
sta.z memset.str
lda #>BITMAP
@ -3370,7 +3366,7 @@ bitmap_init: {
bne b1_from_b2
// [118] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3]
b3_from_b2:
// [118] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1
// [118] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1
lda #<BITMAP
sta.z yoffs
lda #>BITMAP
@ -3844,7 +3840,7 @@ main: {
jmp b3
// main::@3
b3:
// [13] *((const byte*) SCREEN#0+(word) $3e7) ← ++ *((const byte*) SCREEN#0+(word) $3e7) -- _deref_pbuc1=_inc__deref_pbuc1
// [13] *((const byte*) SCREEN+(word) $3e7) ← ++ *((const byte*) SCREEN+(word) $3e7) -- _deref_pbuc1=_inc__deref_pbuc1
inc SCREEN+$3e7
jmp b3
// main::@2
@ -4374,7 +4370,7 @@ bitmap_clear: {
memset_from_bitmap_clear:
// [100] phi (byte) memset::c#4 = (const byte) bitmap_clear::col#0 [phi:bitmap_clear->memset#0] -- vbuxx=vbuc1
ldx #col
// [100] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#1] -- pvoz1=pvoc1
// [100] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN [phi:bitmap_clear->memset#1] -- pvoz1=pvoc1
lda #<SCREEN
sta.z memset.str
lda #>SCREEN
@ -4395,7 +4391,7 @@ bitmap_clear: {
memset_from_b1:
// [100] phi (byte) memset::c#4 = (byte) 0 [phi:bitmap_clear::@1->memset#0] -- vbuxx=vbuc1
ldx #0
// [100] phi (void*) memset::str#3 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#1] -- pvoz1=pvoc1
// [100] phi (void*) memset::str#3 = (void*)(const byte*) BITMAP [phi:bitmap_clear::@1->memset#1] -- pvoz1=pvoc1
lda #<BITMAP
sta.z memset.str
lda #>BITMAP
@ -4519,7 +4515,7 @@ bitmap_init: {
bne b1_from_b2
// [118] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3]
b3_from_b2:
// [118] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1
// [118] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1
lda #<BITMAP
sta.z yoffs
lda #>BITMAP
@ -4751,8 +4747,7 @@ FINAL SYMBOL TABLE
(label) @1
(label) @begin
(label) @end
(byte*) BITMAP
(const byte*) BITMAP#0 BITMAP = (byte*) 8192
(const byte*) BITMAP BITMAP = (byte*) 8192
(byte*) COSTAB
(const byte*) COSTAB#0 COSTAB = (const byte[$180]) SINTAB+(byte) $40
(const byte*) D011 D011 = (byte*) 53265
@ -4761,8 +4756,7 @@ FINAL SYMBOL TABLE
(const byte) RADIX::DECIMAL DECIMAL = (number) $a
(const byte) RADIX::HEXADECIMAL HEXADECIMAL = (number) $10
(const byte) RADIX::OCTAL OCTAL = (number) 8
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = (byte*) 1024
(const byte*) SCREEN SCREEN = (byte*) 1024
(const byte[$180]) SINTAB SINTAB = kickasm {{ .fill $180, 99.5+99.5*sin(i*2*PI/256) }}
(const byte) VIC_BMM VIC_BMM = (byte) $20
(const byte) VIC_DEN VIC_DEN = (byte) $10
@ -4922,7 +4916,7 @@ FINAL SYMBOL TABLE
(label) main::toD0181
(byte*) main::toD0181_gfx
(byte) main::toD0181_return
(const byte) main::toD0181_return#0 toD0181_return = >(word)(const byte*) SCREEN#0&(word) $3fff*(byte) 4|>(word)(const byte*) BITMAP#0/(byte) 4&(byte) $f
(const byte) main::toD0181_return#0 toD0181_return = >(word)(const byte*) SCREEN&(word) $3fff*(byte) 4|>(word)(const byte*) BITMAP/(byte) 4&(byte) $f
(byte*) main::toD0181_screen
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
(label) memset::@1
@ -5057,7 +5051,7 @@ main: {
// main::@3
b3:
// (*(SCREEN+999))++;
// [13] *((const byte*) SCREEN#0+(word) $3e7) ← ++ *((const byte*) SCREEN#0+(word) $3e7) -- _deref_pbuc1=_inc__deref_pbuc1
// [13] *((const byte*) SCREEN+(word) $3e7) ← ++ *((const byte*) SCREEN+(word) $3e7) -- _deref_pbuc1=_inc__deref_pbuc1
inc SCREEN+$3e7
jmp b3
// main::@2
@ -5578,7 +5572,7 @@ bitmap_clear: {
// [100] phi from bitmap_clear to memset [phi:bitmap_clear->memset]
// [100] phi (byte) memset::c#4 = (const byte) bitmap_clear::col#0 [phi:bitmap_clear->memset#0] -- vbuxx=vbuc1
ldx #col
// [100] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#1] -- pvoz1=pvoc1
// [100] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN [phi:bitmap_clear->memset#1] -- pvoz1=pvoc1
lda #<SCREEN
sta.z memset.str
lda #>SCREEN
@ -5596,7 +5590,7 @@ bitmap_clear: {
// [100] phi from bitmap_clear::@1 to memset [phi:bitmap_clear::@1->memset]
// [100] phi (byte) memset::c#4 = (byte) 0 [phi:bitmap_clear::@1->memset#0] -- vbuxx=vbuc1
ldx #0
// [100] phi (void*) memset::str#3 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#1] -- pvoz1=pvoc1
// [100] phi (void*) memset::str#3 = (void*)(const byte*) BITMAP [phi:bitmap_clear::@1->memset#1] -- pvoz1=pvoc1
lda #<BITMAP
sta.z memset.str
lda #>BITMAP
@ -5711,7 +5705,7 @@ bitmap_init: {
cpx #0
bne b1
// [118] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3]
// [118] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1
// [118] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1
lda #<BITMAP
sta.z yoffs
lda #>BITMAP

View File

@ -1,8 +1,7 @@
(label) @1
(label) @begin
(label) @end
(byte*) BITMAP
(const byte*) BITMAP#0 BITMAP = (byte*) 8192
(const byte*) BITMAP BITMAP = (byte*) 8192
(byte*) COSTAB
(const byte*) COSTAB#0 COSTAB = (const byte[$180]) SINTAB+(byte) $40
(const byte*) D011 D011 = (byte*) 53265
@ -11,8 +10,7 @@
(const byte) RADIX::DECIMAL DECIMAL = (number) $a
(const byte) RADIX::HEXADECIMAL HEXADECIMAL = (number) $10
(const byte) RADIX::OCTAL OCTAL = (number) 8
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = (byte*) 1024
(const byte*) SCREEN SCREEN = (byte*) 1024
(const byte[$180]) SINTAB SINTAB = kickasm {{ .fill $180, 99.5+99.5*sin(i*2*PI/256) }}
(const byte) VIC_BMM VIC_BMM = (byte) $20
(const byte) VIC_DEN VIC_DEN = (byte) $10
@ -172,7 +170,7 @@
(label) main::toD0181
(byte*) main::toD0181_gfx
(byte) main::toD0181_return
(const byte) main::toD0181_return#0 toD0181_return = >(word)(const byte*) SCREEN#0&(word) $3fff*(byte) 4|>(word)(const byte*) BITMAP#0/(byte) 4&(byte) $f
(const byte) main::toD0181_return#0 toD0181_return = >(word)(const byte*) SCREEN&(word) $3fff*(byte) 4|>(word)(const byte*) BITMAP/(byte) 4&(byte) $f
(byte*) main::toD0181_screen
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
(label) memset::@1

View File

@ -10,10 +10,10 @@
(void()) main()
main: scope:[main] from @1
[4] *((const byte*) BGCOL#0) ← (byte) 0
[5] *((const byte*) FGCOL#0) ← (byte) 0
[6] *((const byte*) D011#0) ← (const byte) BMM#0|(const byte) DEN#0|(const byte) RSEL#0|(byte) 3
[7] *((const byte*) D018#0) ← (byte)(word)(const byte*) SCREEN#0/(byte) $40|(word)(const byte*) BITMAP/(word) $400
[4] *((const byte*) BGCOL) ← (byte) 0
[5] *((const byte*) FGCOL) ← (byte) 0
[6] *((const byte*) D011) ← (const byte) BMM|(const byte) DEN|(const byte) RSEL|(byte) 3
[7] *((const byte*) D018) ← (byte)(word)(const byte*) SCREEN/(byte) $40|(word)(const byte*) BITMAP/(word) $400
[8] call init_screen
to:main::@3
main::@3: scope:[main] from main
@ -21,14 +21,14 @@ main::@3: scope:[main] from main
[10] call init_plot_tables
to:main::@1
main::@1: scope:[main] from main::@1 main::@3 main::@4
[11] if(*((const byte*) RASTER#0)!=(byte) $ff) goto main::@1
[11] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@1
to:main::@2
main::@2: scope:[main] from main::@1
[12] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0)
[12] *((const byte*) BGCOL) ← ++ *((const byte*) BGCOL)
[13] call plots
to:main::@4
main::@4: scope:[main] from main::@2
[14] *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0)
[14] *((const byte*) BGCOL) ← -- *((const byte*) BGCOL)
to:main::@1
(void()) plots()
@ -37,7 +37,7 @@ plots: scope:[plots] from main::@2
to:plots::@1
plots::@1: scope:[plots] from plots plots::@3
[16] (byte) plots::i#2 ← phi( plots/(byte) 0 plots::@3/(byte) plots::i#1 )
[17] if((byte) plots::i#2<(const byte) plots_cnt#0) goto plots::@2
[17] if((byte) plots::i#2<(const byte) plots_cnt) goto plots::@2
to:plots::@return
plots::@return: scope:[plots] from plots::@1
[18] return
@ -123,8 +123,8 @@ init_screen::@1: scope:[init_screen] from init_screen init_screen::@2
[62] if((byte*) init_screen::b#2!=(const byte*) BITMAP+(word) $2000) goto init_screen::@2
to:init_screen::@3
init_screen::@3: scope:[init_screen] from init_screen::@1 init_screen::@4
[63] (byte*) init_screen::c#2 ← phi( init_screen::@1/(const byte*) SCREEN#0 init_screen::@4/(byte*) init_screen::c#1 )
[64] if((byte*) init_screen::c#2!=(const byte*) SCREEN#0+(word) $400) goto init_screen::@4
[63] (byte*) init_screen::c#2 ← phi( init_screen::@1/(const byte*) SCREEN init_screen::@4/(byte*) init_screen::c#1 )
[64] if((byte*) init_screen::c#2!=(const byte*) SCREEN+(word) $400) goto init_screen::@4
to:init_screen::@return
init_screen::@return: scope:[init_screen] from init_screen::@3
[65] return

View File

@ -33,33 +33,33 @@ Culled Empty Block (label) init_screen::@12
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
(byte*) D011#0 ← ((byte*)) (number) $d011
(byte) BMM#0 ← (number) $20
(byte) DEN#0 ← (number) $10
(byte) RSEL#0 ← (number) 8
(byte*) RASTER#0 ← ((byte*)) (number) $d012
(byte*) D018#0 ← ((byte*)) (number) $d018
(byte*) BGCOL#0 ← ((byte*)) (number) $d020
(byte*) FGCOL#0 ← ((byte*)) (number) $d021
(byte*) SCREEN#0 ← ((byte*)) (number) $400
(byte*) D011 ← ((byte*)) (number) $d011
(byte) BMM ← (number) $20
(byte) DEN ← (number) $10
(byte) RSEL ← (number) 8
(byte*) RASTER ← ((byte*)) (number) $d012
(byte*) D018 ← ((byte*)) (number) $d018
(byte*) BGCOL ← ((byte*)) (number) $d020
(byte*) FGCOL ← ((byte*)) (number) $d021
(byte*) SCREEN ← ((byte*)) (number) $400
(byte*) BITMAP ← ((byte*)) (number) $2000
to:@1
(void()) main()
main: scope:[main] from @5
*((byte*) BGCOL#0) ← (number) 0
*((byte*) FGCOL#0) ← (number) 0
(byte~) main::$0 ← (byte) BMM#0 | (byte) DEN#0
(byte~) main::$1 ← (byte~) main::$0 | (byte) RSEL#0
*((byte*) BGCOL) ← (number) 0
*((byte*) FGCOL) ← (number) 0
(byte~) main::$0 ← (byte) BMM | (byte) DEN
(byte~) main::$1 ← (byte~) main::$0 | (byte) RSEL
(number~) main::$2 ← (byte~) main::$1 | (number) 3
*((byte*) D011#0) ← (number~) main::$2
(word~) main::$3 ← ((word)) (byte*) SCREEN#0
*((byte*) D011) ← (number~) main::$2
(word~) main::$3 ← ((word)) (byte*) SCREEN
(number~) main::$4 ← (word~) main::$3 / (number) $40
(word~) main::$5 ← ((word)) (byte*) BITMAP
(number~) main::$6 ← (word~) main::$5 / (number) $400
(number~) main::$7 ← (number~) main::$4 | (number~) main::$6
(byte~) main::$8 ← ((byte)) (number~) main::$7
*((byte*) D018#0) ← (byte~) main::$8
*((byte*) D018) ← (byte~) main::$8
call init_screen
to:main::@5
main::@5: scope:[main] from main
@ -68,15 +68,15 @@ main::@5: scope:[main] from main
main::@6: scope:[main] from main::@5
to:main::@2
main::@2: scope:[main] from main::@2 main::@6 main::@7
(bool~) main::$11 ← *((byte*) RASTER#0) != (number) $ff
(bool~) main::$11 ← *((byte*) RASTER) != (number) $ff
if((bool~) main::$11) goto main::@2
to:main::@3
main::@3: scope:[main] from main::@2
*((byte*) BGCOL#0) ← ++ *((byte*) BGCOL#0)
*((byte*) BGCOL) ← ++ *((byte*) BGCOL)
call plots
to:main::@7
main::@7: scope:[main] from main::@3
*((byte*) BGCOL#0) ← -- *((byte*) BGCOL#0)
*((byte*) BGCOL) ← -- *((byte*) BGCOL)
if(true) goto main::@2
to:main::@return
main::@return: scope:[main] from main::@7
@ -85,7 +85,7 @@ main::@return: scope:[main] from main::@7
@1: scope:[] from @begin
(byte[]) plots_x ← { (number) $3c, (number) $50, (number) $6e, (number) $50, (number) $3c, (number) $28, (number) $a, (number) $28 }
(byte[]) plots_y ← { (number) $a, (number) $28, (number) $3c, (number) $50, (number) $6e, (number) $50, (number) $3c, (number) $28 }
(byte) plots_cnt#0 ← (number) 8
(byte) plots_cnt ← (number) 8
to:@2
(void()) plots()
@ -94,7 +94,7 @@ plots: scope:[plots] from main::@3
to:plots::@1
plots::@1: scope:[plots] from plots plots::@7
(byte) plots::i#2 ← phi( plots/(byte) plots::i#0 plots::@7/(byte) plots::i#1 )
(bool~) plots::$0 ← (byte) plots::i#2 < (byte) plots_cnt#0
(bool~) plots::$0 ← (byte) plots::i#2 < (byte) plots_cnt
if((bool~) plots::$0) goto plots::@2
to:plots::@return
plots::@2: scope:[plots] from plots::@1
@ -222,11 +222,11 @@ init_screen::@2: scope:[init_screen] from init_screen::@1
(byte*) init_screen::b#1 ← ++ (byte*) init_screen::b#3
to:init_screen::@1
init_screen::@3: scope:[init_screen] from init_screen::@1
(byte*) init_screen::c#0 ← (byte*) SCREEN#0
(byte*) init_screen::c#0 ← (byte*) SCREEN
to:init_screen::@7
init_screen::@7: scope:[init_screen] from init_screen::@3 init_screen::@8
(byte*) init_screen::c#2 ← phi( init_screen::@3/(byte*) init_screen::c#0 init_screen::@8/(byte*) init_screen::c#1 )
(byte*~) init_screen::$2 ← (byte*) SCREEN#0 + (number) $400
(byte*~) init_screen::$2 ← (byte*) SCREEN + (number) $400
(bool~) init_screen::$3 ← (byte*) init_screen::c#2 != (byte*~) init_screen::$2
if((bool~) init_screen::$3) goto init_screen::@8
to:init_screen::@return
@ -253,24 +253,15 @@ SYMBOL TABLE SSA
(label) @begin
(label) @end
(byte*) BGCOL
(byte*) BGCOL#0
(byte*) BITMAP
(byte) BMM
(byte) BMM#0
(byte*) D011
(byte*) D011#0
(byte*) D018
(byte*) D018#0
(byte) DEN
(byte) DEN#0
(byte*) FGCOL
(byte*) FGCOL#0
(byte*) RASTER
(byte*) RASTER#0
(byte) RSEL
(byte) RSEL#0
(byte*) SCREEN
(byte*) SCREEN#0
(void()) init_plot_tables()
(number~) init_plot_tables::$0
(byte~) init_plot_tables::$1
@ -399,15 +390,14 @@ SYMBOL TABLE SSA
(byte) plots::i#3
(byte) plots::i#4
(byte) plots_cnt
(byte) plots_cnt#0
(byte[]) plots_x
(byte[]) plots_y
Adding number conversion cast (unumber) $20 in (byte) BMM#0 ← (number) $20
Adding number conversion cast (unumber) $10 in (byte) DEN#0 ← (number) $10
Adding number conversion cast (unumber) 8 in (byte) RSEL#0 ← (number) 8
Adding number conversion cast (unumber) 0 in *((byte*) BGCOL#0) ← (number) 0
Adding number conversion cast (unumber) 0 in *((byte*) FGCOL#0) ← (number) 0
Adding number conversion cast (unumber) $20 in (byte) BMM ← (number) $20
Adding number conversion cast (unumber) $10 in (byte) DEN ← (number) $10
Adding number conversion cast (unumber) 8 in (byte) RSEL ← (number) 8
Adding number conversion cast (unumber) 0 in *((byte*) BGCOL) ← (number) 0
Adding number conversion cast (unumber) 0 in *((byte*) FGCOL) ← (number) 0
Adding number conversion cast (unumber) 3 in (number~) main::$2 ← (byte~) main::$1 | (number) 3
Adding number conversion cast (unumber) main::$2 in (number~) main::$2 ← (byte~) main::$1 | (unumber)(number) 3
Adding number conversion cast (unumber) $40 in (number~) main::$4 ← (word~) main::$3 / (number) $40
@ -415,8 +405,8 @@ Adding number conversion cast (unumber) main::$4 in (number~) main::$4 ← (word
Adding number conversion cast (unumber) $400 in (number~) main::$6 ← (word~) main::$5 / (number) $400
Adding number conversion cast (unumber) main::$6 in (number~) main::$6 ← (word~) main::$5 / (unumber)(number) $400
Adding number conversion cast (unumber) main::$7 in (number~) main::$7 ← (unumber~) main::$4 | (unumber~) main::$6
Adding number conversion cast (unumber) $ff in (bool~) main::$11 ← *((byte*) RASTER#0) != (number) $ff
Adding number conversion cast (unumber) 8 in (byte) plots_cnt#0 ← (number) 8
Adding number conversion cast (unumber) $ff in (bool~) main::$11 ← *((byte*) RASTER) != (number) $ff
Adding number conversion cast (unumber) 8 in (byte) plots_cnt ← (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
@ -435,28 +425,28 @@ Adding number conversion cast (unumber) 7 in (bool~) init_plot_tables::$11 ← (
Adding number conversion cast (unumber) $28*8 in (byte*~) init_plot_tables::$13 ← (byte*) init_plot_tables::yoffs#3 + (number) $28*(number) 8
Adding number conversion cast (unumber) $2000 in (byte*~) init_screen::$0 ← (byte*) BITMAP + (number) $2000
Adding number conversion cast (unumber) 0 in *((byte*) init_screen::b#3) ← (number) 0
Adding number conversion cast (unumber) $400 in (byte*~) init_screen::$2 ← (byte*) SCREEN#0 + (number) $400
Adding number conversion cast (unumber) $400 in (byte*~) init_screen::$2 ← (byte*) SCREEN + (number) $400
Adding number conversion cast (unumber) $14 in *((byte*) init_screen::c#3) ← (number) $14
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (byte[]) plots_x ← (byte[]){ (byte)(number) $3c, (byte)(number) $50, (byte)(number) $6e, (byte)(number) $50, (byte)(number) $3c, (byte)(number) $28, (byte)(number) $a, (byte)(number) $28 }
Added casts to value list in (byte[]) plots_y ← (byte[]){ (byte)(number) $a, (byte)(number) $28, (byte)(number) $3c, (byte)(number) $50, (byte)(number) $6e, (byte)(number) $50, (byte)(number) $3c, (byte)(number) $28 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (byte*) D011#0 ← (byte*)(number) $d011
Inlining cast (byte) BMM#0 ← (unumber)(number) $20
Inlining cast (byte) DEN#0 ← (unumber)(number) $10
Inlining cast (byte) RSEL#0 ← (unumber)(number) 8
Inlining cast (byte*) RASTER#0 ← (byte*)(number) $d012
Inlining cast (byte*) D018#0 ← (byte*)(number) $d018
Inlining cast (byte*) BGCOL#0 ← (byte*)(number) $d020
Inlining cast (byte*) FGCOL#0 ← (byte*)(number) $d021
Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400
Inlining cast (byte*) D011 ← (byte*)(number) $d011
Inlining cast (byte) BMM ← (unumber)(number) $20
Inlining cast (byte) DEN ← (unumber)(number) $10
Inlining cast (byte) RSEL ← (unumber)(number) 8
Inlining cast (byte*) RASTER ← (byte*)(number) $d012
Inlining cast (byte*) D018 ← (byte*)(number) $d018
Inlining cast (byte*) BGCOL ← (byte*)(number) $d020
Inlining cast (byte*) FGCOL ← (byte*)(number) $d021
Inlining cast (byte*) SCREEN ← (byte*)(number) $400
Inlining cast (byte*) BITMAP ← (byte*)(number) $2000
Inlining cast *((byte*) BGCOL#0) ← (unumber)(number) 0
Inlining cast *((byte*) FGCOL#0) ← (unumber)(number) 0
Inlining cast (word~) main::$3 ← (word)(byte*) SCREEN#0
Inlining cast *((byte*) BGCOL) ← (unumber)(number) 0
Inlining cast *((byte*) FGCOL) ← (unumber)(number) 0
Inlining cast (word~) main::$3 ← (word)(byte*) SCREEN
Inlining cast (word~) main::$5 ← (word)(byte*) BITMAP
Inlining cast (byte~) main::$8 ← (byte)(unumber~) main::$7
Inlining cast (byte) plots_cnt#0 ← (unumber)(number) 8
Inlining cast (byte) plots_cnt ← (unumber)(number) 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
@ -571,8 +561,8 @@ Identical Phi Values (byte) plot::y#1 (byte) plot::y#0
Successful SSA optimization Pass2IdenticalPhiElimination
Identified duplicate assignment right side [95] (byte~) init_plot_tables::$10 ← (byte) init_plot_tables::y#2 & (byte) 7
Successful SSA optimization Pass2DuplicateRValueIdentification
Simple Condition (bool~) main::$11 [26] if(*((byte*) RASTER#0)!=(byte) $ff) goto main::@2
Simple Condition (bool~) plots::$0 [38] if((byte) plots::i#2<(byte) plots_cnt#0) goto plots::@2
Simple Condition (bool~) main::$11 [26] if(*((byte*) RASTER)!=(byte) $ff) goto main::@2
Simple Condition (bool~) plots::$0 [38] if((byte) plots::i#2<(byte) plots_cnt) goto plots::@2
Simple Condition (bool~) init_plot_tables::$4 [79] if((byte) init_plot_tables::bits#1!=(byte) 0) goto init_plot_tables::@2
Simple Condition (bool~) init_plot_tables::$5 [83] if((byte) init_plot_tables::x#1!=rangelast(0,$ff)) goto init_plot_tables::@1
Simple Condition (bool~) init_plot_tables::$12 [98] if((byte~) init_plot_tables::$10!=(byte) 7) goto init_plot_tables::@6
@ -589,19 +579,19 @@ Successful SSA optimization Pass2ConstantRValueConsolidation
Identified constant from value list (byte[]) { (byte) $3c, (byte) $50, (byte) $6e, (byte) $50, (byte) $3c, (byte) $28, (byte) $a, (byte) $28 }
Identified constant from value list (byte[]) { (byte) $a, (byte) $28, (byte) $3c, (byte) $50, (byte) $6e, (byte) $50, (byte) $3c, (byte) $28 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const byte*) D011#0 = (byte*) 53265
Constant (const byte) BMM#0 = $20
Constant (const byte) DEN#0 = $10
Constant (const byte) RSEL#0 = 8
Constant (const byte*) RASTER#0 = (byte*) 53266
Constant (const byte*) D018#0 = (byte*) 53272
Constant (const byte*) BGCOL#0 = (byte*) 53280
Constant (const byte*) FGCOL#0 = (byte*) 53281
Constant (const byte*) SCREEN#0 = (byte*) 1024
Constant (const byte*) D011 = (byte*) 53265
Constant (const byte) BMM = $20
Constant (const byte) DEN = $10
Constant (const byte) RSEL = 8
Constant (const byte*) RASTER = (byte*) 53266
Constant (const byte*) D018 = (byte*) 53272
Constant (const byte*) BGCOL = (byte*) 53280
Constant (const byte*) FGCOL = (byte*) 53281
Constant (const byte*) SCREEN = (byte*) 1024
Constant (const byte*) BITMAP = (byte*) 8192
Constant (const byte[]) plots_x = { $3c, $50, $6e, $50, $3c, $28, $a, $28 }
Constant (const byte[]) plots_y = { $a, $28, $3c, $50, $6e, $50, $3c, $28 }
Constant (const byte) plots_cnt#0 = 8
Constant (const byte) plots_cnt = 8
Constant (const byte) plots::i#0 = 0
Constant (const byte[$100]) plot_xlo = { fill( $100, 0) }
Constant (const byte[$100]) plot_xhi = { fill( $100, 0) }
@ -617,9 +607,9 @@ Constant (const byte*) init_plot_tables::yoffs#0 = (byte*) 0
Constant (const byte) init_plot_tables::y#0 = 0
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte*) init_screen::b#0 = BITMAP
Constant (const byte*) init_screen::c#0 = SCREEN#0
Constant (const byte*) init_screen::c#0 = SCREEN
Successful SSA optimization Pass2ConstantIdentification
Constant value identified (word)SCREEN#0 in [16] (word~) main::$3 ← (word)(const byte*) SCREEN#0
Constant value identified (word)SCREEN in [16] (word~) main::$3 ← (word)(const byte*) SCREEN
Constant value identified (word)BITMAP in [18] (word~) main::$5 ← (word)(const byte*) BITMAP
Successful SSA optimization Pass2ConstantValues
if() condition always true - replacing block destination [30] if(true) goto main::@2
@ -641,23 +631,23 @@ Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias (byte~) init_plot_tables::$10 = (byte~) init_plot_tables::$6
Successful SSA optimization Pass2AliasElimination
Constant right-side identified [2] (byte~) main::$0 ← (const byte) BMM#0 | (const byte) DEN#0
Constant right-side identified [2] (byte~) main::$0 ← (const byte) BMM | (const byte) DEN
Constant right-side identified [41] (byte~) init_plot_tables::$1 ← > (const byte*) BITMAP
Constant right-side identified [64] (byte*~) init_screen::$0 ← (const byte*) BITMAP + (word) $2000
Constant right-side identified [69] (byte*~) init_screen::$2 ← (const byte*) SCREEN#0 + (word) $400
Constant right-side identified [69] (byte*~) init_screen::$2 ← (const byte*) SCREEN + (word) $400
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::$0 = BMM#0|DEN#0
Constant (const word) main::$3 = (word)SCREEN#0
Constant (const byte) main::$0 = BMM|DEN
Constant (const word) main::$3 = (word)SCREEN
Constant (const word) main::$5 = (word)BITMAP
Constant (const byte) init_plot_tables::$1 = >BITMAP
Constant (const byte*) init_screen::$0 = BITMAP+$2000
Constant (const byte*) init_screen::$2 = SCREEN#0+$400
Constant (const byte*) init_screen::$2 = SCREEN+$400
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [2] (byte~) main::$1 ← (const byte) main::$0 | (const byte) RSEL#0
Constant right-side identified [2] (byte~) main::$1 ← (const byte) main::$0 | (const byte) RSEL
Constant right-side identified [5] (word~) main::$4 ← (const word) main::$3 / (byte) $40
Constant right-side identified [6] (word~) main::$6 ← (const word) main::$5 / (word) $400
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::$1 = main::$0|RSEL#0
Constant (const byte) main::$1 = main::$0|RSEL
Constant (const word) main::$4 = main::$3/$40
Constant (const word) main::$6 = main::$5/$400
Successful SSA optimization Pass2ConstantIdentification
@ -688,23 +678,23 @@ Constant inlined init_plot_tables::bits#2 = (byte) $80
Constant inlined init_plot_tables::bits#0 = (byte) $80
Constant inlined plot::plotter_y#0 = (byte) 0
Constant inlined plot::plotter_x#0 = (byte*) 0
Constant inlined init_screen::$2 = (const byte*) SCREEN#0+(word) $400
Constant inlined main::$1 = (const byte) BMM#0|(const byte) DEN#0|(const byte) RSEL#0
Constant inlined init_screen::$2 = (const byte*) SCREEN+(word) $400
Constant inlined main::$1 = (const byte) BMM|(const byte) DEN|(const byte) RSEL
Constant inlined init_plot_tables::$1 = >(const byte*) BITMAP
Constant inlined main::$2 = (const byte) BMM#0|(const byte) DEN#0|(const byte) RSEL#0|(byte) 3
Constant inlined main::$0 = (const byte) BMM#0|(const byte) DEN#0
Constant inlined main::$2 = (const byte) BMM|(const byte) DEN|(const byte) RSEL|(byte) 3
Constant inlined main::$0 = (const byte) BMM|(const byte) DEN
Constant inlined main::$5 = (word)(const byte*) BITMAP
Constant inlined init_plot_tables::y#0 = (byte) 0
Constant inlined main::$6 = (word)(const byte*) BITMAP/(word) $400
Constant inlined init_plot_tables::yoffs#0 = (byte*) 0
Constant inlined main::$3 = (word)(const byte*) SCREEN#0
Constant inlined main::$4 = (word)(const byte*) SCREEN#0/(byte) $40
Constant inlined main::$3 = (word)(const byte*) SCREEN
Constant inlined main::$4 = (word)(const byte*) SCREEN/(byte) $40
Constant inlined init_plot_tables::x#0 = (byte) 0
Constant inlined init_screen::c#0 = (const byte*) SCREEN#0
Constant inlined init_screen::c#0 = (const byte*) SCREEN
Constant inlined init_screen::b#0 = (const byte*) BITMAP
Constant inlined main::$7 = (word)(const byte*) SCREEN#0/(byte) $40|(word)(const byte*) BITMAP/(word) $400
Constant inlined main::$7 = (word)(const byte*) SCREEN/(byte) $40|(word)(const byte*) BITMAP/(word) $400
Constant inlined init_screen::$0 = (const byte*) BITMAP+(word) $2000
Constant inlined main::$8 = (byte)(word)(const byte*) SCREEN#0/(byte) $40|(word)(const byte*) BITMAP/(word) $400
Constant inlined main::$8 = (byte)(word)(const byte*) SCREEN/(byte) $40|(word)(const byte*) BITMAP/(word) $400
Successful SSA optimization Pass2ConstantInlining
Added new block during phi lifting init_plot_tables::@9(between init_plot_tables::@2 and init_plot_tables::@1)
Added new block during phi lifting init_plot_tables::@10(between init_plot_tables::@1 and init_plot_tables::@2)
@ -785,10 +775,10 @@ FINAL CONTROL FLOW GRAPH
(void()) main()
main: scope:[main] from @1
[4] *((const byte*) BGCOL#0) ← (byte) 0
[5] *((const byte*) FGCOL#0) ← (byte) 0
[6] *((const byte*) D011#0) ← (const byte) BMM#0|(const byte) DEN#0|(const byte) RSEL#0|(byte) 3
[7] *((const byte*) D018#0) ← (byte)(word)(const byte*) SCREEN#0/(byte) $40|(word)(const byte*) BITMAP/(word) $400
[4] *((const byte*) BGCOL) ← (byte) 0
[5] *((const byte*) FGCOL) ← (byte) 0
[6] *((const byte*) D011) ← (const byte) BMM|(const byte) DEN|(const byte) RSEL|(byte) 3
[7] *((const byte*) D018) ← (byte)(word)(const byte*) SCREEN/(byte) $40|(word)(const byte*) BITMAP/(word) $400
[8] call init_screen
to:main::@3
main::@3: scope:[main] from main
@ -796,14 +786,14 @@ main::@3: scope:[main] from main
[10] call init_plot_tables
to:main::@1
main::@1: scope:[main] from main::@1 main::@3 main::@4
[11] if(*((const byte*) RASTER#0)!=(byte) $ff) goto main::@1
[11] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@1
to:main::@2
main::@2: scope:[main] from main::@1
[12] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0)
[12] *((const byte*) BGCOL) ← ++ *((const byte*) BGCOL)
[13] call plots
to:main::@4
main::@4: scope:[main] from main::@2
[14] *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0)
[14] *((const byte*) BGCOL) ← -- *((const byte*) BGCOL)
to:main::@1
(void()) plots()
@ -812,7 +802,7 @@ plots: scope:[plots] from main::@2
to:plots::@1
plots::@1: scope:[plots] from plots plots::@3
[16] (byte) plots::i#2 ← phi( plots/(byte) 0 plots::@3/(byte) plots::i#1 )
[17] if((byte) plots::i#2<(const byte) plots_cnt#0) goto plots::@2
[17] if((byte) plots::i#2<(const byte) plots_cnt) goto plots::@2
to:plots::@return
plots::@return: scope:[plots] from plots::@1
[18] return
@ -898,8 +888,8 @@ init_screen::@1: scope:[init_screen] from init_screen init_screen::@2
[62] if((byte*) init_screen::b#2!=(const byte*) BITMAP+(word) $2000) goto init_screen::@2
to:init_screen::@3
init_screen::@3: scope:[init_screen] from init_screen::@1 init_screen::@4
[63] (byte*) init_screen::c#2 ← phi( init_screen::@1/(const byte*) SCREEN#0 init_screen::@4/(byte*) init_screen::c#1 )
[64] if((byte*) init_screen::c#2!=(const byte*) SCREEN#0+(word) $400) goto init_screen::@4
[63] (byte*) init_screen::c#2 ← phi( init_screen::@1/(const byte*) SCREEN init_screen::@4/(byte*) init_screen::c#1 )
[64] if((byte*) init_screen::c#2!=(const byte*) SCREEN+(word) $400) goto init_screen::@4
to:init_screen::@return
init_screen::@return: scope:[init_screen] from init_screen::@3
[65] return
@ -915,15 +905,6 @@ init_screen::@2: scope:[init_screen] from init_screen::@1
VARIABLE REGISTER WEIGHTS
(byte*) BGCOL
(byte) BMM
(byte*) D011
(byte*) D018
(byte) DEN
(byte*) FGCOL
(byte*) RASTER
(byte) RSEL
(byte*) SCREEN
(void()) init_plot_tables()
(byte~) init_plot_tables::$0 22.0
(byte~) init_plot_tables::$10 5.5
@ -974,7 +955,6 @@ VARIABLE REGISTER WEIGHTS
(byte) plots::i
(byte) plots::i#1 202.0
(byte) plots::i#2 101.0
(byte) plots_cnt
Initial phi equivalence classes
[ plots::i#2 plots::i#1 ]
@ -1086,16 +1066,16 @@ bend_from_b1:
bend:
// main
main: {
// [4] *((const byte*) BGCOL#0) ← (byte) 0 -- _deref_pbuc1=vbuc2
// [4] *((const byte*) BGCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta BGCOL
// [5] *((const byte*) FGCOL#0) ← (byte) 0 -- _deref_pbuc1=vbuc2
// [5] *((const byte*) FGCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta FGCOL
// [6] *((const byte*) D011#0) ← (const byte) BMM#0|(const byte) DEN#0|(const byte) RSEL#0|(byte) 3 -- _deref_pbuc1=vbuc2
// [6] *((const byte*) D011) ← (const byte) BMM|(const byte) DEN|(const byte) RSEL|(byte) 3 -- _deref_pbuc1=vbuc2
lda #BMM|DEN|RSEL|3
sta D011
// [7] *((const byte*) D018#0) ← (byte)(word)(const byte*) SCREEN#0/(byte) $40|(word)(const byte*) BITMAP/(word) $400 -- _deref_pbuc1=vbuc2
// [7] *((const byte*) D018) ← (byte)(word)(const byte*) SCREEN/(byte) $40|(word)(const byte*) BITMAP/(word) $400 -- _deref_pbuc1=vbuc2
lda #SCREEN/$40|BITMAP/$400
sta D018
// [8] call init_screen
@ -1114,14 +1094,14 @@ main: {
jmp b1
// main::@1
b1:
// [11] if(*((const byte*) RASTER#0)!=(byte) $ff) goto main::@1 -- _deref_pbuc1_neq_vbuc2_then_la1
// [11] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@1 -- _deref_pbuc1_neq_vbuc2_then_la1
lda #$ff
cmp RASTER
bne b1
jmp b2
// main::@2
b2:
// [12] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) -- _deref_pbuc1=_inc__deref_pbuc1
// [12] *((const byte*) BGCOL) ← ++ *((const byte*) BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1
inc BGCOL
// [13] call plots
// [15] phi from main::@2 to plots [phi:main::@2->plots]
@ -1130,7 +1110,7 @@ main: {
jmp b4
// main::@4
b4:
// [14] *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0) -- _deref_pbuc1=_dec__deref_pbuc1
// [14] *((const byte*) BGCOL) ← -- *((const byte*) BGCOL) -- _deref_pbuc1=_dec__deref_pbuc1
dec BGCOL
jmp b1
}
@ -1145,7 +1125,7 @@ plots: {
jmp b1
// plots::@1
b1:
// [17] if((byte) plots::i#2<(const byte) plots_cnt#0) goto plots::@2 -- vbuz1_lt_vbuc1_then_la1
// [17] if((byte) plots::i#2<(const byte) plots_cnt) goto plots::@2 -- vbuz1_lt_vbuc1_then_la1
lda.z i
cmp #plots_cnt
bcc b2
@ -1420,7 +1400,7 @@ init_screen: {
bne b2
// [63] phi from init_screen::@1 to init_screen::@3 [phi:init_screen::@1->init_screen::@3]
b3_from_b1:
// [63] phi (byte*) init_screen::c#2 = (const byte*) SCREEN#0 [phi:init_screen::@1->init_screen::@3#0] -- pbuz1=pbuc1
// [63] phi (byte*) init_screen::c#2 = (const byte*) SCREEN [phi:init_screen::@1->init_screen::@3#0] -- pbuz1=pbuc1
lda #<SCREEN
sta.z c
lda #>SCREEN
@ -1428,7 +1408,7 @@ init_screen: {
jmp b3
// init_screen::@3
b3:
// [64] if((byte*) init_screen::c#2!=(const byte*) SCREEN#0+(word) $400) goto init_screen::@4 -- pbuz1_neq_pbuc1_then_la1
// [64] if((byte*) init_screen::c#2!=(const byte*) SCREEN+(word) $400) goto init_screen::@4 -- pbuz1_neq_pbuc1_then_la1
lda.z c+1
cmp #>SCREEN+$400
bne b4
@ -1482,11 +1462,11 @@ init_screen: {
REGISTER UPLIFT POTENTIAL REGISTERS
Equivalence Class zp ZP_BYTE:31 [ init_plot_tables::$7 ] has ALU potential.
Statement [4] *((const byte*) BGCOL#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [5] *((const byte*) FGCOL#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [6] *((const byte*) D011#0) ← (const byte) BMM#0|(const byte) DEN#0|(const byte) RSEL#0|(byte) 3 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [7] *((const byte*) D018#0) ← (byte)(word)(const byte*) SCREEN#0/(byte) $40|(word)(const byte*) BITMAP/(word) $400 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [11] if(*((const byte*) RASTER#0)!=(byte) $ff) goto main::@1 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [4] *((const byte*) BGCOL) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [5] *((const byte*) FGCOL) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [6] *((const byte*) D011) ← (const byte) BMM|(const byte) DEN|(const byte) RSEL|(byte) 3 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [7] *((const byte*) D018) ← (byte)(word)(const byte*) SCREEN/(byte) $40|(word)(const byte*) BITMAP/(word) $400 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [11] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@1 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [26] (byte*) plot::plotter_x#2 ← (byte*) plot::plotter_x#1 lo= (byte~) plot::$7 [ plot::x#0 plot::y#0 plot::plotter_x#2 ] ( main:2::plots:13::plot:21 [ plots::i#2 plot::x#0 plot::y#0 plot::plotter_x#2 ] ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ plots::i#2 plots::i#1 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:12 [ plot::x#0 ]
@ -1503,14 +1483,14 @@ Statement [40] *((const byte[$100]) plot_bit + (byte) init_plot_tables::x#2) ←
Statement [55] (byte*) init_plot_tables::yoffs#1 ← (byte*) init_plot_tables::yoffs#2 + (word)(number) $28*(number) 8 [ init_plot_tables::y#2 init_plot_tables::yoffs#1 ] ( main:2::init_plot_tables:10 [ init_plot_tables::y#2 init_plot_tables::yoffs#1 ] ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:5 [ init_plot_tables::y#2 init_plot_tables::y#1 ]
Statement [62] if((byte*) init_screen::b#2!=(const byte*) BITMAP+(word) $2000) goto init_screen::@2 [ init_screen::b#2 ] ( main:2::init_screen:8 [ init_screen::b#2 ] ) always clobbers reg byte a
Statement [64] if((byte*) init_screen::c#2!=(const byte*) SCREEN#0+(word) $400) goto init_screen::@4 [ init_screen::c#2 ] ( main:2::init_screen:8 [ init_screen::c#2 ] ) always clobbers reg byte a
Statement [64] if((byte*) init_screen::c#2!=(const byte*) SCREEN+(word) $400) goto init_screen::@4 [ init_screen::c#2 ] ( main:2::init_screen:8 [ init_screen::c#2 ] ) always clobbers reg byte a
Statement [66] *((byte*) init_screen::c#2) ← (byte) $14 [ init_screen::c#2 ] ( main:2::init_screen:8 [ init_screen::c#2 ] ) always clobbers reg byte a reg byte y
Statement [68] *((byte*) init_screen::b#2) ← (byte) 0 [ init_screen::b#2 ] ( main:2::init_screen:8 [ init_screen::b#2 ] ) always clobbers reg byte a reg byte y
Statement [4] *((const byte*) BGCOL#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [5] *((const byte*) FGCOL#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [6] *((const byte*) D011#0) ← (const byte) BMM#0|(const byte) DEN#0|(const byte) RSEL#0|(byte) 3 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [7] *((const byte*) D018#0) ← (byte)(word)(const byte*) SCREEN#0/(byte) $40|(word)(const byte*) BITMAP/(word) $400 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [11] if(*((const byte*) RASTER#0)!=(byte) $ff) goto main::@1 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [4] *((const byte*) BGCOL) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [5] *((const byte*) FGCOL) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [6] *((const byte*) D011) ← (const byte) BMM|(const byte) DEN|(const byte) RSEL|(byte) 3 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [7] *((const byte*) D018) ← (byte)(word)(const byte*) SCREEN/(byte) $40|(word)(const byte*) BITMAP/(word) $400 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [11] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@1 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [26] (byte*) plot::plotter_x#2 ← (byte*) plot::plotter_x#1 lo= (byte~) plot::$7 [ plot::x#0 plot::y#0 plot::plotter_x#2 ] ( main:2::plots:13::plot:21 [ plots::i#2 plot::x#0 plot::y#0 plot::plotter_x#2 ] ) always clobbers reg byte a
Statement [30] (word) plot::plotter_y#2 ← (word) plot::plotter_y#1 lo= (byte~) plot::$9 [ plot::x#0 plot::plotter_x#2 plot::plotter_y#2 ] ( main:2::plots:13::plot:21 [ plots::i#2 plot::x#0 plot::plotter_x#2 plot::plotter_y#2 ] ) always clobbers reg byte a
Statement [31] (byte*) plot::plotter#0 ← (byte*) plot::plotter_x#2 + (word) plot::plotter_y#2 [ plot::x#0 plot::plotter#0 ] ( main:2::plots:13::plot:21 [ plots::i#2 plot::x#0 plot::plotter#0 ] ) always clobbers reg byte a
@ -1522,7 +1502,7 @@ Statement [40] *((const byte[$100]) plot_bit + (byte) init_plot_tables::x#2) ←
Statement [48] (byte~) init_plot_tables::$10 ← (byte) init_plot_tables::y#2 & (byte) 7 [ init_plot_tables::y#2 init_plot_tables::yoffs#2 init_plot_tables::$10 ] ( main:2::init_plot_tables:10 [ init_plot_tables::y#2 init_plot_tables::yoffs#2 init_plot_tables::$10 ] ) always clobbers reg byte a
Statement [55] (byte*) init_plot_tables::yoffs#1 ← (byte*) init_plot_tables::yoffs#2 + (word)(number) $28*(number) 8 [ init_plot_tables::y#2 init_plot_tables::yoffs#1 ] ( main:2::init_plot_tables:10 [ init_plot_tables::y#2 init_plot_tables::yoffs#1 ] ) always clobbers reg byte a
Statement [62] if((byte*) init_screen::b#2!=(const byte*) BITMAP+(word) $2000) goto init_screen::@2 [ init_screen::b#2 ] ( main:2::init_screen:8 [ init_screen::b#2 ] ) always clobbers reg byte a
Statement [64] if((byte*) init_screen::c#2!=(const byte*) SCREEN#0+(word) $400) goto init_screen::@4 [ init_screen::c#2 ] ( main:2::init_screen:8 [ init_screen::c#2 ] ) always clobbers reg byte a
Statement [64] if((byte*) init_screen::c#2!=(const byte*) SCREEN+(word) $400) goto init_screen::@4 [ init_screen::c#2 ] ( main:2::init_screen:8 [ init_screen::c#2 ] ) always clobbers reg byte a
Statement [66] *((byte*) init_screen::c#2) ← (byte) $14 [ init_screen::c#2 ] ( main:2::init_screen:8 [ init_screen::c#2 ] ) always clobbers reg byte a reg byte y
Statement [68] *((byte*) init_screen::b#2) ← (byte) 0 [ init_screen::b#2 ] ( main:2::init_screen:8 [ init_screen::b#2 ] ) always clobbers reg byte a reg byte y
Potential registers zp ZP_BYTE:2 [ plots::i#2 plots::i#1 ] : zp ZP_BYTE:2 , reg byte x ,
@ -1630,16 +1610,16 @@ bend_from_b1:
bend:
// main
main: {
// [4] *((const byte*) BGCOL#0) ← (byte) 0 -- _deref_pbuc1=vbuc2
// [4] *((const byte*) BGCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta BGCOL
// [5] *((const byte*) FGCOL#0) ← (byte) 0 -- _deref_pbuc1=vbuc2
// [5] *((const byte*) FGCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta FGCOL
// [6] *((const byte*) D011#0) ← (const byte) BMM#0|(const byte) DEN#0|(const byte) RSEL#0|(byte) 3 -- _deref_pbuc1=vbuc2
// [6] *((const byte*) D011) ← (const byte) BMM|(const byte) DEN|(const byte) RSEL|(byte) 3 -- _deref_pbuc1=vbuc2
lda #BMM|DEN|RSEL|3
sta D011
// [7] *((const byte*) D018#0) ← (byte)(word)(const byte*) SCREEN#0/(byte) $40|(word)(const byte*) BITMAP/(word) $400 -- _deref_pbuc1=vbuc2
// [7] *((const byte*) D018) ← (byte)(word)(const byte*) SCREEN/(byte) $40|(word)(const byte*) BITMAP/(word) $400 -- _deref_pbuc1=vbuc2
lda #SCREEN/$40|BITMAP/$400
sta D018
// [8] call init_screen
@ -1658,14 +1638,14 @@ main: {
jmp b1
// main::@1
b1:
// [11] if(*((const byte*) RASTER#0)!=(byte) $ff) goto main::@1 -- _deref_pbuc1_neq_vbuc2_then_la1
// [11] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@1 -- _deref_pbuc1_neq_vbuc2_then_la1
lda #$ff
cmp RASTER
bne b1
jmp b2
// main::@2
b2:
// [12] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) -- _deref_pbuc1=_inc__deref_pbuc1
// [12] *((const byte*) BGCOL) ← ++ *((const byte*) BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1
inc BGCOL
// [13] call plots
// [15] phi from main::@2 to plots [phi:main::@2->plots]
@ -1674,7 +1654,7 @@ main: {
jmp b4
// main::@4
b4:
// [14] *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0) -- _deref_pbuc1=_dec__deref_pbuc1
// [14] *((const byte*) BGCOL) ← -- *((const byte*) BGCOL) -- _deref_pbuc1=_dec__deref_pbuc1
dec BGCOL
jmp b1
}
@ -1687,7 +1667,7 @@ plots: {
jmp b1
// plots::@1
b1:
// [17] if((byte) plots::i#2<(const byte) plots_cnt#0) goto plots::@2 -- vbuxx_lt_vbuc1_then_la1
// [17] if((byte) plots::i#2<(const byte) plots_cnt) goto plots::@2 -- vbuxx_lt_vbuc1_then_la1
cpx #plots_cnt
bcc b2
jmp breturn
@ -1912,7 +1892,7 @@ init_screen: {
bne b2
// [63] phi from init_screen::@1 to init_screen::@3 [phi:init_screen::@1->init_screen::@3]
b3_from_b1:
// [63] phi (byte*) init_screen::c#2 = (const byte*) SCREEN#0 [phi:init_screen::@1->init_screen::@3#0] -- pbuz1=pbuc1
// [63] phi (byte*) init_screen::c#2 = (const byte*) SCREEN [phi:init_screen::@1->init_screen::@3#0] -- pbuz1=pbuc1
lda #<SCREEN
sta.z c
lda #>SCREEN
@ -1920,7 +1900,7 @@ init_screen: {
jmp b3
// init_screen::@3
b3:
// [64] if((byte*) init_screen::c#2!=(const byte*) SCREEN#0+(word) $400) goto init_screen::@4 -- pbuz1_neq_pbuc1_then_la1
// [64] if((byte*) init_screen::c#2!=(const byte*) SCREEN+(word) $400) goto init_screen::@4 -- pbuz1_neq_pbuc1_then_la1
lda.z c+1
cmp #>SCREEN+$400
bne b4
@ -2054,25 +2034,16 @@ FINAL SYMBOL TABLE
(label) @1
(label) @begin
(label) @end
(byte*) BGCOL
(const byte*) BGCOL#0 BGCOL = (byte*) 53280
(const byte*) BGCOL BGCOL = (byte*) 53280
(const byte*) BITMAP BITMAP = (byte*) 8192
(byte) BMM
(const byte) BMM#0 BMM = (byte) $20
(byte*) D011
(const byte*) D011#0 D011 = (byte*) 53265
(byte*) D018
(const byte*) D018#0 D018 = (byte*) 53272
(byte) DEN
(const byte) DEN#0 DEN = (byte) $10
(byte*) FGCOL
(const byte*) FGCOL#0 FGCOL = (byte*) 53281
(byte*) RASTER
(const byte*) RASTER#0 RASTER = (byte*) 53266
(byte) RSEL
(const byte) RSEL#0 RSEL = (byte) 8
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = (byte*) 1024
(const byte) BMM BMM = (byte) $20
(const byte*) D011 D011 = (byte*) 53265
(const byte*) D018 D018 = (byte*) 53272
(const byte) DEN DEN = (byte) $10
(const byte*) FGCOL FGCOL = (byte*) 53281
(const byte*) RASTER RASTER = (byte*) 53266
(const byte) RSEL RSEL = (byte) 8
(const byte*) SCREEN SCREEN = (byte*) 1024
(void()) init_plot_tables()
(byte~) init_plot_tables::$0 reg byte a 22.0
(byte~) init_plot_tables::$10 $10 zp ZP_BYTE:7 5.5
@ -2149,8 +2120,7 @@ FINAL SYMBOL TABLE
(byte) plots::i
(byte) plots::i#1 reg byte x 202.0
(byte) plots::i#2 reg byte x 101.0
(byte) plots_cnt
(const byte) plots_cnt#0 plots_cnt = (byte) 8
(const byte) plots_cnt plots_cnt = (byte) 8
(const byte[]) plots_x plots_x = { (byte) $3c, (byte) $50, (byte) $6e, (byte) $50, (byte) $3c, (byte) $28, (byte) $a, (byte) $28 }
(const byte[]) plots_y plots_y = { (byte) $a, (byte) $28, (byte) $3c, (byte) $50, (byte) $6e, (byte) $50, (byte) $3c, (byte) $28 }
@ -2202,18 +2172,18 @@ Score: 6531
// main
main: {
// *BGCOL = 0
// [4] *((const byte*) BGCOL#0) ← (byte) 0 -- _deref_pbuc1=vbuc2
// [4] *((const byte*) BGCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta BGCOL
// *FGCOL = 0
// [5] *((const byte*) FGCOL#0) ← (byte) 0 -- _deref_pbuc1=vbuc2
// [5] *((const byte*) FGCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2
sta FGCOL
// *D011 = BMM|DEN|RSEL|3
// [6] *((const byte*) D011#0) ← (const byte) BMM#0|(const byte) DEN#0|(const byte) RSEL#0|(byte) 3 -- _deref_pbuc1=vbuc2
// [6] *((const byte*) D011) ← (const byte) BMM|(const byte) DEN|(const byte) RSEL|(byte) 3 -- _deref_pbuc1=vbuc2
lda #BMM|DEN|RSEL|3
sta D011
// *D018 = (byte)(((word)SCREEN/$40)|((word)BITMAP/$400))
// [7] *((const byte*) D018#0) ← (byte)(word)(const byte*) SCREEN#0/(byte) $40|(word)(const byte*) BITMAP/(word) $400 -- _deref_pbuc1=vbuc2
// [7] *((const byte*) D018) ← (byte)(word)(const byte*) SCREEN/(byte) $40|(word)(const byte*) BITMAP/(word) $400 -- _deref_pbuc1=vbuc2
lda #SCREEN/$40|BITMAP/$400
sta D018
// init_screen()
@ -2229,13 +2199,13 @@ main: {
// main::@1
b1:
// while (*RASTER!=$ff)
// [11] if(*((const byte*) RASTER#0)!=(byte) $ff) goto main::@1 -- _deref_pbuc1_neq_vbuc2_then_la1
// [11] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@1 -- _deref_pbuc1_neq_vbuc2_then_la1
lda #$ff
cmp RASTER
bne b1
// main::@2
// (*BGCOL)++;
// [12] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) -- _deref_pbuc1=_inc__deref_pbuc1
// [12] *((const byte*) BGCOL) ← ++ *((const byte*) BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1
inc BGCOL
// plots()
// [13] call plots
@ -2243,7 +2213,7 @@ main: {
jsr plots
// main::@4
// (*BGCOL)--;
// [14] *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0) -- _deref_pbuc1=_dec__deref_pbuc1
// [14] *((const byte*) BGCOL) ← -- *((const byte*) BGCOL) -- _deref_pbuc1=_dec__deref_pbuc1
dec BGCOL
jmp b1
}
@ -2255,7 +2225,7 @@ plots: {
// plots::@1
b1:
// for(byte i=0; i<plots_cnt;i++)
// [17] if((byte) plots::i#2<(const byte) plots_cnt#0) goto plots::@2 -- vbuxx_lt_vbuc1_then_la1
// [17] if((byte) plots::i#2<(const byte) plots_cnt) goto plots::@2 -- vbuxx_lt_vbuc1_then_la1
cpx #plots_cnt
bcc b2
// plots::@return
@ -2474,7 +2444,7 @@ init_screen: {
cmp #<BITMAP+$2000
bne b2
// [63] phi from init_screen::@1 to init_screen::@3 [phi:init_screen::@1->init_screen::@3]
// [63] phi (byte*) init_screen::c#2 = (const byte*) SCREEN#0 [phi:init_screen::@1->init_screen::@3#0] -- pbuz1=pbuc1
// [63] phi (byte*) init_screen::c#2 = (const byte*) SCREEN [phi:init_screen::@1->init_screen::@3#0] -- pbuz1=pbuc1
lda #<SCREEN
sta.z c
lda #>SCREEN
@ -2482,7 +2452,7 @@ init_screen: {
// init_screen::@3
b3:
// for(byte* c = SCREEN; c!=SCREEN+$400;c++)
// [64] if((byte*) init_screen::c#2!=(const byte*) SCREEN#0+(word) $400) goto init_screen::@4 -- pbuz1_neq_pbuc1_then_la1
// [64] if((byte*) init_screen::c#2!=(const byte*) SCREEN+(word) $400) goto init_screen::@4 -- pbuz1_neq_pbuc1_then_la1
lda.z c+1
cmp #>SCREEN+$400
bne b4

View File

@ -1,25 +1,16 @@
(label) @1
(label) @begin
(label) @end
(byte*) BGCOL
(const byte*) BGCOL#0 BGCOL = (byte*) 53280
(const byte*) BGCOL BGCOL = (byte*) 53280
(const byte*) BITMAP BITMAP = (byte*) 8192
(byte) BMM
(const byte) BMM#0 BMM = (byte) $20
(byte*) D011
(const byte*) D011#0 D011 = (byte*) 53265
(byte*) D018
(const byte*) D018#0 D018 = (byte*) 53272
(byte) DEN
(const byte) DEN#0 DEN = (byte) $10
(byte*) FGCOL
(const byte*) FGCOL#0 FGCOL = (byte*) 53281
(byte*) RASTER
(const byte*) RASTER#0 RASTER = (byte*) 53266
(byte) RSEL
(const byte) RSEL#0 RSEL = (byte) 8
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = (byte*) 1024
(const byte) BMM BMM = (byte) $20
(const byte*) D011 D011 = (byte*) 53265
(const byte*) D018 D018 = (byte*) 53272
(const byte) DEN DEN = (byte) $10
(const byte*) FGCOL FGCOL = (byte*) 53281
(const byte*) RASTER RASTER = (byte*) 53266
(const byte) RSEL RSEL = (byte) 8
(const byte*) SCREEN SCREEN = (byte*) 1024
(void()) init_plot_tables()
(byte~) init_plot_tables::$0 reg byte a 22.0
(byte~) init_plot_tables::$10 $10 zp ZP_BYTE:7 5.5
@ -96,8 +87,7 @@
(byte) plots::i
(byte) plots::i#1 reg byte x 202.0
(byte) plots::i#2 reg byte x 101.0
(byte) plots_cnt
(const byte) plots_cnt#0 plots_cnt = (byte) 8
(const byte) plots_cnt plots_cnt = (byte) 8
(const byte[]) plots_x plots_x = { (byte) $3c, (byte) $50, (byte) $6e, (byte) $50, (byte) $3c, (byte) $28, (byte) $a, (byte) $28 }
(const byte[]) plots_y plots_y = { (byte) $a, (byte) $28, (byte) $3c, (byte) $50, (byte) $6e, (byte) $50, (byte) $3c, (byte) $28 }

View File

@ -10,12 +10,12 @@
(void()) main()
main: scope:[main] from @1
[4] *((const byte*) main::SCREEN#0) ← ~(byte) 1
[4] *((const byte*) main::SCREEN) ← ~(byte) 1
to:main::@1
main::@1: scope:[main] from main main::@1
[5] (byte) main::c#2 ← phi( main/(byte) 1 main::@1/(byte) main::c#1 )
[6] (byte~) main::$0 ← ~ (byte) main::c#2
[7] *((const byte*) main::SCREEN#0 + (byte) main::c#2) ← (byte~) main::$0
[7] *((const byte*) main::SCREEN + (byte) main::c#2) ← (byte~) main::$0
[8] (byte) main::c#1 ← ++ (byte) main::c#2
[9] if((byte) main::c#1!=(byte) $1b) goto main::@1
to:main::@return

View File

@ -7,14 +7,14 @@ CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from @1
(byte*) main::SCREEN#0 ← ((byte*)) (number) $400
*((byte*) main::SCREEN#0) ← ~(byte) 1
(byte*) main::SCREEN ← ((byte*)) (number) $400
*((byte*) main::SCREEN) ← ~(byte) 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 )
(byte~) main::$0 ← ~ (byte) main::c#2
*((byte*) main::SCREEN#0 + (byte) main::c#2) ← (byte~) main::$0
*((byte*) main::SCREEN + (byte) main::c#2) ← (byte~) main::$0
(byte) main::c#1 ← (byte) main::c#2 + rangenext(1,$1a)
(bool~) main::$1 ← (byte) main::c#1 != rangelast(1,$1a)
if((bool~) main::$1) goto main::@1
@ -40,19 +40,18 @@ SYMBOL TABLE SSA
(label) main::@1
(label) main::@return
(byte*) main::SCREEN
(byte*) main::SCREEN#0
(byte) main::c
(byte) main::c#0
(byte) main::c#1
(byte) main::c#2
Inlining cast (byte*) main::SCREEN#0 ← (byte*)(number) $400
Inlining cast (byte*) main::SCREEN ← (byte*)(number) $400
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Successful SSA optimization PassNCastSimplification
Simple Condition (bool~) main::$1 [8] if((byte) main::c#1!=rangelast(1,$1a)) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant (const byte*) main::SCREEN#0 = (byte*) 1024
Constant (const byte*) main::SCREEN = (byte*) 1024
Constant (const byte) main::c#0 = 1
Successful SSA optimization Pass2ConstantIdentification
Resolved ranged next value [6] main::c#1 ← ++ main::c#2 to ++
@ -96,12 +95,12 @@ FINAL CONTROL FLOW GRAPH
(void()) main()
main: scope:[main] from @1
[4] *((const byte*) main::SCREEN#0) ← ~(byte) 1
[4] *((const byte*) main::SCREEN) ← ~(byte) 1
to:main::@1
main::@1: scope:[main] from main main::@1
[5] (byte) main::c#2 ← phi( main/(byte) 1 main::@1/(byte) main::c#1 )
[6] (byte~) main::$0 ← ~ (byte) main::c#2
[7] *((const byte*) main::SCREEN#0 + (byte) main::c#2) ← (byte~) main::$0
[7] *((const byte*) main::SCREEN + (byte) main::c#2) ← (byte~) main::$0
[8] (byte) main::c#1 ← ++ (byte) main::c#2
[9] if((byte) main::c#1!=(byte) $1b) goto main::@1
to:main::@return
@ -113,7 +112,6 @@ main::@return: scope:[main] from main::@1
VARIABLE REGISTER WEIGHTS
(void()) main()
(byte~) main::$0 22.0
(byte*) main::SCREEN
(byte) main::c
(byte) main::c#1 16.5
(byte) main::c#2 14.666666666666666
@ -154,7 +152,7 @@ main: {
.label SCREEN = $400
.label _0 = 3
.label c = 2
// [4] *((const byte*) main::SCREEN#0) ← ~(byte) 1 -- _deref_pbuc1=vbuc2
// [4] *((const byte*) main::SCREEN) ← ~(byte) 1 -- _deref_pbuc1=vbuc2
lda #1^$ff
sta SCREEN
// [5] phi from main to main::@1 [phi:main->main::@1]
@ -173,7 +171,7 @@ main: {
lda.z c
eor #$ff
sta.z _0
// [7] *((const byte*) main::SCREEN#0 + (byte) main::c#2) ← (byte~) main::$0 -- pbuc1_derefidx_vbuz1=vbuz2
// [7] *((const byte*) main::SCREEN + (byte) main::c#2) ← (byte~) main::$0 -- pbuc1_derefidx_vbuz1=vbuz2
lda.z _0
ldy.z c
sta SCREEN,y
@ -192,10 +190,10 @@ main: {
// File Data
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [4] *((const byte*) main::SCREEN#0) ← ~(byte) 1 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [4] *((const byte*) main::SCREEN) ← ~(byte) 1 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [6] (byte~) main::$0 ← ~ (byte) main::c#2 [ main::c#2 main::$0 ] ( main:2 [ main::c#2 main::$0 ] ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ main::c#2 main::c#1 ]
Statement [4] *((const byte*) main::SCREEN#0) ← ~(byte) 1 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [4] *((const byte*) main::SCREEN) ← ~(byte) 1 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [6] (byte~) main::$0 ← ~ (byte) main::c#2 [ main::c#2 main::$0 ] ( main:2 [ main::c#2 main::$0 ] ) always clobbers reg byte a
Potential registers zp ZP_BYTE:2 [ main::c#2 main::c#1 ] : zp ZP_BYTE:2 , reg byte x , reg byte y ,
Potential registers zp ZP_BYTE:3 [ main::$0 ] : zp ZP_BYTE:3 , reg byte a , reg byte x , reg byte y ,
@ -231,7 +229,7 @@ bend:
// main
main: {
.label SCREEN = $400
// [4] *((const byte*) main::SCREEN#0) ← ~(byte) 1 -- _deref_pbuc1=vbuc2
// [4] *((const byte*) main::SCREEN) ← ~(byte) 1 -- _deref_pbuc1=vbuc2
lda #1^$ff
sta SCREEN
// [5] phi from main to main::@1 [phi:main->main::@1]
@ -248,7 +246,7 @@ main: {
// [6] (byte~) main::$0 ← ~ (byte) main::c#2 -- vbuaa=_bnot_vbuxx
txa
eor #$ff
// [7] *((const byte*) main::SCREEN#0 + (byte) main::c#2) ← (byte~) main::$0 -- pbuc1_derefidx_vbuxx=vbuaa
// [7] *((const byte*) main::SCREEN + (byte) main::c#2) ← (byte~) main::$0 -- pbuc1_derefidx_vbuxx=vbuaa
sta SCREEN,x
// [8] (byte) main::c#1 ← ++ (byte) main::c#2 -- vbuxx=_inc_vbuxx
inx
@ -295,8 +293,7 @@ FINAL SYMBOL TABLE
(byte~) main::$0 reg byte a 22.0
(label) main::@1
(label) main::@return
(byte*) main::SCREEN
(const byte*) main::SCREEN#0 SCREEN = (byte*) 1024
(const byte*) main::SCREEN SCREEN = (byte*) 1024
(byte) main::c
(byte) main::c#1 reg byte x 16.5
(byte) main::c#2 reg byte x 14.666666666666666
@ -324,7 +321,7 @@ Score: 187
main: {
.label SCREEN = $400
// *SCREEN = ~1ub
// [4] *((const byte*) main::SCREEN#0) ← ~(byte) 1 -- _deref_pbuc1=vbuc2
// [4] *((const byte*) main::SCREEN) ← ~(byte) 1 -- _deref_pbuc1=vbuc2
lda #1^$ff
sta SCREEN
// [5] phi from main to main::@1 [phi:main->main::@1]
@ -339,7 +336,7 @@ main: {
txa
eor #$ff
// SCREEN[c] = ~c
// [7] *((const byte*) main::SCREEN#0 + (byte) main::c#2) ← (byte~) main::$0 -- pbuc1_derefidx_vbuxx=vbuaa
// [7] *((const byte*) main::SCREEN + (byte) main::c#2) ← (byte~) main::$0 -- pbuc1_derefidx_vbuxx=vbuaa
sta SCREEN,x
// for(byte c : 1..26)
// [8] (byte) main::c#1 ← ++ (byte) main::c#2 -- vbuxx=_inc_vbuxx

View File

@ -5,8 +5,7 @@
(byte~) main::$0 reg byte a 22.0
(label) main::@1
(label) main::@return
(byte*) main::SCREEN
(const byte*) main::SCREEN#0 SCREEN = (byte*) 1024
(const byte*) main::SCREEN SCREEN = (byte*) 1024
(byte) main::c
(byte) main::c#1 reg byte x 16.5
(byte) main::c#2 reg byte x 14.666666666666666

View File

@ -34,8 +34,8 @@ main::@return: scope:[main] from main::@3
(void()) bool_const_if()
bool_const_if: scope:[bool_const_if] from main
(bool) bool_const_if::b#0 ← true
if((bool) bool_const_if::b#0) goto bool_const_if::@1
(bool) bool_const_if::b ← true
if((bool) bool_const_if::b) goto bool_const_if::@1
to:bool_const_if::@3
bool_const_if::@1: scope:[bool_const_if] from bool_const_if
*((byte*) SCREEN + (number) 0) ← (byte) 't'
@ -49,14 +49,14 @@ bool_const_if::@return: scope:[bool_const_if] from bool_const_if::@1 bool_const
(void()) bool_const_vars()
bool_const_vars: scope:[bool_const_vars] from main::@1
(byte) bool_const_vars::a#0 ← (number) $e
(bool~) bool_const_vars::$0 ← (byte) bool_const_vars::a#0 == (number) $f
(bool~) bool_const_vars::$1 ← (number) $15 < (byte) bool_const_vars::a#0
(byte) bool_const_vars::a ← (number) $e
(bool~) bool_const_vars::$0 ← (byte) bool_const_vars::a == (number) $f
(bool~) bool_const_vars::$1 ← (number) $15 < (byte) bool_const_vars::a
(bool~) bool_const_vars::$2 ← ! (bool~) bool_const_vars::$1
(bool~) bool_const_vars::$3 ← (bool~) bool_const_vars::$0 || (bool~) bool_const_vars::$2
(bool) bool_const_vars::b1#0 ← (bool~) bool_const_vars::$3
(bool~) bool_const_vars::$4 ← (byte) bool_const_vars::a#0 != (number) $2c
(bool~) bool_const_vars::$5 ← (byte) bool_const_vars::a#0 >= (number) -8
(bool~) bool_const_vars::$4 ← (byte) bool_const_vars::a != (number) $2c
(bool~) bool_const_vars::$5 ← (byte) bool_const_vars::a >= (number) -8
(bool~) bool_const_vars::$6 ← (bool~) bool_const_vars::$4 || (bool~) bool_const_vars::$5
(bool) bool_const_vars::b2#0 ← (bool~) bool_const_vars::$6
(bool~) bool_const_vars::$7 ← ! (bool) bool_const_vars::b2#0
@ -77,13 +77,13 @@ bool_const_vars::@return: scope:[bool_const_vars] from bool_const_vars::@1 bool
(void()) bool_const_inline()
bool_const_inline: scope:[bool_const_inline] from main::@2
(byte) bool_const_inline::a#0 ← (number) $17
(bool~) bool_const_inline::$0 ← (byte) bool_const_inline::a#0 != (number) $2c
(bool~) bool_const_inline::$1 ← (byte) bool_const_inline::a#0 >= (number) -8
(bool~) bool_const_inline::$2 ← (byte) bool_const_inline::a#0 == (number) $f
(byte) bool_const_inline::a ← (number) $17
(bool~) bool_const_inline::$0 ← (byte) bool_const_inline::a != (number) $2c
(bool~) bool_const_inline::$1 ← (byte) bool_const_inline::a >= (number) -8
(bool~) bool_const_inline::$2 ← (byte) bool_const_inline::a == (number) $f
(bool~) bool_const_inline::$3 ← (bool~) bool_const_inline::$1 && (bool~) bool_const_inline::$2
(bool~) bool_const_inline::$4 ← (bool~) bool_const_inline::$0 || (bool~) bool_const_inline::$3
(bool~) bool_const_inline::$5 ← (number) $15 < (byte) bool_const_inline::a#0
(bool~) bool_const_inline::$5 ← (number) $15 < (byte) bool_const_inline::a
(bool~) bool_const_inline::$6 ← ! (bool~) bool_const_inline::$5
(bool~) bool_const_inline::$7 ← (bool~) bool_const_inline::$4 || (bool~) bool_const_inline::$6
if((bool~) bool_const_inline::$7) goto bool_const_inline::@1
@ -115,7 +115,6 @@ SYMBOL TABLE SSA
(label) bool_const_if::@3
(label) bool_const_if::@return
(bool) bool_const_if::b
(bool) bool_const_if::b#0
(void()) bool_const_inline()
(bool~) bool_const_inline::$0
(bool~) bool_const_inline::$1
@ -129,7 +128,6 @@ SYMBOL TABLE SSA
(label) bool_const_inline::@3
(label) bool_const_inline::@return
(byte) bool_const_inline::a
(byte) bool_const_inline::a#0
(void()) bool_const_vars()
(bool~) bool_const_vars::$0
(bool~) bool_const_vars::$1
@ -145,7 +143,6 @@ SYMBOL TABLE SSA
(label) bool_const_vars::@3
(label) bool_const_vars::@return
(byte) bool_const_vars::a
(byte) bool_const_vars::a#0
(bool) bool_const_vars::b
(bool) bool_const_vars::b#0
(bool) bool_const_vars::b1
@ -160,24 +157,24 @@ SYMBOL TABLE SSA
Adding number conversion cast (unumber) 0 in *((byte*) SCREEN + (number) 0) ← (byte) 't'
Adding number conversion cast (unumber) 0 in *((byte*) SCREEN + (number) 0) ← (byte) 'f'
Adding number conversion cast (unumber) $e in (byte) bool_const_vars::a#0 ← (number) $e
Adding number conversion cast (unumber) $f in (bool~) bool_const_vars::$0 ← (byte) bool_const_vars::a#0 == (number) $f
Adding number conversion cast (unumber) $15 in (bool~) bool_const_vars::$1 ← (number) $15 < (byte) bool_const_vars::a#0
Adding number conversion cast (unumber) $2c in (bool~) bool_const_vars::$4 ← (byte) bool_const_vars::a#0 != (number) $2c
Adding number conversion cast (unumber) -8 in (bool~) bool_const_vars::$5 ← (byte) bool_const_vars::a#0 >= (number) -8
Adding number conversion cast (unumber) $e in (byte) bool_const_vars::a ← (number) $e
Adding number conversion cast (unumber) $f in (bool~) bool_const_vars::$0 ← (byte) bool_const_vars::a == (number) $f
Adding number conversion cast (unumber) $15 in (bool~) bool_const_vars::$1 ← (number) $15 < (byte) bool_const_vars::a
Adding number conversion cast (unumber) $2c in (bool~) bool_const_vars::$4 ← (byte) bool_const_vars::a != (number) $2c
Adding number conversion cast (unumber) -8 in (bool~) bool_const_vars::$5 ← (byte) bool_const_vars::a >= (number) -8
Adding number conversion cast (unumber) 1 in *((byte*) SCREEN + (number) 1) ← (byte) 't'
Adding number conversion cast (unumber) 1 in *((byte*) SCREEN + (number) 1) ← (byte) 'f'
Adding number conversion cast (unumber) $17 in (byte) bool_const_inline::a#0 ← (number) $17
Adding number conversion cast (unumber) $2c in (bool~) bool_const_inline::$0 ← (byte) bool_const_inline::a#0 != (number) $2c
Adding number conversion cast (unumber) -8 in (bool~) bool_const_inline::$1 ← (byte) bool_const_inline::a#0 >= (number) -8
Adding number conversion cast (unumber) $f in (bool~) bool_const_inline::$2 ← (byte) bool_const_inline::a#0 == (number) $f
Adding number conversion cast (unumber) $15 in (bool~) bool_const_inline::$5 ← (number) $15 < (byte) bool_const_inline::a#0
Adding number conversion cast (unumber) $17 in (byte) bool_const_inline::a ← (number) $17
Adding number conversion cast (unumber) $2c in (bool~) bool_const_inline::$0 ← (byte) bool_const_inline::a != (number) $2c
Adding number conversion cast (unumber) -8 in (bool~) bool_const_inline::$1 ← (byte) bool_const_inline::a >= (number) -8
Adding number conversion cast (unumber) $f in (bool~) bool_const_inline::$2 ← (byte) bool_const_inline::a == (number) $f
Adding number conversion cast (unumber) $15 in (bool~) bool_const_inline::$5 ← (number) $15 < (byte) bool_const_inline::a
Adding number conversion cast (unumber) 2 in *((byte*) SCREEN + (number) 2) ← (byte) 't'
Adding number conversion cast (unumber) 2 in *((byte*) SCREEN + (number) 2) ← (byte) 'f'
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) SCREEN ← (byte*)(number) $400
Inlining cast (byte) bool_const_vars::a#0 ← (unumber)(number) $e
Inlining cast (byte) bool_const_inline::a#0 ← (unumber)(number) $17
Inlining cast (byte) bool_const_vars::a ← (unumber)(number) $e
Inlining cast (byte) bool_const_inline::a ← (unumber)(number) $17
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 0
@ -214,8 +211,8 @@ Finalized unsigned number type (byte) $15
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) 2
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inversing boolean not [13] (bool~) bool_const_vars::$2 ← (byte) $15 >= (byte) bool_const_vars::a#0 from [12] (bool~) bool_const_vars::$1 ← (byte) $15 < (byte) bool_const_vars::a#0
Inversing boolean not [35] (bool~) bool_const_inline::$6 ← (byte) $15 >= (byte) bool_const_inline::a#0 from [34] (bool~) bool_const_inline::$5 ← (byte) $15 < (byte) bool_const_inline::a#0
Inversing boolean not [13] (bool~) bool_const_vars::$2 ← (byte) $15 >= (byte) bool_const_vars::a from [12] (bool~) bool_const_vars::$1 ← (byte) $15 < (byte) bool_const_vars::a
Inversing boolean not [35] (bool~) bool_const_inline::$6 ← (byte) $15 >= (byte) bool_const_inline::a from [34] (bool~) bool_const_inline::$5 ← (byte) $15 < (byte) bool_const_inline::a
Successful SSA optimization Pass2UnaryNotSimplification
Alias (bool) bool_const_vars::b1#0 = (bool~) bool_const_vars::$3
Alias (bool) bool_const_vars::b2#0 = (bool~) bool_const_vars::$6
@ -231,42 +228,42 @@ Rewriting || if()-condition to two if()s [18] (bool) bool_const_vars::b2#0 ← (
Rewriting && if()-condition to two if()s [32] (bool~) bool_const_inline::$3 ← (bool~) bool_const_inline::$1 && (bool~) bool_const_inline::$2
Successful SSA optimization Pass2ConditionalAndOrRewriting
Constant (const byte*) SCREEN = (byte*) 1024
Constant (const bool) bool_const_if::b#0 = true
Constant (const byte) bool_const_vars::a#0 = $e
Constant (const byte) bool_const_inline::a#0 = $17
Constant (const bool) bool_const_if::b = true
Constant (const byte) bool_const_vars::a = $e
Constant (const byte) bool_const_inline::a = $17
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [6] if((const bool) bool_const_if::b#0) goto bool_const_if::@1
if() condition always true - replacing block destination [6] if((const bool) bool_const_if::b) goto bool_const_if::@1
if() condition always false - eliminating if(false) goto bool_const_vars::@1
Successful SSA optimization Pass2ConstantIfs
Simplifying expression containing zero SCREEN in [7] *((const byte*) SCREEN + (byte) 0) ← (byte) 't'
Simplifying expression containing zero SCREEN in [8] *((const byte*) SCREEN + (byte) 0) ← (byte) 'f'
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused constant (const bool) bool_const_if::b#0
Eliminating unused constant (const bool) bool_const_if::b
Successful SSA optimization PassNEliminateUnusedVars
Removing unused block bool_const_if::@3
Successful SSA optimization Pass2EliminateUnusedBlocks
Simple Condition (bool~) bool_const_vars::$0 [10] if((const byte) bool_const_vars::a#0==(byte) $f) goto bool_const_vars::@6
Simple Condition (bool~) bool_const_inline::$0 [18] if((const byte) bool_const_inline::a#0!=(byte) $2c) goto bool_const_inline::@1
Simple Condition (bool~) bool_const_vars::$4 [23] if((const byte) bool_const_vars::a#0!=(byte) $2c) goto bool_const_vars::@5
Simple Condition (bool~) bool_const_vars::$2 [24] if((byte) $15>=(const byte) bool_const_vars::a#0) goto bool_const_vars::@6
Simple Condition (bool~) bool_const_inline::$6 [25] if((byte) $15>=(const byte) bool_const_inline::a#0) goto bool_const_inline::@1
Simple Condition (bool~) bool_const_inline::$1 [26] if((const byte) bool_const_inline::a#0>=(byte) -8) goto bool_const_inline::@7
Simple Condition (bool~) bool_const_vars::$5 [27] if((const byte) bool_const_vars::a#0>=(byte) -8) goto bool_const_vars::@5
Simple Condition (bool~) bool_const_inline::$2 [28] if((const byte) bool_const_inline::a#0==(byte) $f) goto bool_const_inline::@1
Simple Condition (bool~) bool_const_vars::$0 [10] if((const byte) bool_const_vars::a==(byte) $f) goto bool_const_vars::@6
Simple Condition (bool~) bool_const_inline::$0 [18] if((const byte) bool_const_inline::a!=(byte) $2c) goto bool_const_inline::@1
Simple Condition (bool~) bool_const_vars::$4 [23] if((const byte) bool_const_vars::a!=(byte) $2c) goto bool_const_vars::@5
Simple Condition (bool~) bool_const_vars::$2 [24] if((byte) $15>=(const byte) bool_const_vars::a) goto bool_const_vars::@6
Simple Condition (bool~) bool_const_inline::$6 [25] if((byte) $15>=(const byte) bool_const_inline::a) goto bool_const_inline::@1
Simple Condition (bool~) bool_const_inline::$1 [26] if((const byte) bool_const_inline::a>=(byte) -8) goto bool_const_inline::@7
Simple Condition (bool~) bool_const_vars::$5 [27] if((const byte) bool_const_vars::a>=(byte) -8) goto bool_const_vars::@5
Simple Condition (bool~) bool_const_inline::$2 [28] if((const byte) bool_const_inline::a==(byte) $f) goto bool_const_inline::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Negating conditional jump and destination [26] if((const byte) bool_const_inline::a#0<(byte) -8) goto bool_const_inline::@5
Negating conditional jump and destination [26] if((const byte) bool_const_inline::a<(byte) -8) goto bool_const_inline::@5
Successful SSA optimization Pass2ConditionalJumpSequenceImprovement
if() condition always false - eliminating [10] if((const byte) bool_const_vars::a#0==(byte) $f) goto bool_const_vars::@6
if() condition always true - replacing block destination [18] if((const byte) bool_const_inline::a#0!=(byte) $2c) goto bool_const_inline::@1
if() condition always true - replacing block destination [23] if((const byte) bool_const_vars::a#0!=(byte) $2c) goto bool_const_vars::@5
if() condition always true - replacing block destination [24] if((byte) $15>=(const byte) bool_const_vars::a#0) goto bool_const_vars::@6
if() condition always false - eliminating [25] if((byte) $15>=(const byte) bool_const_inline::a#0) goto bool_const_inline::@1
if() condition always false - eliminating [26] if((const byte) bool_const_inline::a#0<(byte) -8) goto bool_const_inline::@5
if() condition always true - replacing block destination [27] if((const byte) bool_const_vars::a#0>=(byte) -8) goto bool_const_vars::@5
if() condition always false - eliminating [28] if((const byte) bool_const_inline::a#0==(byte) $f) goto bool_const_inline::@1
if() condition always false - eliminating [10] if((const byte) bool_const_vars::a==(byte) $f) goto bool_const_vars::@6
if() condition always true - replacing block destination [18] if((const byte) bool_const_inline::a!=(byte) $2c) goto bool_const_inline::@1
if() condition always true - replacing block destination [23] if((const byte) bool_const_vars::a!=(byte) $2c) goto bool_const_vars::@5
if() condition always true - replacing block destination [24] if((byte) $15>=(const byte) bool_const_vars::a) goto bool_const_vars::@6
if() condition always false - eliminating [25] if((byte) $15>=(const byte) bool_const_inline::a) goto bool_const_inline::@1
if() condition always false - eliminating [26] if((const byte) bool_const_inline::a<(byte) -8) goto bool_const_inline::@5
if() condition always true - replacing block destination [27] if((const byte) bool_const_vars::a>=(byte) -8) goto bool_const_vars::@5
if() condition always false - eliminating [28] if((const byte) bool_const_inline::a==(byte) $f) goto bool_const_inline::@1
Successful SSA optimization Pass2ConstantIfs
Eliminating unused constant (const byte) bool_const_vars::a#0
Eliminating unused constant (const byte) bool_const_inline::a#0
Eliminating unused constant (const byte) bool_const_vars::a
Eliminating unused constant (const byte) bool_const_inline::a
Successful SSA optimization PassNEliminateUnusedVars
Removing unused block bool_const_vars::@1
Removing unused block bool_const_inline::@3
@ -379,11 +376,8 @@ bool_const_if::@return: scope:[bool_const_if] from bool_const_if::@1
VARIABLE REGISTER WEIGHTS
(void()) bool_const_if()
(bool) bool_const_if::b
(void()) bool_const_inline()
(byte) bool_const_inline::a
(void()) bool_const_vars()
(byte) bool_const_vars::a
(bool) bool_const_vars::b
(bool) bool_const_vars::b1
(bool) bool_const_vars::b2
@ -663,15 +657,12 @@ FINAL SYMBOL TABLE
(void()) bool_const_if()
(label) bool_const_if::@1
(label) bool_const_if::@return
(bool) bool_const_if::b
(void()) bool_const_inline()
(label) bool_const_inline::@1
(label) bool_const_inline::@return
(byte) bool_const_inline::a
(void()) bool_const_vars()
(label) bool_const_vars::@1
(label) bool_const_vars::@return
(byte) bool_const_vars::a
(bool) bool_const_vars::b
(bool) bool_const_vars::b1
(bool) bool_const_vars::b2

View File

@ -5,15 +5,12 @@
(void()) bool_const_if()
(label) bool_const_if::@1
(label) bool_const_if::@return
(bool) bool_const_if::b
(void()) bool_const_inline()
(label) bool_const_inline::@1
(label) bool_const_inline::@return
(byte) bool_const_inline::a
(void()) bool_const_vars()
(label) bool_const_vars::@1
(label) bool_const_vars::@return
(byte) bool_const_vars::a
(bool) bool_const_vars::b
(bool) bool_const_vars::b1
(bool) bool_const_vars::b2

View File

@ -25,7 +25,7 @@ main::@5: scope:[main] from main::@1
[12] if((bool~) main::$2) goto main::@2
to:main::@4
main::@4: scope:[main] from main::@5
[13] *((const byte*) main::screen#0 + (byte) main::i#2) ← (byte) ' '
[13] *((const byte*) main::screen + (byte) main::i#2) ← (byte) ' '
to:main::@3
main::@3: scope:[main] from main::@2 main::@4
[14] (byte) main::i#1 ← ++ (byte) main::i#2
@ -35,7 +35,7 @@ main::@return: scope:[main] from main::@3
[16] return
to:@return
main::@2: scope:[main] from main::@5
[17] *((const byte*) main::screen#0 + (byte) main::i#2) ← (byte) '*'
[17] *((const byte*) main::screen + (byte) main::i#2) ← (byte) '*'
to:main::@3
(bool()) isSet((byte) isSet::i , (bool) isSet::b)

View File

@ -10,7 +10,7 @@ CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from @2
(byte*) main::screen#0 ← ((byte*)) (number) $400
(byte*) main::screen ← ((byte*)) (number) $400
(byte) main::i#0 ← (byte) 0
to:main::@1
main::@1: scope:[main] from main main::@3
@ -30,11 +30,11 @@ main::@7: scope:[main] from main::@1
to:main::@4
main::@2: scope:[main] from main::@7
(byte) main::i#3 ← phi( main::@7/(byte) main::i#6 )
*((byte*) main::screen#0 + (byte) main::i#3) ← (byte) '*'
*((byte*) main::screen + (byte) main::i#3) ← (byte) '*'
to:main::@3
main::@4: scope:[main] from main::@7
(byte) main::i#4 ← phi( main::@7/(byte) main::i#6 )
*((byte*) main::screen#0 + (byte) main::i#4) ← (byte) ' '
*((byte*) main::screen + (byte) main::i#4) ← (byte) ' '
to:main::@3
main::@3: scope:[main] from main::@2 main::@4
(byte) main::i#5 ← phi( main::@2/(byte) main::i#3 main::@4/(byte) main::i#4 )
@ -109,7 +109,6 @@ SYMBOL TABLE SSA
(byte) main::i#5
(byte) main::i#6
(byte*) main::screen
(byte*) main::screen#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
@ -118,7 +117,7 @@ Adding number conversion cast (unumber) 8 in (number~) isSet::$0 ← (byte) isSe
Adding number conversion cast (unumber) isSet::$0 in (number~) isSet::$0 ← (byte) isSet::i#1 & (unumber)(number) 8
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::screen ← (byte*)(number) $400
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 1
@ -145,7 +144,7 @@ Identical Phi Values (bool) isSet::b#1 (bool) isSet::b#0
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) main::$3 [19] if((byte) main::i#1!=rangelast(0,$64)) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant (const byte*) main::screen#0 = (byte*) 1024
Constant (const byte*) main::screen = (byte*) 1024
Constant (const byte) main::i#0 = 0
Successful SSA optimization Pass2ConstantIdentification
Resolved ranged next value [17] main::i#1 ← ++ main::i#2 to ++
@ -209,7 +208,7 @@ main::@5: scope:[main] from main::@1
[12] if((bool~) main::$2) goto main::@2
to:main::@4
main::@4: scope:[main] from main::@5
[13] *((const byte*) main::screen#0 + (byte) main::i#2) ← (byte) ' '
[13] *((const byte*) main::screen + (byte) main::i#2) ← (byte) ' '
to:main::@3
main::@3: scope:[main] from main::@2 main::@4
[14] (byte) main::i#1 ← ++ (byte) main::i#2
@ -219,7 +218,7 @@ main::@return: scope:[main] from main::@3
[16] return
to:@return
main::@2: scope:[main] from main::@5
[17] *((const byte*) main::screen#0 + (byte) main::i#2) ← (byte) '*'
[17] *((const byte*) main::screen + (byte) main::i#2) ← (byte) '*'
to:main::@3
(bool()) isSet((byte) isSet::i , (bool) isSet::b)
@ -250,7 +249,6 @@ VARIABLE REGISTER WEIGHTS
(byte) main::i
(byte) main::i#1 16.5
(byte) main::i#2 6.6
(byte*) main::screen
Initial phi equivalence classes
[ main::i#2 main::i#1 ]
@ -358,7 +356,7 @@ main: {
jmp b4
// main::@4
b4:
// [13] *((const byte*) main::screen#0 + (byte) main::i#2) ← (byte) ' ' -- pbuc1_derefidx_vbuz1=vbuc2
// [13] *((const byte*) main::screen + (byte) main::i#2) ← (byte) ' ' -- pbuc1_derefidx_vbuz1=vbuc2
lda #' '
ldy.z i
sta screen,y
@ -378,7 +376,7 @@ main: {
rts
// main::@2
b2:
// [17] *((const byte*) main::screen#0 + (byte) main::i#2) ← (byte) '*' -- pbuc1_derefidx_vbuz1=vbuc2
// [17] *((const byte*) main::screen + (byte) main::i#2) ← (byte) '*' -- pbuc1_derefidx_vbuz1=vbuc2
lda #'*'
ldy.z i
sta screen,y
@ -421,15 +419,15 @@ isSet: {
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [7] (bool) isSet::b#0 ← (byte~) main::$0 == (byte) 0 [ main::i#2 isSet::b#0 ] ( main:2 [ main::i#2 isSet::b#0 ] ) 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 ]
Statement [13] *((const byte*) main::screen#0 + (byte) main::i#2) ← (byte) ' ' [ main::i#2 ] ( main:2 [ main::i#2 ] ) always clobbers reg byte a
Statement [17] *((const byte*) main::screen#0 + (byte) main::i#2) ← (byte) '*' [ main::i#2 ] ( main:2 [ main::i#2 ] ) always clobbers reg byte a
Statement [13] *((const byte*) main::screen + (byte) main::i#2) ← (byte) ' ' [ main::i#2 ] ( main:2 [ main::i#2 ] ) always clobbers reg byte a
Statement [17] *((const byte*) main::screen + (byte) main::i#2) ← (byte) '*' [ main::i#2 ] ( main:2 [ main::i#2 ] ) always clobbers reg byte a
Statement [19] (bool~) isSet::$1 ← (byte~) isSet::$0 != (byte) 0 [ isSet::b#0 isSet::$1 ] ( main:2::isSet:9 [ main::i#2 isSet::b#0 isSet::$1 ] ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp ZP_BOOL:4 [ isSet::b#0 ]
Statement [20] (bool) isSet::return#1 ← (bool) isSet::b#0 || (bool~) isSet::$1 [ isSet::return#1 ] ( main:2::isSet:9 [ main::i#2 isSet::return#1 ] ) always clobbers reg byte a
Statement [6] (byte~) main::$0 ← (byte) main::i#2 & (byte) 1 [ main::i#2 main::$0 ] ( main:2 [ main::i#2 main::$0 ] ) always clobbers reg byte a
Statement [7] (bool) isSet::b#0 ← (byte~) main::$0 == (byte) 0 [ main::i#2 isSet::b#0 ] ( main:2 [ main::i#2 isSet::b#0 ] ) always clobbers reg byte a
Statement [13] *((const byte*) main::screen#0 + (byte) main::i#2) ← (byte) ' ' [ main::i#2 ] ( main:2 [ main::i#2 ] ) always clobbers reg byte a
Statement [17] *((const byte*) main::screen#0 + (byte) main::i#2) ← (byte) '*' [ main::i#2 ] ( main:2 [ main::i#2 ] ) always clobbers reg byte a
Statement [13] *((const byte*) main::screen + (byte) main::i#2) ← (byte) ' ' [ main::i#2 ] ( main:2 [ main::i#2 ] ) always clobbers reg byte a
Statement [17] *((const byte*) main::screen + (byte) main::i#2) ← (byte) '*' [ main::i#2 ] ( main:2 [ main::i#2 ] ) always clobbers reg byte a
Statement [19] (bool~) isSet::$1 ← (byte~) isSet::$0 != (byte) 0 [ isSet::b#0 isSet::$1 ] ( main:2::isSet:9 [ main::i#2 isSet::b#0 isSet::$1 ] ) always clobbers reg byte a
Statement [20] (bool) isSet::return#1 ← (bool) isSet::b#0 || (bool~) isSet::$1 [ isSet::return#1 ] ( main:2::isSet:9 [ main::i#2 isSet::return#1 ] ) 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 ,
@ -515,7 +513,7 @@ main: {
jmp b4
// main::@4
b4:
// [13] *((const byte*) main::screen#0 + (byte) main::i#2) ← (byte) ' ' -- pbuc1_derefidx_vbuxx=vbuc2
// [13] *((const byte*) main::screen + (byte) main::i#2) ← (byte) ' ' -- pbuc1_derefidx_vbuxx=vbuc2
lda #' '
sta screen,x
jmp b3
@ -533,7 +531,7 @@ main: {
rts
// main::@2
b2:
// [17] *((const byte*) main::screen#0 + (byte) main::i#2) ← (byte) '*' -- pbuc1_derefidx_vbuxx=vbuc2
// [17] *((const byte*) main::screen + (byte) main::i#2) ← (byte) '*' -- pbuc1_derefidx_vbuxx=vbuc2
lda #'*'
sta screen,x
jmp b3
@ -621,8 +619,7 @@ FINAL SYMBOL TABLE
(byte) main::i
(byte) main::i#1 reg byte x 16.5
(byte) main::i#2 reg byte x 6.6
(byte*) main::screen
(const byte*) main::screen#0 screen = (byte*) 1024
(const byte*) main::screen screen = (byte*) 1024
reg byte x [ main::i#2 main::i#1 ]
reg byte a [ main::$0 ]
@ -686,7 +683,7 @@ main: {
bne b2
// main::@4
// screen[i] = ' '
// [13] *((const byte*) main::screen#0 + (byte) main::i#2) ← (byte) ' ' -- pbuc1_derefidx_vbuxx=vbuc2
// [13] *((const byte*) main::screen + (byte) main::i#2) ← (byte) ' ' -- pbuc1_derefidx_vbuxx=vbuc2
lda #' '
sta screen,x
// main::@3
@ -704,7 +701,7 @@ main: {
// main::@2
b2:
// screen[i] = '*'
// [17] *((const byte*) main::screen#0 + (byte) main::i#2) ← (byte) '*' -- pbuc1_derefidx_vbuxx=vbuc2
// [17] *((const byte*) main::screen + (byte) main::i#2) ← (byte) '*' -- pbuc1_derefidx_vbuxx=vbuc2
lda #'*'
sta screen,x
jmp b3

View File

@ -24,8 +24,7 @@
(byte) main::i
(byte) main::i#1 reg byte x 16.5
(byte) main::i#2 reg byte x 6.6
(byte*) main::screen
(const byte*) main::screen#0 screen = (byte*) 1024
(const byte*) main::screen screen = (byte*) 1024
reg byte x [ main::i#2 main::i#1 ]
reg byte a [ main::$0 ]

View File

@ -13,11 +13,11 @@ main: scope:[main] from @1
[4] phi()
to:main::@1
main::@1: scope:[main] from main main::@2
[5] (byte) main::y#2 ← phi( main/(const byte) main::y0#0 main::@2/(byte) main::y#4 )
[5] (byte) main::y#2 ← phi( main/(const byte) main::y0 main::@2/(byte) main::y#4 )
[5] (byte) main::e#3 ← phi( main/(const byte) main::yd#0/(byte) 2 main::@2/(byte) main::e#5 )
[5] (byte) main::x#2 ← phi( main/(const byte) main::x0#0 main::@2/(byte) main::x#1 )
[5] (byte*) main::cursor#3 ← phi( main/(const byte[$28*$19]) SCREEN+(const byte) main::y0#0*(byte) $28+(const byte) main::x0#0 main::@2/(byte*) main::cursor#5 )
[6] *((byte*) main::cursor#3) ← (const byte) STAR#0
[5] (byte) main::x#2 ← phi( main/(const byte) main::x0 main::@2/(byte) main::x#1 )
[5] (byte*) main::cursor#3 ← phi( main/(const byte[$28*$19]) SCREEN+(const byte) main::y0*(byte) $28+(const byte) main::x0 main::@2/(byte*) main::cursor#5 )
[6] *((byte*) main::cursor#3) ← (const byte) STAR
[7] (byte) main::x#1 ← (byte) main::x#2 + (byte) 1
[8] (byte*) main::cursor#1 ← (byte*) main::cursor#3 + (byte) 1
[9] (byte) main::e#1 ← (byte) main::e#3 + (const byte) main::yd#0
@ -32,7 +32,7 @@ main::@2: scope:[main] from main::@1 main::@3
[14] (byte) main::y#4 ← phi( main::@1/(byte) main::y#2 main::@3/(byte) main::y#1 )
[14] (byte) main::e#5 ← phi( main::@1/(byte) main::e#1 main::@3/(byte) main::e#2 )
[14] (byte*) main::cursor#5 ← phi( main::@1/(byte*) main::cursor#1 main::@3/(byte*) main::cursor#2 )
[15] if((byte) main::x#1<(const byte) main::x1#0+(byte) 1) goto main::@1
[15] if((byte) main::x#1<(const byte) main::x1+(byte) 1) goto main::@1
to:main::@return
main::@return: scope:[main] from main::@2
[16] return

View File

@ -7,22 +7,22 @@ Culled Empty Block (label) main::@4
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
(byte) STAR#0 ← (number) $51
(byte) STAR ← (number) $51
(byte[$28*$19]) SCREEN ← ((byte[$28*$19])) (number) $400
to:@1
(void()) main()
main: scope:[main] from @1
(byte) main::x0#0 ← (number) 4
(byte) main::y0#0 ← (number) 4
(byte) main::x1#0 ← (number) $27
(byte) main::y1#0 ← (number) $18
(byte~) main::$0 ← (byte) main::x1#0 - (byte) main::x0#0
(byte) main::x0 ← (number) 4
(byte) main::y0 ← (number) 4
(byte) main::x1 ← (number) $27
(byte) main::y1 ← (number) $18
(byte~) main::$0 ← (byte) main::x1 - (byte) main::x0
(byte) main::xd#0 ← (byte~) main::$0
(byte~) main::$1 ← (byte) main::y1#0 - (byte) main::y0#0
(byte~) main::$1 ← (byte) main::y1 - (byte) main::y0
(byte) main::yd#0 ← (byte~) main::$1
(byte) main::x#0 ← (byte) main::x0#0
(byte) main::y#0 ← (byte) main::y0#0
(byte) main::x#0 ← (byte) main::x0
(byte) main::y#0 ← (byte) main::y0
(number~) main::$2 ← (byte) main::yd#0 / (number) 2
(byte) main::e#0 ← (number~) main::$2
(number~) main::$3 ← (byte) main::y#0 * (number) $28
@ -37,7 +37,7 @@ main::@1: scope:[main] from main main::@2
(byte) main::e#3 ← phi( main/(byte) main::e#0 main::@2/(byte) main::e#5 )
(byte) main::x#2 ← phi( main/(byte) main::x#0 main::@2/(byte) main::x#3 )
(byte*) main::cursor#3 ← phi( main/(byte*) main::cursor#0 main::@2/(byte*) main::cursor#5 )
*((byte*) main::cursor#3) ← (byte) STAR#0
*((byte*) main::cursor#3) ← (byte) STAR
(number~) main::$6 ← (byte) main::x#2 + (number) 1
(byte) main::x#1 ← (number~) main::$6
(byte*~) main::$7 ← (byte*) main::cursor#3 + (number) 1
@ -55,7 +55,7 @@ main::@2: scope:[main] from main::@1 main::@3
(byte) main::e#5 ← phi( main::@1/(byte) main::e#1 main::@3/(byte) main::e#2 )
(byte*) main::cursor#5 ← phi( main::@1/(byte*) main::cursor#1 main::@3/(byte*) main::cursor#2 )
(byte) main::x#3 ← phi( main::@1/(byte) main::x#1 main::@3/(byte) main::x#4 )
(number~) main::$14 ← (byte) main::x1#0 + (number) 1
(number~) main::$14 ← (byte) main::x1 + (number) 1
(bool~) main::$15 ← (byte) main::x#3 < (number~) main::$14
if((bool~) main::$15) goto main::@1
to:main::@return
@ -90,7 +90,6 @@ SYMBOL TABLE SSA
(label) @end
(byte[$28*$19]) SCREEN
(byte) STAR
(byte) STAR#0
(void()) main()
(byte~) main::$0
(byte~) main::$1
@ -133,9 +132,7 @@ SYMBOL TABLE SSA
(byte) main::x#3
(byte) main::x#4
(byte) main::x0
(byte) main::x0#0
(byte) main::x1
(byte) main::x1#0
(byte) main::xd
(byte) main::xd#0
(byte) main::xd#1
@ -148,20 +145,18 @@ SYMBOL TABLE SSA
(byte) main::y#3
(byte) main::y#4
(byte) main::y0
(byte) main::y0#0
(byte) main::y1
(byte) main::y1#0
(byte) main::yd
(byte) main::yd#0
(byte) main::yd#1
(byte) main::yd#2
(byte) main::yd#3
Adding number conversion cast (unumber) $51 in (byte) STAR#0 ← (number) $51
Adding number conversion cast (unumber) 4 in (byte) main::x0#0 ← (number) 4
Adding number conversion cast (unumber) 4 in (byte) main::y0#0 ← (number) 4
Adding number conversion cast (unumber) $27 in (byte) main::x1#0 ← (number) $27
Adding number conversion cast (unumber) $18 in (byte) main::y1#0 ← (number) $18
Adding number conversion cast (unumber) $51 in (byte) STAR ← (number) $51
Adding number conversion cast (unumber) 4 in (byte) main::x0 ← (number) 4
Adding number conversion cast (unumber) 4 in (byte) main::y0 ← (number) 4
Adding number conversion cast (unumber) $27 in (byte) main::x1 ← (number) $27
Adding number conversion cast (unumber) $18 in (byte) main::y1 ← (number) $18
Adding number conversion cast (unumber) 2 in (number~) main::$2 ← (byte) main::yd#0 / (number) 2
Adding number conversion cast (unumber) main::$2 in (number~) main::$2 ← (byte) main::yd#0 / (unumber)(number) 2
Adding number conversion cast (unumber) $28 in (number~) main::$3 ← (byte) main::y#0 * (number) $28
@ -169,18 +164,18 @@ Adding number conversion cast (unumber) main::$3 in (number~) main::$3 ← (byte
Adding number conversion cast (unumber) 1 in (number~) main::$6 ← (byte) main::x#2 + (number) 1
Adding number conversion cast (unumber) main::$6 in (number~) main::$6 ← (byte) main::x#2 + (unumber)(number) 1
Adding number conversion cast (unumber) 1 in (byte*~) main::$7 ← (byte*) main::cursor#3 + (number) 1
Adding number conversion cast (unumber) 1 in (number~) main::$14 ← (byte) main::x1#0 + (number) 1
Adding number conversion cast (unumber) main::$14 in (number~) main::$14 ← (byte) main::x1#0 + (unumber)(number) 1
Adding number conversion cast (unumber) 1 in (number~) main::$14 ← (byte) main::x1 + (number) 1
Adding number conversion cast (unumber) main::$14 in (number~) main::$14 ← (byte) main::x1 + (unumber)(number) 1
Adding number conversion cast (unumber) 1 in (number~) main::$11 ← (byte) main::y#2 + (number) 1
Adding number conversion cast (unumber) main::$11 in (number~) main::$11 ← (byte) main::y#2 + (unumber)(number) 1
Adding number conversion cast (unumber) $28 in (byte*~) main::$12 ← (byte*) main::cursor#4 + (number) $28
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte) STAR#0 ← (unumber)(number) $51
Inlining cast (byte) STAR ← (unumber)(number) $51
Inlining cast (byte[$28*$19]) SCREEN ← (byte[$28*$19])(number) $400
Inlining cast (byte) main::x0#0 ← (unumber)(number) 4
Inlining cast (byte) main::y0#0 ← (unumber)(number) 4
Inlining cast (byte) main::x1#0 ← (unumber)(number) $27
Inlining cast (byte) main::y1#0 ← (unumber)(number) $18
Inlining cast (byte) main::x0 ← (unumber)(number) 4
Inlining cast (byte) main::y0 ← (unumber)(number) 4
Inlining cast (byte) main::x1 ← (unumber)(number) $27
Inlining cast (byte) main::y1 ← (unumber)(number) $18
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast $51
Simplifying constant pointer cast (byte*) 1024
@ -212,14 +207,14 @@ Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in (unumber~) main::$2 ← (byte) main::yd#0 / (byte) 2
Inferred type updated to byte in (unumber~) main::$3 ← (byte) main::y#0 * (byte) $28
Inferred type updated to byte in (unumber~) main::$6 ← (byte) main::x#2 + (byte) 1
Inferred type updated to byte in (unumber~) main::$14 ← (byte) main::x1#0 + (byte) 1
Inferred type updated to byte in (unumber~) main::$14 ← (byte) main::x1 + (byte) 1
Inferred type updated to byte in (unumber~) main::$11 ← (byte) main::y#2 + (byte) 1
Inversing boolean not [27] (bool~) main::$10 ← (byte) main::xd#1 > (byte) main::e#1 from [26] (bool~) main::$9 ← (byte) main::xd#1 <= (byte) main::e#1
Successful SSA optimization Pass2UnaryNotSimplification
Alias (byte) main::xd#0 = (byte~) main::$0
Alias (byte) main::yd#0 = (byte~) main::$1
Alias (byte) main::x0#0 = (byte) main::x#0
Alias (byte) main::y0#0 = (byte) main::y#0
Alias (byte) main::x0 = (byte) main::x#0
Alias (byte) main::y0 = (byte) main::y#0
Alias (byte) main::e#0 = (byte~) main::$2
Alias (byte*) main::cursor#0 = (byte*~) main::$5
Alias (byte) main::x#1 = (byte~) main::$6 (byte) main::x#4
@ -242,22 +237,22 @@ Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) main::$10 [28] if((byte) main::xd#0>(byte) main::e#1) goto main::@2
Simple Condition (bool~) main::$15 [32] if((byte) main::x#1<(byte~) main::$14) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant (const byte) STAR#0 = $51
Constant (const byte) STAR = $51
Constant (const byte[$28*$19]) SCREEN = (byte*) 1024
Constant (const byte) main::x0#0 = 4
Constant (const byte) main::y0#0 = 4
Constant (const byte) main::x1#0 = $27
Constant (const byte) main::y1#0 = $18
Constant (const byte) main::x0 = 4
Constant (const byte) main::y0 = 4
Constant (const byte) main::x1 = $27
Constant (const byte) main::y1 = $18
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [0] (byte) main::xd#0 ← (const byte) main::x1#0 - (const byte) main::x0#0
Constant right-side identified [1] (byte) main::yd#0 ← (const byte) main::y1#0 - (const byte) main::y0#0
Constant right-side identified [3] (byte~) main::$3 ← (const byte) main::y0#0 * (byte) $28
Constant right-side identified [13] (byte~) main::$14 ← (const byte) main::x1#0 + (byte) 1
Constant right-side identified [0] (byte) main::xd#0 ← (const byte) main::x1 - (const byte) main::x0
Constant right-side identified [1] (byte) main::yd#0 ← (const byte) main::y1 - (const byte) main::y0
Constant right-side identified [3] (byte~) main::$3 ← (const byte) main::y0 * (byte) $28
Constant right-side identified [13] (byte~) main::$14 ← (const byte) main::x1 + (byte) 1
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::xd#0 = main::x1#0-main::x0#0
Constant (const byte) main::yd#0 = main::y1#0-main::y0#0
Constant (const byte) main::$3 = main::y0#0*$28
Constant (const byte) main::$14 = main::x1#0+1
Constant (const byte) main::xd#0 = main::x1-main::x0
Constant (const byte) main::yd#0 = main::y1-main::y0
Constant (const byte) main::$3 = main::y0*$28
Constant (const byte) main::$14 = main::x1+1
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [0] (byte) main::e#0 ← (const byte) main::yd#0 / (byte) 2
Constant right-side identified [1] (byte*~) main::$4 ← (const byte[$28*$19]) SCREEN + (const byte) main::$3
@ -265,17 +260,17 @@ Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::e#0 = main::yd#0/2
Constant (const byte*) main::$4 = SCREEN+main::$3
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [0] (byte*) main::cursor#0 ← (const byte*) main::$4 + (const byte) main::x0#0
Constant right-side identified [0] (byte*) main::cursor#0 ← (const byte*) main::$4 + (const byte) main::x0
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte*) main::cursor#0 = main::$4+main::x0#0
Constant (const byte*) main::cursor#0 = main::$4+main::x0
Successful SSA optimization Pass2ConstantIdentification
Inlining constant with var siblings (const byte) main::e#0
Inlining constant with var siblings (const byte*) main::cursor#0
Constant inlined main::$3 = (const byte) main::y0#0*(byte) $28
Constant inlined main::$14 = (const byte) main::x1#0+(byte) 1
Constant inlined main::$4 = (const byte[$28*$19]) SCREEN+(const byte) main::y0#0*(byte) $28
Constant inlined main::$3 = (const byte) main::y0*(byte) $28
Constant inlined main::$14 = (const byte) main::x1+(byte) 1
Constant inlined main::$4 = (const byte[$28*$19]) SCREEN+(const byte) main::y0*(byte) $28
Constant inlined main::e#0 = (const byte) main::yd#0/(byte) 2
Constant inlined main::cursor#0 = (const byte[$28*$19]) SCREEN+(const byte) main::y0#0*(byte) $28+(const byte) main::x0#0
Constant inlined main::cursor#0 = (const byte[$28*$19]) SCREEN+(const byte) main::y0*(byte) $28+(const byte) main::x0
Successful SSA optimization Pass2ConstantInlining
Added new block during phi lifting main::@5(between main::@2 and main::@1)
Added new block during phi lifting main::@6(between main::@1 and main::@2)
@ -323,11 +318,11 @@ main: scope:[main] from @1
[4] phi()
to:main::@1
main::@1: scope:[main] from main main::@2
[5] (byte) main::y#2 ← phi( main/(const byte) main::y0#0 main::@2/(byte) main::y#4 )
[5] (byte) main::y#2 ← phi( main/(const byte) main::y0 main::@2/(byte) main::y#4 )
[5] (byte) main::e#3 ← phi( main/(const byte) main::yd#0/(byte) 2 main::@2/(byte) main::e#5 )
[5] (byte) main::x#2 ← phi( main/(const byte) main::x0#0 main::@2/(byte) main::x#1 )
[5] (byte*) main::cursor#3 ← phi( main/(const byte[$28*$19]) SCREEN+(const byte) main::y0#0*(byte) $28+(const byte) main::x0#0 main::@2/(byte*) main::cursor#5 )
[6] *((byte*) main::cursor#3) ← (const byte) STAR#0
[5] (byte) main::x#2 ← phi( main/(const byte) main::x0 main::@2/(byte) main::x#1 )
[5] (byte*) main::cursor#3 ← phi( main/(const byte[$28*$19]) SCREEN+(const byte) main::y0*(byte) $28+(const byte) main::x0 main::@2/(byte*) main::cursor#5 )
[6] *((byte*) main::cursor#3) ← (const byte) STAR
[7] (byte) main::x#1 ← (byte) main::x#2 + (byte) 1
[8] (byte*) main::cursor#1 ← (byte*) main::cursor#3 + (byte) 1
[9] (byte) main::e#1 ← (byte) main::e#3 + (const byte) main::yd#0
@ -342,7 +337,7 @@ main::@2: scope:[main] from main::@1 main::@3
[14] (byte) main::y#4 ← phi( main::@1/(byte) main::y#2 main::@3/(byte) main::y#1 )
[14] (byte) main::e#5 ← phi( main::@1/(byte) main::e#1 main::@3/(byte) main::e#2 )
[14] (byte*) main::cursor#5 ← phi( main::@1/(byte*) main::cursor#1 main::@3/(byte*) main::cursor#2 )
[15] if((byte) main::x#1<(const byte) main::x1#0+(byte) 1) goto main::@1
[15] if((byte) main::x#1<(const byte) main::x1+(byte) 1) goto main::@1
to:main::@return
main::@return: scope:[main] from main::@2
[16] return
@ -350,7 +345,6 @@ main::@return: scope:[main] from main::@2
VARIABLE REGISTER WEIGHTS
(byte) STAR
(void()) main()
(byte*) main::cursor
(byte*) main::cursor#1 8.25
@ -365,15 +359,11 @@ VARIABLE REGISTER WEIGHTS
(byte) main::x
(byte) main::x#1 3.666666666666667
(byte) main::x#2 11.0
(byte) main::x0
(byte) main::x1
(byte) main::xd
(byte) main::y
(byte) main::y#1 7.333333333333333
(byte) main::y#2 5.5
(byte) main::y#4 16.5
(byte) main::y0
(byte) main::y1
(byte) main::yd
Initial phi equivalence classes
@ -431,16 +421,16 @@ main: {
.label y = 6
// [5] phi from main to main::@1 [phi:main->main::@1]
b1_from_main:
// [5] phi (byte) main::y#2 = (const byte) main::y0#0 [phi:main->main::@1#0] -- vbuz1=vbuc1
// [5] phi (byte) main::y#2 = (const byte) main::y0 [phi:main->main::@1#0] -- vbuz1=vbuc1
lda #y0
sta.z y
// [5] phi (byte) main::e#3 = (const byte) main::yd#0/(byte) 2 [phi:main->main::@1#1] -- vbuz1=vbuc1
lda #yd/2
sta.z e
// [5] phi (byte) main::x#2 = (const byte) main::x0#0 [phi:main->main::@1#2] -- vbuz1=vbuc1
// [5] phi (byte) main::x#2 = (const byte) main::x0 [phi:main->main::@1#2] -- vbuz1=vbuc1
lda #x0
sta.z x
// [5] phi (byte*) main::cursor#3 = (const byte[$28*$19]) SCREEN+(const byte) main::y0#0*(byte) $28+(const byte) main::x0#0 [phi:main->main::@1#3] -- pbuz1=pbuc1
// [5] phi (byte*) main::cursor#3 = (const byte[$28*$19]) SCREEN+(const byte) main::y0*(byte) $28+(const byte) main::x0 [phi:main->main::@1#3] -- pbuz1=pbuc1
lda #<SCREEN+y0*$28+x0
sta.z cursor
lda #>SCREEN+y0*$28+x0
@ -455,7 +445,7 @@ main: {
jmp b1
// main::@1
b1:
// [6] *((byte*) main::cursor#3) ← (const byte) STAR#0 -- _deref_pbuz1=vbuc1
// [6] *((byte*) main::cursor#3) ← (const byte) STAR -- _deref_pbuz1=vbuc1
lda #STAR
ldy #0
sta (cursor),y
@ -500,7 +490,7 @@ main: {
jmp b2
// main::@2
b2:
// [15] if((byte) main::x#1<(const byte) main::x1#0+(byte) 1) goto main::@1 -- vbuz1_lt_vbuc1_then_la1
// [15] if((byte) main::x#1<(const byte) main::x1+(byte) 1) goto main::@1 -- vbuz1_lt_vbuc1_then_la1
lda.z x
cmp #x1+1
bcc b1_from_b2
@ -513,7 +503,7 @@ main: {
// File Data
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [6] *((byte*) main::cursor#3) ← (const byte) STAR#0 [ main::cursor#3 main::x#2 main::e#3 main::y#2 ] ( main:2 [ main::cursor#3 main::x#2 main::e#3 main::y#2 ] ) always clobbers reg byte a reg byte y
Statement [6] *((byte*) main::cursor#3) ← (const byte) STAR [ main::cursor#3 main::x#2 main::e#3 main::y#2 ] ( main:2 [ main::cursor#3 main::x#2 main::e#3 main::y#2 ] ) always clobbers reg byte a reg byte y
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:4 [ main::x#2 main::x#1 ]
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:4 [ main::x#2 main::x#1 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:5 [ main::e#3 main::e#5 main::e#1 main::e#2 ]
@ -525,12 +515,12 @@ Removing always clobbered register reg byte x as potential for zp ZP_BYTE:6 [ ma
Removing always clobbered register reg byte x as potential for zp ZP_BYTE:4 [ main::x#2 main::x#1 ]
Statement [12] (byte*) main::cursor#2 ← (byte*) main::cursor#1 + (byte) $28 [ main::x#1 main::e#1 main::y#1 main::cursor#2 ] ( main:2 [ main::x#1 main::e#1 main::y#1 main::cursor#2 ] ) always clobbers reg byte a
Statement [13] (byte) main::e#2 ← (byte) main::e#1 - (const byte) main::xd#0 [ main::x#1 main::y#1 main::cursor#2 main::e#2 ] ( main:2 [ main::x#1 main::y#1 main::cursor#2 main::e#2 ] ) always clobbers reg byte a reg byte x
Statement [15] if((byte) main::x#1<(const byte) main::x1#0+(byte) 1) goto main::@1 [ main::cursor#5 main::x#1 main::e#5 main::y#4 ] ( main:2 [ main::cursor#5 main::x#1 main::e#5 main::y#4 ] ) always clobbers reg byte a
Statement [6] *((byte*) main::cursor#3) ← (const byte) STAR#0 [ main::cursor#3 main::x#2 main::e#3 main::y#2 ] ( main:2 [ main::cursor#3 main::x#2 main::e#3 main::y#2 ] ) always clobbers reg byte a reg byte y
Statement [15] if((byte) main::x#1<(const byte) main::x1+(byte) 1) goto main::@1 [ main::cursor#5 main::x#1 main::e#5 main::y#4 ] ( main:2 [ main::cursor#5 main::x#1 main::e#5 main::y#4 ] ) always clobbers reg byte a
Statement [6] *((byte*) main::cursor#3) ← (const byte) STAR [ main::cursor#3 main::x#2 main::e#3 main::y#2 ] ( main:2 [ main::cursor#3 main::x#2 main::e#3 main::y#2 ] ) always clobbers reg byte a reg byte y
Statement [9] (byte) main::e#1 ← (byte) main::e#3 + (const byte) main::yd#0 [ main::y#2 main::x#1 main::cursor#1 main::e#1 ] ( main:2 [ main::y#2 main::x#1 main::cursor#1 main::e#1 ] ) always clobbers reg byte a reg byte x
Statement [12] (byte*) main::cursor#2 ← (byte*) main::cursor#1 + (byte) $28 [ main::x#1 main::e#1 main::y#1 main::cursor#2 ] ( main:2 [ main::x#1 main::e#1 main::y#1 main::cursor#2 ] ) always clobbers reg byte a
Statement [13] (byte) main::e#2 ← (byte) main::e#1 - (const byte) main::xd#0 [ main::x#1 main::y#1 main::cursor#2 main::e#2 ] ( main:2 [ main::x#1 main::y#1 main::cursor#2 main::e#2 ] ) always clobbers reg byte a reg byte x
Statement [15] if((byte) main::x#1<(const byte) main::x1#0+(byte) 1) goto main::@1 [ main::cursor#5 main::x#1 main::e#5 main::y#4 ] ( main:2 [ main::cursor#5 main::x#1 main::e#5 main::y#4 ] ) always clobbers reg byte a
Statement [15] if((byte) main::x#1<(const byte) main::x1+(byte) 1) goto main::@1 [ main::cursor#5 main::x#1 main::e#5 main::y#4 ] ( main:2 [ main::cursor#5 main::x#1 main::e#5 main::y#4 ] ) always clobbers reg byte a
Potential registers zp ZP_WORD:2 [ main::cursor#3 main::cursor#5 main::cursor#1 main::cursor#2 ] : zp ZP_WORD:2 ,
Potential registers zp ZP_BYTE:4 [ main::x#2 main::x#1 ] : zp ZP_BYTE:4 ,
Potential registers zp ZP_BYTE:5 [ main::e#3 main::e#5 main::e#1 main::e#2 ] : zp ZP_BYTE:5 , reg byte x ,
@ -586,15 +576,15 @@ main: {
.label y = 5
// [5] phi from main to main::@1 [phi:main->main::@1]
b1_from_main:
// [5] phi (byte) main::y#2 = (const byte) main::y0#0 [phi:main->main::@1#0] -- vbuz1=vbuc1
// [5] phi (byte) main::y#2 = (const byte) main::y0 [phi:main->main::@1#0] -- vbuz1=vbuc1
lda #y0
sta.z y
// [5] phi (byte) main::e#3 = (const byte) main::yd#0/(byte) 2 [phi:main->main::@1#1] -- vbuxx=vbuc1
ldx #yd/2
// [5] phi (byte) main::x#2 = (const byte) main::x0#0 [phi:main->main::@1#2] -- vbuz1=vbuc1
// [5] phi (byte) main::x#2 = (const byte) main::x0 [phi:main->main::@1#2] -- vbuz1=vbuc1
lda #x0
sta.z x
// [5] phi (byte*) main::cursor#3 = (const byte[$28*$19]) SCREEN+(const byte) main::y0#0*(byte) $28+(const byte) main::x0#0 [phi:main->main::@1#3] -- pbuz1=pbuc1
// [5] phi (byte*) main::cursor#3 = (const byte[$28*$19]) SCREEN+(const byte) main::y0*(byte) $28+(const byte) main::x0 [phi:main->main::@1#3] -- pbuz1=pbuc1
lda #<SCREEN+y0*$28+x0
sta.z cursor
lda #>SCREEN+y0*$28+x0
@ -609,7 +599,7 @@ main: {
jmp b1
// main::@1
b1:
// [6] *((byte*) main::cursor#3) ← (const byte) STAR#0 -- _deref_pbuz1=vbuc1
// [6] *((byte*) main::cursor#3) ← (const byte) STAR -- _deref_pbuz1=vbuc1
lda #STAR
ldy #0
sta (cursor),y
@ -651,7 +641,7 @@ main: {
jmp b2
// main::@2
b2:
// [15] if((byte) main::x#1<(const byte) main::x1#0+(byte) 1) goto main::@1 -- vbuz1_lt_vbuc1_then_la1
// [15] if((byte) main::x#1<(const byte) main::x1+(byte) 1) goto main::@1 -- vbuz1_lt_vbuc1_then_la1
lda.z x
cmp #x1+1
bcc b1_from_b2
@ -699,8 +689,7 @@ FINAL SYMBOL TABLE
(label) @begin
(label) @end
(const byte[$28*$19]) SCREEN SCREEN = (byte*) 1024
(byte) STAR
(const byte) STAR#0 STAR = (byte) $51
(const byte) STAR STAR = (byte) $51
(void()) main()
(label) main::@1
(label) main::@2
@ -719,22 +708,18 @@ FINAL SYMBOL TABLE
(byte) main::x
(byte) main::x#1 x zp ZP_BYTE:4 3.666666666666667
(byte) main::x#2 x zp ZP_BYTE:4 11.0
(byte) main::x0
(const byte) main::x0#0 x0 = (byte) 4
(byte) main::x1
(const byte) main::x1#0 x1 = (byte) $27
(const byte) main::x0 x0 = (byte) 4
(const byte) main::x1 x1 = (byte) $27
(byte) main::xd
(const byte) main::xd#0 xd = (const byte) main::x1#0-(const byte) main::x0#0
(const byte) main::xd#0 xd = (const byte) main::x1-(const byte) main::x0
(byte) main::y
(byte) main::y#1 y zp ZP_BYTE:5 7.333333333333333
(byte) main::y#2 y zp ZP_BYTE:5 5.5
(byte) main::y#4 y zp ZP_BYTE:5 16.5
(byte) main::y0
(const byte) main::y0#0 y0 = (byte) 4
(byte) main::y1
(const byte) main::y1#0 y1 = (byte) $18
(const byte) main::y0 y0 = (byte) 4
(const byte) main::y1 y1 = (byte) $18
(byte) main::yd
(const byte) main::yd#0 yd = (const byte) main::y1#0-(const byte) main::y0#0
(const byte) main::yd#0 yd = (const byte) main::y1-(const byte) main::y0
zp ZP_WORD:2 [ main::cursor#3 main::cursor#5 main::cursor#1 main::cursor#2 ]
zp ZP_BYTE:4 [ main::x#2 main::x#1 ]
@ -772,15 +757,15 @@ main: {
.label cursor = 2
.label y = 5
// [5] phi from main to main::@1 [phi:main->main::@1]
// [5] phi (byte) main::y#2 = (const byte) main::y0#0 [phi:main->main::@1#0] -- vbuz1=vbuc1
// [5] phi (byte) main::y#2 = (const byte) main::y0 [phi:main->main::@1#0] -- vbuz1=vbuc1
lda #y0
sta.z y
// [5] phi (byte) main::e#3 = (const byte) main::yd#0/(byte) 2 [phi:main->main::@1#1] -- vbuxx=vbuc1
ldx #yd/2
// [5] phi (byte) main::x#2 = (const byte) main::x0#0 [phi:main->main::@1#2] -- vbuz1=vbuc1
// [5] phi (byte) main::x#2 = (const byte) main::x0 [phi:main->main::@1#2] -- vbuz1=vbuc1
lda #x0
sta.z x
// [5] phi (byte*) main::cursor#3 = (const byte[$28*$19]) SCREEN+(const byte) main::y0#0*(byte) $28+(const byte) main::x0#0 [phi:main->main::@1#3] -- pbuz1=pbuc1
// [5] phi (byte*) main::cursor#3 = (const byte[$28*$19]) SCREEN+(const byte) main::y0*(byte) $28+(const byte) main::x0 [phi:main->main::@1#3] -- pbuz1=pbuc1
lda #<SCREEN+y0*$28+x0
sta.z cursor
lda #>SCREEN+y0*$28+x0
@ -793,7 +778,7 @@ main: {
// main::@1
b1:
// *cursor = STAR
// [6] *((byte*) main::cursor#3) ← (const byte) STAR#0 -- _deref_pbuz1=vbuc1
// [6] *((byte*) main::cursor#3) ← (const byte) STAR -- _deref_pbuz1=vbuc1
lda #STAR
ldy #0
sta (cursor),y
@ -838,7 +823,7 @@ main: {
// main::@2
b2:
// while (x<(x1+1))
// [15] if((byte) main::x#1<(const byte) main::x1#0+(byte) 1) goto main::@1 -- vbuz1_lt_vbuc1_then_la1
// [15] if((byte) main::x#1<(const byte) main::x1+(byte) 1) goto main::@1 -- vbuz1_lt_vbuc1_then_la1
lda.z x
cmp #x1+1
bcc b1

View File

@ -2,8 +2,7 @@
(label) @begin
(label) @end
(const byte[$28*$19]) SCREEN SCREEN = (byte*) 1024
(byte) STAR
(const byte) STAR#0 STAR = (byte) $51
(const byte) STAR STAR = (byte) $51
(void()) main()
(label) main::@1
(label) main::@2
@ -22,22 +21,18 @@
(byte) main::x
(byte) main::x#1 x zp ZP_BYTE:4 3.666666666666667
(byte) main::x#2 x zp ZP_BYTE:4 11.0
(byte) main::x0
(const byte) main::x0#0 x0 = (byte) 4
(byte) main::x1
(const byte) main::x1#0 x1 = (byte) $27
(const byte) main::x0 x0 = (byte) 4
(const byte) main::x1 x1 = (byte) $27
(byte) main::xd
(const byte) main::xd#0 xd = (const byte) main::x1#0-(const byte) main::x0#0
(const byte) main::xd#0 xd = (const byte) main::x1-(const byte) main::x0
(byte) main::y
(byte) main::y#1 y zp ZP_BYTE:5 7.333333333333333
(byte) main::y#2 y zp ZP_BYTE:5 5.5
(byte) main::y#4 y zp ZP_BYTE:5 16.5
(byte) main::y0
(const byte) main::y0#0 y0 = (byte) 4
(byte) main::y1
(const byte) main::y1#0 y1 = (byte) $18
(const byte) main::y0 y0 = (byte) 4
(const byte) main::y1 y1 = (byte) $18
(byte) main::yd
(const byte) main::yd#0 yd = (const byte) main::y1#0-(const byte) main::y0#0
(const byte) main::yd#0 yd = (const byte) main::y1-(const byte) main::y0
zp ZP_WORD:2 [ main::cursor#3 main::cursor#5 main::cursor#1 main::cursor#2 ]
zp ZP_BYTE:4 [ main::x#2 main::x#1 ]

View File

@ -13,27 +13,27 @@ main: scope:[main] from @1
[4] phi()
to:main::@1
main::@1: scope:[main] from main main::@2
[5] (byte) main::y#2 ← phi( main/(const byte) main::y0#0 main::@2/(byte) main::y#4 )
[5] (byte) main::e#3 ← phi( main/(const byte) main::y1#0/(byte) 2 main::@2/(byte) main::e#5 )
[5] (byte) main::x#2 ← phi( main/(const byte) main::x0#0 main::@2/(byte) main::x#1 )
[5] (byte) main::y#2 ← phi( main/(const byte) main::y0 main::@2/(byte) main::y#4 )
[5] (byte) main::e#3 ← phi( main/(const byte) main::y1/(byte) 2 main::@2/(byte) main::e#5 )
[5] (byte) main::x#2 ← phi( main/(const byte) main::x0 main::@2/(byte) main::x#1 )
[5] (word) main::idx#3 ← phi( main/(byte) 0 main::@2/(word) main::idx#5 )
[6] (byte*~) main::$15 ← (const byte[$28*$19]) main::screen + (word) main::idx#3
[7] *((byte*~) main::$15) ← (const byte) main::STAR#0
[7] *((byte*~) main::$15) ← (const byte) main::STAR
[8] (byte) main::x#1 ← (byte) main::x#2 + (byte) 1
[9] (word) main::idx#1 ← (word) main::idx#3 + (byte) 1
[10] (byte) main::e#1 ← (byte) main::e#3 + (const byte) main::y1#0
[11] if((const byte) main::x1#0>=(byte) main::e#1) goto main::@2
[10] (byte) main::e#1 ← (byte) main::e#3 + (const byte) main::y1
[11] if((const byte) main::x1>=(byte) main::e#1) goto main::@2
to:main::@3
main::@3: scope:[main] from main::@1
[12] (byte) main::y#1 ← (byte) main::y#2 + (byte) 1
[13] (word) main::idx#2 ← (word) main::idx#1 + (byte) $28
[14] (byte) main::e#2 ← (byte) main::e#1 - (const byte) main::x1#0
[14] (byte) main::e#2 ← (byte) main::e#1 - (const byte) main::x1
to:main::@2
main::@2: scope:[main] from main::@1 main::@3
[15] (byte) main::y#4 ← phi( main::@1/(byte) main::y#2 main::@3/(byte) main::y#1 )
[15] (byte) main::e#5 ← phi( main::@1/(byte) main::e#1 main::@3/(byte) main::e#2 )
[15] (word) main::idx#5 ← phi( main::@1/(word) main::idx#1 main::@3/(word) main::idx#2 )
[16] if((byte) main::x#1<(const byte) main::x1#0+(byte) 1) goto main::@1
[16] if((byte) main::x#1<(const byte) main::x1+(byte) 1) goto main::@1
to:main::@return
main::@return: scope:[main] from main::@2
[17] return

View File

@ -11,18 +11,18 @@ CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from @1
(byte) main::STAR#0 ← (number) $51
(byte) main::STAR ← (number) $51
(byte[$28*$19]) main::screen ← ((byte[$28*$19])) (number) $400
(byte) main::x0#0 ← (number) 0
(byte) main::y0#0 ← (number) 0
(byte) main::x1#0 ← (number) $27
(byte) main::y1#0 ← (number) $18
(byte~) main::$0 ← (byte) main::x1#0 - (byte) main::x0#0
(byte) main::x0 ← (number) 0
(byte) main::y0 ← (number) 0
(byte) main::x1 ← (number) $27
(byte) main::y1 ← (number) $18
(byte~) main::$0 ← (byte) main::x1 - (byte) main::x0
(byte) main::xd#0 ← (byte~) main::$0
(byte~) main::$1 ← (byte) main::y1#0 - (byte) main::y0#0
(byte~) main::$1 ← (byte) main::y1 - (byte) main::y0
(byte) main::yd#0 ← (byte~) main::$1
(byte) main::x#0 ← (byte) main::x0#0
(byte) main::y#0 ← (byte) main::y0#0
(byte) main::x#0 ← (byte) main::x0
(byte) main::y#0 ← (byte) main::y0
(number~) main::$2 ← (byte) main::yd#0 / (number) 2
(byte) main::e#0 ← (number~) main::$2
(number~) main::$3 ← (byte) main::y#0 * (number) $28
@ -36,7 +36,7 @@ main::@1: scope:[main] from main main::@2
(byte) main::e#3 ← phi( main/(byte) main::e#0 main::@2/(byte) main::e#5 )
(byte) main::x#2 ← phi( main/(byte) main::x#0 main::@2/(byte) main::x#3 )
(word) main::idx#3 ← phi( main/(word) main::idx#0 main::@2/(word) main::idx#5 )
*((byte[$28*$19]) main::screen + (word) main::idx#3) ← (byte) main::STAR#0
*((byte[$28*$19]) main::screen + (word) main::idx#3) ← (byte) main::STAR
(number~) main::$5 ← (byte) main::x#2 + (number) 1
(byte) main::x#1 ← (number~) main::$5
(number~) main::$6 ← (word) main::idx#3 + (number) 1
@ -54,7 +54,7 @@ main::@2: scope:[main] from main::@1 main::@3
(byte) main::e#5 ← phi( main::@1/(byte) main::e#1 main::@3/(byte) main::e#2 )
(word) main::idx#5 ← phi( main::@1/(word) main::idx#1 main::@3/(word) main::idx#2 )
(byte) main::x#3 ← phi( main::@1/(byte) main::x#1 main::@3/(byte) main::x#4 )
(number~) main::$13 ← (byte) main::x1#0 + (number) 1
(number~) main::$13 ← (byte) main::x1 + (number) 1
(bool~) main::$14 ← (byte) main::x#3 < (number~) main::$13
if((bool~) main::$14) goto main::@1
to:main::@return
@ -108,7 +108,6 @@ SYMBOL TABLE SSA
(label) main::@3
(label) main::@return
(byte) main::STAR
(byte) main::STAR#0
(byte) main::e
(byte) main::e#0
(byte) main::e#1
@ -131,9 +130,7 @@ SYMBOL TABLE SSA
(byte) main::x#3
(byte) main::x#4
(byte) main::x0
(byte) main::x0#0
(byte) main::x1
(byte) main::x1#0
(byte) main::xd
(byte) main::xd#0
(byte) main::xd#1
@ -146,20 +143,18 @@ SYMBOL TABLE SSA
(byte) main::y#3
(byte) main::y#4
(byte) main::y0
(byte) main::y0#0
(byte) main::y1
(byte) main::y1#0
(byte) main::yd
(byte) main::yd#0
(byte) main::yd#1
(byte) main::yd#2
(byte) main::yd#3
Adding number conversion cast (unumber) $51 in (byte) main::STAR#0 ← (number) $51
Adding number conversion cast (unumber) 0 in (byte) main::x0#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) main::y0#0 ← (number) 0
Adding number conversion cast (unumber) $27 in (byte) main::x1#0 ← (number) $27
Adding number conversion cast (unumber) $18 in (byte) main::y1#0 ← (number) $18
Adding number conversion cast (unumber) $51 in (byte) main::STAR ← (number) $51
Adding number conversion cast (unumber) 0 in (byte) main::x0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) main::y0 ← (number) 0
Adding number conversion cast (unumber) $27 in (byte) main::x1 ← (number) $27
Adding number conversion cast (unumber) $18 in (byte) main::y1 ← (number) $18
Adding number conversion cast (unumber) 2 in (number~) main::$2 ← (byte) main::yd#0 / (number) 2
Adding number conversion cast (unumber) main::$2 in (number~) main::$2 ← (byte) main::yd#0 / (unumber)(number) 2
Adding number conversion cast (unumber) $28 in (number~) main::$3 ← (byte) main::y#0 * (number) $28
@ -169,19 +164,19 @@ Adding number conversion cast (unumber) 1 in (number~) main::$5 ← (byte) main:
Adding number conversion cast (unumber) main::$5 in (number~) main::$5 ← (byte) main::x#2 + (unumber)(number) 1
Adding number conversion cast (unumber) 1 in (number~) main::$6 ← (word) main::idx#3 + (number) 1
Adding number conversion cast (unumber) main::$6 in (number~) main::$6 ← (word) main::idx#3 + (unumber)(number) 1
Adding number conversion cast (unumber) 1 in (number~) main::$13 ← (byte) main::x1#0 + (number) 1
Adding number conversion cast (unumber) main::$13 in (number~) main::$13 ← (byte) main::x1#0 + (unumber)(number) 1
Adding number conversion cast (unumber) 1 in (number~) main::$13 ← (byte) main::x1 + (number) 1
Adding number conversion cast (unumber) main::$13 in (number~) main::$13 ← (byte) main::x1 + (unumber)(number) 1
Adding number conversion cast (unumber) 1 in (number~) main::$10 ← (byte) main::y#2 + (number) 1
Adding number conversion cast (unumber) main::$10 in (number~) main::$10 ← (byte) main::y#2 + (unumber)(number) 1
Adding number conversion cast (unumber) $28 in (number~) main::$11 ← (word) main::idx#4 + (number) $28
Adding number conversion cast (unumber) main::$11 in (number~) main::$11 ← (word) main::idx#4 + (unumber)(number) $28
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte) main::STAR#0 ← (unumber)(number) $51
Inlining cast (byte) main::STAR ← (unumber)(number) $51
Inlining cast (byte[$28*$19]) main::screen ← (byte[$28*$19])(number) $400
Inlining cast (byte) main::x0#0 ← (unumber)(number) 0
Inlining cast (byte) main::y0#0 ← (unumber)(number) 0
Inlining cast (byte) main::x1#0 ← (unumber)(number) $27
Inlining cast (byte) main::y1#0 ← (unumber)(number) $18
Inlining cast (byte) main::x0 ← (unumber)(number) 0
Inlining cast (byte) main::y0 ← (unumber)(number) 0
Inlining cast (byte) main::x1 ← (unumber)(number) $27
Inlining cast (byte) main::y1 ← (unumber)(number) $18
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast $51
Simplifying constant pointer cast (byte*) 1024
@ -215,15 +210,15 @@ Inferred type updated to byte in (unumber~) main::$3 ← (byte) main::y#0 * (byt
Inferred type updated to byte in (unumber~) main::$4 ← (byte) main::x#0 + (byte~) main::$3
Inferred type updated to byte in (unumber~) main::$5 ← (byte) main::x#2 + (byte) 1
Inferred type updated to word in (unumber~) main::$6 ← (word) main::idx#3 + (byte) 1
Inferred type updated to byte in (unumber~) main::$13 ← (byte) main::x1#0 + (byte) 1
Inferred type updated to byte in (unumber~) main::$13 ← (byte) main::x1 + (byte) 1
Inferred type updated to byte in (unumber~) main::$10 ← (byte) main::y#2 + (byte) 1
Inferred type updated to word in (unumber~) main::$11 ← (word) main::idx#4 + (byte) $28
Inversing boolean not [26] (bool~) main::$9 ← (byte) main::xd#1 >= (byte) main::e#1 from [25] (bool~) main::$8 ← (byte) main::xd#1 < (byte) main::e#1
Successful SSA optimization Pass2UnaryNotSimplification
Alias (byte) main::xd#0 = (byte~) main::$0
Alias (byte) main::yd#0 = (byte~) main::$1
Alias (byte) main::x0#0 = (byte) main::x#0
Alias (byte) main::y0#0 = (byte) main::y#0
Alias (byte) main::x0 = (byte) main::x#0
Alias (byte) main::y0 = (byte) main::y#0
Alias (byte) main::e#0 = (byte~) main::$2
Alias (word) main::idx#0 = (byte~) main::$4
Alias (byte) main::x#1 = (byte~) main::$5 (byte) main::x#4
@ -246,30 +241,30 @@ Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) main::$9 [27] if((byte) main::xd#0>=(byte) main::e#1) goto main::@2
Simple Condition (bool~) main::$14 [31] if((byte) main::x#1<(byte~) main::$13) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant (const byte) main::STAR#0 = $51
Constant (const byte) main::STAR = $51
Constant (const byte[$28*$19]) main::screen = (byte*) 1024
Constant (const byte) main::x0#0 = 0
Constant (const byte) main::y0#0 = 0
Constant (const byte) main::x1#0 = $27
Constant (const byte) main::y1#0 = $18
Constant (const byte) main::x0 = 0
Constant (const byte) main::y0 = 0
Constant (const byte) main::x1 = $27
Constant (const byte) main::y1 = $18
Successful SSA optimization Pass2ConstantIdentification
De-inlining pointer[w] to *(pointer+w) [18] *((const byte[$28*$19]) main::screen + (word) main::idx#3) ← (const byte) main::STAR#0
De-inlining pointer[w] to *(pointer+w) [18] *((const byte[$28*$19]) main::screen + (word) main::idx#3) ← (const byte) main::STAR
Successful SSA optimization Pass2DeInlineWordDerefIdx
Simplifying expression containing zero main::x1#0 in [6] (byte) main::xd#0 ← (const byte) main::x1#0 - (const byte) main::x0#0
Simplifying expression containing zero main::y1#0 in [8] (byte) main::yd#0 ← (const byte) main::y1#0 - (const byte) main::y0#0
Simplifying expression containing zero main::$3 in [15] (word) main::idx#0 ← (const byte) main::x0#0 + (byte~) main::$3
Simplifying expression containing zero main::x1 in [6] (byte) main::xd#0 ← (const byte) main::x1 - (const byte) main::x0
Simplifying expression containing zero main::y1 in [8] (byte) main::yd#0 ← (const byte) main::y1 - (const byte) main::y0
Simplifying expression containing zero main::$3 in [15] (word) main::idx#0 ← (const byte) main::x0 + (byte~) main::$3
Successful SSA optimization PassNSimplifyExpressionWithZero
Alias (word) main::idx#0 = (byte~) main::$3
Successful SSA optimization Pass2AliasElimination
Constant right-side identified [3] (word) main::idx#0 ← (const byte) main::y0#0 * (byte) $28
Constant right-side identified [13] (byte~) main::$13 ← (const byte) main::x1#0 + (byte) 1
Constant right-side identified [3] (word) main::idx#0 ← (const byte) main::y0 * (byte) $28
Constant right-side identified [13] (byte~) main::$13 ← (const byte) main::x1 + (byte) 1
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::xd#0 = main::x1#0
Constant (const byte) main::yd#0 = main::y1#0
Constant (const word) main::idx#0 = main::y0#0*$28
Constant (const byte) main::$13 = main::x1#0+1
Constant (const byte) main::xd#0 = main::x1
Constant (const byte) main::yd#0 = main::y1
Constant (const word) main::idx#0 = main::y0*$28
Constant (const byte) main::$13 = main::x1+1
Successful SSA optimization Pass2ConstantIdentification
Simplifying constant evaluating to zero (const byte) main::y0#0*(byte) $28 in
Simplifying constant evaluating to zero (const byte) main::y0*(byte) $28 in
Successful SSA optimization PassNSimplifyConstantZero
Constant right-side identified [0] (byte) main::e#0 ← (const byte) main::yd#0 / (byte) 2
Successful SSA optimization Pass2ConstantRValueConsolidation
@ -277,11 +272,11 @@ Constant (const byte) main::e#0 = main::yd#0/2
Successful SSA optimization Pass2ConstantIdentification
Inlining constant with var siblings (const word) main::idx#0
Inlining constant with var siblings (const byte) main::e#0
Constant inlined main::$13 = (const byte) main::x1#0+(byte) 1
Constant inlined main::$13 = (const byte) main::x1+(byte) 1
Constant inlined main::idx#0 = (byte) 0
Constant inlined main::xd#0 = (const byte) main::x1#0
Constant inlined main::e#0 = (const byte) main::y1#0/(byte) 2
Constant inlined main::yd#0 = (const byte) main::y1#0
Constant inlined main::xd#0 = (const byte) main::x1
Constant inlined main::e#0 = (const byte) main::y1/(byte) 2
Constant inlined main::yd#0 = (const byte) main::y1
Successful SSA optimization Pass2ConstantInlining
Added new block during phi lifting main::@5(between main::@2 and main::@1)
Added new block during phi lifting main::@6(between main::@1 and main::@2)
@ -329,27 +324,27 @@ main: scope:[main] from @1
[4] phi()
to:main::@1
main::@1: scope:[main] from main main::@2
[5] (byte) main::y#2 ← phi( main/(const byte) main::y0#0 main::@2/(byte) main::y#4 )
[5] (byte) main::e#3 ← phi( main/(const byte) main::y1#0/(byte) 2 main::@2/(byte) main::e#5 )
[5] (byte) main::x#2 ← phi( main/(const byte) main::x0#0 main::@2/(byte) main::x#1 )
[5] (byte) main::y#2 ← phi( main/(const byte) main::y0 main::@2/(byte) main::y#4 )
[5] (byte) main::e#3 ← phi( main/(const byte) main::y1/(byte) 2 main::@2/(byte) main::e#5 )
[5] (byte) main::x#2 ← phi( main/(const byte) main::x0 main::@2/(byte) main::x#1 )
[5] (word) main::idx#3 ← phi( main/(byte) 0 main::@2/(word) main::idx#5 )
[6] (byte*~) main::$15 ← (const byte[$28*$19]) main::screen + (word) main::idx#3
[7] *((byte*~) main::$15) ← (const byte) main::STAR#0
[7] *((byte*~) main::$15) ← (const byte) main::STAR
[8] (byte) main::x#1 ← (byte) main::x#2 + (byte) 1
[9] (word) main::idx#1 ← (word) main::idx#3 + (byte) 1
[10] (byte) main::e#1 ← (byte) main::e#3 + (const byte) main::y1#0
[11] if((const byte) main::x1#0>=(byte) main::e#1) goto main::@2
[10] (byte) main::e#1 ← (byte) main::e#3 + (const byte) main::y1
[11] if((const byte) main::x1>=(byte) main::e#1) goto main::@2
to:main::@3
main::@3: scope:[main] from main::@1
[12] (byte) main::y#1 ← (byte) main::y#2 + (byte) 1
[13] (word) main::idx#2 ← (word) main::idx#1 + (byte) $28
[14] (byte) main::e#2 ← (byte) main::e#1 - (const byte) main::x1#0
[14] (byte) main::e#2 ← (byte) main::e#1 - (const byte) main::x1
to:main::@2
main::@2: scope:[main] from main::@1 main::@3
[15] (byte) main::y#4 ← phi( main::@1/(byte) main::y#2 main::@3/(byte) main::y#1 )
[15] (byte) main::e#5 ← phi( main::@1/(byte) main::e#1 main::@3/(byte) main::e#2 )
[15] (word) main::idx#5 ← phi( main::@1/(word) main::idx#1 main::@3/(word) main::idx#2 )
[16] if((byte) main::x#1<(const byte) main::x1#0+(byte) 1) goto main::@1
[16] if((byte) main::x#1<(const byte) main::x1+(byte) 1) goto main::@1
to:main::@return
main::@return: scope:[main] from main::@2
[17] return
@ -359,7 +354,6 @@ main::@return: scope:[main] from main::@2
VARIABLE REGISTER WEIGHTS
(void()) main()
(byte*~) main::$15 22.0
(byte) main::STAR
(byte) main::e
(byte) main::e#1 11.0
(byte) main::e#2 22.0
@ -373,15 +367,11 @@ VARIABLE REGISTER WEIGHTS
(byte) main::x
(byte) main::x#1 3.666666666666667
(byte) main::x#2 7.333333333333333
(byte) main::x0
(byte) main::x1
(byte) main::xd
(byte) main::y
(byte) main::y#1 7.333333333333333
(byte) main::y#2 4.714285714285714
(byte) main::y#4 16.5
(byte) main::y0
(byte) main::y1
(byte) main::yd
Initial phi equivalence classes
@ -441,13 +431,13 @@ main: {
.label _15 = 7
// [5] phi from main to main::@1 [phi:main->main::@1]
b1_from_main:
// [5] phi (byte) main::y#2 = (const byte) main::y0#0 [phi:main->main::@1#0] -- vbuz1=vbuc1
// [5] phi (byte) main::y#2 = (const byte) main::y0 [phi:main->main::@1#0] -- vbuz1=vbuc1
lda #y0
sta.z y
// [5] phi (byte) main::e#3 = (const byte) main::y1#0/(byte) 2 [phi:main->main::@1#1] -- vbuz1=vbuc1
// [5] phi (byte) main::e#3 = (const byte) main::y1/(byte) 2 [phi:main->main::@1#1] -- vbuz1=vbuc1
lda #y1/2
sta.z e
// [5] phi (byte) main::x#2 = (const byte) main::x0#0 [phi:main->main::@1#2] -- vbuz1=vbuc1
// [5] phi (byte) main::x#2 = (const byte) main::x0 [phi:main->main::@1#2] -- vbuz1=vbuc1
lda #x0
sta.z x
// [5] phi (word) main::idx#3 = (byte) 0 [phi:main->main::@1#3] -- vwuz1=vbuc1
@ -473,7 +463,7 @@ main: {
lda.z idx+1
adc #>screen
sta.z _15+1
// [7] *((byte*~) main::$15) ← (const byte) main::STAR#0 -- _deref_pbuz1=vbuc1
// [7] *((byte*~) main::$15) ← (const byte) main::STAR -- _deref_pbuz1=vbuc1
lda #STAR
ldy #0
sta (_15),y
@ -484,11 +474,11 @@ main: {
bne !+
inc.z idx+1
!:
// [10] (byte) main::e#1 ← (byte) main::e#3 + (const byte) main::y1#0 -- vbuz1=vbuz1_plus_vbuc1
// [10] (byte) main::e#1 ← (byte) main::e#3 + (const byte) main::y1 -- vbuz1=vbuz1_plus_vbuc1
lax.z e
axs #-[y1]
stx.z e
// [11] if((const byte) main::x1#0>=(byte) main::e#1) goto main::@2 -- vbuc1_ge_vbuz1_then_la1
// [11] if((const byte) main::x1>=(byte) main::e#1) goto main::@2 -- vbuc1_ge_vbuz1_then_la1
lda #x1
cmp.z e
bcs b2_from_b1
@ -505,7 +495,7 @@ main: {
bcc !+
inc.z idx+1
!:
// [14] (byte) main::e#2 ← (byte) main::e#1 - (const byte) main::x1#0 -- vbuz1=vbuz1_minus_vbuc1
// [14] (byte) main::e#2 ← (byte) main::e#1 - (const byte) main::x1 -- vbuz1=vbuz1_minus_vbuc1
lax.z e
axs #x1
stx.z e
@ -518,7 +508,7 @@ main: {
jmp b2
// main::@2
b2:
// [16] if((byte) main::x#1<(const byte) main::x1#0+(byte) 1) goto main::@1 -- vbuz1_lt_vbuc1_then_la1
// [16] if((byte) main::x#1<(const byte) main::x1+(byte) 1) goto main::@1 -- vbuz1_lt_vbuc1_then_la1
lda.z x
cmp #x1+1
bcc b1_from_b2
@ -535,22 +525,22 @@ Statement [6] (byte*~) main::$15 ← (const byte[$28*$19]) main::screen + (word)
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:4 [ main::x#2 main::x#1 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:5 [ main::e#3 main::e#5 main::e#1 main::e#2 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:6 [ main::y#2 main::y#4 main::y#1 ]
Statement [7] *((byte*~) main::$15) ← (const byte) main::STAR#0 [ main::idx#3 main::x#2 main::e#3 main::y#2 ] ( main:2 [ main::idx#3 main::x#2 main::e#3 main::y#2 ] ) always clobbers reg byte a reg byte y
Statement [7] *((byte*~) main::$15) ← (const byte) main::STAR [ main::idx#3 main::x#2 main::e#3 main::y#2 ] ( main:2 [ main::idx#3 main::x#2 main::e#3 main::y#2 ] ) always clobbers reg byte a reg byte y
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:4 [ main::x#2 main::x#1 ]
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:5 [ main::e#3 main::e#5 main::e#1 main::e#2 ]
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:6 [ main::y#2 main::y#4 main::y#1 ]
Statement [10] (byte) main::e#1 ← (byte) main::e#3 + (const byte) main::y1#0 [ main::y#2 main::x#1 main::idx#1 main::e#1 ] ( main:2 [ main::y#2 main::x#1 main::idx#1 main::e#1 ] ) always clobbers reg byte a reg byte x
Statement [10] (byte) main::e#1 ← (byte) main::e#3 + (const byte) main::y1 [ main::y#2 main::x#1 main::idx#1 main::e#1 ] ( main:2 [ main::y#2 main::x#1 main::idx#1 main::e#1 ] ) always clobbers reg byte a reg byte x
Removing always clobbered register reg byte x as potential for zp ZP_BYTE:6 [ main::y#2 main::y#4 main::y#1 ]
Removing always clobbered register reg byte x as potential for zp ZP_BYTE:4 [ main::x#2 main::x#1 ]
Statement [13] (word) main::idx#2 ← (word) main::idx#1 + (byte) $28 [ main::x#1 main::e#1 main::y#1 main::idx#2 ] ( main:2 [ main::x#1 main::e#1 main::y#1 main::idx#2 ] ) always clobbers reg byte a
Statement [14] (byte) main::e#2 ← (byte) main::e#1 - (const byte) main::x1#0 [ main::x#1 main::y#1 main::idx#2 main::e#2 ] ( main:2 [ main::x#1 main::y#1 main::idx#2 main::e#2 ] ) always clobbers reg byte a reg byte x
Statement [16] if((byte) main::x#1<(const byte) main::x1#0+(byte) 1) goto main::@1 [ main::idx#5 main::x#1 main::e#5 main::y#4 ] ( main:2 [ main::idx#5 main::x#1 main::e#5 main::y#4 ] ) always clobbers reg byte a
Statement [14] (byte) main::e#2 ← (byte) main::e#1 - (const byte) main::x1 [ main::x#1 main::y#1 main::idx#2 main::e#2 ] ( main:2 [ main::x#1 main::y#1 main::idx#2 main::e#2 ] ) always clobbers reg byte a reg byte x
Statement [16] if((byte) main::x#1<(const byte) main::x1+(byte) 1) goto main::@1 [ main::idx#5 main::x#1 main::e#5 main::y#4 ] ( main:2 [ main::idx#5 main::x#1 main::e#5 main::y#4 ] ) always clobbers reg byte a
Statement [6] (byte*~) main::$15 ← (const byte[$28*$19]) main::screen + (word) main::idx#3 [ main::idx#3 main::x#2 main::e#3 main::y#2 main::$15 ] ( main:2 [ main::idx#3 main::x#2 main::e#3 main::y#2 main::$15 ] ) always clobbers reg byte a
Statement [7] *((byte*~) main::$15) ← (const byte) main::STAR#0 [ main::idx#3 main::x#2 main::e#3 main::y#2 ] ( main:2 [ main::idx#3 main::x#2 main::e#3 main::y#2 ] ) always clobbers reg byte a reg byte y
Statement [10] (byte) main::e#1 ← (byte) main::e#3 + (const byte) main::y1#0 [ main::y#2 main::x#1 main::idx#1 main::e#1 ] ( main:2 [ main::y#2 main::x#1 main::idx#1 main::e#1 ] ) always clobbers reg byte a reg byte x
Statement [7] *((byte*~) main::$15) ← (const byte) main::STAR [ main::idx#3 main::x#2 main::e#3 main::y#2 ] ( main:2 [ main::idx#3 main::x#2 main::e#3 main::y#2 ] ) always clobbers reg byte a reg byte y
Statement [10] (byte) main::e#1 ← (byte) main::e#3 + (const byte) main::y1 [ main::y#2 main::x#1 main::idx#1 main::e#1 ] ( main:2 [ main::y#2 main::x#1 main::idx#1 main::e#1 ] ) always clobbers reg byte a reg byte x
Statement [13] (word) main::idx#2 ← (word) main::idx#1 + (byte) $28 [ main::x#1 main::e#1 main::y#1 main::idx#2 ] ( main:2 [ main::x#1 main::e#1 main::y#1 main::idx#2 ] ) always clobbers reg byte a
Statement [14] (byte) main::e#2 ← (byte) main::e#1 - (const byte) main::x1#0 [ main::x#1 main::y#1 main::idx#2 main::e#2 ] ( main:2 [ main::x#1 main::y#1 main::idx#2 main::e#2 ] ) always clobbers reg byte a reg byte x
Statement [16] if((byte) main::x#1<(const byte) main::x1#0+(byte) 1) goto main::@1 [ main::idx#5 main::x#1 main::e#5 main::y#4 ] ( main:2 [ main::idx#5 main::x#1 main::e#5 main::y#4 ] ) always clobbers reg byte a
Statement [14] (byte) main::e#2 ← (byte) main::e#1 - (const byte) main::x1 [ main::x#1 main::y#1 main::idx#2 main::e#2 ] ( main:2 [ main::x#1 main::y#1 main::idx#2 main::e#2 ] ) always clobbers reg byte a reg byte x
Statement [16] if((byte) main::x#1<(const byte) main::x1+(byte) 1) goto main::@1 [ main::idx#5 main::x#1 main::e#5 main::y#4 ] ( main:2 [ main::idx#5 main::x#1 main::e#5 main::y#4 ] ) always clobbers reg byte a
Potential registers zp ZP_WORD:2 [ main::idx#3 main::idx#5 main::idx#1 main::idx#2 ] : zp ZP_WORD:2 ,
Potential registers zp ZP_BYTE:4 [ main::x#2 main::x#1 ] : zp ZP_BYTE:4 ,
Potential registers zp ZP_BYTE:5 [ main::e#3 main::e#5 main::e#1 main::e#2 ] : zp ZP_BYTE:5 , reg byte x ,
@ -607,12 +597,12 @@ main: {
.label _15 = 6
// [5] phi from main to main::@1 [phi:main->main::@1]
b1_from_main:
// [5] phi (byte) main::y#2 = (const byte) main::y0#0 [phi:main->main::@1#0] -- vbuz1=vbuc1
// [5] phi (byte) main::y#2 = (const byte) main::y0 [phi:main->main::@1#0] -- vbuz1=vbuc1
lda #y0
sta.z y
// [5] phi (byte) main::e#3 = (const byte) main::y1#0/(byte) 2 [phi:main->main::@1#1] -- vbuxx=vbuc1
// [5] phi (byte) main::e#3 = (const byte) main::y1/(byte) 2 [phi:main->main::@1#1] -- vbuxx=vbuc1
ldx #y1/2
// [5] phi (byte) main::x#2 = (const byte) main::x0#0 [phi:main->main::@1#2] -- vbuz1=vbuc1
// [5] phi (byte) main::x#2 = (const byte) main::x0 [phi:main->main::@1#2] -- vbuz1=vbuc1
lda #x0
sta.z x
// [5] phi (word) main::idx#3 = (byte) 0 [phi:main->main::@1#3] -- vwuz1=vbuc1
@ -638,7 +628,7 @@ main: {
lda.z idx+1
adc #>screen
sta.z _15+1
// [7] *((byte*~) main::$15) ← (const byte) main::STAR#0 -- _deref_pbuz1=vbuc1
// [7] *((byte*~) main::$15) ← (const byte) main::STAR -- _deref_pbuz1=vbuc1
lda #STAR
ldy #0
sta (_15),y
@ -649,10 +639,10 @@ main: {
bne !+
inc.z idx+1
!:
// [10] (byte) main::e#1 ← (byte) main::e#3 + (const byte) main::y1#0 -- vbuxx=vbuxx_plus_vbuc1
// [10] (byte) main::e#1 ← (byte) main::e#3 + (const byte) main::y1 -- vbuxx=vbuxx_plus_vbuc1
txa
axs #-[y1]
// [11] if((const byte) main::x1#0>=(byte) main::e#1) goto main::@2 -- vbuc1_ge_vbuxx_then_la1
// [11] if((const byte) main::x1>=(byte) main::e#1) goto main::@2 -- vbuc1_ge_vbuxx_then_la1
cpx #x1
bcc b2_from_b1
beq b2_from_b1
@ -669,7 +659,7 @@ main: {
bcc !+
inc.z idx+1
!:
// [14] (byte) main::e#2 ← (byte) main::e#1 - (const byte) main::x1#0 -- vbuxx=vbuxx_minus_vbuc1
// [14] (byte) main::e#2 ← (byte) main::e#1 - (const byte) main::x1 -- vbuxx=vbuxx_minus_vbuc1
txa
axs #x1
// [15] phi from main::@1 main::@3 to main::@2 [phi:main::@1/main::@3->main::@2]
@ -681,7 +671,7 @@ main: {
jmp b2
// main::@2
b2:
// [16] if((byte) main::x#1<(const byte) main::x1#0+(byte) 1) goto main::@1 -- vbuz1_lt_vbuc1_then_la1
// [16] if((byte) main::x#1<(const byte) main::x1+(byte) 1) goto main::@1 -- vbuz1_lt_vbuc1_then_la1
lda.z x
cmp #x1+1
bcc b1_from_b2
@ -737,8 +727,7 @@ FINAL SYMBOL TABLE
(label) main::@2
(label) main::@3
(label) main::@return
(byte) main::STAR
(const byte) main::STAR#0 STAR = (byte) $51
(const byte) main::STAR STAR = (byte) $51
(byte) main::e
(byte) main::e#1 reg byte x 11.0
(byte) main::e#2 reg byte x 22.0
@ -753,19 +742,15 @@ FINAL SYMBOL TABLE
(byte) main::x
(byte) main::x#1 x zp ZP_BYTE:4 3.666666666666667
(byte) main::x#2 x zp ZP_BYTE:4 7.333333333333333
(byte) main::x0
(const byte) main::x0#0 x0 = (byte) 0
(byte) main::x1
(const byte) main::x1#0 x1 = (byte) $27
(const byte) main::x0 x0 = (byte) 0
(const byte) main::x1 x1 = (byte) $27
(byte) main::xd
(byte) main::y
(byte) main::y#1 y zp ZP_BYTE:5 7.333333333333333
(byte) main::y#2 y zp ZP_BYTE:5 4.714285714285714
(byte) main::y#4 y zp ZP_BYTE:5 16.5
(byte) main::y0
(const byte) main::y0#0 y0 = (byte) 0
(byte) main::y1
(const byte) main::y1#0 y1 = (byte) $18
(const byte) main::y0 y0 = (byte) 0
(const byte) main::y1 y1 = (byte) $18
(byte) main::yd
zp ZP_WORD:2 [ main::idx#3 main::idx#5 main::idx#1 main::idx#2 ]
@ -804,12 +789,12 @@ main: {
.label y = 5
.label _15 = 6
// [5] phi from main to main::@1 [phi:main->main::@1]
// [5] phi (byte) main::y#2 = (const byte) main::y0#0 [phi:main->main::@1#0] -- vbuz1=vbuc1
// [5] phi (byte) main::y#2 = (const byte) main::y0 [phi:main->main::@1#0] -- vbuz1=vbuc1
lda #y0
sta.z y
// [5] phi (byte) main::e#3 = (const byte) main::y1#0/(byte) 2 [phi:main->main::@1#1] -- vbuxx=vbuc1
// [5] phi (byte) main::e#3 = (const byte) main::y1/(byte) 2 [phi:main->main::@1#1] -- vbuxx=vbuc1
ldx #y1/2
// [5] phi (byte) main::x#2 = (const byte) main::x0#0 [phi:main->main::@1#2] -- vbuz1=vbuc1
// [5] phi (byte) main::x#2 = (const byte) main::x0 [phi:main->main::@1#2] -- vbuz1=vbuc1
lda #x0
sta.z x
// [5] phi (word) main::idx#3 = (byte) 0 [phi:main->main::@1#3] -- vwuz1=vbuc1
@ -832,7 +817,7 @@ main: {
lda.z idx+1
adc #>screen
sta.z _15+1
// [7] *((byte*~) main::$15) ← (const byte) main::STAR#0 -- _deref_pbuz1=vbuc1
// [7] *((byte*~) main::$15) ← (const byte) main::STAR -- _deref_pbuz1=vbuc1
lda #STAR
ldy #0
sta (_15),y
@ -846,11 +831,11 @@ main: {
inc.z idx+1
!:
// e = e+yd
// [10] (byte) main::e#1 ← (byte) main::e#3 + (const byte) main::y1#0 -- vbuxx=vbuxx_plus_vbuc1
// [10] (byte) main::e#1 ← (byte) main::e#3 + (const byte) main::y1 -- vbuxx=vbuxx_plus_vbuc1
txa
axs #-[y1]
// if(xd<e)
// [11] if((const byte) main::x1#0>=(byte) main::e#1) goto main::@2 -- vbuc1_ge_vbuxx_then_la1
// [11] if((const byte) main::x1>=(byte) main::e#1) goto main::@2 -- vbuc1_ge_vbuxx_then_la1
cpx #x1
bcc b2
beq b2
@ -868,7 +853,7 @@ main: {
inc.z idx+1
!:
// e = e - xd
// [14] (byte) main::e#2 ← (byte) main::e#1 - (const byte) main::x1#0 -- vbuxx=vbuxx_minus_vbuc1
// [14] (byte) main::e#2 ← (byte) main::e#1 - (const byte) main::x1 -- vbuxx=vbuxx_minus_vbuc1
txa
axs #x1
// [15] phi from main::@1 main::@3 to main::@2 [phi:main::@1/main::@3->main::@2]
@ -878,7 +863,7 @@ main: {
// main::@2
b2:
// while (x<(x1+1))
// [16] if((byte) main::x#1<(const byte) main::x1#0+(byte) 1) goto main::@1 -- vbuz1_lt_vbuc1_then_la1
// [16] if((byte) main::x#1<(const byte) main::x1+(byte) 1) goto main::@1 -- vbuz1_lt_vbuc1_then_la1
lda.z x
cmp #x1+1
bcc b1

View File

@ -7,8 +7,7 @@
(label) main::@2
(label) main::@3
(label) main::@return
(byte) main::STAR
(const byte) main::STAR#0 STAR = (byte) $51
(const byte) main::STAR STAR = (byte) $51
(byte) main::e
(byte) main::e#1 reg byte x 11.0
(byte) main::e#2 reg byte x 22.0
@ -23,19 +22,15 @@
(byte) main::x
(byte) main::x#1 x zp ZP_BYTE:4 3.666666666666667
(byte) main::x#2 x zp ZP_BYTE:4 7.333333333333333
(byte) main::x0
(const byte) main::x0#0 x0 = (byte) 0
(byte) main::x1
(const byte) main::x1#0 x1 = (byte) $27
(const byte) main::x0 x0 = (byte) 0
(const byte) main::x1 x1 = (byte) $27
(byte) main::xd
(byte) main::y
(byte) main::y#1 y zp ZP_BYTE:5 7.333333333333333
(byte) main::y#2 y zp ZP_BYTE:5 4.714285714285714
(byte) main::y#4 y zp ZP_BYTE:5 16.5
(byte) main::y0
(const byte) main::y0#0 y0 = (byte) 0
(byte) main::y1
(const byte) main::y1#0 y1 = (byte) $18
(const byte) main::y0 y0 = (byte) 0
(const byte) main::y1 y1 = (byte) $18
(byte) main::yd
zp ZP_WORD:2 [ main::idx#3 main::idx#5 main::idx#1 main::idx#2 ]

View File

@ -81,7 +81,7 @@ print_ln::@return: scope:[print_ln] from print_ln::@1
(void()) print_sdword((signed dword) print_sdword::dw)
print_sdword: scope:[print_sdword] from testLong::@3 testLong::@5
[35] (signed dword) print_sdword::dw#3 ← phi( testLong::@3/(const signed dword) testLong::n#0 testLong::@5/(const signed dword) testLong::s#0 )
[35] (signed dword) print_sdword::dw#3 ← phi( testLong::@3/(const signed dword) testLong::n testLong::@5/(const signed dword) testLong::s )
[36] if((signed dword) print_sdword::dw#3<(signed byte) 0) goto print_sdword::@1
to:print_sdword::@3
print_sdword::@3: scope:[print_sdword] from print_sdword
@ -118,7 +118,7 @@ print_char::@return: scope:[print_char] from print_char
(void()) print_dword((dword) print_dword::dw)
print_dword: scope:[print_dword] from print_sdword::@2 testLong::@1
[50] (byte*) print_char_cursor#145 ← phi( print_sdword::@2/(byte*) print_char_cursor#26 testLong::@1/(byte*) print_char_cursor#136 )
[50] (dword) print_dword::dw#2 ← phi( print_sdword::@2/(dword) print_dword::dw#0 testLong::@1/(const dword) testLong::u#0 )
[50] (dword) print_dword::dw#2 ← phi( print_sdword::@2/(dword) print_dword::dw#0 testLong::@1/(const dword) testLong::u )
[51] (word) print_word::w#1 ← > (dword) print_dword::dw#2
[52] call print_word
to:print_dword::@1
@ -133,7 +133,7 @@ print_dword::@return: scope:[print_dword] from print_dword::@1
(void()) print_word((word) print_word::w)
print_word: scope:[print_word] from print_dword print_dword::@1 print_sword::@2 testInt::@1 testShort::@1
[56] (byte*) print_char_cursor#144 ← phi( print_dword/(byte*) print_char_cursor#145 print_dword::@1/(byte*) print_char_cursor#26 print_sword::@2/(byte*) print_char_cursor#26 testInt::@1/(byte*) print_char_cursor#136 testShort::@1/(byte*) print_char_cursor#136 )
[56] (word) print_word::w#5 ← phi( print_dword/(word) print_word::w#1 print_dword::@1/(word) print_word::w#2 print_sword::@2/(word) print_word::w#0 testInt::@1/(const word) testInt::u#0 testShort::@1/(const word) testShort::u#0 )
[56] (word) print_word::w#5 ← phi( print_dword/(word) print_word::w#1 print_dword::@1/(word) print_word::w#2 print_sword::@2/(word) print_word::w#0 testInt::@1/(const word) testInt::u testShort::@1/(const word) testShort::u )
[57] (byte) print_byte::b#1 ← > (word) print_word::w#5
[58] call print_byte
to:print_word::@1
@ -148,7 +148,7 @@ print_word::@return: scope:[print_word] from print_word::@1
(void()) print_byte((byte) print_byte::b)
print_byte: scope:[print_byte] from print_sbyte::@2 print_word print_word::@1 testChar::@1 testChar::@3
[62] (byte*) print_char_cursor#149 ← phi( print_sbyte::@2/(byte*) print_char_cursor#26 print_word/(byte*) print_char_cursor#144 print_word::@1/(byte*) print_char_cursor#26 testChar::@1/(byte*) print_char_cursor#136 testChar::@3/(byte*) print_char_cursor#26 )
[62] (byte) print_byte::b#5 ← phi( print_sbyte::@2/(byte)(const signed byte) print_sbyte::b#0 print_word/(byte) print_byte::b#1 print_word::@1/(byte) print_byte::b#2 testChar::@1/(const byte) testChar::u#0 testChar::@3/(const byte) testChar::n#0 )
[62] (byte) print_byte::b#5 ← phi( print_sbyte::@2/(byte)(const signed byte) print_sbyte::b#0 print_word/(byte) print_byte::b#1 print_word::@1/(byte) print_byte::b#2 testChar::@1/(const byte) testChar::u testChar::@3/(const byte) testChar::n )
[63] (byte~) print_byte::$0 ← (byte) print_byte::b#5 >> (byte) 4
[64] (byte) print_char::ch#6 ← *((const byte[]) print_hextab + (byte~) print_byte::$0)
[65] call print_char
@ -216,7 +216,7 @@ testInt::@return: scope:[testInt] from testInt::@6
(void()) print_sword((signed word) print_sword::w)
print_sword: scope:[print_sword] from testInt::@3 testInt::@5 testShort::@3 testShort::@5
[92] (signed word) print_sword::w#10 ← phi( testInt::@3/(const signed word) testInt::n#0 testInt::@5/(const signed word) testInt::s#0 testShort::@3/(const signed word) testShort::n#0 testShort::@5/(const signed word) testShort::s#0 )
[92] (signed word) print_sword::w#10 ← phi( testInt::@3/(const signed word) testInt::n testInt::@5/(const signed word) testInt::s testShort::@3/(const signed word) testShort::n testShort::@5/(const signed word) testShort::s )
[93] if((signed word) print_sword::w#10<(signed byte) 0) goto print_sword::@1
to:print_sword::@3
print_sword::@3: scope:[print_sword] from print_sword

View File

@ -491,9 +491,9 @@ main::@return: scope:[main] from main::@5
testChar: scope:[testChar] from main::@1
(byte*) print_line_cursor#67 ← phi( main::@1/(byte*) print_line_cursor#5 )
(byte*) print_char_cursor#151 ← phi( main::@1/(byte*) print_char_cursor#30 )
(byte) testChar::u#0 ← (number) $e
(byte) testChar::n#0 ← (number) $e
(signed byte) testChar::s#0 ← (number) -$e
(byte) testChar::u ← (number) $e
(byte) testChar::n ← (number) $e
(signed byte) testChar::s ← (number) -$e
(byte*) print_str::str#1 ← (const string) testChar::str
call print_str
to:testChar::@1
@ -501,7 +501,7 @@ testChar::@1: scope:[testChar] from testChar
(byte*) print_line_cursor#63 ← phi( testChar/(byte*) print_line_cursor#67 )
(byte*) print_char_cursor#103 ← phi( testChar/(byte*) print_char_cursor#2 )
(byte*) print_char_cursor#36 ← (byte*) print_char_cursor#103
(byte) print_byte::b#3 ← (byte) testChar::u#0
(byte) print_byte::b#3 ← (byte) testChar::u
call print_byte
to:testChar::@2
testChar::@2: scope:[testChar] from testChar::@1
@ -515,7 +515,7 @@ testChar::@3: scope:[testChar] from testChar::@2
(byte*) print_line_cursor#55 ← phi( testChar::@2/(byte*) print_line_cursor#59 )
(byte*) print_char_cursor#105 ← phi( testChar::@2/(byte*) print_char_cursor#27 )
(byte*) print_char_cursor#38 ← (byte*) print_char_cursor#105
(byte) print_byte::b#4 ← (byte) testChar::n#0
(byte) print_byte::b#4 ← (byte) testChar::n
call print_byte
to:testChar::@4
testChar::@4: scope:[testChar] from testChar::@3
@ -529,7 +529,7 @@ testChar::@5: scope:[testChar] from testChar::@4
(byte*) print_line_cursor#46 ← phi( testChar::@4/(byte*) print_line_cursor#51 )
(byte*) print_char_cursor#107 ← phi( testChar::@4/(byte*) print_char_cursor#27 )
(byte*) print_char_cursor#40 ← (byte*) print_char_cursor#107
(signed byte) print_sbyte::b#1 ← (signed byte) testChar::s#0
(signed byte) print_sbyte::b#1 ← (signed byte) testChar::s
call print_sbyte
to:testChar::@6
testChar::@6: scope:[testChar] from testChar::@5
@ -556,9 +556,9 @@ testChar::@return: scope:[testChar] from testChar::@7
testShort: scope:[testShort] from main::@2
(byte*) print_line_cursor#68 ← phi( main::@2/(byte*) print_line_cursor#6 )
(byte*) print_char_cursor#152 ← phi( main::@2/(byte*) print_char_cursor#31 )
(word) testShort::u#0 ← (number) $578
(signed word) testShort::n#0 ← (number) -$578
(signed word) testShort::s#0 ← (number) -$578
(word) testShort::u ← (number) $578
(signed word) testShort::n ← (number) -$578
(signed word) testShort::s ← (number) -$578
(byte*) print_str::str#2 ← (const string) testShort::str
call print_str
to:testShort::@1
@ -566,7 +566,7 @@ testShort::@1: scope:[testShort] from testShort
(byte*) print_line_cursor#64 ← phi( testShort/(byte*) print_line_cursor#68 )
(byte*) print_char_cursor#111 ← phi( testShort/(byte*) print_char_cursor#2 )
(byte*) print_char_cursor#44 ← (byte*) print_char_cursor#111
(word) print_word::w#3 ← (word) testShort::u#0
(word) print_word::w#3 ← (word) testShort::u
call print_word
to:testShort::@2
testShort::@2: scope:[testShort] from testShort::@1
@ -580,7 +580,7 @@ testShort::@3: scope:[testShort] from testShort::@2
(byte*) print_line_cursor#56 ← phi( testShort::@2/(byte*) print_line_cursor#60 )
(byte*) print_char_cursor#113 ← phi( testShort::@2/(byte*) print_char_cursor#27 )
(byte*) print_char_cursor#46 ← (byte*) print_char_cursor#113
(signed word) print_sword::w#1 ← (signed word) testShort::n#0
(signed word) print_sword::w#1 ← (signed word) testShort::n
call print_sword
to:testShort::@4
testShort::@4: scope:[testShort] from testShort::@3
@ -594,7 +594,7 @@ testShort::@5: scope:[testShort] from testShort::@4
(byte*) print_line_cursor#47 ← phi( testShort::@4/(byte*) print_line_cursor#52 )
(byte*) print_char_cursor#115 ← phi( testShort::@4/(byte*) print_char_cursor#27 )
(byte*) print_char_cursor#48 ← (byte*) print_char_cursor#115
(signed word) print_sword::w#2 ← (signed word) testShort::s#0
(signed word) print_sword::w#2 ← (signed word) testShort::s
call print_sword
to:testShort::@6
testShort::@6: scope:[testShort] from testShort::@5
@ -621,9 +621,9 @@ testShort::@return: scope:[testShort] from testShort::@7
testInt: scope:[testInt] from main::@3
(byte*) print_line_cursor#69 ← phi( main::@3/(byte*) print_line_cursor#7 )
(byte*) print_char_cursor#153 ← phi( main::@3/(byte*) print_char_cursor#32 )
(word) testInt::u#0 ← (number) $578
(signed word) testInt::n#0 ← (number) -$578
(signed word) testInt::s#0 ← (number) -$578
(word) testInt::u ← (number) $578
(signed word) testInt::n ← (number) -$578
(signed word) testInt::s ← (number) -$578
(byte*) print_str::str#3 ← (const string) testInt::str
call print_str
to:testInt::@1
@ -631,7 +631,7 @@ testInt::@1: scope:[testInt] from testInt
(byte*) print_line_cursor#65 ← phi( testInt/(byte*) print_line_cursor#69 )
(byte*) print_char_cursor#119 ← phi( testInt/(byte*) print_char_cursor#2 )
(byte*) print_char_cursor#52 ← (byte*) print_char_cursor#119
(word) print_word::w#4 ← (word) testInt::u#0
(word) print_word::w#4 ← (word) testInt::u
call print_word
to:testInt::@2
testInt::@2: scope:[testInt] from testInt::@1
@ -645,7 +645,7 @@ testInt::@3: scope:[testInt] from testInt::@2
(byte*) print_line_cursor#57 ← phi( testInt::@2/(byte*) print_line_cursor#61 )
(byte*) print_char_cursor#121 ← phi( testInt::@2/(byte*) print_char_cursor#27 )
(byte*) print_char_cursor#54 ← (byte*) print_char_cursor#121
(signed word) print_sword::w#3 ← (signed word) testInt::n#0
(signed word) print_sword::w#3 ← (signed word) testInt::n
call print_sword
to:testInt::@4
testInt::@4: scope:[testInt] from testInt::@3
@ -659,7 +659,7 @@ testInt::@5: scope:[testInt] from testInt::@4
(byte*) print_line_cursor#48 ← phi( testInt::@4/(byte*) print_line_cursor#53 )
(byte*) print_char_cursor#123 ← phi( testInt::@4/(byte*) print_char_cursor#27 )
(byte*) print_char_cursor#56 ← (byte*) print_char_cursor#123
(signed word) print_sword::w#4 ← (signed word) testInt::s#0
(signed word) print_sword::w#4 ← (signed word) testInt::s
call print_sword
to:testInt::@6
testInt::@6: scope:[testInt] from testInt::@5
@ -686,9 +686,9 @@ testInt::@return: scope:[testInt] from testInt::@7
testLong: scope:[testLong] from main::@4
(byte*) print_line_cursor#70 ← phi( main::@4/(byte*) print_line_cursor#8 )
(byte*) print_char_cursor#154 ← phi( main::@4/(byte*) print_char_cursor#33 )
(dword) testLong::u#0 ← (number) $222e0
(signed dword) testLong::n#0 ← (number) -$222e0
(signed dword) testLong::s#0 ← (number) -$222e0
(dword) testLong::u ← (number) $222e0
(signed dword) testLong::n ← (number) -$222e0
(signed dword) testLong::s ← (number) -$222e0
(byte*) print_str::str#4 ← (const string) testLong::str
call print_str
to:testLong::@1
@ -696,7 +696,7 @@ testLong::@1: scope:[testLong] from testLong
(byte*) print_line_cursor#66 ← phi( testLong/(byte*) print_line_cursor#70 )
(byte*) print_char_cursor#127 ← phi( testLong/(byte*) print_char_cursor#2 )
(byte*) print_char_cursor#60 ← (byte*) print_char_cursor#127
(dword) print_dword::dw#1 ← (dword) testLong::u#0
(dword) print_dword::dw#1 ← (dword) testLong::u
call print_dword
to:testLong::@2
testLong::@2: scope:[testLong] from testLong::@1
@ -710,7 +710,7 @@ testLong::@3: scope:[testLong] from testLong::@2
(byte*) print_line_cursor#58 ← phi( testLong::@2/(byte*) print_line_cursor#62 )
(byte*) print_char_cursor#129 ← phi( testLong::@2/(byte*) print_char_cursor#27 )
(byte*) print_char_cursor#62 ← (byte*) print_char_cursor#129
(signed dword) print_sdword::dw#1 ← (signed dword) testLong::n#0
(signed dword) print_sdword::dw#1 ← (signed dword) testLong::n
call print_sdword
to:testLong::@4
testLong::@4: scope:[testLong] from testLong::@3
@ -724,7 +724,7 @@ testLong::@5: scope:[testLong] from testLong::@4
(byte*) print_line_cursor#49 ← phi( testLong::@4/(byte*) print_line_cursor#54 )
(byte*) print_char_cursor#131 ← phi( testLong::@4/(byte*) print_char_cursor#27 )
(byte*) print_char_cursor#64 ← (byte*) print_char_cursor#131
(signed dword) print_sdword::dw#2 ← (signed dword) testLong::s#0
(signed dword) print_sdword::dw#2 ← (signed dword) testLong::s
call print_sdword
to:testLong::@6
testLong::@6: scope:[testLong] from testLong::@5
@ -1219,12 +1219,9 @@ SYMBOL TABLE SSA
(label) testChar::@7
(label) testChar::@return
(byte) testChar::n
(byte) testChar::n#0
(signed byte) testChar::s
(signed byte) testChar::s#0
(const string) testChar::str = (string) "char: "
(byte) testChar::u
(byte) testChar::u#0
(void()) testInt()
(label) testInt::@1
(label) testInt::@2
@ -1235,12 +1232,9 @@ SYMBOL TABLE SSA
(label) testInt::@7
(label) testInt::@return
(signed word) testInt::n
(signed word) testInt::n#0
(signed word) testInt::s
(signed word) testInt::s#0
(const string) testInt::str = (string) "int: "
(word) testInt::u
(word) testInt::u#0
(void()) testLong()
(label) testLong::@1
(label) testLong::@2
@ -1251,12 +1245,9 @@ SYMBOL TABLE SSA
(label) testLong::@7
(label) testLong::@return
(signed dword) testLong::n
(signed dword) testLong::n#0
(signed dword) testLong::s
(signed dword) testLong::s#0
(const string) testLong::str = (string) "long: "
(dword) testLong::u
(dword) testLong::u#0
(void()) testShort()
(label) testShort::@1
(label) testShort::@2
@ -1267,12 +1258,9 @@ SYMBOL TABLE SSA
(label) testShort::@7
(label) testShort::@return
(signed word) testShort::n
(signed word) testShort::n#0
(signed word) testShort::s
(signed word) testShort::s#0
(const string) testShort::str = (string) "short: "
(word) testShort::u
(word) testShort::u#0
Adding number conversion cast (unumber) 0 in (bool~) memset::$0 ← (word) memset::num#1 > (number) 0
Adding number conversion cast (unumber) 0 in (bool~) print_str::$0 ← (number) 0 != *((byte*) print_str::str#5)
@ -1284,18 +1272,18 @@ Adding number conversion cast (unumber) 4 in (byte~) print_byte::$0 ← (byte) p
Adding number conversion cast (unumber) $f in (number~) print_byte::$2 ← (byte) print_byte::b#6 & (number) $f
Adding number conversion cast (unumber) print_byte::$2 in (number~) print_byte::$2 ← (byte) print_byte::b#6 & (unumber)(number) $f
Adding number conversion cast (unumber) $3e8 in (word) memset::num#0 ← (number) $3e8
Adding number conversion cast (unumber) $e in (byte) testChar::u#0 ← (number) $e
Adding number conversion cast (unumber) $e in (byte) testChar::n#0 ← (number) $e
Adding number conversion cast (snumber) -$e in (signed byte) testChar::s#0 ← (number) -$e
Adding number conversion cast (unumber) $578 in (word) testShort::u#0 ← (number) $578
Adding number conversion cast (snumber) -$578 in (signed word) testShort::n#0 ← (number) -$578
Adding number conversion cast (snumber) -$578 in (signed word) testShort::s#0 ← (number) -$578
Adding number conversion cast (unumber) $578 in (word) testInt::u#0 ← (number) $578
Adding number conversion cast (snumber) -$578 in (signed word) testInt::n#0 ← (number) -$578
Adding number conversion cast (snumber) -$578 in (signed word) testInt::s#0 ← (number) -$578
Adding number conversion cast (unumber) $222e0 in (dword) testLong::u#0 ← (number) $222e0
Adding number conversion cast (snumber) -$222e0 in (signed dword) testLong::n#0 ← (number) -$222e0
Adding number conversion cast (snumber) -$222e0 in (signed dword) testLong::s#0 ← (number) -$222e0
Adding number conversion cast (unumber) $e in (byte) testChar::u ← (number) $e
Adding number conversion cast (unumber) $e in (byte) testChar::n ← (number) $e
Adding number conversion cast (snumber) -$e in (signed byte) testChar::s ← (number) -$e
Adding number conversion cast (unumber) $578 in (word) testShort::u ← (number) $578
Adding number conversion cast (snumber) -$578 in (signed word) testShort::n ← (number) -$578
Adding number conversion cast (snumber) -$578 in (signed word) testShort::s ← (number) -$578
Adding number conversion cast (unumber) $578 in (word) testInt::u ← (number) $578
Adding number conversion cast (snumber) -$578 in (signed word) testInt::n ← (number) -$578
Adding number conversion cast (snumber) -$578 in (signed word) testInt::s ← (number) -$578
Adding number conversion cast (unumber) $222e0 in (dword) testLong::u ← (number) $222e0
Adding number conversion cast (snumber) -$222e0 in (signed dword) testLong::n ← (number) -$222e0
Adding number conversion cast (snumber) -$222e0 in (signed dword) testLong::s ← (number) -$222e0
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*~) memset::$2 ← (byte*)(void*) memset::str#2
Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#2
@ -1304,18 +1292,18 @@ Inlining cast (word~) print_sword::$1 ← (word)(signed word) print_sword::w#7
Inlining cast (byte~) print_sbyte::$1 ← (byte)(signed byte) print_sbyte::b#4
Inlining cast (dword~) print_sdword::$1 ← (dword)(signed dword) print_sdword::dw#5
Inlining cast (word) memset::num#0 ← (unumber)(number) $3e8
Inlining cast (byte) testChar::u#0 ← (unumber)(number) $e
Inlining cast (byte) testChar::n#0 ← (unumber)(number) $e
Inlining cast (signed byte) testChar::s#0 ← (snumber)(number) -$e
Inlining cast (word) testShort::u#0 ← (unumber)(number) $578
Inlining cast (signed word) testShort::n#0 ← (snumber)(number) -$578
Inlining cast (signed word) testShort::s#0 ← (snumber)(number) -$578
Inlining cast (word) testInt::u#0 ← (unumber)(number) $578
Inlining cast (signed word) testInt::n#0 ← (snumber)(number) -$578
Inlining cast (signed word) testInt::s#0 ← (snumber)(number) -$578
Inlining cast (dword) testLong::u#0 ← (unumber)(number) $222e0
Inlining cast (signed dword) testLong::n#0 ← (snumber)(number) -$222e0
Inlining cast (signed dword) testLong::s#0 ← (snumber)(number) -$222e0
Inlining cast (byte) testChar::u ← (unumber)(number) $e
Inlining cast (byte) testChar::n ← (unumber)(number) $e
Inlining cast (signed byte) testChar::s ← (snumber)(number) -$e
Inlining cast (word) testShort::u ← (unumber)(number) $578
Inlining cast (signed word) testShort::n ← (snumber)(number) -$578
Inlining cast (signed word) testShort::s ← (snumber)(number) -$578
Inlining cast (word) testInt::u ← (unumber)(number) $578
Inlining cast (signed word) testInt::n ← (snumber)(number) -$578
Inlining cast (signed word) testInt::s ← (snumber)(number) -$578
Inlining cast (dword) testLong::u ← (unumber)(number) $222e0
Inlining cast (signed dword) testLong::n ← (snumber)(number) -$222e0
Inlining cast (signed dword) testLong::s ← (snumber)(number) -$222e0
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast 0
Simplifying constant pointer cast (byte*) 1024
@ -1570,43 +1558,43 @@ Constant (const byte) print_char::ch#5 = ' '
Constant (const byte[]) print_hextab = $0
Constant (const byte) memset::c#0 = ' '
Constant (const word) memset::num#0 = $3e8
Constant (const byte) testChar::u#0 = $e
Constant (const byte) testChar::n#0 = $e
Constant (const signed byte) testChar::s#0 = -$e
Constant (const byte) testChar::u = $e
Constant (const byte) testChar::n = $e
Constant (const signed byte) testChar::s = -$e
Constant (const byte*) print_str::str#1 = testChar::str
Constant (const byte) print_char::ch#8 = ' '
Constant (const byte) print_char::ch#9 = ' '
Constant (const word) testShort::u#0 = $578
Constant (const signed word) testShort::n#0 = -$578
Constant (const signed word) testShort::s#0 = -$578
Constant (const word) testShort::u = $578
Constant (const signed word) testShort::n = -$578
Constant (const signed word) testShort::s = -$578
Constant (const byte*) print_str::str#2 = testShort::str
Constant (const byte) print_char::ch#10 = ' '
Constant (const byte) print_char::ch#11 = ' '
Constant (const word) testInt::u#0 = $578
Constant (const signed word) testInt::n#0 = -$578
Constant (const signed word) testInt::s#0 = -$578
Constant (const word) testInt::u = $578
Constant (const signed word) testInt::n = -$578
Constant (const signed word) testInt::s = -$578
Constant (const byte*) print_str::str#3 = testInt::str
Constant (const byte) print_char::ch#12 = ' '
Constant (const byte) print_char::ch#13 = ' '
Constant (const dword) testLong::u#0 = $222e0
Constant (const signed dword) testLong::n#0 = -$222e0
Constant (const signed dword) testLong::s#0 = -$222e0
Constant (const dword) testLong::u = $222e0
Constant (const signed dword) testLong::n = -$222e0
Constant (const signed dword) testLong::s = -$222e0
Constant (const byte*) print_str::str#4 = testLong::str
Constant (const byte) print_char::ch#14 = ' '
Constant (const byte) print_char::ch#15 = ' '
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte) print_byte::b#3 = testChar::u#0
Constant (const byte) print_byte::b#4 = testChar::n#0
Constant (const signed byte) print_sbyte::b#1 = testChar::s#0
Constant (const word) print_word::w#3 = testShort::u#0
Constant (const signed word) print_sword::w#1 = testShort::n#0
Constant (const signed word) print_sword::w#2 = testShort::s#0
Constant (const word) print_word::w#4 = testInt::u#0
Constant (const signed word) print_sword::w#3 = testInt::n#0
Constant (const signed word) print_sword::w#4 = testInt::s#0
Constant (const dword) print_dword::dw#1 = testLong::u#0
Constant (const signed dword) print_sdword::dw#1 = testLong::n#0
Constant (const signed dword) print_sdword::dw#2 = testLong::s#0
Constant (const byte) print_byte::b#3 = testChar::u
Constant (const byte) print_byte::b#4 = testChar::n
Constant (const signed byte) print_sbyte::b#1 = testChar::s
Constant (const word) print_word::w#3 = testShort::u
Constant (const signed word) print_sword::w#1 = testShort::n
Constant (const signed word) print_sword::w#2 = testShort::s
Constant (const word) print_word::w#4 = testInt::u
Constant (const signed word) print_sword::w#3 = testInt::n
Constant (const signed word) print_sword::w#4 = testInt::s
Constant (const dword) print_dword::dw#1 = testLong::u
Constant (const signed dword) print_sdword::dw#1 = testLong::n
Constant (const signed dword) print_sdword::dw#2 = testLong::s
Successful SSA optimization Pass2ConstantIdentification
Constant value identified (void*)print_line_cursor#0 in [169] (void*) memset::str#0 ← (void*)(const byte*) print_line_cursor#0
Successful SSA optimization Pass2ConstantValues
@ -1677,27 +1665,27 @@ Inlining constant with var siblings (const byte*) print_line_cursor#0
Constant inlined print_char::ch#13 = (byte) ' '
Constant inlined print_char::ch#14 = (byte) ' '
Constant inlined print_char::ch#15 = (byte) ' '
Constant inlined print_sbyte::b#1 = (const signed byte) testChar::s#0
Constant inlined print_sbyte::b#1 = (const signed byte) testChar::s
Constant inlined print_char::ch#10 = (byte) ' '
Constant inlined print_sword::w#1 = (const signed word) testShort::n#0
Constant inlined print_sword::w#1 = (const signed word) testShort::n
Constant inlined print_char::ch#11 = (byte) ' '
Constant inlined print_sword::w#2 = (const signed word) testShort::s#0
Constant inlined print_sword::w#2 = (const signed word) testShort::s
Constant inlined print_char::ch#12 = (byte) ' '
Constant inlined print_sword::w#3 = (const signed word) testInt::n#0
Constant inlined print_sword::w#3 = (const signed word) testInt::n
Constant inlined $0 = (const byte[]) print_hextab
Constant inlined print_sword::w#4 = (const signed word) testInt::s#0
Constant inlined print_dword::dw#1 = (const dword) testLong::u#0
Constant inlined print_sword::w#4 = (const signed word) testInt::s
Constant inlined print_dword::dw#1 = (const dword) testLong::u
Constant inlined print_char::ch#9 = (byte) ' '
Constant inlined print_char::ch#8 = (byte) ' '
Constant inlined memset::$2 = (byte*)(const void*) memset::str#0
Constant inlined print_sdword::dw#2 = (const signed dword) testLong::s#0
Constant inlined print_sdword::dw#1 = (const signed dword) testLong::n#0
Constant inlined print_sdword::dw#2 = (const signed dword) testLong::s
Constant inlined print_sdword::dw#1 = (const signed dword) testLong::n
Constant inlined print_byte::b#0 = (byte)(const signed byte) print_sbyte::b#0
Constant inlined print_line_cursor#0 = (byte*) 1024
Constant inlined print_byte::b#4 = (const byte) testChar::n#0
Constant inlined print_byte::b#3 = (const byte) testChar::u#0
Constant inlined print_word::w#3 = (const word) testShort::u#0
Constant inlined print_word::w#4 = (const word) testInt::u#0
Constant inlined print_byte::b#4 = (const byte) testChar::n
Constant inlined print_byte::b#3 = (const byte) testChar::u
Constant inlined print_word::w#3 = (const word) testShort::u
Constant inlined print_word::w#4 = (const word) testInt::u
Constant inlined print_char::ch#2 = (byte) '-'
Constant inlined print_char::ch#5 = (byte) ' '
Constant inlined print_char::ch#4 = (byte) '-'
@ -1972,7 +1960,7 @@ print_ln::@return: scope:[print_ln] from print_ln::@1
(void()) print_sdword((signed dword) print_sdword::dw)
print_sdword: scope:[print_sdword] from testLong::@3 testLong::@5
[35] (signed dword) print_sdword::dw#3 ← phi( testLong::@3/(const signed dword) testLong::n#0 testLong::@5/(const signed dword) testLong::s#0 )
[35] (signed dword) print_sdword::dw#3 ← phi( testLong::@3/(const signed dword) testLong::n testLong::@5/(const signed dword) testLong::s )
[36] if((signed dword) print_sdword::dw#3<(signed byte) 0) goto print_sdword::@1
to:print_sdword::@3
print_sdword::@3: scope:[print_sdword] from print_sdword
@ -2009,7 +1997,7 @@ print_char::@return: scope:[print_char] from print_char
(void()) print_dword((dword) print_dword::dw)
print_dword: scope:[print_dword] from print_sdword::@2 testLong::@1
[50] (byte*) print_char_cursor#145 ← phi( print_sdword::@2/(byte*) print_char_cursor#26 testLong::@1/(byte*) print_char_cursor#136 )
[50] (dword) print_dword::dw#2 ← phi( print_sdword::@2/(dword) print_dword::dw#0 testLong::@1/(const dword) testLong::u#0 )
[50] (dword) print_dword::dw#2 ← phi( print_sdword::@2/(dword) print_dword::dw#0 testLong::@1/(const dword) testLong::u )
[51] (word) print_word::w#1 ← > (dword) print_dword::dw#2
[52] call print_word
to:print_dword::@1
@ -2024,7 +2012,7 @@ print_dword::@return: scope:[print_dword] from print_dword::@1
(void()) print_word((word) print_word::w)
print_word: scope:[print_word] from print_dword print_dword::@1 print_sword::@2 testInt::@1 testShort::@1
[56] (byte*) print_char_cursor#144 ← phi( print_dword/(byte*) print_char_cursor#145 print_dword::@1/(byte*) print_char_cursor#26 print_sword::@2/(byte*) print_char_cursor#26 testInt::@1/(byte*) print_char_cursor#136 testShort::@1/(byte*) print_char_cursor#136 )
[56] (word) print_word::w#5 ← phi( print_dword/(word) print_word::w#1 print_dword::@1/(word) print_word::w#2 print_sword::@2/(word) print_word::w#0 testInt::@1/(const word) testInt::u#0 testShort::@1/(const word) testShort::u#0 )
[56] (word) print_word::w#5 ← phi( print_dword/(word) print_word::w#1 print_dword::@1/(word) print_word::w#2 print_sword::@2/(word) print_word::w#0 testInt::@1/(const word) testInt::u testShort::@1/(const word) testShort::u )
[57] (byte) print_byte::b#1 ← > (word) print_word::w#5
[58] call print_byte
to:print_word::@1
@ -2039,7 +2027,7 @@ print_word::@return: scope:[print_word] from print_word::@1
(void()) print_byte((byte) print_byte::b)
print_byte: scope:[print_byte] from print_sbyte::@2 print_word print_word::@1 testChar::@1 testChar::@3
[62] (byte*) print_char_cursor#149 ← phi( print_sbyte::@2/(byte*) print_char_cursor#26 print_word/(byte*) print_char_cursor#144 print_word::@1/(byte*) print_char_cursor#26 testChar::@1/(byte*) print_char_cursor#136 testChar::@3/(byte*) print_char_cursor#26 )
[62] (byte) print_byte::b#5 ← phi( print_sbyte::@2/(byte)(const signed byte) print_sbyte::b#0 print_word/(byte) print_byte::b#1 print_word::@1/(byte) print_byte::b#2 testChar::@1/(const byte) testChar::u#0 testChar::@3/(const byte) testChar::n#0 )
[62] (byte) print_byte::b#5 ← phi( print_sbyte::@2/(byte)(const signed byte) print_sbyte::b#0 print_word/(byte) print_byte::b#1 print_word::@1/(byte) print_byte::b#2 testChar::@1/(const byte) testChar::u testChar::@3/(const byte) testChar::n )
[63] (byte~) print_byte::$0 ← (byte) print_byte::b#5 >> (byte) 4
[64] (byte) print_char::ch#6 ← *((const byte[]) print_hextab + (byte~) print_byte::$0)
[65] call print_char
@ -2107,7 +2095,7 @@ testInt::@return: scope:[testInt] from testInt::@6
(void()) print_sword((signed word) print_sword::w)
print_sword: scope:[print_sword] from testInt::@3 testInt::@5 testShort::@3 testShort::@5
[92] (signed word) print_sword::w#10 ← phi( testInt::@3/(const signed word) testInt::n#0 testInt::@5/(const signed word) testInt::s#0 testShort::@3/(const signed word) testShort::n#0 testShort::@5/(const signed word) testShort::s#0 )
[92] (signed word) print_sword::w#10 ← phi( testInt::@3/(const signed word) testInt::n testInt::@5/(const signed word) testInt::s testShort::@3/(const signed word) testShort::n testShort::@5/(const signed word) testShort::s )
[93] if((signed word) print_sword::w#10<(signed byte) 0) goto print_sword::@1
to:print_sword::@3
print_sword::@3: scope:[print_sword] from print_sword
@ -2308,21 +2296,9 @@ VARIABLE REGISTER WEIGHTS
(word) print_word::w#2 4.0
(word) print_word::w#5 3.333333333333333
(void()) testChar()
(byte) testChar::n
(signed byte) testChar::s
(byte) testChar::u
(void()) testInt()
(signed word) testInt::n
(signed word) testInt::s
(word) testInt::u
(void()) testLong()
(signed dword) testLong::n
(signed dword) testLong::s
(dword) testLong::u
(void()) testShort()
(signed word) testShort::n
(signed word) testShort::s
(word) testShort::u
Initial phi equivalence classes
[ print_line_cursor#20 print_line_cursor#39 print_line_cursor#1 ]
@ -2461,7 +2437,7 @@ testLong: {
// [50] phi from testLong::@1 to print_dword [phi:testLong::@1->print_dword]
print_dword_from_b1:
// [50] phi (byte*) print_char_cursor#145 = (byte*) print_char_cursor#136 [phi:testLong::@1->print_dword#0] -- register_copy
// [50] phi (dword) print_dword::dw#2 = (const dword) testLong::u#0 [phi:testLong::@1->print_dword#1] -- vduz1=vduc1
// [50] phi (dword) print_dword::dw#2 = (const dword) testLong::u [phi:testLong::@1->print_dword#1] -- vduz1=vduc1
lda #<u
sta.z print_dword.dw
lda #>u
@ -2492,7 +2468,7 @@ testLong: {
// [22] call print_sdword
// [35] phi from testLong::@3 to print_sdword [phi:testLong::@3->print_sdword]
print_sdword_from_b3:
// [35] phi (signed dword) print_sdword::dw#3 = (const signed dword) testLong::n#0 [phi:testLong::@3->print_sdword#0] -- vdsz1=vdsc1
// [35] phi (signed dword) print_sdword::dw#3 = (const signed dword) testLong::n [phi:testLong::@3->print_sdword#0] -- vdsz1=vdsc1
lda #<n
sta.z print_sdword.dw
lda #>n
@ -2523,7 +2499,7 @@ testLong: {
// [26] call print_sdword
// [35] phi from testLong::@5 to print_sdword [phi:testLong::@5->print_sdword]
print_sdword_from_b5:
// [35] phi (signed dword) print_sdword::dw#3 = (const signed dword) testLong::s#0 [phi:testLong::@5->print_sdword#0] -- vdsz1=vdsc1
// [35] phi (signed dword) print_sdword::dw#3 = (const signed dword) testLong::s [phi:testLong::@5->print_sdword#0] -- vdsz1=vdsc1
lda #<s
sta.z print_sdword.dw
lda #>s
@ -2874,7 +2850,7 @@ testInt: {
// [56] phi from testInt::@1 to print_word [phi:testInt::@1->print_word]
print_word_from_b1:
// [56] phi (byte*) print_char_cursor#144 = (byte*) print_char_cursor#136 [phi:testInt::@1->print_word#0] -- register_copy
// [56] phi (word) print_word::w#5 = (const word) testInt::u#0 [phi:testInt::@1->print_word#1] -- vwuz1=vwuc1
// [56] phi (word) print_word::w#5 = (const word) testInt::u [phi:testInt::@1->print_word#1] -- vwuz1=vwuc1
lda #<u
sta.z print_word.w
lda #>u
@ -2901,7 +2877,7 @@ testInt: {
// [84] call print_sword
// [92] phi from testInt::@3 to print_sword [phi:testInt::@3->print_sword]
print_sword_from_b3:
// [92] phi (signed word) print_sword::w#10 = (const signed word) testInt::n#0 [phi:testInt::@3->print_sword#0] -- vwsz1=vwsc1
// [92] phi (signed word) print_sword::w#10 = (const signed word) testInt::n [phi:testInt::@3->print_sword#0] -- vwsz1=vwsc1
lda #<n
sta.z print_sword.w
lda #>n
@ -2928,7 +2904,7 @@ testInt: {
// [88] call print_sword
// [92] phi from testInt::@5 to print_sword [phi:testInt::@5->print_sword]
print_sword_from_b5:
// [92] phi (signed word) print_sword::w#10 = (const signed word) testInt::s#0 [phi:testInt::@5->print_sword#0] -- vwsz1=vwsc1
// [92] phi (signed word) print_sword::w#10 = (const signed word) testInt::s [phi:testInt::@5->print_sword#0] -- vwsz1=vwsc1
lda #<s
sta.z print_sword.w
lda #>s
@ -3051,7 +3027,7 @@ testShort: {
// [56] phi from testShort::@1 to print_word [phi:testShort::@1->print_word]
print_word_from_b1:
// [56] phi (byte*) print_char_cursor#144 = (byte*) print_char_cursor#136 [phi:testShort::@1->print_word#0] -- register_copy
// [56] phi (word) print_word::w#5 = (const word) testShort::u#0 [phi:testShort::@1->print_word#1] -- vwuz1=vwuc1
// [56] phi (word) print_word::w#5 = (const word) testShort::u [phi:testShort::@1->print_word#1] -- vwuz1=vwuc1
lda #<u
sta.z print_word.w
lda #>u
@ -3078,7 +3054,7 @@ testShort: {
// [110] call print_sword
// [92] phi from testShort::@3 to print_sword [phi:testShort::@3->print_sword]
print_sword_from_b3:
// [92] phi (signed word) print_sword::w#10 = (const signed word) testShort::n#0 [phi:testShort::@3->print_sword#0] -- vwsz1=vwsc1
// [92] phi (signed word) print_sword::w#10 = (const signed word) testShort::n [phi:testShort::@3->print_sword#0] -- vwsz1=vwsc1
lda #<n
sta.z print_sword.w
lda #>n
@ -3105,7 +3081,7 @@ testShort: {
// [114] call print_sword
// [92] phi from testShort::@5 to print_sword [phi:testShort::@5->print_sword]
print_sword_from_b5:
// [92] phi (signed word) print_sword::w#10 = (const signed word) testShort::s#0 [phi:testShort::@5->print_sword#0] -- vwsz1=vwsc1
// [92] phi (signed word) print_sword::w#10 = (const signed word) testShort::s [phi:testShort::@5->print_sword#0] -- vwsz1=vwsc1
lda #<s
sta.z print_sword.w
lda #>s
@ -3157,7 +3133,7 @@ testChar: {
// [62] phi from testChar::@1 to print_byte [phi:testChar::@1->print_byte]
print_byte_from_b1:
// [62] phi (byte*) print_char_cursor#149 = (byte*) print_char_cursor#136 [phi:testChar::@1->print_byte#0] -- register_copy
// [62] phi (byte) print_byte::b#5 = (const byte) testChar::u#0 [phi:testChar::@1->print_byte#1] -- vbuz1=vbuc1
// [62] phi (byte) print_byte::b#5 = (const byte) testChar::u [phi:testChar::@1->print_byte#1] -- vbuz1=vbuc1
lda #u
sta.z print_byte.b
jsr print_byte
@ -3183,7 +3159,7 @@ testChar: {
// [62] phi from testChar::@3 to print_byte [phi:testChar::@3->print_byte]
print_byte_from_b3:
// [62] phi (byte*) print_char_cursor#149 = (byte*) print_char_cursor#26 [phi:testChar::@3->print_byte#0] -- register_copy
// [62] phi (byte) print_byte::b#5 = (const byte) testChar::n#0 [phi:testChar::@3->print_byte#1] -- vbuz1=vbuc1
// [62] phi (byte) print_byte::b#5 = (const byte) testChar::n [phi:testChar::@3->print_byte#1] -- vbuz1=vbuc1
lda #n
sta.z print_byte.b
jsr print_byte
@ -3533,7 +3509,7 @@ testLong: {
// [50] phi from testLong::@1 to print_dword [phi:testLong::@1->print_dword]
print_dword_from_b1:
// [50] phi (byte*) print_char_cursor#145 = (byte*) print_char_cursor#136 [phi:testLong::@1->print_dword#0] -- register_copy
// [50] phi (dword) print_dword::dw#2 = (const dword) testLong::u#0 [phi:testLong::@1->print_dword#1] -- vduz1=vduc1
// [50] phi (dword) print_dword::dw#2 = (const dword) testLong::u [phi:testLong::@1->print_dword#1] -- vduz1=vduc1
lda #<u
sta.z print_dword.dw
lda #>u
@ -3563,7 +3539,7 @@ testLong: {
// [22] call print_sdword
// [35] phi from testLong::@3 to print_sdword [phi:testLong::@3->print_sdword]
print_sdword_from_b3:
// [35] phi (signed dword) print_sdword::dw#3 = (const signed dword) testLong::n#0 [phi:testLong::@3->print_sdword#0] -- vdsz1=vdsc1
// [35] phi (signed dword) print_sdword::dw#3 = (const signed dword) testLong::n [phi:testLong::@3->print_sdword#0] -- vdsz1=vdsc1
lda #<n
sta.z print_sdword.dw
lda #>n
@ -3593,7 +3569,7 @@ testLong: {
// [26] call print_sdword
// [35] phi from testLong::@5 to print_sdword [phi:testLong::@5->print_sdword]
print_sdword_from_b5:
// [35] phi (signed dword) print_sdword::dw#3 = (const signed dword) testLong::s#0 [phi:testLong::@5->print_sdword#0] -- vdsz1=vdsc1
// [35] phi (signed dword) print_sdword::dw#3 = (const signed dword) testLong::s [phi:testLong::@5->print_sdword#0] -- vdsz1=vdsc1
lda #<s
sta.z print_sdword.dw
lda #>s
@ -3924,7 +3900,7 @@ testInt: {
// [56] phi from testInt::@1 to print_word [phi:testInt::@1->print_word]
print_word_from_b1:
// [56] phi (byte*) print_char_cursor#144 = (byte*) print_char_cursor#136 [phi:testInt::@1->print_word#0] -- register_copy
// [56] phi (word) print_word::w#5 = (const word) testInt::u#0 [phi:testInt::@1->print_word#1] -- vwuz1=vwuc1
// [56] phi (word) print_word::w#5 = (const word) testInt::u [phi:testInt::@1->print_word#1] -- vwuz1=vwuc1
lda #<u
sta.z print_word.w
lda #>u
@ -3950,7 +3926,7 @@ testInt: {
// [84] call print_sword
// [92] phi from testInt::@3 to print_sword [phi:testInt::@3->print_sword]
print_sword_from_b3:
// [92] phi (signed word) print_sword::w#10 = (const signed word) testInt::n#0 [phi:testInt::@3->print_sword#0] -- vwsz1=vwsc1
// [92] phi (signed word) print_sword::w#10 = (const signed word) testInt::n [phi:testInt::@3->print_sword#0] -- vwsz1=vwsc1
lda #<n
sta.z print_sword.w
lda #>n
@ -3976,7 +3952,7 @@ testInt: {
// [88] call print_sword
// [92] phi from testInt::@5 to print_sword [phi:testInt::@5->print_sword]
print_sword_from_b5:
// [92] phi (signed word) print_sword::w#10 = (const signed word) testInt::s#0 [phi:testInt::@5->print_sword#0] -- vwsz1=vwsc1
// [92] phi (signed word) print_sword::w#10 = (const signed word) testInt::s [phi:testInt::@5->print_sword#0] -- vwsz1=vwsc1
lda #<s
sta.z print_sword.w
lda #>s
@ -4093,7 +4069,7 @@ testShort: {
// [56] phi from testShort::@1 to print_word [phi:testShort::@1->print_word]
print_word_from_b1:
// [56] phi (byte*) print_char_cursor#144 = (byte*) print_char_cursor#136 [phi:testShort::@1->print_word#0] -- register_copy
// [56] phi (word) print_word::w#5 = (const word) testShort::u#0 [phi:testShort::@1->print_word#1] -- vwuz1=vwuc1
// [56] phi (word) print_word::w#5 = (const word) testShort::u [phi:testShort::@1->print_word#1] -- vwuz1=vwuc1
lda #<u
sta.z print_word.w
lda #>u
@ -4119,7 +4095,7 @@ testShort: {
// [110] call print_sword
// [92] phi from testShort::@3 to print_sword [phi:testShort::@3->print_sword]
print_sword_from_b3:
// [92] phi (signed word) print_sword::w#10 = (const signed word) testShort::n#0 [phi:testShort::@3->print_sword#0] -- vwsz1=vwsc1
// [92] phi (signed word) print_sword::w#10 = (const signed word) testShort::n [phi:testShort::@3->print_sword#0] -- vwsz1=vwsc1
lda #<n
sta.z print_sword.w
lda #>n
@ -4145,7 +4121,7 @@ testShort: {
// [114] call print_sword
// [92] phi from testShort::@5 to print_sword [phi:testShort::@5->print_sword]
print_sword_from_b5:
// [92] phi (signed word) print_sword::w#10 = (const signed word) testShort::s#0 [phi:testShort::@5->print_sword#0] -- vwsz1=vwsc1
// [92] phi (signed word) print_sword::w#10 = (const signed word) testShort::s [phi:testShort::@5->print_sword#0] -- vwsz1=vwsc1
lda #<s
sta.z print_sword.w
lda #>s
@ -4197,7 +4173,7 @@ testChar: {
// [62] phi from testChar::@1 to print_byte [phi:testChar::@1->print_byte]
print_byte_from_b1:
// [62] phi (byte*) print_char_cursor#149 = (byte*) print_char_cursor#136 [phi:testChar::@1->print_byte#0] -- register_copy
// [62] phi (byte) print_byte::b#5 = (const byte) testChar::u#0 [phi:testChar::@1->print_byte#1] -- vbuxx=vbuc1
// [62] phi (byte) print_byte::b#5 = (const byte) testChar::u [phi:testChar::@1->print_byte#1] -- vbuxx=vbuc1
ldx #u
jsr print_byte
// [122] phi from testChar::@1 to testChar::@2 [phi:testChar::@1->testChar::@2]
@ -4221,7 +4197,7 @@ testChar: {
// [62] phi from testChar::@3 to print_byte [phi:testChar::@3->print_byte]
print_byte_from_b3:
// [62] phi (byte*) print_char_cursor#149 = (byte*) print_char_cursor#26 [phi:testChar::@3->print_byte#0] -- register_copy
// [62] phi (byte) print_byte::b#5 = (const byte) testChar::n#0 [phi:testChar::@3->print_byte#1] -- vbuxx=vbuc1
// [62] phi (byte) print_byte::b#5 = (const byte) testChar::n [phi:testChar::@3->print_byte#1] -- vbuxx=vbuc1
ldx #n
jsr print_byte
// [126] phi from testChar::@3 to testChar::@4 [phi:testChar::@3->testChar::@4]
@ -4669,7 +4645,7 @@ FINAL SYMBOL TABLE
(label) print_sbyte::@2
(label) print_sbyte::@return
(signed byte) print_sbyte::b
(const signed byte) print_sbyte::b#0 b = -(const signed byte) testChar::s#0
(const signed byte) print_sbyte::b#0 b = -(const signed byte) testChar::s
(byte*) print_screen
(void()) print_sdword((signed dword) print_sdword::dw)
(label) print_sdword::@1
@ -4715,13 +4691,10 @@ FINAL SYMBOL TABLE
(label) testChar::@5
(label) testChar::@6
(label) testChar::@return
(byte) testChar::n
(const byte) testChar::n#0 n = (byte) $e
(signed byte) testChar::s
(const signed byte) testChar::s#0 s = (signed byte) -$e
(const byte) testChar::n n = (byte) $e
(const signed byte) testChar::s s = (signed byte) -$e
(const string) testChar::str str = (string) "char: "
(byte) testChar::u
(const byte) testChar::u#0 u = (byte) $e
(const byte) testChar::u u = (byte) $e
(void()) testInt()
(label) testInt::@1
(label) testInt::@2
@ -4730,13 +4703,10 @@ FINAL SYMBOL TABLE
(label) testInt::@5
(label) testInt::@6
(label) testInt::@return
(signed word) testInt::n
(const signed word) testInt::n#0 n = (signed word) -$578
(signed word) testInt::s
(const signed word) testInt::s#0 s = (signed word) -$578
(const signed word) testInt::n n = (signed word) -$578
(const signed word) testInt::s s = (signed word) -$578
(const string) testInt::str str = (string) "int: "
(word) testInt::u
(const word) testInt::u#0 u = (word) $578
(const word) testInt::u u = (word) $578
(void()) testLong()
(label) testLong::@1
(label) testLong::@2
@ -4745,13 +4715,10 @@ FINAL SYMBOL TABLE
(label) testLong::@5
(label) testLong::@6
(label) testLong::@return
(signed dword) testLong::n
(const signed dword) testLong::n#0 n = (signed dword) -$222e0
(signed dword) testLong::s
(const signed dword) testLong::s#0 s = (signed dword) -$222e0
(const signed dword) testLong::n n = (signed dword) -$222e0
(const signed dword) testLong::s s = (signed dword) -$222e0
(const string) testLong::str str = (string) "long: "
(dword) testLong::u
(const dword) testLong::u#0 u = (dword) $222e0
(const dword) testLong::u u = (dword) $222e0
(void()) testShort()
(label) testShort::@1
(label) testShort::@2
@ -4760,13 +4727,10 @@ FINAL SYMBOL TABLE
(label) testShort::@5
(label) testShort::@6
(label) testShort::@return
(signed word) testShort::n
(const signed word) testShort::n#0 n = (signed word) -$578
(signed word) testShort::s
(const signed word) testShort::s#0 s = (signed word) -$578
(const signed word) testShort::n n = (signed word) -$578
(const signed word) testShort::s s = (signed word) -$578
(const string) testShort::str str = (string) "short: "
(word) testShort::u
(const word) testShort::u#0 u = (word) $578
(const word) testShort::u u = (word) $578
zp ZP_DWORD:2 [ print_sdword::dw#5 print_sdword::dw#0 print_sdword::dw#3 print_dword::dw#2 print_dword::dw#0 ]
reg byte a [ print_char::ch#16 print_char::ch#6 print_char::ch#7 ]
@ -4855,7 +4819,7 @@ testLong: {
// [18] call print_dword
// [50] phi from testLong::@1 to print_dword [phi:testLong::@1->print_dword]
// [50] phi (byte*) print_char_cursor#145 = (byte*) print_char_cursor#136 [phi:testLong::@1->print_dword#0] -- register_copy
// [50] phi (dword) print_dword::dw#2 = (const dword) testLong::u#0 [phi:testLong::@1->print_dword#1] -- vduz1=vduc1
// [50] phi (dword) print_dword::dw#2 = (const dword) testLong::u [phi:testLong::@1->print_dword#1] -- vduz1=vduc1
lda #<u
sta.z print_dword.dw
lda #>u
@ -4879,7 +4843,7 @@ testLong: {
// print_sdword(n)
// [22] call print_sdword
// [35] phi from testLong::@3 to print_sdword [phi:testLong::@3->print_sdword]
// [35] phi (signed dword) print_sdword::dw#3 = (const signed dword) testLong::n#0 [phi:testLong::@3->print_sdword#0] -- vdsz1=vdsc1
// [35] phi (signed dword) print_sdword::dw#3 = (const signed dword) testLong::n [phi:testLong::@3->print_sdword#0] -- vdsz1=vdsc1
lda #<n
sta.z print_sdword.dw
lda #>n
@ -4903,7 +4867,7 @@ testLong: {
// print_sdword(s)
// [26] call print_sdword
// [35] phi from testLong::@5 to print_sdword [phi:testLong::@5->print_sdword]
// [35] phi (signed dword) print_sdword::dw#3 = (const signed dword) testLong::s#0 [phi:testLong::@5->print_sdword#0] -- vdsz1=vdsc1
// [35] phi (signed dword) print_sdword::dw#3 = (const signed dword) testLong::s [phi:testLong::@5->print_sdword#0] -- vdsz1=vdsc1
lda #<s
sta.z print_sdword.dw
lda #>s
@ -5208,7 +5172,7 @@ testInt: {
// [80] call print_word
// [56] phi from testInt::@1 to print_word [phi:testInt::@1->print_word]
// [56] phi (byte*) print_char_cursor#144 = (byte*) print_char_cursor#136 [phi:testInt::@1->print_word#0] -- register_copy
// [56] phi (word) print_word::w#5 = (const word) testInt::u#0 [phi:testInt::@1->print_word#1] -- vwuz1=vwuc1
// [56] phi (word) print_word::w#5 = (const word) testInt::u [phi:testInt::@1->print_word#1] -- vwuz1=vwuc1
lda #<u
sta.z print_word.w
lda #>u
@ -5228,7 +5192,7 @@ testInt: {
// print_sword(n)
// [84] call print_sword
// [92] phi from testInt::@3 to print_sword [phi:testInt::@3->print_sword]
// [92] phi (signed word) print_sword::w#10 = (const signed word) testInt::n#0 [phi:testInt::@3->print_sword#0] -- vwsz1=vwsc1
// [92] phi (signed word) print_sword::w#10 = (const signed word) testInt::n [phi:testInt::@3->print_sword#0] -- vwsz1=vwsc1
lda #<n
sta.z print_sword.w
lda #>n
@ -5248,7 +5212,7 @@ testInt: {
// print_sword(s)
// [88] call print_sword
// [92] phi from testInt::@5 to print_sword [phi:testInt::@5->print_sword]
// [92] phi (signed word) print_sword::w#10 = (const signed word) testInt::s#0 [phi:testInt::@5->print_sword#0] -- vwsz1=vwsc1
// [92] phi (signed word) print_sword::w#10 = (const signed word) testInt::s [phi:testInt::@5->print_sword#0] -- vwsz1=vwsc1
lda #<s
sta.z print_sword.w
lda #>s
@ -5349,7 +5313,7 @@ testShort: {
// [106] call print_word
// [56] phi from testShort::@1 to print_word [phi:testShort::@1->print_word]
// [56] phi (byte*) print_char_cursor#144 = (byte*) print_char_cursor#136 [phi:testShort::@1->print_word#0] -- register_copy
// [56] phi (word) print_word::w#5 = (const word) testShort::u#0 [phi:testShort::@1->print_word#1] -- vwuz1=vwuc1
// [56] phi (word) print_word::w#5 = (const word) testShort::u [phi:testShort::@1->print_word#1] -- vwuz1=vwuc1
lda #<u
sta.z print_word.w
lda #>u
@ -5369,7 +5333,7 @@ testShort: {
// print_sword(n)
// [110] call print_sword
// [92] phi from testShort::@3 to print_sword [phi:testShort::@3->print_sword]
// [92] phi (signed word) print_sword::w#10 = (const signed word) testShort::n#0 [phi:testShort::@3->print_sword#0] -- vwsz1=vwsc1
// [92] phi (signed word) print_sword::w#10 = (const signed word) testShort::n [phi:testShort::@3->print_sword#0] -- vwsz1=vwsc1
lda #<n
sta.z print_sword.w
lda #>n
@ -5389,7 +5353,7 @@ testShort: {
// print_sword(s)
// [114] call print_sword
// [92] phi from testShort::@5 to print_sword [phi:testShort::@5->print_sword]
// [92] phi (signed word) print_sword::w#10 = (const signed word) testShort::s#0 [phi:testShort::@5->print_sword#0] -- vwsz1=vwsc1
// [92] phi (signed word) print_sword::w#10 = (const signed word) testShort::s [phi:testShort::@5->print_sword#0] -- vwsz1=vwsc1
lda #<s
sta.z print_sword.w
lda #>s
@ -5434,7 +5398,7 @@ testChar: {
// [121] call print_byte
// [62] phi from testChar::@1 to print_byte [phi:testChar::@1->print_byte]
// [62] phi (byte*) print_char_cursor#149 = (byte*) print_char_cursor#136 [phi:testChar::@1->print_byte#0] -- register_copy
// [62] phi (byte) print_byte::b#5 = (const byte) testChar::u#0 [phi:testChar::@1->print_byte#1] -- vbuxx=vbuc1
// [62] phi (byte) print_byte::b#5 = (const byte) testChar::u [phi:testChar::@1->print_byte#1] -- vbuxx=vbuc1
ldx #u
jsr print_byte
// [122] phi from testChar::@1 to testChar::@2 [phi:testChar::@1->testChar::@2]
@ -5452,7 +5416,7 @@ testChar: {
// [125] call print_byte
// [62] phi from testChar::@3 to print_byte [phi:testChar::@3->print_byte]
// [62] phi (byte*) print_char_cursor#149 = (byte*) print_char_cursor#26 [phi:testChar::@3->print_byte#0] -- register_copy
// [62] phi (byte) print_byte::b#5 = (const byte) testChar::n#0 [phi:testChar::@3->print_byte#1] -- vbuxx=vbuc1
// [62] phi (byte) print_byte::b#5 = (const byte) testChar::n [phi:testChar::@3->print_byte#1] -- vbuxx=vbuc1
ldx #n
jsr print_byte
// [126] phi from testChar::@3 to testChar::@4 [phi:testChar::@3->testChar::@4]

View File

@ -75,7 +75,7 @@
(label) print_sbyte::@2
(label) print_sbyte::@return
(signed byte) print_sbyte::b
(const signed byte) print_sbyte::b#0 b = -(const signed byte) testChar::s#0
(const signed byte) print_sbyte::b#0 b = -(const signed byte) testChar::s
(byte*) print_screen
(void()) print_sdword((signed dword) print_sdword::dw)
(label) print_sdword::@1
@ -121,13 +121,10 @@
(label) testChar::@5
(label) testChar::@6
(label) testChar::@return
(byte) testChar::n
(const byte) testChar::n#0 n = (byte) $e
(signed byte) testChar::s
(const signed byte) testChar::s#0 s = (signed byte) -$e
(const byte) testChar::n n = (byte) $e
(const signed byte) testChar::s s = (signed byte) -$e
(const string) testChar::str str = (string) "char: "
(byte) testChar::u
(const byte) testChar::u#0 u = (byte) $e
(const byte) testChar::u u = (byte) $e
(void()) testInt()
(label) testInt::@1
(label) testInt::@2
@ -136,13 +133,10 @@
(label) testInt::@5
(label) testInt::@6
(label) testInt::@return
(signed word) testInt::n
(const signed word) testInt::n#0 n = (signed word) -$578
(signed word) testInt::s
(const signed word) testInt::s#0 s = (signed word) -$578
(const signed word) testInt::n n = (signed word) -$578
(const signed word) testInt::s s = (signed word) -$578
(const string) testInt::str str = (string) "int: "
(word) testInt::u
(const word) testInt::u#0 u = (word) $578
(const word) testInt::u u = (word) $578
(void()) testLong()
(label) testLong::@1
(label) testLong::@2
@ -151,13 +145,10 @@
(label) testLong::@5
(label) testLong::@6
(label) testLong::@return
(signed dword) testLong::n
(const signed dword) testLong::n#0 n = (signed dword) -$222e0
(signed dword) testLong::s
(const signed dword) testLong::s#0 s = (signed dword) -$222e0
(const signed dword) testLong::n n = (signed dword) -$222e0
(const signed dword) testLong::s s = (signed dword) -$222e0
(const string) testLong::str str = (string) "long: "
(dword) testLong::u
(const dword) testLong::u#0 u = (dword) $222e0
(const dword) testLong::u u = (dword) $222e0
(void()) testShort()
(label) testShort::@1
(label) testShort::@2
@ -166,13 +157,10 @@
(label) testShort::@5
(label) testShort::@6
(label) testShort::@return
(signed word) testShort::n
(const signed word) testShort::n#0 n = (signed word) -$578
(signed word) testShort::s
(const signed word) testShort::s#0 s = (signed word) -$578
(const signed word) testShort::n n = (signed word) -$578
(const signed word) testShort::s s = (signed word) -$578
(const string) testShort::str str = (string) "short: "
(word) testShort::u
(const word) testShort::u#0 u = (word) $578
(const word) testShort::u u = (word) $578
zp ZP_DWORD:2 [ print_sdword::dw#5 print_sdword::dw#0 print_sdword::dw#3 print_dword::dw#2 print_dword::dw#0 ]
reg byte a [ print_char::ch#16 print_char::ch#6 print_char::ch#7 ]

View File

@ -138,7 +138,7 @@ gfx_init_plane_charset8::@return: scope:[gfx_init_plane_charset8] from gfx_init
(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx)
dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1] from gfx_init_plane_charset8 gfx_init_plane_charset8::@8
[74] (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 ← phi( gfx_init_plane_charset8/(const byte) gfx_init_plane_charset8::gfxbCpuBank#0 gfx_init_plane_charset8::@8/(byte)(number) $4000/(number) $4000 )
[75] *((const byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#2
[75] *((const byte*) dtvSetCpuBankSegment1::cpuBank) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#2
asm { .byte$32,$dd lda$ff .byte$32,$00 }
to:dtvSetCpuBankSegment1::@return
dtvSetCpuBankSegment1::@return: scope:[dtvSetCpuBankSegment1] from dtvSetCpuBankSegment1

View File

@ -66,8 +66,8 @@ CONTROL FLOW GRAPH SSA
(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx)
dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1] from gfx_init_plane_charset8 gfx_init_plane_charset8::@8
(byte) dtvSetCpuBankSegment1::cpuBankIdx#2 ← phi( gfx_init_plane_charset8/(byte) dtvSetCpuBankSegment1::cpuBankIdx#0 gfx_init_plane_charset8::@8/(byte) dtvSetCpuBankSegment1::cpuBankIdx#1 )
(byte*) dtvSetCpuBankSegment1::cpuBank#0 ← ((byte*)) (number) $ff
*((byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#2
(byte*) dtvSetCpuBankSegment1::cpuBank ← ((byte*)) (number) $ff
*((byte*) dtvSetCpuBankSegment1::cpuBank) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#2
asm { .byte$32,$dd lda$ff .byte$32,$00 }
to:dtvSetCpuBankSegment1::@return
dtvSetCpuBankSegment1::@return: scope:[dtvSetCpuBankSegment1] from dtvSetCpuBankSegment1
@ -390,7 +390,6 @@ SYMBOL TABLE SSA
(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx)
(label) dtvSetCpuBankSegment1::@return
(byte*) dtvSetCpuBankSegment1::cpuBank
(byte*) dtvSetCpuBankSegment1::cpuBank#0
(byte) dtvSetCpuBankSegment1::cpuBankIdx
(byte) dtvSetCpuBankSegment1::cpuBankIdx#0
(byte) dtvSetCpuBankSegment1::cpuBankIdx#1
@ -680,7 +679,7 @@ Inlining cast (byte*) DTV_PLANEB_START_HI ← (byte*)(number) $d04b
Inlining cast (byte*) DTV_PLANEB_STEP ← (byte*)(number) $d04c
Inlining cast (byte*) DTV_PLANEB_MODULO_LO ← (byte*)(number) $d047
Inlining cast (byte*) DTV_PLANEB_MODULO_HI ← (byte*)(number) $d048
Inlining cast (byte*) dtvSetCpuBankSegment1::cpuBank#0 ← (byte*)(number) $ff
Inlining cast (byte*) dtvSetCpuBankSegment1::cpuBank ← (byte*)(number) $ff
Inlining cast (byte*) SCREEN ← (byte*)(number) $7c00
Inlining cast (byte*) CHARSET8 ← (byte*)(number) $8000
Inlining cast *((byte*) DTV_PLANEA_START_HI) ← (unumber)(number) 0
@ -938,7 +937,7 @@ Constant (const byte*) DTV_PLANEB_START_HI = (byte*) 53323
Constant (const byte*) DTV_PLANEB_STEP = (byte*) 53324
Constant (const byte*) DTV_PLANEB_MODULO_LO = (byte*) 53319
Constant (const byte*) DTV_PLANEB_MODULO_HI = (byte*) 53320
Constant (const byte*) dtvSetCpuBankSegment1::cpuBank#0 = (byte*) 255
Constant (const byte*) dtvSetCpuBankSegment1::cpuBank = (byte*) 255
Constant (const byte*) SCREEN = (byte*) 31744
Constant (const byte*) CHARSET8 = (byte*) 32768
Constant (const byte) main::j#0 = 0
@ -1373,7 +1372,7 @@ gfx_init_plane_charset8::@return: scope:[gfx_init_plane_charset8] from gfx_init
(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx)
dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1] from gfx_init_plane_charset8 gfx_init_plane_charset8::@8
[74] (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 ← phi( gfx_init_plane_charset8/(const byte) gfx_init_plane_charset8::gfxbCpuBank#0 gfx_init_plane_charset8::@8/(byte)(number) $4000/(number) $4000 )
[75] *((const byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#2
[75] *((const byte*) dtvSetCpuBankSegment1::cpuBank) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#2
asm { .byte$32,$dd lda$ff .byte$32,$00 }
to:dtvSetCpuBankSegment1::@return
dtvSetCpuBankSegment1::@return: scope:[dtvSetCpuBankSegment1] from dtvSetCpuBankSegment1
@ -1411,7 +1410,6 @@ gfx_init_screen0::@return: scope:[gfx_init_screen0] from gfx_init_screen0::@3
VARIABLE REGISTER WEIGHTS
(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx)
(byte*) dtvSetCpuBankSegment1::cpuBank
(byte) dtvSetCpuBankSegment1::cpuBankIdx
(byte) dtvSetCpuBankSegment1::cpuBankIdx#2 2.0
(void()) gfx_init()
@ -2069,7 +2067,7 @@ dtvSetCpuBankSegment1: {
// Move CPU BANK 1 SEGMENT ($4000-$7fff)
.label cpuBank = $ff
.label cpuBankIdx = $d
// [75] *((const byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 -- _deref_pbuc1=vbuz1
// [75] *((const byte*) dtvSetCpuBankSegment1::cpuBank) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 -- _deref_pbuc1=vbuz1
lda.z cpuBankIdx
sta cpuBank
// asm { .byte$32,$dd lda$ff .byte$32,$00 }
@ -2823,7 +2821,7 @@ gfx_init_plane_charset8: {
dtvSetCpuBankSegment1: {
// Move CPU BANK 1 SEGMENT ($4000-$7fff)
.label cpuBank = $ff
// [75] *((const byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 -- _deref_pbuc1=vbuaa
// [75] *((const byte*) dtvSetCpuBankSegment1::cpuBank) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 -- _deref_pbuc1=vbuaa
sta cpuBank
// asm { .byte$32,$dd lda$ff .byte$32,$00 }
.byte $32, $dd
@ -3055,8 +3053,7 @@ FINAL SYMBOL TABLE
(const byte) VIC_RSEL VIC_RSEL = (byte) 8
(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx)
(label) dtvSetCpuBankSegment1::@return
(byte*) dtvSetCpuBankSegment1::cpuBank
(const byte*) dtvSetCpuBankSegment1::cpuBank#0 cpuBank = (byte*) 255
(const byte*) dtvSetCpuBankSegment1::cpuBank cpuBank = (byte*) 255
(byte) dtvSetCpuBankSegment1::cpuBankIdx
(byte) dtvSetCpuBankSegment1::cpuBankIdx#2 reg byte a 2.0
(void()) gfx_init()
@ -3657,7 +3654,7 @@ dtvSetCpuBankSegment1: {
// Move CPU BANK 1 SEGMENT ($4000-$7fff)
.label cpuBank = $ff
// *cpuBank = cpuBankIdx
// [75] *((const byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 -- _deref_pbuc1=vbuaa
// [75] *((const byte*) dtvSetCpuBankSegment1::cpuBank) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 -- _deref_pbuc1=vbuaa
sta cpuBank
// asm
// asm { .byte$32,$dd lda$ff .byte$32,$00 }

View File

@ -43,8 +43,7 @@
(const byte) VIC_RSEL VIC_RSEL = (byte) 8
(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx)
(label) dtvSetCpuBankSegment1::@return
(byte*) dtvSetCpuBankSegment1::cpuBank
(const byte*) dtvSetCpuBankSegment1::cpuBank#0 cpuBank = (byte*) 255
(const byte*) dtvSetCpuBankSegment1::cpuBank cpuBank = (byte*) 255
(byte) dtvSetCpuBankSegment1::cpuBankIdx
(byte) dtvSetCpuBankSegment1::cpuBankIdx#2 reg byte a 2.0
(void()) gfx_init()

View File

@ -106,7 +106,7 @@ gfx_init_chunky::@return: scope:[gfx_init_chunky] from gfx_init_chunky::@6
(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx)
dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1] from gfx_init_chunky gfx_init_chunky::@4 gfx_init_chunky::@6
[58] (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 ← phi( gfx_init_chunky/(byte)(const byte*) CHUNKY/(word) $4000 gfx_init_chunky::@4/(byte) dtvSetCpuBankSegment1::cpuBankIdx#1 gfx_init_chunky::@6/(byte)(number) $4000/(number) $4000 )
[59] *((const byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#3
[59] *((const byte*) dtvSetCpuBankSegment1::cpuBank) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#3
asm { .byte$32,$dd lda$ff .byte$32,$00 }
to:dtvSetCpuBankSegment1::@return
dtvSetCpuBankSegment1::@return: scope:[dtvSetCpuBankSegment1] from dtvSetCpuBankSegment1

View File

@ -56,8 +56,8 @@ CONTROL FLOW GRAPH SSA
(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx)
dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1] from gfx_init_chunky gfx_init_chunky::@4 gfx_init_chunky::@6
(byte) dtvSetCpuBankSegment1::cpuBankIdx#3 ← phi( gfx_init_chunky/(byte) dtvSetCpuBankSegment1::cpuBankIdx#0 gfx_init_chunky::@4/(byte) dtvSetCpuBankSegment1::cpuBankIdx#1 gfx_init_chunky::@6/(byte) dtvSetCpuBankSegment1::cpuBankIdx#2 )
(byte*) dtvSetCpuBankSegment1::cpuBank#0 ← ((byte*)) (number) $ff
*((byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#3
(byte*) dtvSetCpuBankSegment1::cpuBank ← ((byte*)) (number) $ff
*((byte*) dtvSetCpuBankSegment1::cpuBank) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#3
asm { .byte$32,$dd lda$ff .byte$32,$00 }
to:dtvSetCpuBankSegment1::@return
dtvSetCpuBankSegment1::@return: scope:[dtvSetCpuBankSegment1] from dtvSetCpuBankSegment1
@ -281,7 +281,6 @@ SYMBOL TABLE SSA
(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx)
(label) dtvSetCpuBankSegment1::@return
(byte*) dtvSetCpuBankSegment1::cpuBank
(byte*) dtvSetCpuBankSegment1::cpuBank#0
(byte) dtvSetCpuBankSegment1::cpuBankIdx
(byte) dtvSetCpuBankSegment1::cpuBankIdx#0
(byte) dtvSetCpuBankSegment1::cpuBankIdx#1
@ -474,7 +473,7 @@ Inlining cast (byte*) DTV_PLANEB_START_HI ← (byte*)(number) $d04b
Inlining cast (byte*) DTV_PLANEB_STEP ← (byte*)(number) $d04c
Inlining cast (byte*) DTV_PLANEB_MODULO_LO ← (byte*)(number) $d047
Inlining cast (byte*) DTV_PLANEB_MODULO_HI ← (byte*)(number) $d048
Inlining cast (byte*) dtvSetCpuBankSegment1::cpuBank#0 ← (byte*)(number) $ff
Inlining cast (byte*) dtvSetCpuBankSegment1::cpuBank ← (byte*)(number) $ff
Inlining cast (byte*) CHUNKY ← (byte*)(number) $8000
Inlining cast *((byte*) DTV_PLANEB_START_HI) ← (unumber)(number) 0
Inlining cast *((byte*) DTV_PLANEB_STEP) ← (unumber)(number) 8
@ -655,7 +654,7 @@ Constant (const byte*) DTV_PLANEB_START_HI = (byte*) 53323
Constant (const byte*) DTV_PLANEB_STEP = (byte*) 53324
Constant (const byte*) DTV_PLANEB_MODULO_LO = (byte*) 53319
Constant (const byte*) DTV_PLANEB_MODULO_HI = (byte*) 53320
Constant (const byte*) dtvSetCpuBankSegment1::cpuBank#0 = (byte*) 255
Constant (const byte*) dtvSetCpuBankSegment1::cpuBank = (byte*) 255
Constant (const byte*) CHUNKY = (byte*) 32768
Constant (const byte) main::j#0 = 0
Constant (const byte) main::rst#0 = $42
@ -998,7 +997,7 @@ gfx_init_chunky::@return: scope:[gfx_init_chunky] from gfx_init_chunky::@6
(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx)
dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1] from gfx_init_chunky gfx_init_chunky::@4 gfx_init_chunky::@6
[58] (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 ← phi( gfx_init_chunky/(byte)(const byte*) CHUNKY/(word) $4000 gfx_init_chunky::@4/(byte) dtvSetCpuBankSegment1::cpuBankIdx#1 gfx_init_chunky::@6/(byte)(number) $4000/(number) $4000 )
[59] *((const byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#3
[59] *((const byte*) dtvSetCpuBankSegment1::cpuBank) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#3
asm { .byte$32,$dd lda$ff .byte$32,$00 }
to:dtvSetCpuBankSegment1::@return
dtvSetCpuBankSegment1::@return: scope:[dtvSetCpuBankSegment1] from dtvSetCpuBankSegment1
@ -1008,7 +1007,6 @@ dtvSetCpuBankSegment1::@return: scope:[dtvSetCpuBankSegment1] from dtvSetCpuBan
VARIABLE REGISTER WEIGHTS
(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx)
(byte*) dtvSetCpuBankSegment1::cpuBank
(byte) dtvSetCpuBankSegment1::cpuBankIdx
(byte) dtvSetCpuBankSegment1::cpuBankIdx#1 202.0
(byte) dtvSetCpuBankSegment1::cpuBankIdx#3 103.0
@ -1528,7 +1526,7 @@ dtvSetCpuBankSegment1: {
// Move CPU BANK 1 SEGMENT ($4000-$7fff)
.label cpuBank = $ff
.label cpuBankIdx = 9
// [59] *((const byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 -- _deref_pbuc1=vbuz1
// [59] *((const byte*) dtvSetCpuBankSegment1::cpuBank) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 -- _deref_pbuc1=vbuz1
lda.z cpuBankIdx
sta cpuBank
// asm { .byte$32,$dd lda$ff .byte$32,$00 }
@ -2058,7 +2056,7 @@ gfx_init_chunky: {
dtvSetCpuBankSegment1: {
// Move CPU BANK 1 SEGMENT ($4000-$7fff)
.label cpuBank = $ff
// [59] *((const byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 -- _deref_pbuc1=vbuaa
// [59] *((const byte*) dtvSetCpuBankSegment1::cpuBank) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 -- _deref_pbuc1=vbuaa
sta cpuBank
// asm { .byte$32,$dd lda$ff .byte$32,$00 }
.byte $32, $dd
@ -2177,8 +2175,7 @@ FINAL SYMBOL TABLE
(const byte) VIC_RSEL VIC_RSEL = (byte) 8
(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx)
(label) dtvSetCpuBankSegment1::@return
(byte*) dtvSetCpuBankSegment1::cpuBank
(const byte*) dtvSetCpuBankSegment1::cpuBank#0 cpuBank = (byte*) 255
(const byte*) dtvSetCpuBankSegment1::cpuBank cpuBank = (byte*) 255
(byte) dtvSetCpuBankSegment1::cpuBankIdx
(byte) dtvSetCpuBankSegment1::cpuBankIdx#1 reg byte a 202.0
(byte) dtvSetCpuBankSegment1::cpuBankIdx#3 reg byte a 103.0
@ -2660,7 +2657,7 @@ dtvSetCpuBankSegment1: {
// Move CPU BANK 1 SEGMENT ($4000-$7fff)
.label cpuBank = $ff
// *cpuBank = cpuBankIdx
// [59] *((const byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 -- _deref_pbuc1=vbuaa
// [59] *((const byte*) dtvSetCpuBankSegment1::cpuBank) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 -- _deref_pbuc1=vbuaa
sta cpuBank
// asm
// asm { .byte$32,$dd lda$ff .byte$32,$00 }

View File

@ -35,8 +35,7 @@
(const byte) VIC_RSEL VIC_RSEL = (byte) 8
(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx)
(label) dtvSetCpuBankSegment1::@return
(byte*) dtvSetCpuBankSegment1::cpuBank
(const byte*) dtvSetCpuBankSegment1::cpuBank#0 cpuBank = (byte*) 255
(const byte*) dtvSetCpuBankSegment1::cpuBank cpuBank = (byte*) 255
(byte) dtvSetCpuBankSegment1::cpuBankIdx
(byte) dtvSetCpuBankSegment1::cpuBankIdx#1 reg byte a 202.0
(byte) dtvSetCpuBankSegment1::cpuBankIdx#3 reg byte a 103.0

View File

@ -38,7 +38,7 @@ main: scope:[main] from @1
[29] *((const byte*) DTV_BLITTER_DEST_STEP) ← (byte) $10
[30] *((const byte*) DTV_BLITTER_LEN_LO) ← <(byte) $14*(word) $a
[31] *((const byte*) DTV_BLITTER_LEN_HI) ← (byte) 0
[32] *((const byte*) DTV_BLITTER_ALU#0) ← (const byte) DTV_BLIT_ADD
[32] *((const byte*) DTV_BLITTER_ALU) ← (const byte) DTV_BLIT_ADD
[33] *((const byte*) DTV_BLITTER_TRANSPARANCY) ← (const byte) DTV_BLIT_TRANSPARANCY_NONE
[34] *((const byte*) DTV_BLITTER_CONTROL) ← (const byte) DTV_BLIT_FORCE_START|(const byte) DTV_BLIT_SRCA_FWD|(const byte) DTV_BLIT_SRCB_FWD|(const byte) DTV_BLIT_DEST_FWD
[35] *((const byte*) DTV_BLITTER_CONTROL2) ← (const byte) DTV_BLIT_DEST_CONT

View File

@ -47,7 +47,7 @@ CONTROL FLOW GRAPH SSA
(byte) DTV_BLIT_DEST_FWD ← (number) 8
(byte*) DTV_BLITTER_TRANSPARANCY ← ((byte*)) (number) $d33b
(byte) DTV_BLIT_TRANSPARANCY_NONE ← (number) 0
(byte*) DTV_BLITTER_ALU#0 ← ((byte*)) (number) $d33e
(byte*) DTV_BLITTER_ALU ← ((byte*)) (number) $d33e
(byte) DTV_BLIT_ADD ← (number) $30
(byte*) DTV_BLITTER_CONTROL2 ← ((byte*)) (number) $d33f
(byte) DTV_BLIT_CLEAR_IRQ ← (number) 1
@ -98,7 +98,7 @@ main: scope:[main] from @6
*((byte*) DTV_BLITTER_DEST_STEP) ← (number) $10
*((byte*) DTV_BLITTER_LEN_LO) ← <(number) $14*(word) $a
*((byte*) DTV_BLITTER_LEN_HI) ← >(number) $14*(word) $a
*((byte*) DTV_BLITTER_ALU#0) ← (byte) DTV_BLIT_ADD
*((byte*) DTV_BLITTER_ALU) ← (byte) DTV_BLIT_ADD
*((byte*) DTV_BLITTER_TRANSPARANCY) ← (byte) DTV_BLIT_TRANSPARANCY_NONE
(byte~) main::$10 ← (byte) DTV_BLIT_FORCE_START | (byte) DTV_BLIT_SRCA_FWD
(byte~) main::$11 ← (byte~) main::$10 | (byte) DTV_BLIT_SRCB_FWD
@ -130,7 +130,6 @@ SYMBOL TABLE SSA
(label) @begin
(label) @end
(byte*) DTV_BLITTER_ALU
(byte*) DTV_BLITTER_ALU#0
(byte*) DTV_BLITTER_CONTROL
(byte*) DTV_BLITTER_CONTROL2
(byte*) DTV_BLITTER_DEST_HI
@ -260,7 +259,7 @@ Inlining cast (byte) DTV_BLIT_SRCB_FWD ← (unumber)(number) 4
Inlining cast (byte) DTV_BLIT_DEST_FWD ← (unumber)(number) 8
Inlining cast (byte*) DTV_BLITTER_TRANSPARANCY ← (byte*)(number) $d33b
Inlining cast (byte) DTV_BLIT_TRANSPARANCY_NONE ← (unumber)(number) 0
Inlining cast (byte*) DTV_BLITTER_ALU#0 ← (byte*)(number) $d33e
Inlining cast (byte*) DTV_BLITTER_ALU ← (byte*)(number) $d33e
Inlining cast (byte) DTV_BLIT_ADD ← (unumber)(number) $30
Inlining cast (byte*) DTV_BLITTER_CONTROL2 ← (byte*)(number) $d33f
Inlining cast (byte) DTV_BLIT_CLEAR_IRQ ← (unumber)(number) 1
@ -410,7 +409,7 @@ Constant (const byte) DTV_BLIT_SRCB_FWD = 4
Constant (const byte) DTV_BLIT_DEST_FWD = 8
Constant (const byte*) DTV_BLITTER_TRANSPARANCY = (byte*) 54075
Constant (const byte) DTV_BLIT_TRANSPARANCY_NONE = 0
Constant (const byte*) DTV_BLITTER_ALU#0 = (byte*) 54078
Constant (const byte*) DTV_BLITTER_ALU = (byte*) 54078
Constant (const byte) DTV_BLIT_ADD = $30
Constant (const byte*) DTV_BLITTER_CONTROL2 = (byte*) 54079
Constant (const byte) DTV_BLIT_CLEAR_IRQ = 1
@ -533,7 +532,7 @@ main: scope:[main] from @1
[29] *((const byte*) DTV_BLITTER_DEST_STEP) ← (byte) $10
[30] *((const byte*) DTV_BLITTER_LEN_LO) ← <(byte) $14*(word) $a
[31] *((const byte*) DTV_BLITTER_LEN_HI) ← (byte) 0
[32] *((const byte*) DTV_BLITTER_ALU#0) ← (const byte) DTV_BLIT_ADD
[32] *((const byte*) DTV_BLITTER_ALU) ← (const byte) DTV_BLIT_ADD
[33] *((const byte*) DTV_BLITTER_TRANSPARANCY) ← (const byte) DTV_BLIT_TRANSPARANCY_NONE
[34] *((const byte*) DTV_BLITTER_CONTROL) ← (const byte) DTV_BLIT_FORCE_START|(const byte) DTV_BLIT_SRCA_FWD|(const byte) DTV_BLIT_SRCB_FWD|(const byte) DTV_BLIT_DEST_FWD
[35] *((const byte*) DTV_BLITTER_CONTROL2) ← (const byte) DTV_BLIT_DEST_CONT
@ -548,7 +547,6 @@ main::@return: scope:[main] from main::@1
VARIABLE REGISTER WEIGHTS
(byte*) DTV_BLITTER_ALU
(void()) main()
(byte~) main::$13 22.0
@ -741,7 +739,7 @@ main: {
// [31] *((const byte*) DTV_BLITTER_LEN_HI) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta DTV_BLITTER_LEN_HI
// [32] *((const byte*) DTV_BLITTER_ALU#0) ← (const byte) DTV_BLIT_ADD -- _deref_pbuc1=vbuc2
// [32] *((const byte*) DTV_BLITTER_ALU) ← (const byte) DTV_BLIT_ADD -- _deref_pbuc1=vbuc2
lda #DTV_BLIT_ADD
sta DTV_BLITTER_ALU
// [33] *((const byte*) DTV_BLITTER_TRANSPARANCY) ← (const byte) DTV_BLIT_TRANSPARANCY_NONE -- _deref_pbuc1=vbuc2
@ -807,7 +805,7 @@ Statement [28] *((const byte*) DTV_BLITTER_DEST_LIN_HI) ← (byte) 0 [ ] ( main:
Statement [29] *((const byte*) DTV_BLITTER_DEST_STEP) ← (byte) $10 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [30] *((const byte*) DTV_BLITTER_LEN_LO) ← <(byte) $14*(word) $a [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [31] *((const byte*) DTV_BLITTER_LEN_HI) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [32] *((const byte*) DTV_BLITTER_ALU#0) ← (const byte) DTV_BLIT_ADD [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [32] *((const byte*) DTV_BLITTER_ALU) ← (const byte) DTV_BLIT_ADD [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [33] *((const byte*) DTV_BLITTER_TRANSPARANCY) ← (const byte) DTV_BLIT_TRANSPARANCY_NONE [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [34] *((const byte*) DTV_BLITTER_CONTROL) ← (const byte) DTV_BLIT_FORCE_START|(const byte) DTV_BLIT_SRCA_FWD|(const byte) DTV_BLIT_SRCB_FWD|(const byte) DTV_BLIT_DEST_FWD [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [35] *((const byte*) DTV_BLITTER_CONTROL2) ← (const byte) DTV_BLIT_DEST_CONT [ ] ( main:2 [ ] ) always clobbers reg byte a
@ -1002,7 +1000,7 @@ main: {
// [31] *((const byte*) DTV_BLITTER_LEN_HI) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta DTV_BLITTER_LEN_HI
// [32] *((const byte*) DTV_BLITTER_ALU#0) ← (const byte) DTV_BLIT_ADD -- _deref_pbuc1=vbuc2
// [32] *((const byte*) DTV_BLITTER_ALU) ← (const byte) DTV_BLIT_ADD -- _deref_pbuc1=vbuc2
lda #DTV_BLIT_ADD
sta DTV_BLITTER_ALU
// [33] *((const byte*) DTV_BLITTER_TRANSPARANCY) ← (const byte) DTV_BLIT_TRANSPARANCY_NONE -- _deref_pbuc1=vbuc2
@ -1067,8 +1065,7 @@ FINAL SYMBOL TABLE
(label) @1
(label) @begin
(label) @end
(byte*) DTV_BLITTER_ALU
(const byte*) DTV_BLITTER_ALU#0 DTV_BLITTER_ALU = (byte*) 54078
(const byte*) DTV_BLITTER_ALU DTV_BLITTER_ALU = (byte*) 54078
(const byte*) DTV_BLITTER_CONTROL DTV_BLITTER_CONTROL = (byte*) 54074
(const byte*) DTV_BLITTER_CONTROL2 DTV_BLITTER_CONTROL2 = (byte*) 54079
(const byte*) DTV_BLITTER_DEST_HI DTV_BLITTER_DEST_HI = (byte*) 54066
@ -1318,7 +1315,7 @@ main: {
lda #0
sta DTV_BLITTER_LEN_HI
// *DTV_BLITTER_ALU = DTV_BLIT_ADD
// [32] *((const byte*) DTV_BLITTER_ALU#0) ← (const byte) DTV_BLIT_ADD -- _deref_pbuc1=vbuc2
// [32] *((const byte*) DTV_BLITTER_ALU) ← (const byte) DTV_BLIT_ADD -- _deref_pbuc1=vbuc2
lda #DTV_BLIT_ADD
sta DTV_BLITTER_ALU
// *DTV_BLITTER_TRANSPARANCY = DTV_BLIT_TRANSPARANCY_NONE

View File

@ -1,8 +1,7 @@
(label) @1
(label) @begin
(label) @end
(byte*) DTV_BLITTER_ALU
(const byte*) DTV_BLITTER_ALU#0 DTV_BLITTER_ALU = (byte*) 54078
(const byte*) DTV_BLITTER_ALU DTV_BLITTER_ALU = (byte*) 54078
(const byte*) DTV_BLITTER_CONTROL DTV_BLITTER_CONTROL = (byte*) 54074
(const byte*) DTV_BLITTER_CONTROL2 DTV_BLITTER_CONTROL2 = (byte*) 54079
(const byte*) DTV_BLITTER_DEST_HI DTV_BLITTER_DEST_HI = (byte*) 54066

View File

@ -38,7 +38,7 @@ main: scope:[main] from @1
[29] *((const byte*) DTV_BLITTER_DEST_STEP) ← (byte) $10
[30] *((const byte*) DTV_BLITTER_LEN_LO) ← (const byte) SRCA_LEN
[31] *((const byte*) DTV_BLITTER_LEN_HI) ← (byte) 0
[32] *((const byte*) DTV_BLITTER_ALU#0) ← (const byte) DTV_BLIT_ADD
[32] *((const byte*) DTV_BLITTER_ALU) ← (const byte) DTV_BLIT_ADD
[33] *((const byte*) DTV_BLITTER_TRANSPARANCY) ← (const byte) DTV_BLIT_TRANSPARANCY_NONE
[34] *((const byte*) DTV_BLITTER_CONTROL) ← (const byte) DTV_BLIT_FORCE_START|(const byte) DTV_BLIT_SRCA_FWD|(const byte) DTV_BLIT_SRCB_FWD|(const byte) DTV_BLIT_DEST_FWD
[35] *((const byte*) DTV_BLITTER_CONTROL2) ← (const byte) DTV_BLIT_DEST_CONT

View File

@ -48,7 +48,7 @@ CONTROL FLOW GRAPH SSA
(byte) DTV_BLIT_DEST_FWD ← (number) 8
(byte*) DTV_BLITTER_TRANSPARANCY ← ((byte*)) (number) $d33b
(byte) DTV_BLIT_TRANSPARANCY_NONE ← (number) 0
(byte*) DTV_BLITTER_ALU#0 ← ((byte*)) (number) $d33e
(byte*) DTV_BLITTER_ALU ← ((byte*)) (number) $d33e
(byte) DTV_BLIT_ADD ← (number) $30
(byte*) DTV_BLITTER_CONTROL2 ← ((byte*)) (number) $d33f
(byte) DTV_BLIT_CLEAR_IRQ ← (number) 1
@ -96,7 +96,7 @@ main: scope:[main] from @6
*((byte*) DTV_BLITTER_DEST_STEP) ← (number) $10
*((byte*) DTV_BLITTER_LEN_LO) ← (byte) SRCA_LEN
*((byte*) DTV_BLITTER_LEN_HI) ← (number) 0
*((byte*) DTV_BLITTER_ALU#0) ← (byte) DTV_BLIT_ADD
*((byte*) DTV_BLITTER_ALU) ← (byte) DTV_BLIT_ADD
*((byte*) DTV_BLITTER_TRANSPARANCY) ← (byte) DTV_BLIT_TRANSPARANCY_NONE
(byte~) main::$6 ← (byte) DTV_BLIT_FORCE_START | (byte) DTV_BLIT_SRCA_FWD
(byte~) main::$7 ← (byte~) main::$6 | (byte) DTV_BLIT_SRCB_FWD
@ -139,7 +139,6 @@ SYMBOL TABLE SSA
(label) @begin
(label) @end
(byte*) DTV_BLITTER_ALU
(byte*) DTV_BLITTER_ALU#0
(byte*) DTV_BLITTER_CONTROL
(byte*) DTV_BLITTER_CONTROL2
(byte*) DTV_BLITTER_DEST_HI
@ -272,7 +271,7 @@ Inlining cast (byte) DTV_BLIT_SRCB_FWD ← (unumber)(number) 4
Inlining cast (byte) DTV_BLIT_DEST_FWD ← (unumber)(number) 8
Inlining cast (byte*) DTV_BLITTER_TRANSPARANCY ← (byte*)(number) $d33b
Inlining cast (byte) DTV_BLIT_TRANSPARANCY_NONE ← (unumber)(number) 0
Inlining cast (byte*) DTV_BLITTER_ALU#0 ← (byte*)(number) $d33e
Inlining cast (byte*) DTV_BLITTER_ALU ← (byte*)(number) $d33e
Inlining cast (byte) DTV_BLIT_ADD ← (unumber)(number) $30
Inlining cast (byte*) DTV_BLITTER_CONTROL2 ← (byte*)(number) $d33f
Inlining cast (byte) DTV_BLIT_CLEAR_IRQ ← (unumber)(number) 1
@ -422,7 +421,7 @@ Constant (const byte) DTV_BLIT_SRCB_FWD = 4
Constant (const byte) DTV_BLIT_DEST_FWD = 8
Constant (const byte*) DTV_BLITTER_TRANSPARANCY = (byte*) 54075
Constant (const byte) DTV_BLIT_TRANSPARANCY_NONE = 0
Constant (const byte*) DTV_BLITTER_ALU#0 = (byte*) 54078
Constant (const byte*) DTV_BLITTER_ALU = (byte*) 54078
Constant (const byte) DTV_BLIT_ADD = $30
Constant (const byte*) DTV_BLITTER_CONTROL2 = (byte*) 54079
Constant (const byte) DTV_BLIT_CLEAR_IRQ = 1
@ -561,7 +560,7 @@ main: scope:[main] from @1
[29] *((const byte*) DTV_BLITTER_DEST_STEP) ← (byte) $10
[30] *((const byte*) DTV_BLITTER_LEN_LO) ← (const byte) SRCA_LEN
[31] *((const byte*) DTV_BLITTER_LEN_HI) ← (byte) 0
[32] *((const byte*) DTV_BLITTER_ALU#0) ← (const byte) DTV_BLIT_ADD
[32] *((const byte*) DTV_BLITTER_ALU) ← (const byte) DTV_BLIT_ADD
[33] *((const byte*) DTV_BLITTER_TRANSPARANCY) ← (const byte) DTV_BLIT_TRANSPARANCY_NONE
[34] *((const byte*) DTV_BLITTER_CONTROL) ← (const byte) DTV_BLIT_FORCE_START|(const byte) DTV_BLIT_SRCA_FWD|(const byte) DTV_BLIT_SRCB_FWD|(const byte) DTV_BLIT_DEST_FWD
[35] *((const byte*) DTV_BLITTER_CONTROL2) ← (const byte) DTV_BLIT_DEST_CONT
@ -582,7 +581,6 @@ main::@return: scope:[main] from main::@2
VARIABLE REGISTER WEIGHTS
(byte*) DTV_BLITTER_ALU
(void()) main()
(byte~) main::$9 202.0
(byte) main::r
@ -782,7 +780,7 @@ main: {
// [31] *((const byte*) DTV_BLITTER_LEN_HI) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta DTV_BLITTER_LEN_HI
// [32] *((const byte*) DTV_BLITTER_ALU#0) ← (const byte) DTV_BLIT_ADD -- _deref_pbuc1=vbuc2
// [32] *((const byte*) DTV_BLITTER_ALU) ← (const byte) DTV_BLIT_ADD -- _deref_pbuc1=vbuc2
lda #DTV_BLIT_ADD
sta DTV_BLITTER_ALU
// [33] *((const byte*) DTV_BLITTER_TRANSPARANCY) ← (const byte) DTV_BLIT_TRANSPARANCY_NONE -- _deref_pbuc1=vbuc2
@ -870,7 +868,7 @@ Statement [28] *((const byte*) DTV_BLITTER_DEST_LIN_HI) ← >(word) $100 [ ] ( m
Statement [29] *((const byte*) DTV_BLITTER_DEST_STEP) ← (byte) $10 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [30] *((const byte*) DTV_BLITTER_LEN_LO) ← (const byte) SRCA_LEN [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [31] *((const byte*) DTV_BLITTER_LEN_HI) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [32] *((const byte*) DTV_BLITTER_ALU#0) ← (const byte) DTV_BLIT_ADD [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [32] *((const byte*) DTV_BLITTER_ALU) ← (const byte) DTV_BLIT_ADD [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [33] *((const byte*) DTV_BLITTER_TRANSPARANCY) ← (const byte) DTV_BLIT_TRANSPARANCY_NONE [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [34] *((const byte*) DTV_BLITTER_CONTROL) ← (const byte) DTV_BLIT_FORCE_START|(const byte) DTV_BLIT_SRCA_FWD|(const byte) DTV_BLIT_SRCB_FWD|(const byte) DTV_BLIT_DEST_FWD [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [35] *((const byte*) DTV_BLITTER_CONTROL2) ← (const byte) DTV_BLIT_DEST_CONT [ ] ( main:2 [ ] ) always clobbers reg byte a
@ -905,7 +903,7 @@ Statement [28] *((const byte*) DTV_BLITTER_DEST_LIN_HI) ← >(word) $100 [ ] ( m
Statement [29] *((const byte*) DTV_BLITTER_DEST_STEP) ← (byte) $10 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [30] *((const byte*) DTV_BLITTER_LEN_LO) ← (const byte) SRCA_LEN [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [31] *((const byte*) DTV_BLITTER_LEN_HI) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [32] *((const byte*) DTV_BLITTER_ALU#0) ← (const byte) DTV_BLIT_ADD [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [32] *((const byte*) DTV_BLITTER_ALU) ← (const byte) DTV_BLIT_ADD [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [33] *((const byte*) DTV_BLITTER_TRANSPARANCY) ← (const byte) DTV_BLIT_TRANSPARANCY_NONE [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [34] *((const byte*) DTV_BLITTER_CONTROL) ← (const byte) DTV_BLIT_FORCE_START|(const byte) DTV_BLIT_SRCA_FWD|(const byte) DTV_BLIT_SRCB_FWD|(const byte) DTV_BLIT_DEST_FWD [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [35] *((const byte*) DTV_BLITTER_CONTROL2) ← (const byte) DTV_BLIT_DEST_CONT [ ] ( main:2 [ ] ) always clobbers reg byte a
@ -1102,7 +1100,7 @@ main: {
// [31] *((const byte*) DTV_BLITTER_LEN_HI) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta DTV_BLITTER_LEN_HI
// [32] *((const byte*) DTV_BLITTER_ALU#0) ← (const byte) DTV_BLIT_ADD -- _deref_pbuc1=vbuc2
// [32] *((const byte*) DTV_BLITTER_ALU) ← (const byte) DTV_BLIT_ADD -- _deref_pbuc1=vbuc2
lda #DTV_BLIT_ADD
sta DTV_BLITTER_ALU
// [33] *((const byte*) DTV_BLITTER_TRANSPARANCY) ← (const byte) DTV_BLIT_TRANSPARANCY_NONE -- _deref_pbuc1=vbuc2
@ -1200,8 +1198,7 @@ FINAL SYMBOL TABLE
(label) @1
(label) @begin
(label) @end
(byte*) DTV_BLITTER_ALU
(const byte*) DTV_BLITTER_ALU#0 DTV_BLITTER_ALU = (byte*) 54078
(const byte*) DTV_BLITTER_ALU DTV_BLITTER_ALU = (byte*) 54078
(const byte*) DTV_BLITTER_CONTROL DTV_BLITTER_CONTROL = (byte*) 54074
(const byte*) DTV_BLITTER_CONTROL2 DTV_BLITTER_CONTROL2 = (byte*) 54079
(const byte*) DTV_BLITTER_DEST_HI DTV_BLITTER_DEST_HI = (byte*) 54066
@ -1453,7 +1450,7 @@ main: {
lda #0
sta DTV_BLITTER_LEN_HI
// *DTV_BLITTER_ALU = DTV_BLIT_ADD
// [32] *((const byte*) DTV_BLITTER_ALU#0) ← (const byte) DTV_BLIT_ADD -- _deref_pbuc1=vbuc2
// [32] *((const byte*) DTV_BLITTER_ALU) ← (const byte) DTV_BLIT_ADD -- _deref_pbuc1=vbuc2
lda #DTV_BLIT_ADD
sta DTV_BLITTER_ALU
// *DTV_BLITTER_TRANSPARANCY = DTV_BLIT_TRANSPARANCY_NONE

View File

@ -1,8 +1,7 @@
(label) @1
(label) @begin
(label) @end
(byte*) DTV_BLITTER_ALU
(const byte*) DTV_BLITTER_ALU#0 DTV_BLITTER_ALU = (byte*) 54078
(const byte*) DTV_BLITTER_ALU DTV_BLITTER_ALU = (byte*) 54078
(const byte*) DTV_BLITTER_CONTROL DTV_BLITTER_CONTROL = (byte*) 54074
(const byte*) DTV_BLITTER_CONTROL2 DTV_BLITTER_CONTROL2 = (byte*) 54079
(const byte*) DTV_BLITTER_DEST_HI DTV_BLITTER_DEST_HI = (byte*) 54066

View File

@ -654,7 +654,7 @@ form_render_values: scope:[form_render_values] from form_mode::@14 form_mode::@
to:form_render_values::@1
form_render_values::@1: scope:[form_render_values] from form_render_values form_render_values::@3
[329] (byte) form_render_values::idx#2 ← phi( form_render_values/(byte) 0 form_render_values::@3/(byte) form_render_values::idx#1 )
[330] if((byte) form_render_values::idx#2<(const byte) form_fields_cnt#0) goto form_render_values::@2
[330] if((byte) form_render_values::idx#2<(const byte) form_fields_cnt) goto form_render_values::@2
to:form_render_values::@return
form_render_values::@return: scope:[form_render_values] from form_render_values::@1
[331] return
@ -721,7 +721,7 @@ apply_preset::@2: scope:[apply_preset] from apply_preset apply_preset::@1 apply
to:apply_preset::@13
apply_preset::@13: scope:[apply_preset] from apply_preset::@14 apply_preset::@2
[354] (byte) apply_preset::i#2 ← phi( apply_preset::@2/(byte) 0 apply_preset::@14/(byte) apply_preset::i#1 )
[355] if((byte) apply_preset::i#2!=(const byte) form_fields_cnt#0) goto apply_preset::@14
[355] if((byte) apply_preset::i#2!=(const byte) form_fields_cnt) goto apply_preset::@14
to:apply_preset::@return
apply_preset::@return: scope:[apply_preset] from apply_preset::@13
[356] return
@ -778,7 +778,7 @@ form_control::@22: scope:[form_control] from form_control::@9
[381] phi()
to:form_control::@14
form_control::@14: scope:[form_control] from form_control::@13 form_control::@22 form_control::@23 form_control::@9
[382] (byte) form_field_idx#31 ← phi( form_control::@22/(byte) form_field_idx#6 form_control::@9/(const byte) form_fields_cnt#0-(byte) 1 form_control::@23/(byte) form_field_idx#5 form_control::@13/(byte) 0 )
[382] (byte) form_field_idx#31 ← phi( form_control::@22/(byte) form_field_idx#6 form_control::@9/(const byte) form_fields_cnt-(byte) 1 form_control::@23/(byte) form_field_idx#5 form_control::@13/(byte) 0 )
to:form_control::@return
form_control::@return: scope:[form_control] from form_control::@14 form_control::@16 form_control::@5 form_control::@6
[383] (byte) form_field_idx#18 ← phi( form_control::@5/(byte) form_field_idx#28 form_control::@14/(byte) form_field_idx#31 form_control::@16/(byte) form_field_idx#28 form_control::@6/(byte) form_field_idx#28 )
@ -788,7 +788,7 @@ form_control::@return: scope:[form_control] from form_control::@14 form_control
to:@return
form_control::@13: scope:[form_control] from form_control::@8
[385] (byte) form_field_idx#5 ← ++ (byte) form_field_idx#28
[386] if((byte) form_field_idx#5!=(const byte) form_fields_cnt#0) goto form_control::@23
[386] if((byte) form_field_idx#5!=(const byte) form_fields_cnt) goto form_control::@23
to:form_control::@14
form_control::@23: scope:[form_control] from form_control::@13
[387] phi()
@ -1051,7 +1051,7 @@ gfx_init_plane_fill::@return: scope:[gfx_init_plane_fill] from gfx_init_plane_f
(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx)
dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1] from gfx_init_plane_8bppchunky gfx_init_plane_8bppchunky::@4 gfx_init_plane_8bppchunky::@6 gfx_init_plane_charset8 gfx_init_plane_charset8::@8 gfx_init_plane_fill gfx_init_plane_fill::@4 gfx_init_plane_horisontal gfx_init_plane_horisontal2 gfx_init_plane_horisontal2::@4 gfx_init_plane_horisontal::@7 gfx_init_plane_vertical gfx_init_plane_vertical::@4
[501] (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 ← phi( gfx_init_plane_8bppchunky/(byte)(const dword) PLANE_8BPP_CHUNKY/(word) $4000 gfx_init_plane_8bppchunky::@4/(byte) dtvSetCpuBankSegment1::cpuBankIdx#1 gfx_init_plane_8bppchunky::@6/(byte)(number) $4000/(number) $4000 gfx_init_plane_charset8/(const byte) gfx_init_plane_charset8::gfxbCpuBank#0 gfx_init_plane_charset8::@8/(byte)(number) $4000/(number) $4000 gfx_init_plane_fill/(byte) dtvSetCpuBankSegment1::cpuBankIdx#11 gfx_init_plane_fill::@4/(byte)(number) $4000/(number) $4000 gfx_init_plane_horisontal/(const byte) gfx_init_plane_horisontal::gfxbCpuBank#0 gfx_init_plane_horisontal2/(const byte) gfx_init_plane_horisontal2::gfxbCpuBank#0 gfx_init_plane_horisontal2::@4/(byte)(number) $4000/(number) $4000 gfx_init_plane_horisontal::@7/(byte)(number) $4000/(number) $4000 gfx_init_plane_vertical/(const byte) gfx_init_plane_vertical::gfxbCpuBank#0 gfx_init_plane_vertical::@4/(byte)(number) $4000/(number) $4000 )
[502] *((const byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#13
[502] *((const byte*) dtvSetCpuBankSegment1::cpuBank) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#13
asm { .byte$32,$dd lda$ff .byte$32,$00 }
to:dtvSetCpuBankSegment1::@return
dtvSetCpuBankSegment1::@return: scope:[dtvSetCpuBankSegment1] from dtvSetCpuBankSegment1
@ -1290,7 +1290,7 @@ gfx_init_vic_bitmap::@3: scope:[gfx_init_vic_bitmap] from gfx_init_vic_bitmap
to:gfx_init_vic_bitmap::@1
gfx_init_vic_bitmap::@1: scope:[gfx_init_vic_bitmap] from gfx_init_vic_bitmap::@3 gfx_init_vic_bitmap::@4
[606] (byte) gfx_init_vic_bitmap::l#2 ← phi( gfx_init_vic_bitmap::@3/(byte) 0 gfx_init_vic_bitmap::@4/(byte) gfx_init_vic_bitmap::l#1 )
[607] if((byte) gfx_init_vic_bitmap::l#2<(const byte) gfx_init_vic_bitmap::lines_cnt#0) goto gfx_init_vic_bitmap::@2
[607] if((byte) gfx_init_vic_bitmap::l#2<(const byte) gfx_init_vic_bitmap::lines_cnt) goto gfx_init_vic_bitmap::@2
to:gfx_init_vic_bitmap::@return
gfx_init_vic_bitmap::@return: scope:[gfx_init_vic_bitmap] from gfx_init_vic_bitmap::@1
[608] return

View File

@ -366,8 +366,8 @@ CONTROL FLOW GRAPH SSA
(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx)
dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1] from gfx_init_plane_8bppchunky gfx_init_plane_8bppchunky::@4 gfx_init_plane_8bppchunky::@6 gfx_init_plane_charset8 gfx_init_plane_charset8::@8 gfx_init_plane_fill gfx_init_plane_fill::@4 gfx_init_plane_horisontal gfx_init_plane_horisontal2 gfx_init_plane_horisontal2::@4 gfx_init_plane_horisontal::@8 gfx_init_plane_vertical gfx_init_plane_vertical::@4
(byte) dtvSetCpuBankSegment1::cpuBankIdx#13 ← phi( gfx_init_plane_8bppchunky/(byte) dtvSetCpuBankSegment1::cpuBankIdx#0 gfx_init_plane_8bppchunky::@4/(byte) dtvSetCpuBankSegment1::cpuBankIdx#1 gfx_init_plane_8bppchunky::@6/(byte) dtvSetCpuBankSegment1::cpuBankIdx#2 gfx_init_plane_charset8/(byte) dtvSetCpuBankSegment1::cpuBankIdx#9 gfx_init_plane_charset8::@8/(byte) dtvSetCpuBankSegment1::cpuBankIdx#10 gfx_init_plane_fill/(byte) dtvSetCpuBankSegment1::cpuBankIdx#11 gfx_init_plane_fill::@4/(byte) dtvSetCpuBankSegment1::cpuBankIdx#12 gfx_init_plane_horisontal/(byte) dtvSetCpuBankSegment1::cpuBankIdx#3 gfx_init_plane_horisontal2/(byte) dtvSetCpuBankSegment1::cpuBankIdx#5 gfx_init_plane_horisontal2::@4/(byte) dtvSetCpuBankSegment1::cpuBankIdx#6 gfx_init_plane_horisontal::@8/(byte) dtvSetCpuBankSegment1::cpuBankIdx#4 gfx_init_plane_vertical/(byte) dtvSetCpuBankSegment1::cpuBankIdx#7 gfx_init_plane_vertical::@4/(byte) dtvSetCpuBankSegment1::cpuBankIdx#8 )
(byte*) dtvSetCpuBankSegment1::cpuBank#0 ← ((byte*)) (number) $ff
*((byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#13
(byte*) dtvSetCpuBankSegment1::cpuBank ← ((byte*)) (number) $ff
*((byte*) dtvSetCpuBankSegment1::cpuBank) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#13
asm { .byte$32,$dd lda$ff .byte$32,$00 }
to:dtvSetCpuBankSegment1::@return
dtvSetCpuBankSegment1::@return: scope:[dtvSetCpuBankSegment1] from dtvSetCpuBankSegment1
@ -1796,7 +1796,7 @@ get_vic_charset::@3: scope:[get_vic_charset] from get_vic_charset::@4
(byte*) FORM_CHARSET ← ((byte*)) (number) $1800
(byte[]) FORM_TEXT ← (const string) $39
(byte[]) FORM_COLS ← (const string) $40
(byte) form_fields_cnt#0 ← (number) $24
(byte) form_fields_cnt ← (number) $24
(byte[]) form_fields_x ← { (number) 8, (number) $c, (number) $c, (number) $c, (number) $c, (number) $c, (number) $c, (number) $c, (number) $c, (number) $c, (number) $19, (number) $18, (number) $19, (number) $18, (number) $19, (number) $18, (number) $19, (number) $19, (number) $18, (number) $19, (number) $18, (number) $19, (number) $18, (number) $19, (number) $25, (number) $25, (number) $25, (number) $25, (number) $24, (number) $25, (number) $24, (number) $25, (number) $24, (number) $25, (number) $24, (number) $25 }
(byte[]) form_fields_y ← { (number) 2, (number) 5, (number) 6, (number) 7, (number) 8, (number) 9, (number) $a, (number) $b, (number) $c, (number) $d, (number) 5, (number) 6, (number) 6, (number) 7, (number) 7, (number) 8, (number) 8, (number) $b, (number) $c, (number) $c, (number) $d, (number) $d, (number) $e, (number) $e, (number) 5, (number) 6, (number) 7, (number) $a, (number) $b, (number) $b, (number) $c, (number) $c, (number) $d, (number) $d, (number) $e, (number) $e }
(byte[]) form_fields_max ← { (number) $a, (number) 1, (number) 1, (number) 1, (number) 1, (number) 1, (number) 1, (number) 1, (number) 1, (number) 1, (number) $d, (number) $f, (number) $f, (number) $f, (number) $f, (number) $f, (number) $f, (number) $d, (number) $f, (number) $f, (number) $f, (number) $f, (number) $f, (number) $f, (number) 3, (number) 1, (number) 4, (number) 1, (number) $f, (number) $f, (number) $f, (number) $f, (number) $f, (number) $f, (number) $f, (number) $f }
@ -1914,7 +1914,7 @@ apply_preset::@22: scope:[apply_preset] from apply_preset::@1 apply_preset::@10
apply_preset::@45: scope:[apply_preset] from apply_preset::@22 apply_preset::@46
(byte*) apply_preset::preset#14 ← phi( apply_preset::@22/(byte*) apply_preset::preset#15 apply_preset::@46/(byte*) apply_preset::preset#13 )
(byte) apply_preset::i#2 ← phi( apply_preset::@22/(byte) apply_preset::i#0 apply_preset::@46/(byte) apply_preset::i#1 )
(bool~) apply_preset::$11 ← (byte) apply_preset::i#2 != (byte) form_fields_cnt#0
(bool~) apply_preset::$11 ← (byte) apply_preset::i#2 != (byte) form_fields_cnt
if((bool~) apply_preset::$11) goto apply_preset::@46
to:apply_preset::@return
apply_preset::@46: scope:[apply_preset] from apply_preset::@45
@ -2766,12 +2766,12 @@ gfx_init_vic_bitmap::@7: scope:[gfx_init_vic_bitmap] from gfx_init_vic_bitmap
gfx_init_vic_bitmap::@8: scope:[gfx_init_vic_bitmap] from gfx_init_vic_bitmap::@7
(byte[]) gfx_init_vic_bitmap::lines_x ← { (number) 0, (number) $ff, (number) $ff, (number) 0, (number) 0, (number) $80, (number) $ff, (number) $80, (number) 0, (number) $80 }
(byte[]) gfx_init_vic_bitmap::lines_y ← { (number) 0, (number) 0, (number) $c7, (number) $c7, (number) 0, (number) 0, (number) $64, (number) $c7, (number) $64, (number) 0 }
(byte) gfx_init_vic_bitmap::lines_cnt#0 ← (number) 9
(byte) gfx_init_vic_bitmap::lines_cnt ← (number) 9
(byte) gfx_init_vic_bitmap::l#0 ← (number) 0
to:gfx_init_vic_bitmap::@1
gfx_init_vic_bitmap::@1: scope:[gfx_init_vic_bitmap] from gfx_init_vic_bitmap::@8 gfx_init_vic_bitmap::@9
(byte) gfx_init_vic_bitmap::l#2 ← phi( gfx_init_vic_bitmap::@8/(byte) gfx_init_vic_bitmap::l#0 gfx_init_vic_bitmap::@9/(byte) gfx_init_vic_bitmap::l#1 )
(bool~) gfx_init_vic_bitmap::$2 ← (byte) gfx_init_vic_bitmap::l#2 < (byte) gfx_init_vic_bitmap::lines_cnt#0
(bool~) gfx_init_vic_bitmap::$2 ← (byte) gfx_init_vic_bitmap::l#2 < (byte) gfx_init_vic_bitmap::lines_cnt
if((bool~) gfx_init_vic_bitmap::$2) goto gfx_init_vic_bitmap::@2
to:gfx_init_vic_bitmap::@return
gfx_init_vic_bitmap::@2: scope:[gfx_init_vic_bitmap] from gfx_init_vic_bitmap::@1
@ -3614,7 +3614,7 @@ form_render_values: scope:[form_render_values] from form_mode::@27 form_mode::@
to:form_render_values::@1
form_render_values::@1: scope:[form_render_values] from form_render_values form_render_values::@7
(byte) form_render_values::idx#2 ← phi( form_render_values/(byte) form_render_values::idx#0 form_render_values::@7/(byte) form_render_values::idx#1 )
(bool~) form_render_values::$0 ← (byte) form_render_values::idx#2 < (byte) form_fields_cnt#0
(bool~) form_render_values::$0 ← (byte) form_render_values::idx#2 < (byte) form_fields_cnt
if((bool~) form_render_values::$0) goto form_render_values::@2
to:form_render_values::@return
form_render_values::@2: scope:[form_render_values] from form_render_values::@1
@ -3753,7 +3753,7 @@ form_control::@19: scope:[form_control] from form_control::@10
(byte) keyboard_events_size#69 ← phi( form_control::@10/(byte) keyboard_events_size#87 )
(byte) form_field_idx#16 ← phi( form_control::@10/(byte) form_field_idx#29 )
(byte) form_field_idx#5 ← ++ (byte) form_field_idx#16
(bool~) form_control::$21 ← (byte) form_field_idx#5 == (byte) form_fields_cnt#0
(bool~) form_control::$21 ← (byte) form_field_idx#5 == (byte) form_fields_cnt
(bool~) form_control::$22 ← ! (bool~) form_control::$21
if((bool~) form_control::$22) goto form_control::@22
to:form_control::@24
@ -3769,7 +3769,7 @@ form_control::@11: scope:[form_control] from form_control::@10
form_control::@12: scope:[form_control] from form_control::@11
(byte) keyboard_modifiers#67 ← phi( form_control::@11/(byte) keyboard_modifiers#66 )
(byte) keyboard_events_size#68 ← phi( form_control::@11/(byte) keyboard_events_size#67 )
(number~) form_control::$20 ← (byte) form_fields_cnt#0 - (number) 1
(number~) form_control::$20 ← (byte) form_fields_cnt - (number) 1
(byte) form_field_idx#7 ← (number~) form_control::$20
to:form_control::@22
form_control::@22: scope:[form_control] from form_control::@11 form_control::@12 form_control::@19 form_control::@24
@ -4617,7 +4617,6 @@ SYMBOL TABLE SSA
(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx)
(label) dtvSetCpuBankSegment1::@return
(byte*) dtvSetCpuBankSegment1::cpuBank
(byte*) dtvSetCpuBankSegment1::cpuBank#0
(byte) dtvSetCpuBankSegment1::cpuBankIdx
(byte) dtvSetCpuBankSegment1::cpuBankIdx#0
(byte) dtvSetCpuBankSegment1::cpuBankIdx#1
@ -4897,7 +4896,6 @@ SYMBOL TABLE SSA
(byte) form_field_ptr::y
(byte) form_field_ptr::y#0
(byte) form_fields_cnt
(byte) form_fields_cnt#0
(byte[]) form_fields_max
(byte[]) form_fields_val
(byte[]) form_fields_x
@ -5709,7 +5707,6 @@ SYMBOL TABLE SSA
(byte) gfx_init_vic_bitmap::l#3
(byte) gfx_init_vic_bitmap::l#4
(byte) gfx_init_vic_bitmap::lines_cnt
(byte) gfx_init_vic_bitmap::lines_cnt#0
(byte[]) gfx_init_vic_bitmap::lines_x
(byte[]) gfx_init_vic_bitmap::lines_y
(void()) gfx_mode()
@ -6885,7 +6882,7 @@ Adding number conversion cast (unumber) 3 in (bool~) get_vic_screen::$3 ← (byt
Adding number conversion cast (unumber) 4 in (bool~) get_vic_screen::$4 ← (byte) get_vic_screen::idx#6 == (number) 4
Adding number conversion cast (unumber) 0 in (bool~) get_vic_charset::$0 ← (byte) get_vic_charset::idx#1 == (number) 0
Adding number conversion cast (unumber) 1 in (bool~) get_vic_charset::$1 ← (byte) get_vic_charset::idx#2 == (number) 1
Adding number conversion cast (unumber) $24 in (byte) form_fields_cnt#0 ← (number) $24
Adding number conversion cast (unumber) $24 in (byte) form_fields_cnt ← (number) $24
Adding number conversion cast (unumber) 0 in (bool~) apply_preset::$0 ← (byte) apply_preset::idx#1 == (number) 0
Adding number conversion cast (unumber) 1 in (bool~) apply_preset::$1 ← (byte) apply_preset::idx#2 == (number) 1
Adding number conversion cast (unumber) 2 in (bool~) apply_preset::$2 ← (byte) apply_preset::idx#3 == (number) 2
@ -7035,7 +7032,7 @@ Adding number conversion cast (unumber) 3 in (number~) gfx_init_screen3::$2 ←
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::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) 9 in (byte) gfx_init_vic_bitmap::lines_cnt ← (number) 9
Adding number conversion cast (unumber) 0 in (byte) gfx_init_vic_bitmap::l#0 ← (number) 0
Adding number conversion cast (unumber) 1 in (number~) gfx_init_vic_bitmap::$3 ← (byte) gfx_init_vic_bitmap::l#3 + (number) 1
Adding number conversion cast (unumber) gfx_init_vic_bitmap::$3 in (number~) gfx_init_vic_bitmap::$3 ← (byte) gfx_init_vic_bitmap::l#3 + (unumber)(number) 1
@ -7141,8 +7138,8 @@ Adding number conversion cast (unumber) $7f in (number~) form_control::$15 ← *
Adding number conversion cast (unumber) form_control::$15 in (number~) form_control::$15 ← *((byte*) form_control::field#3) & (unumber)(number) $7f
Adding number conversion cast (unumber) 0 in (bool~) form_control::$17 ← (byte~) form_control::$16 == (number) 0
Adding number conversion cast (unumber) $ff in (bool~) form_control::$18 ← (byte) form_field_idx#6 == (number) $ff
Adding number conversion cast (unumber) 1 in (number~) form_control::$20 ← (byte) form_fields_cnt#0 - (number) 1
Adding number conversion cast (unumber) form_control::$20 in (number~) form_control::$20 ← (byte) form_fields_cnt#0 - (unumber)(number) 1
Adding number conversion cast (unumber) 1 in (number~) form_control::$20 ← (byte) form_fields_cnt - (number) 1
Adding number conversion cast (unumber) form_control::$20 in (number~) form_control::$20 ← (byte) form_fields_cnt - (unumber)(number) 1
Adding number conversion cast (snumber) 2 in (number~) form_control::$23 ← (signed byte) FORM_CURSOR_BLINK / (number) 2
Adding number conversion cast (snumber) form_control::$23 in (number~) form_control::$23 ← (signed byte) FORM_CURSOR_BLINK / (snumber)(number) 2
Adding number conversion cast (unumber) 0 in (byte) form_control::return#1 ← (number) 0
@ -7231,7 +7228,7 @@ Inlining cast (byte*) DTV_COLOR_BANK_LO ← (byte*)(number) $d036
Inlining cast (byte*) DTV_COLOR_BANK_HI ← (byte*)(number) $d037
Inlining cast (dword) DTV_COLOR_BANK_DEFAULT ← (unumber)(number) $1d800
Inlining cast (byte*) DTV_GRAPHICS_VIC_BANK ← (byte*)(number) $d03d
Inlining cast (byte*) dtvSetCpuBankSegment1::cpuBank#0 ← (byte*)(number) $ff
Inlining cast (byte*) dtvSetCpuBankSegment1::cpuBank ← (byte*)(number) $ff
Inlining cast (byte*~) memset::$2 ← (byte*)(void*) memset::str#2
Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#2
Inlining cast (byte*) print_screen#0 ← (byte*)(number) $400
@ -7291,7 +7288,7 @@ Inlining cast (dword~) get_plane::$16 ← (dword)(dword) PLANE_FULL
Inlining cast (dword~) get_plane::$15 ← (dword)(byte*) VIC_SCREEN0
Inlining cast (byte*) FORM_SCREEN ← (byte*)(number) $400
Inlining cast (byte*) FORM_CHARSET ← (byte*)(number) $1800
Inlining cast (byte) form_fields_cnt#0 ← (unumber)(number) $24
Inlining cast (byte) form_fields_cnt ← (unumber)(number) $24
Inlining cast (byte) apply_preset::i#0 ← (unumber)(number) 0
Inlining cast (byte) gfx_mode::dtv_control#0 ← (unumber)(number) 0
Inlining cast *((byte*) DTV_PLANEA_MODULO_HI) ← (unumber)(number) 0
@ -7306,7 +7303,7 @@ Inlining cast *((byte*) BORDERCOL) ← (unumber)(number) 0
Inlining cast *((byte*) PROCPORT) ← (unumber)(number) $32
Inlining cast *((byte*) PROCPORT) ← (unumber)(number) $37
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::lines_cnt ← (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
@ -8687,7 +8684,7 @@ Inferred type updated to signed byte in (snumber~) form_control::$3 ← (signed
Inferred type updated to byte in (unumber~) form_control::$14 ← *((byte*) form_control::field#1) | (byte) $80
Inferred type updated to byte in (unumber~) form_control::$13 ← *((byte*) form_control::field#2) & (byte) $7f
Inferred type updated to byte in (unumber~) form_control::$15 ← *((byte*) form_control::field#3) & (byte) $7f
Inferred type updated to byte in (unumber~) form_control::$20 ← (byte) form_fields_cnt#0 - (byte) 1
Inferred type updated to byte in (unumber~) form_control::$20 ← (byte) form_fields_cnt - (byte) 1
Inferred type updated to signed byte in (snumber~) form_control::$23 ← (signed byte) FORM_CURSOR_BLINK / (signed byte) 2
Adding pointer type conversion cast (byte*) bitmap_clear::$0 in (byte*~) bitmap_clear::$0 ← (word~) bitmap_clear::$3
Adding pointer type conversion cast (byte*) form_field_ptr::$0 in (byte*~) form_field_ptr::$0 ← (word~) form_field_ptr::$2
@ -8726,7 +8723,7 @@ Inversing boolean not [1635] (bool~) form_mode::$40 ← (byte) form_mode::preset
Inversing boolean not [1712] (bool~) form_control::$2 ← (signed byte) form_cursor_count#5 >= (signed byte) 0 from [1711] (bool~) form_control::$1 ← (signed byte) form_cursor_count#5 < (signed byte) 0
Inversing boolean not [1738] (bool~) form_control::$8 ← (byte) form_control::key_event#0 != (byte) KEY_CRSR_DOWN from [1737] (bool~) form_control::$7 ← (byte) form_control::key_event#0 == (byte) KEY_CRSR_DOWN
Inversing boolean not [1742] (bool~) form_control::$10 ← (byte) form_control::key_event#1 != (byte) KEY_CRSR_RIGHT from [1741] (bool~) form_control::$9 ← (byte) form_control::key_event#1 == (byte) KEY_CRSR_RIGHT
Inversing boolean not [1753] (bool~) form_control::$22 ← (byte) form_field_idx#5 != (byte) form_fields_cnt#0 from [1752] (bool~) form_control::$21 ← (byte) form_field_idx#5 == (byte) form_fields_cnt#0
Inversing boolean not [1753] (bool~) form_control::$22 ← (byte) form_field_idx#5 != (byte) form_fields_cnt from [1752] (bool~) form_control::$21 ← (byte) form_field_idx#5 == (byte) form_fields_cnt
Inversing boolean not [1758] (bool~) form_control::$19 ← (byte) form_field_idx#6 != (byte) $ff from [1757] (bool~) form_control::$18 ← (byte) form_field_idx#6 == (byte) $ff
Inversing boolean not [1778] (bool~) form_control::$12 ← (byte) form_control::key_event#2 != (byte) KEY_SPACE from [1777] (bool~) form_control::$11 ← (byte) form_control::key_event#2 == (byte) KEY_SPACE
Inversing boolean not [1787] (bool~) form_control::$29 ← *((byte[]) form_fields_val + (byte) form_field_idx#19) <= *((byte[]) form_fields_max + (byte) form_field_idx#19) from [1786] (bool~) form_control::$28 ← *((byte[]) form_fields_val + (byte) form_field_idx#19) > *((byte[]) form_fields_max + (byte) form_field_idx#19)
@ -9444,7 +9441,7 @@ Simple Condition (bool~) apply_preset::$7 [785] if((byte) apply_preset::idx#0==(
Simple Condition (bool~) apply_preset::$8 [789] if((byte) apply_preset::idx#0==(byte) 8) goto apply_preset::@9
Simple Condition (bool~) apply_preset::$9 [793] if((byte) apply_preset::idx#0==(byte) 9) goto apply_preset::@10
Simple Condition (bool~) apply_preset::$10 [797] if((byte) apply_preset::idx#0==(byte) $a) goto apply_preset::@11
Simple Condition (bool~) apply_preset::$11 [804] if((byte) apply_preset::i#2!=(byte) form_fields_cnt#0) goto apply_preset::@46
Simple Condition (bool~) apply_preset::$11 [804] if((byte) apply_preset::i#2!=(byte) form_fields_cnt) goto apply_preset::@46
Simple Condition (bool~) render_preset_name::$0 [812] if((byte) render_preset_name::idx#10==(byte) 0) goto render_preset_name::@1
Simple Condition (bool~) render_preset_name::$1 [816] if((byte) render_preset_name::idx#10==(byte) 1) goto render_preset_name::@2
Simple Condition (bool~) render_preset_name::$2 [820] if((byte) render_preset_name::idx#10==(byte) 2) goto render_preset_name::@3
@ -9484,7 +9481,7 @@ Simple Condition (bool~) gfx_init_screen3::$4 [1265] if((byte) gfx_init_screen3:
Simple Condition (bool~) gfx_init_screen3::$5 [1269] if((byte) gfx_init_screen3::cy#1!=rangelast(0,$18)) goto gfx_init_screen3::@1
Simple Condition (bool~) gfx_init_screen4::$0 [1280] if((byte) gfx_init_screen4::cx#1!=rangelast(0,$27)) goto gfx_init_screen4::@2
Simple Condition (bool~) gfx_init_screen4::$1 [1284] if((byte) gfx_init_screen4::cy#1!=rangelast(0,$18)) goto gfx_init_screen4::@1
Simple Condition (bool~) gfx_init_vic_bitmap::$2 [1295] if((byte) gfx_init_vic_bitmap::l#2<(byte) gfx_init_vic_bitmap::lines_cnt#0) goto gfx_init_vic_bitmap::@2
Simple Condition (bool~) gfx_init_vic_bitmap::$2 [1295] if((byte) gfx_init_vic_bitmap::l#2<(byte) gfx_init_vic_bitmap::lines_cnt) goto gfx_init_vic_bitmap::@2
Simple Condition (bool~) gfx_init_plane_8bppchunky::$6 [1321] if((byte*) gfx_init_plane_8bppchunky::gfxb#3!=(word) $8000) goto gfx_init_plane_8bppchunky::@3
Simple Condition (bool~) gfx_init_plane_8bppchunky::$10 [1330] if((word) gfx_init_plane_8bppchunky::x#1!=rangelast(0,$13f)) goto gfx_init_plane_8bppchunky::@2
Simple Condition (bool~) gfx_init_plane_8bppchunky::$11 [1340] if((byte) gfx_init_plane_8bppchunky::y#1!=rangelast(0,$c7)) goto gfx_init_plane_8bppchunky::@1
@ -9506,13 +9503,13 @@ Simple Condition (bool~) form_mode::$35 [1620] if(*((byte*) RASTER)!=(byte) $ff)
Simple Condition (bool~) form_mode::$38 [1632] if((byte~) form_mode::$36==(byte) 0) goto form_mode::@14
Simple Condition (bool~) form_mode::$40 [1636] if((byte) form_mode::preset_current#6==*((byte*) form_preset)) goto form_mode::@3
Simple Condition (bool~) form_set_screen::$3 [1675] if((byte) form_set_screen::y#1!=rangelast(0,$18)) goto form_set_screen::@1
Simple Condition (bool~) form_render_values::$0 [1692] if((byte) form_render_values::idx#2<(byte) form_fields_cnt#0) goto form_render_values::@2
Simple Condition (bool~) form_render_values::$0 [1692] if((byte) form_render_values::idx#2<(byte) form_fields_cnt) goto form_render_values::@2
Simple Condition (bool~) form_control::$2 [1713] if((signed byte) form_cursor_count#5>=(signed byte) 0) goto form_control::@1
Simple Condition (bool~) form_control::$4 [1717] if((signed byte) form_cursor_count#15<(signed byte~) form_control::$3) goto form_control::@2
Simple Condition (bool~) form_control::$8 [1739] if((byte) form_control::key_event#0!=(byte) KEY_CRSR_DOWN) goto form_control::@4
Simple Condition (bool~) form_control::$10 [1743] if((byte) form_control::key_event#0!=(byte) KEY_CRSR_RIGHT) goto form_control::@5
Simple Condition (bool~) form_control::$17 [1749] if((byte~) form_control::$16==(byte) 0) goto form_control::@19
Simple Condition (bool~) form_control::$22 [1754] if((byte) form_field_idx#5!=(byte) form_fields_cnt#0) goto form_control::@22
Simple Condition (bool~) form_control::$22 [1754] if((byte) form_field_idx#5!=(byte) form_fields_cnt) goto form_control::@22
Simple Condition (bool~) form_control::$19 [1759] if((byte) form_field_idx#6!=(byte) $ff) goto form_control::@22
Simple Condition (bool~) form_control::$12 [1779] if((byte) form_control::key_event#0!=(byte) KEY_SPACE) goto form_control::@6
Simple Condition (bool~) form_control::$25 [1783] if((byte~) form_control::$24==(byte) 0) goto form_control::@26
@ -9615,7 +9612,7 @@ Constant (const byte*) DTV_COLOR_BANK_LO = (byte*) 53302
Constant (const byte*) DTV_COLOR_BANK_HI = (byte*) 53303
Constant (const dword) DTV_COLOR_BANK_DEFAULT = $1d800
Constant (const byte*) DTV_GRAPHICS_VIC_BANK = (byte*) 53309
Constant (const byte*) dtvSetCpuBankSegment1::cpuBank#0 = (byte*) 255
Constant (const byte*) dtvSetCpuBankSegment1::cpuBank = (byte*) 255
Constant (const byte*) print_screen#0 = (byte*) 1024
Constant (const byte[]) print_hextab = $38
Constant (const byte) memset::c#0 = ' '
@ -9675,7 +9672,7 @@ Constant (const byte*) FORM_SCREEN = (byte*) 1024
Constant (const byte*) FORM_CHARSET = (byte*) 6144
Constant (const byte[]) FORM_TEXT = $39
Constant (const byte[]) FORM_COLS = $40
Constant (const byte) form_fields_cnt#0 = $24
Constant (const byte) form_fields_cnt = $24
Constant (const byte[]) form_fields_x = { 8, $c, $c, $c, $c, $c, $c, $c, $c, $c, $19, $18, $19, $18, $19, $18, $19, $19, $18, $19, $18, $19, $18, $19, $25, $25, $25, $25, $24, $25, $24, $25, $24, $25, $24, $25 }
Constant (const byte[]) form_fields_y = { 2, 5, 6, 7, 8, 9, $a, $b, $c, $d, 5, 6, 6, 7, 7, 8, 8, $b, $c, $c, $d, $d, $e, $e, 5, 6, 7, $a, $b, $b, $c, $c, $d, $d, $e, $e }
Constant (const byte[]) form_fields_max = { $a, 1, 1, 1, 1, 1, 1, 1, 1, 1, $d, $f, $f, $f, $f, $f, $f, $d, $f, $f, $f, $f, $f, $f, 3, 1, 4, 1, $f, $f, $f, $f, $f, $f, $f, $f }
@ -9725,7 +9722,7 @@ Constant (const byte) gfx_init_screen4::cy#0 = 0
Constant (const byte) gfx_init_screen4::cx#0 = 0
Constant (const byte[]) gfx_init_vic_bitmap::lines_x = { 0, $ff, $ff, 0, 0, $80, $ff, $80, 0, $80 }
Constant (const byte[]) gfx_init_vic_bitmap::lines_y = { 0, 0, $c7, $c7, 0, 0, $64, $c7, $64, 0 }
Constant (const byte) gfx_init_vic_bitmap::lines_cnt#0 = 9
Constant (const byte) gfx_init_vic_bitmap::lines_cnt = 9
Constant (const byte) gfx_init_vic_bitmap::l#0 = 0
Constant (const byte*) gfx_init_plane_8bppchunky::gfxb#0 = (byte*) 16384
Constant (const byte) gfx_init_plane_8bppchunky::y#0 = 0
@ -10184,7 +10181,7 @@ Constant right-side identified [783] (byte~) form_mode::$32 ← < (const byte*)
Constant right-side identified [785] (byte~) form_mode::$33 ← > (const byte*) FORM_SCREEN
Constant right-side identified [810] (signed byte) form_cursor_count#26 ← (const signed byte) FORM_CURSOR_BLINK / (signed byte) 2
Constant right-side identified [838] (signed byte~) form_control::$3 ← (const signed byte) FORM_CURSOR_BLINK / (signed byte) 2
Constant right-side identified [858] (byte) form_field_idx#7 ← (const byte) form_fields_cnt#0 - (byte) 1
Constant right-side identified [858] (byte) form_field_idx#7 ← (const byte) form_fields_cnt - (byte) 1
Constant right-side identified [860] (signed byte) form_cursor_count#7 ← (const signed byte) FORM_CURSOR_BLINK / (signed byte) 2
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) KEY_MODIFIER_SHIFT = KEY_MODIFIER_LSHIFT|KEY_MODIFIER_RSHIFT
@ -10222,7 +10219,7 @@ Constant (const byte) form_mode::$32 = <FORM_SCREEN
Constant (const byte) form_mode::$33 = >FORM_SCREEN
Constant (const signed byte) form_cursor_count#26 = FORM_CURSOR_BLINK/2
Constant (const signed byte) form_control::$3 = FORM_CURSOR_BLINK/2
Constant (const byte) form_field_idx#7 = form_fields_cnt#0-1
Constant (const byte) form_field_idx#7 = form_fields_cnt-1
Constant (const signed byte) form_cursor_count#7 = FORM_CURSOR_BLINK/2
Successful SSA optimization Pass2ConstantIdentification
Constant value identified (byte)gfx_init_plane_8bppchunky::$0 in [607] (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#0 ← (byte)(const dword) gfx_init_plane_8bppchunky::$0
@ -10696,7 +10693,7 @@ Constant inlined $38 = (const byte[]) print_hextab
Constant inlined form_field_idx#8 = (byte) 0
Constant inlined get_plane::return#8 = (const dword) PLANE_VERTICAL
Constant inlined $39 = (const byte[]) FORM_TEXT
Constant inlined form_field_idx#7 = (const byte) form_fields_cnt#0-(byte) 1
Constant inlined form_field_idx#7 = (const byte) form_fields_cnt-(byte) 1
Constant inlined get_plane::return#9 = (const dword) PLANE_HORISONTAL2
Constant inlined gfx_init_plane_8bppchunky::gfxb#0 = (byte*) 16384
Constant inlined gfx_init_plane_8bppchunky::gfxb#2 = (byte*) 16384
@ -12419,7 +12416,7 @@ form_render_values: scope:[form_render_values] from form_mode::@14 form_mode::@
to:form_render_values::@1
form_render_values::@1: scope:[form_render_values] from form_render_values form_render_values::@3
[329] (byte) form_render_values::idx#2 ← phi( form_render_values/(byte) 0 form_render_values::@3/(byte) form_render_values::idx#1 )
[330] if((byte) form_render_values::idx#2<(const byte) form_fields_cnt#0) goto form_render_values::@2
[330] if((byte) form_render_values::idx#2<(const byte) form_fields_cnt) goto form_render_values::@2
to:form_render_values::@return
form_render_values::@return: scope:[form_render_values] from form_render_values::@1
[331] return
@ -12486,7 +12483,7 @@ apply_preset::@2: scope:[apply_preset] from apply_preset apply_preset::@1 apply
to:apply_preset::@13
apply_preset::@13: scope:[apply_preset] from apply_preset::@14 apply_preset::@2
[354] (byte) apply_preset::i#2 ← phi( apply_preset::@2/(byte) 0 apply_preset::@14/(byte) apply_preset::i#1 )
[355] if((byte) apply_preset::i#2!=(const byte) form_fields_cnt#0) goto apply_preset::@14
[355] if((byte) apply_preset::i#2!=(const byte) form_fields_cnt) goto apply_preset::@14
to:apply_preset::@return
apply_preset::@return: scope:[apply_preset] from apply_preset::@13
[356] return
@ -12543,7 +12540,7 @@ form_control::@22: scope:[form_control] from form_control::@9
[381] phi()
to:form_control::@14
form_control::@14: scope:[form_control] from form_control::@13 form_control::@22 form_control::@23 form_control::@9
[382] (byte) form_field_idx#31 ← phi( form_control::@22/(byte) form_field_idx#6 form_control::@9/(const byte) form_fields_cnt#0-(byte) 1 form_control::@23/(byte) form_field_idx#5 form_control::@13/(byte) 0 )
[382] (byte) form_field_idx#31 ← phi( form_control::@22/(byte) form_field_idx#6 form_control::@9/(const byte) form_fields_cnt-(byte) 1 form_control::@23/(byte) form_field_idx#5 form_control::@13/(byte) 0 )
to:form_control::@return
form_control::@return: scope:[form_control] from form_control::@14 form_control::@16 form_control::@5 form_control::@6
[383] (byte) form_field_idx#18 ← phi( form_control::@5/(byte) form_field_idx#28 form_control::@14/(byte) form_field_idx#31 form_control::@16/(byte) form_field_idx#28 form_control::@6/(byte) form_field_idx#28 )
@ -12553,7 +12550,7 @@ form_control::@return: scope:[form_control] from form_control::@14 form_control
to:@return
form_control::@13: scope:[form_control] from form_control::@8
[385] (byte) form_field_idx#5 ← ++ (byte) form_field_idx#28
[386] if((byte) form_field_idx#5!=(const byte) form_fields_cnt#0) goto form_control::@23
[386] if((byte) form_field_idx#5!=(const byte) form_fields_cnt) goto form_control::@23
to:form_control::@14
form_control::@23: scope:[form_control] from form_control::@13
[387] phi()
@ -12816,7 +12813,7 @@ gfx_init_plane_fill::@return: scope:[gfx_init_plane_fill] from gfx_init_plane_f
(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx)
dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1] from gfx_init_plane_8bppchunky gfx_init_plane_8bppchunky::@4 gfx_init_plane_8bppchunky::@6 gfx_init_plane_charset8 gfx_init_plane_charset8::@8 gfx_init_plane_fill gfx_init_plane_fill::@4 gfx_init_plane_horisontal gfx_init_plane_horisontal2 gfx_init_plane_horisontal2::@4 gfx_init_plane_horisontal::@7 gfx_init_plane_vertical gfx_init_plane_vertical::@4
[501] (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 ← phi( gfx_init_plane_8bppchunky/(byte)(const dword) PLANE_8BPP_CHUNKY/(word) $4000 gfx_init_plane_8bppchunky::@4/(byte) dtvSetCpuBankSegment1::cpuBankIdx#1 gfx_init_plane_8bppchunky::@6/(byte)(number) $4000/(number) $4000 gfx_init_plane_charset8/(const byte) gfx_init_plane_charset8::gfxbCpuBank#0 gfx_init_plane_charset8::@8/(byte)(number) $4000/(number) $4000 gfx_init_plane_fill/(byte) dtvSetCpuBankSegment1::cpuBankIdx#11 gfx_init_plane_fill::@4/(byte)(number) $4000/(number) $4000 gfx_init_plane_horisontal/(const byte) gfx_init_plane_horisontal::gfxbCpuBank#0 gfx_init_plane_horisontal2/(const byte) gfx_init_plane_horisontal2::gfxbCpuBank#0 gfx_init_plane_horisontal2::@4/(byte)(number) $4000/(number) $4000 gfx_init_plane_horisontal::@7/(byte)(number) $4000/(number) $4000 gfx_init_plane_vertical/(const byte) gfx_init_plane_vertical::gfxbCpuBank#0 gfx_init_plane_vertical::@4/(byte)(number) $4000/(number) $4000 )
[502] *((const byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#13
[502] *((const byte*) dtvSetCpuBankSegment1::cpuBank) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#13
asm { .byte$32,$dd lda$ff .byte$32,$00 }
to:dtvSetCpuBankSegment1::@return
dtvSetCpuBankSegment1::@return: scope:[dtvSetCpuBankSegment1] from dtvSetCpuBankSegment1
@ -13055,7 +13052,7 @@ gfx_init_vic_bitmap::@3: scope:[gfx_init_vic_bitmap] from gfx_init_vic_bitmap
to:gfx_init_vic_bitmap::@1
gfx_init_vic_bitmap::@1: scope:[gfx_init_vic_bitmap] from gfx_init_vic_bitmap::@3 gfx_init_vic_bitmap::@4
[606] (byte) gfx_init_vic_bitmap::l#2 ← phi( gfx_init_vic_bitmap::@3/(byte) 0 gfx_init_vic_bitmap::@4/(byte) gfx_init_vic_bitmap::l#1 )
[607] if((byte) gfx_init_vic_bitmap::l#2<(const byte) gfx_init_vic_bitmap::lines_cnt#0) goto gfx_init_vic_bitmap::@2
[607] if((byte) gfx_init_vic_bitmap::l#2<(const byte) gfx_init_vic_bitmap::lines_cnt) goto gfx_init_vic_bitmap::@2
to:gfx_init_vic_bitmap::@return
gfx_init_vic_bitmap::@return: scope:[gfx_init_vic_bitmap] from gfx_init_vic_bitmap::@1
[608] return
@ -13783,7 +13780,6 @@ VARIABLE REGISTER WEIGHTS
(byte) bitmap_plot::y#3 202.0
(byte) bitmap_plot::y#4 204.0
(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx)
(byte*) dtvSetCpuBankSegment1::cpuBank
(byte) dtvSetCpuBankSegment1::cpuBankIdx
(byte) dtvSetCpuBankSegment1::cpuBankIdx#1 202.0
(byte) dtvSetCpuBankSegment1::cpuBankIdx#11 4.0
@ -13826,7 +13822,6 @@ VARIABLE REGISTER WEIGHTS
(byte) form_field_ptr::x#0 33.90000000000003
(byte) form_field_ptr::y
(byte) form_field_ptr::y#0 6.0
(byte) form_fields_cnt
(void()) form_mode()
(byte~) form_mode::$36 2002.0
(byte) form_mode::i
@ -14088,7 +14083,6 @@ VARIABLE REGISTER WEIGHTS
(byte) gfx_init_vic_bitmap::l
(byte) gfx_init_vic_bitmap::l#1 22.0
(byte) gfx_init_vic_bitmap::l#2 11.0
(byte) gfx_init_vic_bitmap::lines_cnt
(void()) gfx_mode()
(byte~) gfx_mode::$20 4.0
(dword~) gfx_mode::$22 4.0
@ -17515,7 +17509,7 @@ form_render_values: {
jmp b1
// form_render_values::@1
b1:
// [330] if((byte) form_render_values::idx#2<(const byte) form_fields_cnt#0) goto form_render_values::@2 -- vbuz1_lt_vbuc1_then_la1
// [330] if((byte) form_render_values::idx#2<(const byte) form_fields_cnt) goto form_render_values::@2 -- vbuz1_lt_vbuc1_then_la1
lda.z idx
cmp #form_fields_cnt
bcc b2
@ -17766,7 +17760,7 @@ apply_preset: {
// Copy preset values into the fields
// apply_preset::@13
b13:
// [355] if((byte) apply_preset::i#2!=(const byte) form_fields_cnt#0) goto apply_preset::@14 -- vbuz1_neq_vbuc1_then_la1
// [355] if((byte) apply_preset::i#2!=(const byte) form_fields_cnt) goto apply_preset::@14 -- vbuz1_neq_vbuc1_then_la1
lda #form_fields_cnt
cmp.z i
bne b14
@ -17917,7 +17911,7 @@ form_control: {
bne b22_from_b9
// [382] phi from form_control::@9 to form_control::@14 [phi:form_control::@9->form_control::@14]
b14_from_b9:
// [382] phi (byte) form_field_idx#31 = (const byte) form_fields_cnt#0-(byte) 1 [phi:form_control::@9->form_control::@14#0] -- vbuz1=vbuc1
// [382] phi (byte) form_field_idx#31 = (const byte) form_fields_cnt-(byte) 1 [phi:form_control::@9->form_control::@14#0] -- vbuz1=vbuc1
lda #form_fields_cnt-1
sta.z form_field_idx
jmp b14
@ -17951,7 +17945,7 @@ form_control: {
b13:
// [385] (byte) form_field_idx#5 ← ++ (byte) form_field_idx#28 -- vbuz1=_inc_vbuz1
inc.z form_field_idx
// [386] if((byte) form_field_idx#5!=(const byte) form_fields_cnt#0) goto form_control::@23 -- vbuz1_neq_vbuc1_then_la1
// [386] if((byte) form_field_idx#5!=(const byte) form_fields_cnt) goto form_control::@23 -- vbuz1_neq_vbuc1_then_la1
lda #form_fields_cnt
cmp.z form_field_idx
bne b23_from_b13
@ -18665,7 +18659,7 @@ dtvSetCpuBankSegment1: {
// Move CPU BANK 1 SEGMENT ($4000-$7fff)
.label cpuBank = $ff
.label cpuBankIdx = $43
// [502] *((const byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 -- _deref_pbuc1=vbuz1
// [502] *((const byte*) dtvSetCpuBankSegment1::cpuBank) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 -- _deref_pbuc1=vbuz1
lda.z cpuBankIdx
sta cpuBank
// asm { .byte$32,$dd lda$ff .byte$32,$00 }
@ -19394,7 +19388,7 @@ gfx_init_vic_bitmap: {
jmp b1
// gfx_init_vic_bitmap::@1
b1:
// [607] if((byte) gfx_init_vic_bitmap::l#2<(const byte) gfx_init_vic_bitmap::lines_cnt#0) goto gfx_init_vic_bitmap::@2 -- vbuz1_lt_vbuc1_then_la1
// [607] if((byte) gfx_init_vic_bitmap::l#2<(const byte) gfx_init_vic_bitmap::lines_cnt) goto gfx_init_vic_bitmap::@2 -- vbuz1_lt_vbuc1_then_la1
lda.z l
cmp #lines_cnt
bcc b2
@ -24635,7 +24629,7 @@ form_render_values: {
jmp b1
// form_render_values::@1
b1:
// [330] if((byte) form_render_values::idx#2<(const byte) form_fields_cnt#0) goto form_render_values::@2 -- vbuxx_lt_vbuc1_then_la1
// [330] if((byte) form_render_values::idx#2<(const byte) form_fields_cnt) goto form_render_values::@2 -- vbuxx_lt_vbuc1_then_la1
cpx #form_fields_cnt
bcc b2
jmp breturn
@ -24863,7 +24857,7 @@ apply_preset: {
// Copy preset values into the fields
// apply_preset::@13
b13:
// [355] if((byte) apply_preset::i#2!=(const byte) form_fields_cnt#0) goto apply_preset::@14 -- vbuyy_neq_vbuc1_then_la1
// [355] if((byte) apply_preset::i#2!=(const byte) form_fields_cnt) goto apply_preset::@14 -- vbuyy_neq_vbuc1_then_la1
cpy #form_fields_cnt
bne b14
jmp breturn
@ -24992,7 +24986,7 @@ form_control: {
bne b22_from_b9
// [382] phi from form_control::@9 to form_control::@14 [phi:form_control::@9->form_control::@14]
b14_from_b9:
// [382] phi (byte) form_field_idx#31 = (const byte) form_fields_cnt#0-(byte) 1 [phi:form_control::@9->form_control::@14#0] -- vbuz1=vbuc1
// [382] phi (byte) form_field_idx#31 = (const byte) form_fields_cnt-(byte) 1 [phi:form_control::@9->form_control::@14#0] -- vbuz1=vbuc1
lda #form_fields_cnt-1
sta.z form_field_idx
jmp b14
@ -25025,7 +25019,7 @@ form_control: {
b13:
// [385] (byte) form_field_idx#5 ← ++ (byte) form_field_idx#28 -- vbuz1=_inc_vbuz1
inc.z form_field_idx
// [386] if((byte) form_field_idx#5!=(const byte) form_fields_cnt#0) goto form_control::@23 -- vbuz1_neq_vbuc1_then_la1
// [386] if((byte) form_field_idx#5!=(const byte) form_fields_cnt) goto form_control::@23 -- vbuz1_neq_vbuc1_then_la1
lda #form_fields_cnt
cmp.z form_field_idx
bne b23_from_b13
@ -25694,7 +25688,7 @@ gfx_init_plane_fill: {
dtvSetCpuBankSegment1: {
// Move CPU BANK 1 SEGMENT ($4000-$7fff)
.label cpuBank = $ff
// [502] *((const byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 -- _deref_pbuc1=vbuaa
// [502] *((const byte*) dtvSetCpuBankSegment1::cpuBank) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 -- _deref_pbuc1=vbuaa
sta cpuBank
// asm { .byte$32,$dd lda$ff .byte$32,$00 }
.byte $32, $dd
@ -26379,7 +26373,7 @@ gfx_init_vic_bitmap: {
jmp b1
// gfx_init_vic_bitmap::@1
b1:
// [607] if((byte) gfx_init_vic_bitmap::l#2<(const byte) gfx_init_vic_bitmap::lines_cnt#0) goto gfx_init_vic_bitmap::@2 -- vbuz1_lt_vbuc1_then_la1
// [607] if((byte) gfx_init_vic_bitmap::l#2<(const byte) gfx_init_vic_bitmap::lines_cnt) goto gfx_init_vic_bitmap::@2 -- vbuz1_lt_vbuc1_then_la1
lda.z l
cmp #lines_cnt
bcc b2
@ -29202,8 +29196,7 @@ FINAL SYMBOL TABLE
(const byte[$100]) bitmap_plot_ylo bitmap_plot_ylo = { fill( $100, 0) }
(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx)
(label) dtvSetCpuBankSegment1::@return
(byte*) dtvSetCpuBankSegment1::cpuBank
(const byte*) dtvSetCpuBankSegment1::cpuBank#0 cpuBank = (byte*) 255
(const byte*) dtvSetCpuBankSegment1::cpuBank cpuBank = (byte*) 255
(byte) dtvSetCpuBankSegment1::cpuBankIdx
(byte) dtvSetCpuBankSegment1::cpuBankIdx#1 reg byte a 202.0
(byte) dtvSetCpuBankSegment1::cpuBankIdx#11 reg byte a 4.0
@ -29271,8 +29264,7 @@ FINAL SYMBOL TABLE
(byte) form_field_ptr::x#0 x zp ZP_BYTE:30 33.90000000000003
(byte) form_field_ptr::y
(byte) form_field_ptr::y#0 reg byte a 6.0
(byte) form_fields_cnt
(const byte) form_fields_cnt#0 form_fields_cnt = (byte) $24
(const byte) form_fields_cnt form_fields_cnt = (byte) $24
(const byte[]) form_fields_max form_fields_max = { (byte) $a, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) $d, (byte) $f, (byte) $f, (byte) $f, (byte) $f, (byte) $f, (byte) $f, (byte) $d, (byte) $f, (byte) $f, (byte) $f, (byte) $f, (byte) $f, (byte) $f, (byte) 3, (byte) 1, (byte) 4, (byte) 1, (byte) $f, (byte) $f, (byte) $f, (byte) $f, (byte) $f, (byte) $f, (byte) $f, (byte) $f }
(const byte[]) form_fields_val form_fields_val = { (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0 }
(const byte[]) form_fields_x form_fields_x = { (byte) 8, (byte) $c, (byte) $c, (byte) $c, (byte) $c, (byte) $c, (byte) $c, (byte) $c, (byte) $c, (byte) $c, (byte) $19, (byte) $18, (byte) $19, (byte) $18, (byte) $19, (byte) $18, (byte) $19, (byte) $19, (byte) $18, (byte) $19, (byte) $18, (byte) $19, (byte) $18, (byte) $19, (byte) $25, (byte) $25, (byte) $25, (byte) $25, (byte) $24, (byte) $25, (byte) $24, (byte) $25, (byte) $24, (byte) $25, (byte) $24, (byte) $25 }
@ -29685,8 +29677,7 @@ FINAL SYMBOL TABLE
(byte) gfx_init_vic_bitmap::l
(byte) gfx_init_vic_bitmap::l#1 l zp ZP_BYTE:8 22.0
(byte) gfx_init_vic_bitmap::l#2 l zp ZP_BYTE:8 11.0
(byte) gfx_init_vic_bitmap::lines_cnt
(const byte) gfx_init_vic_bitmap::lines_cnt#0 lines_cnt = (byte) 9
(const byte) gfx_init_vic_bitmap::lines_cnt lines_cnt = (byte) 9
(const byte[]) gfx_init_vic_bitmap::lines_x lines_x = { (byte) 0, (byte) $ff, (byte) $ff, (byte) 0, (byte) 0, (byte) $80, (byte) $ff, (byte) $80, (byte) 0, (byte) $80 }
(const byte[]) gfx_init_vic_bitmap::lines_y lines_y = { (byte) 0, (byte) 0, (byte) $c7, (byte) $c7, (byte) 0, (byte) 0, (byte) $64, (byte) $c7, (byte) $64, (byte) 0 }
(void()) gfx_mode()
@ -32215,7 +32206,7 @@ form_render_values: {
// form_render_values::@1
b1:
// for( byte idx=0; idx<form_fields_cnt; idx++)
// [330] if((byte) form_render_values::idx#2<(const byte) form_fields_cnt#0) goto form_render_values::@2 -- vbuxx_lt_vbuc1_then_la1
// [330] if((byte) form_render_values::idx#2<(const byte) form_fields_cnt) goto form_render_values::@2 -- vbuxx_lt_vbuc1_then_la1
cpx #form_fields_cnt
bcc b2
// form_render_values::@return
@ -32428,7 +32419,7 @@ apply_preset: {
// apply_preset::@13
b13:
// for( byte i=0; i != form_fields_cnt; i++)
// [355] if((byte) apply_preset::i#2!=(const byte) form_fields_cnt#0) goto apply_preset::@14 -- vbuyy_neq_vbuc1_then_la1
// [355] if((byte) apply_preset::i#2!=(const byte) form_fields_cnt) goto apply_preset::@14 -- vbuyy_neq_vbuc1_then_la1
cpy #form_fields_cnt
bne b14
// apply_preset::@return
@ -32545,7 +32536,7 @@ form_control: {
cmp.z form_field_idx
bne b14
// [382] phi from form_control::@9 to form_control::@14 [phi:form_control::@9->form_control::@14]
// [382] phi (byte) form_field_idx#31 = (const byte) form_fields_cnt#0-(byte) 1 [phi:form_control::@9->form_control::@14#0] -- vbuz1=vbuc1
// [382] phi (byte) form_field_idx#31 = (const byte) form_fields_cnt-(byte) 1 [phi:form_control::@9->form_control::@14#0] -- vbuz1=vbuc1
lda #form_fields_cnt-1
sta.z form_field_idx
// [381] phi from form_control::@9 to form_control::@22 [phi:form_control::@9->form_control::@22]
@ -32570,7 +32561,7 @@ form_control: {
// if(++form_field_idx==form_fields_cnt)
// [385] (byte) form_field_idx#5 ← ++ (byte) form_field_idx#28 -- vbuz1=_inc_vbuz1
inc.z form_field_idx
// [386] if((byte) form_field_idx#5!=(const byte) form_fields_cnt#0) goto form_control::@23 -- vbuz1_neq_vbuc1_then_la1
// [386] if((byte) form_field_idx#5!=(const byte) form_fields_cnt) goto form_control::@23 -- vbuz1_neq_vbuc1_then_la1
lda #form_fields_cnt
cmp.z form_field_idx
bne b14
@ -33163,7 +33154,7 @@ dtvSetCpuBankSegment1: {
// Move CPU BANK 1 SEGMENT ($4000-$7fff)
.label cpuBank = $ff
// *cpuBank = cpuBankIdx
// [502] *((const byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 -- _deref_pbuc1=vbuaa
// [502] *((const byte*) dtvSetCpuBankSegment1::cpuBank) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 -- _deref_pbuc1=vbuaa
sta cpuBank
// asm
// asm { .byte$32,$dd lda$ff .byte$32,$00 }
@ -33785,7 +33776,7 @@ gfx_init_vic_bitmap: {
// gfx_init_vic_bitmap::@1
b1:
// for(byte l=0; l<lines_cnt;l++)
// [607] if((byte) gfx_init_vic_bitmap::l#2<(const byte) gfx_init_vic_bitmap::lines_cnt#0) goto gfx_init_vic_bitmap::@2 -- vbuz1_lt_vbuc1_then_la1
// [607] if((byte) gfx_init_vic_bitmap::l#2<(const byte) gfx_init_vic_bitmap::lines_cnt) goto gfx_init_vic_bitmap::@2 -- vbuz1_lt_vbuc1_then_la1
lda.z l
cmp #lines_cnt
bcc b2

View File

@ -373,8 +373,7 @@
(const byte[$100]) bitmap_plot_ylo bitmap_plot_ylo = { fill( $100, 0) }
(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx)
(label) dtvSetCpuBankSegment1::@return
(byte*) dtvSetCpuBankSegment1::cpuBank
(const byte*) dtvSetCpuBankSegment1::cpuBank#0 cpuBank = (byte*) 255
(const byte*) dtvSetCpuBankSegment1::cpuBank cpuBank = (byte*) 255
(byte) dtvSetCpuBankSegment1::cpuBankIdx
(byte) dtvSetCpuBankSegment1::cpuBankIdx#1 reg byte a 202.0
(byte) dtvSetCpuBankSegment1::cpuBankIdx#11 reg byte a 4.0
@ -442,8 +441,7 @@
(byte) form_field_ptr::x#0 x zp ZP_BYTE:30 33.90000000000003
(byte) form_field_ptr::y
(byte) form_field_ptr::y#0 reg byte a 6.0
(byte) form_fields_cnt
(const byte) form_fields_cnt#0 form_fields_cnt = (byte) $24
(const byte) form_fields_cnt form_fields_cnt = (byte) $24
(const byte[]) form_fields_max form_fields_max = { (byte) $a, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) $d, (byte) $f, (byte) $f, (byte) $f, (byte) $f, (byte) $f, (byte) $f, (byte) $d, (byte) $f, (byte) $f, (byte) $f, (byte) $f, (byte) $f, (byte) $f, (byte) 3, (byte) 1, (byte) 4, (byte) 1, (byte) $f, (byte) $f, (byte) $f, (byte) $f, (byte) $f, (byte) $f, (byte) $f, (byte) $f }
(const byte[]) form_fields_val form_fields_val = { (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0 }
(const byte[]) form_fields_x form_fields_x = { (byte) 8, (byte) $c, (byte) $c, (byte) $c, (byte) $c, (byte) $c, (byte) $c, (byte) $c, (byte) $c, (byte) $c, (byte) $19, (byte) $18, (byte) $19, (byte) $18, (byte) $19, (byte) $18, (byte) $19, (byte) $19, (byte) $18, (byte) $19, (byte) $18, (byte) $19, (byte) $18, (byte) $19, (byte) $25, (byte) $25, (byte) $25, (byte) $25, (byte) $24, (byte) $25, (byte) $24, (byte) $25, (byte) $24, (byte) $25, (byte) $24, (byte) $25 }
@ -856,8 +854,7 @@
(byte) gfx_init_vic_bitmap::l
(byte) gfx_init_vic_bitmap::l#1 l zp ZP_BYTE:8 22.0
(byte) gfx_init_vic_bitmap::l#2 l zp ZP_BYTE:8 11.0
(byte) gfx_init_vic_bitmap::lines_cnt
(const byte) gfx_init_vic_bitmap::lines_cnt#0 lines_cnt = (byte) 9
(const byte) gfx_init_vic_bitmap::lines_cnt lines_cnt = (byte) 9
(const byte[]) gfx_init_vic_bitmap::lines_x lines_x = { (byte) 0, (byte) $ff, (byte) $ff, (byte) 0, (byte) 0, (byte) $80, (byte) $ff, (byte) $80, (byte) 0, (byte) $80 }
(const byte[]) gfx_init_vic_bitmap::lines_y lines_y = { (byte) 0, (byte) 0, (byte) $c7, (byte) $c7, (byte) 0, (byte) 0, (byte) $64, (byte) $c7, (byte) $64, (byte) 0 }
(void()) gfx_mode()

View File

@ -431,7 +431,7 @@ keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matri
(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx)
dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1] from mode_8bppchunkybmm::@2 mode_8bppchunkybmm::@6 mode_8bppchunkybmm::@8
[223] (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 ← phi( mode_8bppchunkybmm::@2/(byte)(const dword) mode_8bppchunkybmm::PLANEB/(word) $4000 mode_8bppchunkybmm::@6/(byte) dtvSetCpuBankSegment1::cpuBankIdx#1 mode_8bppchunkybmm::@8/(byte)(number) $4000/(number) $4000 )
[224] *((const byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#3
[224] *((const byte*) dtvSetCpuBankSegment1::cpuBank) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#3
asm { .byte$32,$dd lda$ff .byte$32,$00 }
to:dtvSetCpuBankSegment1::@return
dtvSetCpuBankSegment1::@return: scope:[dtvSetCpuBankSegment1] from dtvSetCpuBankSegment1
@ -490,7 +490,7 @@ mode_8bpppixelcell::@6: scope:[mode_8bpppixelcell] from mode_8bpppixelcell::@12
[260] (byte) mode_8bpppixelcell::ch#8 ← phi( mode_8bpppixelcell::@12/(byte) mode_8bpppixelcell::ch#1 mode_8bpppixelcell::@5/(byte) 0 )
[260] (byte) mode_8bpppixelcell::col#7 ← phi( mode_8bpppixelcell::@12/(byte) mode_8bpppixelcell::col#1 mode_8bpppixelcell::@5/(byte) 0 )
[260] (byte*) mode_8bpppixelcell::gfxb#7 ← phi( mode_8bpppixelcell::@12/(byte*) mode_8bpppixelcell::gfxb#1 mode_8bpppixelcell::@5/(const byte*) mode_8bpppixelcell::PLANEB )
[260] (byte*) mode_8bpppixelcell::chargen#4 ← phi( mode_8bpppixelcell::@12/(byte*) mode_8bpppixelcell::chargen#1 mode_8bpppixelcell::@5/(const byte*) mode_8bpppixelcell::CHARGEN#0 )
[260] (byte*) mode_8bpppixelcell::chargen#4 ← phi( mode_8bpppixelcell::@12/(byte*) mode_8bpppixelcell::chargen#1 mode_8bpppixelcell::@5/(const byte*) mode_8bpppixelcell::CHARGEN )
to:mode_8bpppixelcell::@7
mode_8bpppixelcell::@7: scope:[mode_8bpppixelcell] from mode_8bpppixelcell::@11 mode_8bpppixelcell::@6
[261] (byte) mode_8bpppixelcell::cr#6 ← phi( mode_8bpppixelcell::@11/(byte) mode_8bpppixelcell::cr#1 mode_8bpppixelcell::@6/(byte) 0 )
@ -1036,7 +1036,7 @@ mode_stdbitmap::@10: scope:[mode_stdbitmap] from mode_stdbitmap::@6
to:mode_stdbitmap::@7
mode_stdbitmap::@7: scope:[mode_stdbitmap] from mode_stdbitmap::@10 mode_stdbitmap::@11
[581] (byte) mode_stdbitmap::l#2 ← phi( mode_stdbitmap::@10/(byte) 0 mode_stdbitmap::@11/(byte) mode_stdbitmap::l#1 )
[582] if((byte) mode_stdbitmap::l#2<(const byte) mode_stdbitmap::lines_cnt#0) goto mode_stdbitmap::@8
[582] if((byte) mode_stdbitmap::l#2<(const byte) mode_stdbitmap::lines_cnt) goto mode_stdbitmap::@8
to:mode_stdbitmap::@9
mode_stdbitmap::@9: scope:[mode_stdbitmap] from mode_stdbitmap::@7
[583] phi()

View File

@ -218,8 +218,8 @@ CONTROL FLOW GRAPH SSA
(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx)
dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1] from mode_8bppchunkybmm::@2 mode_8bppchunkybmm::@6 mode_8bppchunkybmm::@8
(byte) dtvSetCpuBankSegment1::cpuBankIdx#3 ← phi( mode_8bppchunkybmm::@2/(byte) dtvSetCpuBankSegment1::cpuBankIdx#0 mode_8bppchunkybmm::@6/(byte) dtvSetCpuBankSegment1::cpuBankIdx#1 mode_8bppchunkybmm::@8/(byte) dtvSetCpuBankSegment1::cpuBankIdx#2 )
(byte*) dtvSetCpuBankSegment1::cpuBank#0 ← ((byte*)) (number) $ff
*((byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#3
(byte*) dtvSetCpuBankSegment1::cpuBank ← ((byte*)) (number) $ff
*((byte*) dtvSetCpuBankSegment1::cpuBank) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#3
asm { .byte$32,$dd lda$ff .byte$32,$00 }
to:dtvSetCpuBankSegment1::@return
dtvSetCpuBankSegment1::@return: scope:[dtvSetCpuBankSegment1] from dtvSetCpuBankSegment1
@ -2250,13 +2250,13 @@ mode_stdbitmap::@14: scope:[mode_stdbitmap] from mode_stdbitmap::@13
(byte) dtv_control#178 ← phi( mode_stdbitmap::@13/(byte) dtv_control#193 )
(byte[]) mode_stdbitmap::lines_x ← { (number) 0, (number) $ff, (number) $ff, (number) 0, (number) 0, (number) $80, (number) $ff, (number) $80, (number) 0, (number) $80 }
(byte[]) mode_stdbitmap::lines_y ← { (number) 0, (number) 0, (number) $c7, (number) $c7, (number) 0, (number) 0, (number) $64, (number) $c7, (number) $64, (number) 0 }
(byte) mode_stdbitmap::lines_cnt#0 ← (number) 9
(byte) mode_stdbitmap::lines_cnt ← (number) 9
(byte) mode_stdbitmap::l#0 ← (number) 0
to:mode_stdbitmap::@7
mode_stdbitmap::@7: scope:[mode_stdbitmap] from mode_stdbitmap::@14 mode_stdbitmap::@15
(byte) dtv_control#150 ← phi( mode_stdbitmap::@14/(byte) dtv_control#178 mode_stdbitmap::@15/(byte) dtv_control#179 )
(byte) mode_stdbitmap::l#2 ← phi( mode_stdbitmap::@14/(byte) mode_stdbitmap::l#0 mode_stdbitmap::@15/(byte) mode_stdbitmap::l#1 )
(bool~) mode_stdbitmap::$29 ← (byte) mode_stdbitmap::l#2 < (byte) mode_stdbitmap::lines_cnt#0
(bool~) mode_stdbitmap::$29 ← (byte) mode_stdbitmap::l#2 < (byte) mode_stdbitmap::lines_cnt
if((bool~) mode_stdbitmap::$29) goto mode_stdbitmap::@8
to:mode_stdbitmap::@9
mode_stdbitmap::@8: scope:[mode_stdbitmap] from mode_stdbitmap::@7
@ -3190,9 +3190,9 @@ mode_8bpppixelcell::@5: scope:[mode_8bpppixelcell] from mode_8bpppixelcell::@4
mode_8bpppixelcell::@6: scope:[mode_8bpppixelcell] from mode_8bpppixelcell::@5
(byte) dtv_control#252 ← phi( mode_8bpppixelcell::@5/(byte) dtv_control#261 )
*((byte*) PROCPORT) ← (byte) PROCPORT_RAM_CHARROM
(byte*) mode_8bpppixelcell::CHARGEN#0 ← ((byte*)) (number) $d000
(byte*) mode_8bpppixelcell::CHARGEN ← ((byte*)) (number) $d000
(byte*) mode_8bpppixelcell::gfxb#0 ← (byte*) mode_8bpppixelcell::PLANEB
(byte*) mode_8bpppixelcell::chargen#0 ← (byte*) mode_8bpppixelcell::CHARGEN#0
(byte*) mode_8bpppixelcell::chargen#0 ← (byte*) mode_8bpppixelcell::CHARGEN
(byte) mode_8bpppixelcell::col#0 ← (number) 0
(byte) mode_8bpppixelcell::ch#0 ← (byte) 0
to:mode_8bpppixelcell::@7
@ -4026,7 +4026,6 @@ SYMBOL TABLE SSA
(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx)
(label) dtvSetCpuBankSegment1::@return
(byte*) dtvSetCpuBankSegment1::cpuBank
(byte*) dtvSetCpuBankSegment1::cpuBank#0
(byte) dtvSetCpuBankSegment1::cpuBankIdx
(byte) dtvSetCpuBankSegment1::cpuBankIdx#0
(byte) dtvSetCpuBankSegment1::cpuBankIdx#1
@ -4723,7 +4722,6 @@ SYMBOL TABLE SSA
(label) mode_8bpppixelcell::@9
(label) mode_8bpppixelcell::@return
(byte*) mode_8bpppixelcell::CHARGEN
(byte*) mode_8bpppixelcell::CHARGEN#0
(byte*) mode_8bpppixelcell::PLANEA
(byte*) mode_8bpppixelcell::PLANEB
(byte) mode_8bpppixelcell::ax
@ -5535,7 +5533,6 @@ SYMBOL TABLE SSA
(byte) mode_stdbitmap::l#3
(byte) mode_stdbitmap::l#4
(byte) mode_stdbitmap::lines_cnt
(byte) mode_stdbitmap::lines_cnt#0
(byte[]) mode_stdbitmap::lines_x
(byte[]) mode_stdbitmap::lines_y
(void()) mode_stdchar()
@ -6308,7 +6305,7 @@ Adding number conversion cast (unumber) mode_stdbitmap::$24 in (number~) mode_st
Adding number conversion cast (unumber) $10 in (number~) mode_stdbitmap::$25 ← (byte) mode_stdbitmap::col#0 * (number) $10
Adding number conversion cast (unumber) mode_stdbitmap::$25 in (number~) mode_stdbitmap::$25 ← (byte) mode_stdbitmap::col#0 * (unumber)(number) $10
Adding number conversion cast (unumber) mode_stdbitmap::$26 in (number~) mode_stdbitmap::$26 ← (unumber~) mode_stdbitmap::$25 | (byte) mode_stdbitmap::col2#0
Adding number conversion cast (unumber) 9 in (byte) mode_stdbitmap::lines_cnt#0 ← (number) 9
Adding number conversion cast (unumber) 9 in (byte) mode_stdbitmap::lines_cnt ← (number) 9
Adding number conversion cast (unumber) 0 in (byte) mode_stdbitmap::l#0 ← (number) 0
Adding number conversion cast (unumber) 1 in (number~) mode_stdbitmap::$30 ← (byte) mode_stdbitmap::l#3 + (number) 1
Adding number conversion cast (unumber) mode_stdbitmap::$30 in (number~) mode_stdbitmap::$30 ← (byte) mode_stdbitmap::l#3 + (unumber)(number) 1
@ -6579,7 +6576,7 @@ Inlining cast (byte*) DTV_COLOR_BANK_LO ← (byte*)(number) $d036
Inlining cast (byte*) DTV_COLOR_BANK_HI ← (byte*)(number) $d037
Inlining cast (dword) DTV_COLOR_BANK_DEFAULT ← (unumber)(number) $1d800
Inlining cast (byte*) DTV_GRAPHICS_VIC_BANK ← (byte*)(number) $d03d
Inlining cast (byte*) dtvSetCpuBankSegment1::cpuBank#0 ← (byte*)(number) $ff
Inlining cast (byte*) dtvSetCpuBankSegment1::cpuBank ← (byte*)(number) $ff
Inlining cast (byte*~) memset::$2 ← (byte*)(void*) memset::str#2
Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#2
Inlining cast (byte*) print_screen#0 ← (byte*)(number) $400
@ -6689,7 +6686,7 @@ Inlining cast (byte~) mode_stdbitmap::$5 ← (byte)(unumber~) mode_stdbitmap::$4
Inlining cast (word~) mode_stdbitmap::$10 ← (word)(byte*) mode_stdbitmap::SCREEN
Inlining cast (word~) mode_stdbitmap::$13 ← (word)(byte*) mode_stdbitmap::BITMAP
Inlining cast (byte~) mode_stdbitmap::$17 ← (byte)(unumber~) mode_stdbitmap::$16
Inlining cast (byte) mode_stdbitmap::lines_cnt#0 ← (unumber)(number) 9
Inlining cast (byte) mode_stdbitmap::lines_cnt ← (unumber)(number) 9
Inlining cast (byte) mode_stdbitmap::l#0 ← (unumber)(number) 0
Inlining cast (byte*) mode_hicolstdchar::SCREEN ← (byte*)(number) $8000
Inlining cast (byte*) mode_hicolstdchar::CHARSET ← (byte*)(number) $9000
@ -6795,7 +6792,7 @@ Inlining cast *((byte*) DTV_PLANEB_STEP) ← (unumber)(number) 0
Inlining cast *((byte*) DTV_PLANEB_MODULO_LO) ← (unumber)(number) 0
Inlining cast *((byte*) DTV_PLANEB_MODULO_HI) ← (unumber)(number) 0
Inlining cast *((byte*) BORDERCOL) ← (unumber)(number) 0
Inlining cast (byte*) mode_8bpppixelcell::CHARGEN#0 ← (byte*)(number) $d000
Inlining cast (byte*) mode_8bpppixelcell::CHARGEN ← (byte*)(number) $d000
Inlining cast (byte) mode_8bpppixelcell::col#0 ← (unumber)(number) 0
Inlining cast (byte) mode_8bpppixelcell::c#0 ← (unumber)(number) 0
Inlining cast (dword) mode_8bppchunkybmm::PLANEB ← (unumber)(number) $20000
@ -8059,7 +8056,7 @@ Alias (byte) mode_8bpppixelcell::ay#2 = (byte) mode_8bpppixelcell::ay#3
Alias (byte*) mode_8bpppixelcell::gfxa#1 = (byte*) mode_8bpppixelcell::gfxa#4
Alias (byte) dtv_control#252 = (byte) dtv_control#261 (byte) dtv_control#268
Alias (byte*) mode_8bpppixelcell::PLANEB = (byte*) mode_8bpppixelcell::gfxb#0
Alias (byte*) mode_8bpppixelcell::CHARGEN#0 = (byte*) mode_8bpppixelcell::chargen#0
Alias (byte*) mode_8bpppixelcell::CHARGEN = (byte*) mode_8bpppixelcell::chargen#0
Alias (byte) mode_8bpppixelcell::bits#1 = (byte~) mode_8bpppixelcell::$23
Alias (byte) mode_8bpppixelcell::col#3 = (byte) mode_8bpppixelcell::col#4 (byte) mode_8bpppixelcell::c#1
Alias (byte*) mode_8bpppixelcell::gfxb#3 = (byte*) mode_8bpppixelcell::gfxb#4
@ -8393,7 +8390,7 @@ Simple Condition (bool~) mode_mcchar::$33 [1037] if((byte) mode_mcchar::cy#1!=ra
Simple Condition (bool~) mode_stdbitmap::$21 [1078] if((byte) mode_stdbitmap::i#1!=rangelast(0,$f)) goto mode_stdbitmap::@1
Simple Condition (bool~) mode_stdbitmap::$27 [1098] if((byte) mode_stdbitmap::cx#1!=rangelast(0,$27)) goto mode_stdbitmap::@4
Simple Condition (bool~) mode_stdbitmap::$28 [1102] if((byte) mode_stdbitmap::cy#1!=rangelast(0,$18)) goto mode_stdbitmap::@3
Simple Condition (bool~) mode_stdbitmap::$29 [1115] if((byte) mode_stdbitmap::l#2<(byte) mode_stdbitmap::lines_cnt#0) goto mode_stdbitmap::@8
Simple Condition (bool~) mode_stdbitmap::$29 [1115] if((byte) mode_stdbitmap::l#2<(byte) mode_stdbitmap::lines_cnt) goto mode_stdbitmap::@8
Simple Condition (bool~) mode_hicolstdchar::$24 [1174] if((byte) mode_hicolstdchar::i#1!=rangelast(0,$f)) goto mode_hicolstdchar::@1
Simple Condition (bool~) mode_hicolstdchar::$29 [1195] if((byte) mode_hicolstdchar::cx#1!=rangelast(0,$27)) goto mode_hicolstdchar::@4
Simple Condition (bool~) mode_hicolstdchar::$30 [1199] if((byte) mode_hicolstdchar::cy#1!=rangelast(0,$18)) goto mode_hicolstdchar::@3
@ -8509,7 +8506,7 @@ Constant (const byte*) DTV_COLOR_BANK_LO = (byte*) 53302
Constant (const byte*) DTV_COLOR_BANK_HI = (byte*) 53303
Constant (const dword) DTV_COLOR_BANK_DEFAULT = $1d800
Constant (const byte*) DTV_GRAPHICS_VIC_BANK = (byte*) 53309
Constant (const byte*) dtvSetCpuBankSegment1::cpuBank#0 = (byte*) 255
Constant (const byte*) dtvSetCpuBankSegment1::cpuBank = (byte*) 255
Constant (const byte*) print_screen#0 = (byte*) 1024
Constant (const byte) memset::c#0 = ' '
Constant (const word) memset::num#0 = $3e8
@ -8582,7 +8579,7 @@ Constant (const byte) mode_stdbitmap::cy#0 = 0
Constant (const byte) mode_stdbitmap::cx#0 = 0
Constant (const byte[]) mode_stdbitmap::lines_x = { 0, $ff, $ff, 0, 0, $80, $ff, $80, 0, $80 }
Constant (const byte[]) mode_stdbitmap::lines_y = { 0, 0, $c7, $c7, 0, 0, $64, $c7, $64, 0 }
Constant (const byte) mode_stdbitmap::lines_cnt#0 = 9
Constant (const byte) mode_stdbitmap::lines_cnt = 9
Constant (const byte) mode_stdbitmap::l#0 = 0
Constant (const byte*) mode_hicolstdchar::SCREEN = (byte*) 32768
Constant (const byte*) mode_hicolstdchar::CHARSET = (byte*) 36864
@ -8639,7 +8636,7 @@ Constant (const byte*) mode_8bpppixelcell::PLANEB = (byte*) 16384
Constant (const byte) mode_8bpppixelcell::i#0 = 0
Constant (const byte) mode_8bpppixelcell::ay#0 = 0
Constant (const byte) mode_8bpppixelcell::ax#0 = 0
Constant (const byte*) mode_8bpppixelcell::CHARGEN#0 = (byte*) 53248
Constant (const byte*) mode_8bpppixelcell::CHARGEN = (byte*) 53248
Constant (const byte) mode_8bpppixelcell::col#0 = 0
Constant (const byte) mode_8bpppixelcell::ch#0 = 0
Constant (const byte) mode_8bpppixelcell::cr#0 = 0
@ -11319,7 +11316,7 @@ keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matri
(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx)
dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1] from mode_8bppchunkybmm::@2 mode_8bppchunkybmm::@6 mode_8bppchunkybmm::@8
[223] (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 ← phi( mode_8bppchunkybmm::@2/(byte)(const dword) mode_8bppchunkybmm::PLANEB/(word) $4000 mode_8bppchunkybmm::@6/(byte) dtvSetCpuBankSegment1::cpuBankIdx#1 mode_8bppchunkybmm::@8/(byte)(number) $4000/(number) $4000 )
[224] *((const byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#3
[224] *((const byte*) dtvSetCpuBankSegment1::cpuBank) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#3
asm { .byte$32,$dd lda$ff .byte$32,$00 }
to:dtvSetCpuBankSegment1::@return
dtvSetCpuBankSegment1::@return: scope:[dtvSetCpuBankSegment1] from dtvSetCpuBankSegment1
@ -11378,7 +11375,7 @@ mode_8bpppixelcell::@6: scope:[mode_8bpppixelcell] from mode_8bpppixelcell::@12
[260] (byte) mode_8bpppixelcell::ch#8 ← phi( mode_8bpppixelcell::@12/(byte) mode_8bpppixelcell::ch#1 mode_8bpppixelcell::@5/(byte) 0 )
[260] (byte) mode_8bpppixelcell::col#7 ← phi( mode_8bpppixelcell::@12/(byte) mode_8bpppixelcell::col#1 mode_8bpppixelcell::@5/(byte) 0 )
[260] (byte*) mode_8bpppixelcell::gfxb#7 ← phi( mode_8bpppixelcell::@12/(byte*) mode_8bpppixelcell::gfxb#1 mode_8bpppixelcell::@5/(const byte*) mode_8bpppixelcell::PLANEB )
[260] (byte*) mode_8bpppixelcell::chargen#4 ← phi( mode_8bpppixelcell::@12/(byte*) mode_8bpppixelcell::chargen#1 mode_8bpppixelcell::@5/(const byte*) mode_8bpppixelcell::CHARGEN#0 )
[260] (byte*) mode_8bpppixelcell::chargen#4 ← phi( mode_8bpppixelcell::@12/(byte*) mode_8bpppixelcell::chargen#1 mode_8bpppixelcell::@5/(const byte*) mode_8bpppixelcell::CHARGEN )
to:mode_8bpppixelcell::@7
mode_8bpppixelcell::@7: scope:[mode_8bpppixelcell] from mode_8bpppixelcell::@11 mode_8bpppixelcell::@6
[261] (byte) mode_8bpppixelcell::cr#6 ← phi( mode_8bpppixelcell::@11/(byte) mode_8bpppixelcell::cr#1 mode_8bpppixelcell::@6/(byte) 0 )
@ -11924,7 +11921,7 @@ mode_stdbitmap::@10: scope:[mode_stdbitmap] from mode_stdbitmap::@6
to:mode_stdbitmap::@7
mode_stdbitmap::@7: scope:[mode_stdbitmap] from mode_stdbitmap::@10 mode_stdbitmap::@11
[581] (byte) mode_stdbitmap::l#2 ← phi( mode_stdbitmap::@10/(byte) 0 mode_stdbitmap::@11/(byte) mode_stdbitmap::l#1 )
[582] if((byte) mode_stdbitmap::l#2<(const byte) mode_stdbitmap::lines_cnt#0) goto mode_stdbitmap::@8
[582] if((byte) mode_stdbitmap::l#2<(const byte) mode_stdbitmap::lines_cnt) goto mode_stdbitmap::@8
to:mode_stdbitmap::@9
mode_stdbitmap::@9: scope:[mode_stdbitmap] from mode_stdbitmap::@7
[583] phi()
@ -12761,7 +12758,6 @@ VARIABLE REGISTER WEIGHTS
(byte) bitmap_plot::y#3 2002.0
(byte) bitmap_plot::y#4 2004.0
(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx)
(byte*) dtvSetCpuBankSegment1::cpuBank
(byte) dtvSetCpuBankSegment1::cpuBankIdx
(byte) dtvSetCpuBankSegment1::cpuBankIdx#1 2002.0
(byte) dtvSetCpuBankSegment1::cpuBankIdx#3 1003.0
@ -12864,7 +12860,6 @@ VARIABLE REGISTER WEIGHTS
(byte~) mode_8bpppixelcell::$16 2002.0
(byte~) mode_8bpppixelcell::$17 2002.0
(byte~) mode_8bpppixelcell::$20 20002.0
(byte*) mode_8bpppixelcell::CHARGEN
(byte) mode_8bpppixelcell::ax
(byte) mode_8bpppixelcell::ax#1 1501.5
(byte) mode_8bpppixelcell::ax#2 429.0
@ -13153,7 +13148,6 @@ VARIABLE REGISTER WEIGHTS
(byte) mode_stdbitmap::l
(byte) mode_stdbitmap::l#1 202.0
(byte) mode_stdbitmap::l#2 101.0
(byte) mode_stdbitmap::lines_cnt
(void()) mode_stdchar()
(byte~) mode_stdchar::$25 2002.0
(byte~) mode_stdchar::$26 2002.0
@ -15356,7 +15350,7 @@ dtvSetCpuBankSegment1: {
// Move CPU BANK 1 SEGMENT ($4000-$7fff)
.label cpuBank = $ff
.label cpuBankIdx = $f
// [224] *((const byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 -- _deref_pbuc1=vbuz1
// [224] *((const byte*) dtvSetCpuBankSegment1::cpuBank) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 -- _deref_pbuc1=vbuz1
lda.z cpuBankIdx
sta cpuBank
// asm { .byte$32,$dd lda$ff .byte$32,$00 }
@ -15572,7 +15566,7 @@ mode_8bpppixelcell: {
sta.z gfxb
lda #>PLANEB
sta.z gfxb+1
// [260] phi (byte*) mode_8bpppixelcell::chargen#4 = (const byte*) mode_8bpppixelcell::CHARGEN#0 [phi:mode_8bpppixelcell::@5->mode_8bpppixelcell::@6#3] -- pbuz1=pbuc1
// [260] phi (byte*) mode_8bpppixelcell::chargen#4 = (const byte*) mode_8bpppixelcell::CHARGEN [phi:mode_8bpppixelcell::@5->mode_8bpppixelcell::@6#3] -- pbuz1=pbuc1
lda #<CHARGEN
sta.z chargen
lda #>CHARGEN
@ -17520,7 +17514,7 @@ mode_stdbitmap: {
jmp b7
// mode_stdbitmap::@7
b7:
// [582] if((byte) mode_stdbitmap::l#2<(const byte) mode_stdbitmap::lines_cnt#0) goto mode_stdbitmap::@8 -- vbuz1_lt_vbuc1_then_la1
// [582] if((byte) mode_stdbitmap::l#2<(const byte) mode_stdbitmap::lines_cnt) goto mode_stdbitmap::@8 -- vbuz1_lt_vbuc1_then_la1
lda.z l
cmp #lines_cnt
bcc b8
@ -22067,7 +22061,7 @@ keyboard_matrix_read: {
dtvSetCpuBankSegment1: {
// Move CPU BANK 1 SEGMENT ($4000-$7fff)
.label cpuBank = $ff
// [224] *((const byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 -- _deref_pbuc1=vbuaa
// [224] *((const byte*) dtvSetCpuBankSegment1::cpuBank) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 -- _deref_pbuc1=vbuaa
sta cpuBank
// asm { .byte$32,$dd lda$ff .byte$32,$00 }
.byte $32, $dd
@ -22263,7 +22257,7 @@ mode_8bpppixelcell: {
sta.z gfxb
lda #>PLANEB
sta.z gfxb+1
// [260] phi (byte*) mode_8bpppixelcell::chargen#4 = (const byte*) mode_8bpppixelcell::CHARGEN#0 [phi:mode_8bpppixelcell::@5->mode_8bpppixelcell::@6#3] -- pbuz1=pbuc1
// [260] phi (byte*) mode_8bpppixelcell::chargen#4 = (const byte*) mode_8bpppixelcell::CHARGEN [phi:mode_8bpppixelcell::@5->mode_8bpppixelcell::@6#3] -- pbuz1=pbuc1
lda #<CHARGEN
sta.z chargen
lda #>CHARGEN
@ -24061,7 +24055,7 @@ mode_stdbitmap: {
jmp b7
// mode_stdbitmap::@7
b7:
// [582] if((byte) mode_stdbitmap::l#2<(const byte) mode_stdbitmap::lines_cnt#0) goto mode_stdbitmap::@8 -- vbuz1_lt_vbuc1_then_la1
// [582] if((byte) mode_stdbitmap::l#2<(const byte) mode_stdbitmap::lines_cnt) goto mode_stdbitmap::@8 -- vbuz1_lt_vbuc1_then_la1
lda.z l
cmp #lines_cnt
bcc b8
@ -26952,8 +26946,7 @@ FINAL SYMBOL TABLE
(const byte[$100]) bitmap_plot_ylo bitmap_plot_ylo = { fill( $100, 0) }
(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx)
(label) dtvSetCpuBankSegment1::@return
(byte*) dtvSetCpuBankSegment1::cpuBank
(const byte*) dtvSetCpuBankSegment1::cpuBank#0 cpuBank = (byte*) 255
(const byte*) dtvSetCpuBankSegment1::cpuBank cpuBank = (byte*) 255
(byte) dtvSetCpuBankSegment1::cpuBankIdx
(byte) dtvSetCpuBankSegment1::cpuBankIdx#1 reg byte a 2002.0
(byte) dtvSetCpuBankSegment1::cpuBankIdx#3 reg byte a 1003.0
@ -27140,8 +27133,7 @@ FINAL SYMBOL TABLE
(label) mode_8bpppixelcell::@8
(label) mode_8bpppixelcell::@9
(label) mode_8bpppixelcell::@return
(byte*) mode_8bpppixelcell::CHARGEN
(const byte*) mode_8bpppixelcell::CHARGEN#0 CHARGEN = (byte*) 53248
(const byte*) mode_8bpppixelcell::CHARGEN CHARGEN = (byte*) 53248
(const byte*) mode_8bpppixelcell::PLANEA PLANEA = (byte*) 15360
(const byte*) mode_8bpppixelcell::PLANEB PLANEB = (byte*) 16384
(byte) mode_8bpppixelcell::ax
@ -27558,8 +27550,7 @@ FINAL SYMBOL TABLE
(byte) mode_stdbitmap::l
(byte) mode_stdbitmap::l#1 l zp ZP_BYTE:14 202.0
(byte) mode_stdbitmap::l#2 l zp ZP_BYTE:14 101.0
(byte) mode_stdbitmap::lines_cnt
(const byte) mode_stdbitmap::lines_cnt#0 lines_cnt = (byte) 9
(const byte) mode_stdbitmap::lines_cnt lines_cnt = (byte) 9
(const byte[]) mode_stdbitmap::lines_x lines_x = { (byte) 0, (byte) $ff, (byte) $ff, (byte) 0, (byte) 0, (byte) $80, (byte) $ff, (byte) $80, (byte) 0, (byte) $80 }
(const byte[]) mode_stdbitmap::lines_y lines_y = { (byte) 0, (byte) 0, (byte) $c7, (byte) $c7, (byte) 0, (byte) 0, (byte) $64, (byte) $c7, (byte) $64, (byte) 0 }
(void()) mode_stdchar()
@ -28902,7 +28893,7 @@ dtvSetCpuBankSegment1: {
// Move CPU BANK 1 SEGMENT ($4000-$7fff)
.label cpuBank = $ff
// *cpuBank = cpuBankIdx
// [224] *((const byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 -- _deref_pbuc1=vbuaa
// [224] *((const byte*) dtvSetCpuBankSegment1::cpuBank) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 -- _deref_pbuc1=vbuaa
sta cpuBank
// asm
// asm { .byte$32,$dd lda$ff .byte$32,$00 }
@ -29101,7 +29092,7 @@ mode_8bpppixelcell: {
sta.z gfxb
lda #>PLANEB
sta.z gfxb+1
// [260] phi (byte*) mode_8bpppixelcell::chargen#4 = (const byte*) mode_8bpppixelcell::CHARGEN#0 [phi:mode_8bpppixelcell::@5->mode_8bpppixelcell::@6#3] -- pbuz1=pbuc1
// [260] phi (byte*) mode_8bpppixelcell::chargen#4 = (const byte*) mode_8bpppixelcell::CHARGEN [phi:mode_8bpppixelcell::@5->mode_8bpppixelcell::@6#3] -- pbuz1=pbuc1
lda #<CHARGEN
sta.z chargen
lda #>CHARGEN
@ -30879,7 +30870,7 @@ mode_stdbitmap: {
// mode_stdbitmap::@7
b7:
// for(byte l=0; l<lines_cnt;l++)
// [582] if((byte) mode_stdbitmap::l#2<(const byte) mode_stdbitmap::lines_cnt#0) goto mode_stdbitmap::@8 -- vbuz1_lt_vbuc1_then_la1
// [582] if((byte) mode_stdbitmap::l#2<(const byte) mode_stdbitmap::lines_cnt) goto mode_stdbitmap::@8 -- vbuz1_lt_vbuc1_then_la1
lda.z l
cmp #lines_cnt
bcc b8

View File

@ -338,8 +338,7 @@
(const byte[$100]) bitmap_plot_ylo bitmap_plot_ylo = { fill( $100, 0) }
(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx)
(label) dtvSetCpuBankSegment1::@return
(byte*) dtvSetCpuBankSegment1::cpuBank
(const byte*) dtvSetCpuBankSegment1::cpuBank#0 cpuBank = (byte*) 255
(const byte*) dtvSetCpuBankSegment1::cpuBank cpuBank = (byte*) 255
(byte) dtvSetCpuBankSegment1::cpuBankIdx
(byte) dtvSetCpuBankSegment1::cpuBankIdx#1 reg byte a 2002.0
(byte) dtvSetCpuBankSegment1::cpuBankIdx#3 reg byte a 1003.0
@ -526,8 +525,7 @@
(label) mode_8bpppixelcell::@8
(label) mode_8bpppixelcell::@9
(label) mode_8bpppixelcell::@return
(byte*) mode_8bpppixelcell::CHARGEN
(const byte*) mode_8bpppixelcell::CHARGEN#0 CHARGEN = (byte*) 53248
(const byte*) mode_8bpppixelcell::CHARGEN CHARGEN = (byte*) 53248
(const byte*) mode_8bpppixelcell::PLANEA PLANEA = (byte*) 15360
(const byte*) mode_8bpppixelcell::PLANEB PLANEB = (byte*) 16384
(byte) mode_8bpppixelcell::ax
@ -944,8 +942,7 @@
(byte) mode_stdbitmap::l
(byte) mode_stdbitmap::l#1 l zp ZP_BYTE:14 202.0
(byte) mode_stdbitmap::l#2 l zp ZP_BYTE:14 101.0
(byte) mode_stdbitmap::lines_cnt
(const byte) mode_stdbitmap::lines_cnt#0 lines_cnt = (byte) 9
(const byte) mode_stdbitmap::lines_cnt lines_cnt = (byte) 9
(const byte[]) mode_stdbitmap::lines_x lines_x = { (byte) 0, (byte) $ff, (byte) $ff, (byte) 0, (byte) 0, (byte) $80, (byte) $ff, (byte) $80, (byte) 0, (byte) $80 }
(const byte[]) mode_stdbitmap::lines_y lines_y = { (byte) 0, (byte) 0, (byte) $c7, (byte) $c7, (byte) 0, (byte) 0, (byte) $64, (byte) $c7, (byte) $64, (byte) 0 }
(void()) mode_stdchar()

View File

@ -27,7 +27,7 @@ main::@return: scope:[main] from main::@2
(void()) print((word) print::w)
print: scope:[print] from main main::@1 main::@2
[11] (word) print::w#3 ← phi( main/(word) $1234 main::@1/(const word) main::w#0 main::@2/(byte) $12*(word) $100+(byte) $34 )
[11] (word) print::w#3 ← phi( main/(word) $1234 main::@1/(const word) main::w main::@2/(byte) $12*(word) $100+(byte) $34 )
[11] (byte) idx#12 ← phi( main/(byte) 0 main::@1/(byte) idx#13 main::@2/(byte) idx#13 )
[12] (byte~) print::$0 ← (byte) idx#12 << (byte) 1
[13] *((const word*) SCREEN + (byte~) print::$0) ← (word) print::w#3

View File

@ -8,14 +8,14 @@ CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from @2
(byte) idx#15 ← phi( @2/(byte) idx#16 )
(word) main::w#0 ← (number) $1234
(word) main::w ← (number) $1234
(word) print::w#0 ← (number) $1234
call print
to:main::@1
main::@1: scope:[main] from main
(byte) idx#8 ← phi( main/(byte) idx#6 )
(byte) idx#0 ← (byte) idx#8
(word) print::w#1 ← (word) main::w#0
(word) print::w#1 ← (word) main::w
call print
to:main::@2
main::@2: scope:[main] from main::@1
@ -93,7 +93,6 @@ SYMBOL TABLE SSA
(label) main::@3
(label) main::@return
(word) main::w
(word) main::w#0
(void()) print((word) print::w)
(byte~) print::$0
(label) print::@return
@ -105,11 +104,11 @@ SYMBOL TABLE SSA
Fixing inline constructor with main::$3 ← (byte)$12 w= (byte)$34
Successful SSA optimization Pass2FixInlineConstructors
Adding number conversion cast (unumber) $1234 in (word) main::w#0 ← (number) $1234
Adding number conversion cast (unumber) $1234 in (word) main::w ← (number) $1234
Adding number conversion cast (unumber) $1234 in (word) print::w#0 ← (number) $1234
Adding number conversion cast (unumber) 0 in (byte) idx#4 ← (number) 0
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (word) main::w#0 ← (unumber)(number) $1234
Inlining cast (word) main::w ← (unumber)(number) $1234
Inlining cast (word) print::w#0 ← (unumber)(number) $1234
Inlining cast (word*) SCREEN ← (word*)(number) $400
Inlining cast (byte) idx#4 ← (unumber)(number) 0
@ -141,12 +140,12 @@ Identical Phi Values (byte) idx#14 (byte) idx#10
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [10] (word) print::w#2 ← (byte) $12 w= (byte) $34
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const word) main::w#0 = $1234
Constant (const word) main::w = $1234
Constant (const word) print::w#0 = $1234
Constant (const word*) SCREEN = (word*) 1024
Constant (const byte) idx#16 = 0
Successful SSA optimization Pass2ConstantIdentification
Constant (const word) print::w#1 = main::w#0
Constant (const word) print::w#1 = main::w
Successful SSA optimization Pass2ConstantIdentification
Adding number conversion cast (unumber) $12*$100+$34 in (word) print::w#2 ← (byte) $12*(number) $100+(byte) $34
Adding number conversion cast (unumber) $12*$100 in (word) print::w#2 ← ((unumber)) (byte) $12*(number) $100+(byte) $34
@ -169,7 +168,7 @@ Inlining constant with var siblings (const word) print::w#1
Inlining constant with var siblings (const word) print::w#2
Inlining constant with var siblings (const byte) idx#16
Constant inlined print::w#2 = (byte) $12*(word) $100+(byte) $34
Constant inlined print::w#1 = (const word) main::w#0
Constant inlined print::w#1 = (const word) main::w
Constant inlined print::w#0 = (word) $1234
Constant inlined idx#16 = (byte) 0
Successful SSA optimization Pass2ConstantInlining
@ -231,7 +230,7 @@ main::@return: scope:[main] from main::@2
(void()) print((word) print::w)
print: scope:[print] from main main::@1 main::@2
[11] (word) print::w#3 ← phi( main/(word) $1234 main::@1/(const word) main::w#0 main::@2/(byte) $12*(word) $100+(byte) $34 )
[11] (word) print::w#3 ← phi( main/(word) $1234 main::@1/(const word) main::w main::@2/(byte) $12*(word) $100+(byte) $34 )
[11] (byte) idx#12 ← phi( main/(byte) 0 main::@1/(byte) idx#13 main::@2/(byte) idx#13 )
[12] (byte~) print::$0 ← (byte) idx#12 << (byte) 1
[13] *((const word*) SCREEN + (byte~) print::$0) ← (word) print::w#3
@ -247,7 +246,6 @@ VARIABLE REGISTER WEIGHTS
(byte) idx#12 2.6666666666666665
(byte) idx#13 1.0
(void()) main()
(word) main::w
(void()) print((word) print::w)
(byte~) print::$0 4.0
(word) print::w
@ -315,7 +313,7 @@ main: {
// [7] call print
// [11] phi from main::@1 to print [phi:main::@1->print]
print_from_b1:
// [11] phi (word) print::w#3 = (const word) main::w#0 [phi:main::@1->print#0] -- vwuz1=vwuc1
// [11] phi (word) print::w#3 = (const word) main::w [phi:main::@1->print#0] -- vwuz1=vwuc1
lda #<w
sta.z print.w
lda #>w
@ -435,7 +433,7 @@ main: {
// [7] call print
// [11] phi from main::@1 to print [phi:main::@1->print]
print_from_b1:
// [11] phi (word) print::w#3 = (const word) main::w#0 [phi:main::@1->print#0] -- vwuz1=vwuc1
// [11] phi (word) print::w#3 = (const word) main::w [phi:main::@1->print#0] -- vwuz1=vwuc1
lda #<w
sta.z print.w
lda #>w
@ -528,8 +526,7 @@ FINAL SYMBOL TABLE
(label) main::@1
(label) main::@2
(label) main::@return
(word) main::w
(const word) main::w#0 w = (word) $1234
(const word) main::w w = (word) $1234
(void()) print((word) print::w)
(byte~) print::$0 reg byte a 4.0
(label) print::@return
@ -578,7 +575,7 @@ main: {
// print(w)
// [7] call print
// [11] phi from main::@1 to print [phi:main::@1->print]
// [11] phi (word) print::w#3 = (const word) main::w#0 [phi:main::@1->print#0] -- vwuz1=vwuc1
// [11] phi (word) print::w#3 = (const word) main::w [phi:main::@1->print#0] -- vwuz1=vwuc1
lda #<w
sta.z print.w
lda #>w

View File

@ -9,8 +9,7 @@
(label) main::@1
(label) main::@2
(label) main::@return
(word) main::w
(const word) main::w#0 w = (word) $1234
(const word) main::w w = (word) $1234
(void()) print((word) print::w)
(byte~) print::$0 reg byte a 4.0
(label) print::@return

View File

@ -14,7 +14,7 @@ main: scope:[main] from @1
to:main::@1
main::@1: scope:[main] from main main::@1
[5] (byte) main::i#2 ← phi( main/(byte) 0 main::@1/(byte) main::i#1 )
[6] *((const byte*) main::SCREEN#0 + (byte) main::i#2) ← (byte)*((const signed byte[]) main::sbs + (byte) main::i#2)
[6] *((const byte*) main::SCREEN + (byte) main::i#2) ← (byte)*((const signed byte[]) main::sbs + (byte) main::i#2)
[7] (byte) main::i#1 ← ++ (byte) main::i#2
[8] if((byte) main::i#1!=(byte) 4) goto main::@1
to:main::@return

View File

@ -8,13 +8,13 @@ CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from @1
(signed byte[]) main::sbs ← { (number) -1, (number) -2, (number) -3, (number) -4 }
(byte*) main::SCREEN#0 ← ((byte*)) (number) $400
(byte*) main::SCREEN ← ((byte*)) (number) $400
(byte) main::i#0 ← (byte) 0
to:main::@1
main::@1: scope:[main] from main main::@1
(byte) main::i#2 ← phi( main/(byte) main::i#0 main::@1/(byte) main::i#1 )
(byte~) main::$0 ← ((byte)) *((signed byte[]) main::sbs + (byte) main::i#2)
*((byte*) main::SCREEN#0 + (byte) main::i#2) ← (byte~) main::$0
*((byte*) main::SCREEN + (byte) main::i#2) ← (byte~) main::$0
(byte) main::i#1 ← (byte) main::i#2 + rangenext(0,3)
(bool~) main::$1 ← (byte) main::i#1 != rangelast(0,3)
if((bool~) main::$1) goto main::@1
@ -40,7 +40,6 @@ SYMBOL TABLE SSA
(label) main::@1
(label) main::@return
(byte*) main::SCREEN
(byte*) main::SCREEN#0
(byte) main::i
(byte) main::i#0
(byte) main::i#1
@ -49,7 +48,7 @@ SYMBOL TABLE SSA
Added casts to value list in (signed byte[]) main::sbs ← (signed byte[]){ (signed byte)(number) -1, (signed byte)(number) -2, (signed byte)(number) -3, (signed byte)(number) -4 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (byte*) main::SCREEN#0 ← (byte*)(number) $400
Inlining cast (byte*) main::SCREEN ← (byte*)(number) $400
Inlining cast (byte~) main::$0 ← (byte)*((signed byte[]) main::sbs + (byte) main::i#2)
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast -1
@ -63,7 +62,7 @@ Successful SSA optimization Pass2ConditionalJumpSimplification
Identified constant from value list (signed byte[]) { (signed byte) -1, (signed byte) -2, (signed byte) -3, (signed byte) -4 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const signed byte[]) main::sbs = { -1, -2, -3, -4 }
Constant (const byte*) main::SCREEN#0 = (byte*) 1024
Constant (const byte*) main::SCREEN = (byte*) 1024
Constant (const byte) main::i#0 = 0
Successful SSA optimization Pass2ConstantIdentification
Resolved ranged next value [6] main::i#1 ← ++ main::i#2 to ++
@ -115,7 +114,7 @@ main: scope:[main] from @1
to:main::@1
main::@1: scope:[main] from main main::@1
[5] (byte) main::i#2 ← phi( main/(byte) 0 main::@1/(byte) main::i#1 )
[6] *((const byte*) main::SCREEN#0 + (byte) main::i#2) ← (byte)*((const signed byte[]) main::sbs + (byte) main::i#2)
[6] *((const byte*) main::SCREEN + (byte) main::i#2) ← (byte)*((const signed byte[]) main::sbs + (byte) main::i#2)
[7] (byte) main::i#1 ← ++ (byte) main::i#2
[8] if((byte) main::i#1!=(byte) 4) goto main::@1
to:main::@return
@ -126,7 +125,6 @@ main::@return: scope:[main] from main::@1
VARIABLE REGISTER WEIGHTS
(void()) main()
(byte*) main::SCREEN
(byte) main::i
(byte) main::i#1 16.5
(byte) main::i#2 16.5
@ -178,7 +176,7 @@ main: {
jmp b1
// main::@1
b1:
// [6] *((const byte*) main::SCREEN#0 + (byte) main::i#2) ← (byte)*((const signed byte[]) main::sbs + (byte) main::i#2) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz1
// [6] *((const byte*) main::SCREEN + (byte) main::i#2) ← (byte)*((const signed byte[]) main::sbs + (byte) main::i#2) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz1
ldy.z i
lda sbs,y
sta SCREEN,y
@ -198,9 +196,9 @@ main: {
// File Data
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [6] *((const byte*) main::SCREEN#0 + (byte) main::i#2) ← (byte)*((const signed byte[]) main::sbs + (byte) main::i#2) [ main::i#2 ] ( main:2 [ main::i#2 ] ) always clobbers reg byte a
Statement [6] *((const byte*) main::SCREEN + (byte) main::i#2) ← (byte)*((const signed byte[]) main::sbs + (byte) main::i#2) [ main::i#2 ] ( main:2 [ main::i#2 ] ) 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 ]
Statement [6] *((const byte*) main::SCREEN#0 + (byte) main::i#2) ← (byte)*((const signed byte[]) main::sbs + (byte) main::i#2) [ main::i#2 ] ( main:2 [ main::i#2 ] ) always clobbers reg byte a
Statement [6] *((const byte*) main::SCREEN + (byte) main::i#2) ← (byte)*((const signed byte[]) main::sbs + (byte) main::i#2) [ main::i#2 ] ( main:2 [ main::i#2 ] ) 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 ,
REGISTER UPLIFT SCOPES
@ -248,7 +246,7 @@ main: {
jmp b1
// main::@1
b1:
// [6] *((const byte*) main::SCREEN#0 + (byte) main::i#2) ← (byte)*((const signed byte[]) main::sbs + (byte) main::i#2) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx
// [6] *((const byte*) main::SCREEN + (byte) main::i#2) ← (byte)*((const signed byte[]) main::sbs + (byte) main::i#2) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx
lda sbs,x
sta SCREEN,x
// [7] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx
@ -297,8 +295,7 @@ FINAL SYMBOL TABLE
(void()) main()
(label) main::@1
(label) main::@return
(byte*) main::SCREEN
(const byte*) main::SCREEN#0 SCREEN = (byte*) 1024
(const byte*) main::SCREEN SCREEN = (byte*) 1024
(byte) main::i
(byte) main::i#1 reg byte x 16.5
(byte) main::i#2 reg byte x 16.5
@ -335,7 +332,7 @@ main: {
// main::@1
b1:
// SCREEN[i] = (byte) sbs[i]
// [6] *((const byte*) main::SCREEN#0 + (byte) main::i#2) ← (byte)*((const signed byte[]) main::sbs + (byte) main::i#2) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx
// [6] *((const byte*) main::SCREEN + (byte) main::i#2) ← (byte)*((const signed byte[]) main::sbs + (byte) main::i#2) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx
lda sbs,x
sta SCREEN,x
// for(byte i : 0..3)

View File

@ -4,8 +4,7 @@
(void()) main()
(label) main::@1
(label) main::@return
(byte*) main::SCREEN
(const byte*) main::SCREEN#0 SCREEN = (byte*) 1024
(const byte*) main::SCREEN SCREEN = (byte*) 1024
(byte) main::i
(byte) main::i#1 reg byte x 16.5
(byte) main::i#2 reg byte x 16.5

View File

@ -20,7 +20,7 @@ main::spritePtr1: scope:[main] from main::getScreen1
[7] (byte) main::spritePtr1_return#0 ← *((byte*~) main::spritePtr1_$0)
to:main::@1
main::@1: scope:[main] from main::spritePtr1
[8] *((const byte*) main::DSP#0) ← (byte) main::spritePtr1_return#0
[8] *((const byte*) main::DSP) ← (byte) main::spritePtr1_return#0
to:main::@return
main::@return: scope:[main] from main::@1
[9] return

View File

@ -16,7 +16,7 @@ CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from @3
(byte*) main::DSP#0 ← ((byte*)) (number) $400
(byte*) main::DSP ← ((byte*)) (number) $400
(byte) main::getScreen1_id#0 ← (number) 0
to:main::getScreen1
main::getScreen1: scope:[main] from main
@ -46,7 +46,7 @@ main::spritePtr1_@return: scope:[main] from main::spritePtr1
main::@2: scope:[main] from main::spritePtr1_@return
(byte) main::spritePtr1_return#3 ← phi( main::spritePtr1_@return/(byte) main::spritePtr1_return#1 )
(byte~) main::$1 ← (byte) main::spritePtr1_return#3
*((byte*) main::DSP#0 + (number) 0) ← (byte~) main::$1
*((byte*) main::DSP + (number) 0) ← (byte~) main::$1
to:main::@return
main::@return: scope:[main] from main::@2
return
@ -73,7 +73,6 @@ SYMBOL TABLE SSA
(label) main::@2
(label) main::@return
(byte*) main::DSP
(byte*) main::DSP#0
(label) main::getScreen1
(byte~) main::getScreen1_$0
(label) main::getScreen1_@return
@ -101,11 +100,11 @@ SYMBOL TABLE SSA
Adding number conversion cast (unumber) 0 in (byte) main::getScreen1_id#0 ← (number) 0
Adding number conversion cast (unumber) $378 in (byte*~) main::spritePtr1_$0 ← (byte*) main::spritePtr1_screen#1 + (number) $378
Adding number conversion cast (unumber) 0 in *((byte*) main::DSP#0 + (number) 0) ← (byte~) main::$1
Adding number conversion cast (unumber) 0 in *((byte*) main::DSP + (number) 0) ← (byte~) main::$1
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*~) $0 ← (byte*)(number) $400
Inlining cast (byte*~) $1 ← (byte*)(number) $1400
Inlining cast (byte*) main::DSP#0 ← (byte*)(number) $400
Inlining cast (byte*) main::DSP ← (byte*)(number) $400
Inlining cast (byte) main::getScreen1_id#0 ← (unumber)(number) 0
Inlining cast (byte~) main::spritePtr1_$1 ← (byte)*((byte*~) main::spritePtr1_$0)
Successful SSA optimization Pass2InlineCast
@ -127,10 +126,10 @@ Alias (byte) main::spritePtr1_return#0 = (byte~) main::spritePtr1_$1 (byte) main
Successful SSA optimization Pass2AliasElimination
Constant (const byte*) $0 = (byte*) 1024
Constant (const byte*) $1 = (byte*) 5120
Constant (const byte*) main::DSP#0 = (byte*) 1024
Constant (const byte*) main::DSP = (byte*) 1024
Constant (const byte) main::getScreen1_id#0 = 0
Successful SSA optimization Pass2ConstantIdentification
Simplifying expression containing zero main::DSP#0 in [21] *((const byte*) main::DSP#0 + (byte) 0) ← (byte) main::spritePtr1_return#0
Simplifying expression containing zero main::DSP in [21] *((const byte*) main::DSP + (byte) 0) ← (byte) main::spritePtr1_return#0
Successful SSA optimization PassNSimplifyExpressionWithZero
Constant right-side identified [1] (byte~) main::getScreen1_$0 ← (const byte) main::getScreen1_id#0 * (const byte) SIZEOF_POINTER
Successful SSA optimization Pass2ConstantRValueConsolidation
@ -197,7 +196,7 @@ main::spritePtr1: scope:[main] from main::getScreen1
[7] (byte) main::spritePtr1_return#0 ← *((byte*~) main::spritePtr1_$0)
to:main::@1
main::@1: scope:[main] from main::spritePtr1
[8] *((const byte*) main::DSP#0) ← (byte) main::spritePtr1_return#0
[8] *((const byte*) main::DSP) ← (byte) main::spritePtr1_return#0
to:main::@return
main::@return: scope:[main] from main::@1
[9] return
@ -206,7 +205,6 @@ main::@return: scope:[main] from main::@1
VARIABLE REGISTER WEIGHTS
(void()) main()
(byte*) main::DSP
(byte) main::getScreen1_id
(byte*) main::getScreen1_return
(byte*) main::getScreen1_return#0 4.0
@ -284,7 +282,7 @@ main: {
jmp b1
// main::@1
b1:
// [8] *((const byte*) main::DSP#0) ← (byte) main::spritePtr1_return#0 -- _deref_pbuc1=vbuz1
// [8] *((const byte*) main::DSP) ← (byte) main::spritePtr1_return#0 -- _deref_pbuc1=vbuz1
lda.z spritePtr1_return
sta DSP
jmp breturn
@ -366,7 +364,7 @@ main: {
jmp b1
// main::@1
b1:
// [8] *((const byte*) main::DSP#0) ← (byte) main::spritePtr1_return#0 -- _deref_pbuc1=vbuaa
// [8] *((const byte*) main::DSP) ← (byte) main::spritePtr1_return#0 -- _deref_pbuc1=vbuaa
sta DSP
jmp breturn
// main::@return
@ -409,8 +407,7 @@ FINAL SYMBOL TABLE
(void()) main()
(label) main::@1
(label) main::@return
(byte*) main::DSP
(const byte*) main::DSP#0 DSP = (byte*) 1024
(const byte*) main::DSP DSP = (byte*) 1024
(label) main::getScreen1
(byte) main::getScreen1_id
(byte*) main::getScreen1_return
@ -471,7 +468,7 @@ main: {
lda (spritePtr1__0),y
// main::@1
// DSP[0] = spritePtr(getScreen(0))
// [8] *((const byte*) main::DSP#0) ← (byte) main::spritePtr1_return#0 -- _deref_pbuc1=vbuaa
// [8] *((const byte*) main::DSP) ← (byte) main::spritePtr1_return#0 -- _deref_pbuc1=vbuaa
sta DSP
// main::@return
// }

View File

@ -4,8 +4,7 @@
(void()) main()
(label) main::@1
(label) main::@return
(byte*) main::DSP
(const byte*) main::DSP#0 DSP = (byte*) 1024
(const byte*) main::DSP DSP = (byte*) 1024
(label) main::getScreen1
(byte) main::getScreen1_id
(byte*) main::getScreen1_return

View File

@ -10,7 +10,7 @@
(void()) main()
main: scope:[main] from @1
[4] *((const byte*) main::sprite_ptr#0) ← (byte)(const byte*) sprite#0/(byte) $40
[4] *((const byte*) main::sprite_ptr#0) ← (byte)(const byte*) sprite/(byte) $40
to:main::@return
main::@return: scope:[main] from main
[5] return

View File

@ -3,15 +3,15 @@ Identified constant variable (byte*) SCREEN
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
(byte*) sprite#0 ← ((byte*)) (number) $5000
(byte*) SCREEN#0 ← ((byte*)) (number) $4400
(byte*) sprite ← ((byte*)) (number) $5000
(byte*) SCREEN ← ((byte*)) (number) $4400
to:@1
(void()) main()
main: scope:[main] from @1
(byte*~) main::$0 ← (byte*) SCREEN#0 + (number) $378
(byte*~) main::$0 ← (byte*) SCREEN + (number) $378
(byte*) main::sprite_ptr#0 ← (byte*~) main::$0
(byte*~) main::$1 ← (byte*) sprite#0 / (number) $40
(byte*~) main::$1 ← (byte*) sprite / (number) $40
(byte~) main::$2 ← ((byte)) (byte*~) main::$1
*((byte*) main::sprite_ptr#0 + (number) 0) ← (byte~) main::$2
to:main::@return
@ -31,7 +31,6 @@ SYMBOL TABLE SSA
(label) @begin
(label) @end
(byte*) SCREEN
(byte*) SCREEN#0
(void()) main()
(byte*~) main::$0
(byte*~) main::$1
@ -40,14 +39,13 @@ SYMBOL TABLE SSA
(byte*) main::sprite_ptr
(byte*) main::sprite_ptr#0
(byte*) sprite
(byte*) sprite#0
Adding number conversion cast (unumber) $378 in (byte*~) main::$0 ← (byte*) SCREEN#0 + (number) $378
Adding number conversion cast (unumber) $40 in (byte*~) main::$1 ← (byte*) sprite#0 / (number) $40
Adding number conversion cast (unumber) $378 in (byte*~) main::$0 ← (byte*) SCREEN + (number) $378
Adding number conversion cast (unumber) $40 in (byte*~) main::$1 ← (byte*) sprite / (number) $40
Adding number conversion cast (unumber) 0 in *((byte*) main::sprite_ptr#0 + (number) 0) ← (byte~) main::$2
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) sprite#0 ← (byte*)(number) $5000
Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $4400
Inlining cast (byte*) sprite ← (byte*)(number) $5000
Inlining cast (byte*) SCREEN ← (byte*)(number) $4400
Inlining cast (byte~) main::$2 ← (byte)(byte*~) main::$1
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 20480
@ -62,23 +60,23 @@ Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias (byte*) main::sprite_ptr#0 = (byte*~) main::$0
Successful SSA optimization Pass2AliasElimination
Constant (const byte*) sprite#0 = (byte*) 20480
Constant (const byte*) SCREEN#0 = (byte*) 17408
Constant (const byte*) sprite = (byte*) 20480
Constant (const byte*) SCREEN = (byte*) 17408
Successful SSA optimization Pass2ConstantIdentification
Simplifying expression containing zero main::sprite_ptr#0 in [6] *((byte*) main::sprite_ptr#0 + (byte) 0) ← (byte~) main::$2
Successful SSA optimization PassNSimplifyExpressionWithZero
Constant right-side identified [0] (byte*) main::sprite_ptr#0 ← (const byte*) SCREEN#0 + (word) $378
Constant right-side identified [1] (byte*~) main::$1 ← (const byte*) sprite#0 / (byte) $40
Constant right-side identified [0] (byte*) main::sprite_ptr#0 ← (const byte*) SCREEN + (word) $378
Constant right-side identified [1] (byte*~) main::$1 ← (const byte*) sprite / (byte) $40
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte*) main::sprite_ptr#0 = SCREEN#0+$378
Constant (const byte*) main::$1 = sprite#0/$40
Constant (const byte*) main::sprite_ptr#0 = SCREEN+$378
Constant (const byte*) main::$1 = sprite/$40
Successful SSA optimization Pass2ConstantIdentification
Constant value identified (byte)main::$1 in [2] (byte~) main::$2 ← (byte)(const byte*) main::$1
Successful SSA optimization Pass2ConstantValues
Constant (const byte) main::$2 = (byte)main::$1
Successful SSA optimization Pass2ConstantIdentification
Constant inlined main::$1 = (const byte*) sprite#0/(byte) $40
Constant inlined main::$2 = (byte)(const byte*) sprite#0/(byte) $40
Constant inlined main::$1 = (const byte*) sprite/(byte) $40
Constant inlined main::$2 = (byte)(const byte*) sprite/(byte) $40
Successful SSA optimization Pass2ConstantInlining
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @1
@ -107,7 +105,7 @@ FINAL CONTROL FLOW GRAPH
(void()) main()
main: scope:[main] from @1
[4] *((const byte*) main::sprite_ptr#0) ← (byte)(const byte*) sprite#0/(byte) $40
[4] *((const byte*) main::sprite_ptr#0) ← (byte)(const byte*) sprite/(byte) $40
to:main::@return
main::@return: scope:[main] from main
[5] return
@ -115,10 +113,8 @@ main::@return: scope:[main] from main
VARIABLE REGISTER WEIGHTS
(byte*) SCREEN
(void()) main()
(byte*) main::sprite_ptr
(byte*) sprite
Initial phi equivalence classes
Complete equivalence classes
@ -151,7 +147,7 @@ bend:
// main
main: {
.label sprite_ptr = SCREEN+$378
// [4] *((const byte*) main::sprite_ptr#0) ← (byte)(const byte*) sprite#0/(byte) $40 -- _deref_pbuc1=vbuc2
// [4] *((const byte*) main::sprite_ptr#0) ← (byte)(const byte*) sprite/(byte) $40 -- _deref_pbuc1=vbuc2
lda #$ff&sprite/$40
sta sprite_ptr
jmp breturn
@ -163,7 +159,7 @@ main: {
// File Data
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [4] *((const byte*) main::sprite_ptr#0) ← (byte)(const byte*) sprite#0/(byte) $40 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [4] *((const byte*) main::sprite_ptr#0) ← (byte)(const byte*) sprite/(byte) $40 [ ] ( main:2 [ ] ) always clobbers reg byte a
REGISTER UPLIFT SCOPES
Uplift Scope [main]
@ -199,7 +195,7 @@ bend:
// main
main: {
.label sprite_ptr = SCREEN+$378
// [4] *((const byte*) main::sprite_ptr#0) ← (byte)(const byte*) sprite#0/(byte) $40 -- _deref_pbuc1=vbuc2
// [4] *((const byte*) main::sprite_ptr#0) ← (byte)(const byte*) sprite/(byte) $40 -- _deref_pbuc1=vbuc2
lda #$ff&sprite/$40
sta sprite_ptr
jmp breturn
@ -232,14 +228,12 @@ FINAL SYMBOL TABLE
(label) @1
(label) @begin
(label) @end
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = (byte*) 17408
(const byte*) SCREEN SCREEN = (byte*) 17408
(void()) main()
(label) main::@return
(byte*) main::sprite_ptr
(const byte*) main::sprite_ptr#0 sprite_ptr = (const byte*) SCREEN#0+(word) $378
(byte*) sprite
(const byte*) sprite#0 sprite = (byte*) 20480
(const byte*) main::sprite_ptr#0 sprite_ptr = (const byte*) SCREEN+(word) $378
(const byte*) sprite sprite = (byte*) 20480
@ -265,7 +259,7 @@ Score: 12
main: {
.label sprite_ptr = SCREEN+$378
// sprite_ptr[0] = (byte)(sprite/$40)
// [4] *((const byte*) main::sprite_ptr#0) ← (byte)(const byte*) sprite#0/(byte) $40 -- _deref_pbuc1=vbuc2
// [4] *((const byte*) main::sprite_ptr#0) ← (byte)(const byte*) sprite/(byte) $40 -- _deref_pbuc1=vbuc2
lda #$ff&sprite/$40
sta sprite_ptr
// main::@return

View File

@ -1,12 +1,10 @@
(label) @1
(label) @begin
(label) @end
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = (byte*) 17408
(const byte*) SCREEN SCREEN = (byte*) 17408
(void()) main()
(label) main::@return
(byte*) main::sprite_ptr
(const byte*) main::sprite_ptr#0 sprite_ptr = (const byte*) SCREEN#0+(word) $378
(byte*) sprite
(const byte*) sprite#0 sprite = (byte*) 20480
(const byte*) main::sprite_ptr#0 sprite_ptr = (const byte*) SCREEN+(word) $378
(const byte*) sprite sprite = (byte*) 20480

View File

@ -10,16 +10,16 @@
(void()) main()
main: scope:[main] from @1
[4] *((const byte*) main::SCREEN#0) ← (const byte) main::midw#0
[5] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) main::midb#0
[6] if(*((const byte*) main::SCREEN#0)==*((const byte*) main::SCREEN#0+(byte) 1)) goto main::@1
[4] *((const byte*) main::SCREEN) ← (const byte) main::midw#0
[5] *((const byte*) main::SCREEN+(byte) 1) ← (const byte) main::midb#0
[6] if(*((const byte*) main::SCREEN)==*((const byte*) main::SCREEN+(byte) 1)) goto main::@1
to:main::@2
main::@2: scope:[main] from main
[7] *((const byte*) main::BGCOL#0) ← (byte) 2
[7] *((const byte*) main::BGCOL) ← (byte) 2
to:main::@return
main::@return: scope:[main] from main::@1 main::@2
[8] return
to:@return
main::@1: scope:[main] from main
[9] *((const byte*) main::BGCOL#0) ← (byte) 5
[9] *((const byte*) main::BGCOL) ← (byte) 5
to:main::@return

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