1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2025-04-22 03:38:31 +00:00

Removed old @begin / @end global blocks. Now using __start(), __init(). Closes

This commit is contained in:
jespergravgaard 2020-06-27 22:36:52 +02:00
parent 64d2d99488
commit c1b22d345e
1000 changed files with 21473 additions and 21494 deletions
src
main/java/dk/camelot64/kickc
test/ref
address-0.asmaddress-0.cfgaddress-0.logaddress-0.symaddress-1.logaddress-2.asmaddress-2.cfgaddress-2.logaddress-2.symaddress-3.logaddress-4.logaddress-5.asmaddress-5.cfgaddress-5.logaddress-5.symaddress-6.asmaddress-6.cfgaddress-6.logaddress-6.symaddress-8.logaddress-9.logaddress-of-0.logaddress-of-1.logaddress-of-2.asmaddress-of-2.cfgaddress-of-2.logaddress-of-2.symaddress-of-3.logarray-16bit-lookup.logarray-length-symbolic-min.logarray-length-symbolic.logarrays-init-kasm-0.logarrays-init-kasm-1.logarrays-init-short.logarrays-init.logasm-culling-jmp.logasm-mnemonic-names.logasm-uses-0.logassignment-chained.logassignment-compound.logatoi-1.asmatoi-1.cfgatoi-1.logatoi-1.symbgblack.logbitmap-circle-2.logbitmap-circle.logbitmap-line-anim-1.logbitmap-line-anim-2.logbitmap-plot-0.asmbitmap-plot-0.cfgbitmap-plot-0.logbitmap-plot-0.symbitmap-plot-1.asmbitmap-plot-1.cfgbitmap-plot-1.logbitmap-plot-1.symbitmap-plot-2.asmbitmap-plot-2.cfgbitmap-plot-2.logbitmap-plot-2.symbitmap-plot-3.logbitmap-plotter.logbitwise-not.logbool-const.logbool-function.logbool-ifs-min.logbool-ifs.logbool-nullpointer-exception.logbool-pointer.logbool-vars.logbresenham.logbresenhamarr.logc-types.logc64dtv-8bppcharstretch.logc64dtv-8bppchunkystretch.logc64dtv-blitter-box.logc64dtv-blittermin.logc64dtv-color.logc64dtv-gfxexplorer.logc64dtv-gfxmodes.logcall-parameter-autocast.logcallconstparam.logcast-deref.logcast-not-needed-2.logcast-not-needed-3.logcast-not-needed.logcast-precedence-problem.logcasting.logchargen.logchessboard.logcia-timer-cyclecount.logcia-timer-simple.logcirclechars.asmcirclechars.cfgcirclechars.logcirclechars.sym

@ -8,12 +8,10 @@ import java.util.Objects;
/** A reference to a symbol (variable, procedure or label) */
public class SymbolRef implements Value {
public static final String BEGIN_BLOCK_NAME = "@begin";
public static final String END_BLOCK_NAME = "@end";
public static final String PROCEXIT_BLOCK_NAME = "@return";
public static final String MAIN_PROC_NAME = "main";
public static final String START_PROC_NAME = "_start";
public static final String INIT_PROC_NAME = "_init";
public static final String START_PROC_NAME = "__start";
public static final String INIT_PROC_NAME = "__init";
/** The full name of the variable. Allowing lookup in the symbol table. */
private String fullName;
@ -74,8 +72,6 @@ public class SymbolRef implements Value {
}
public boolean isIntermediate() {
if( fullName.contains(BEGIN_BLOCK_NAME) || fullName.contains(END_BLOCK_NAME))
return false;
return fullName.contains("$") || fullName.contains("@");
}

@ -31,16 +31,8 @@ public class Pass3LoopDepthAnalysis extends Pass2Base {
Set<ScopeRef> done = new LinkedHashSet<>();
List<ControlFlowBlock> entryPointBlocks = getGraph().getEntryPointBlocks(getProgram());
for(ControlFlowBlock entryPointBlock : entryPointBlocks) {
LabelRef label = entryPointBlock.getLabel();
ScopeRef scope;
if(label.getFullName().equals(LabelRef.BEGIN_BLOCK_NAME)) {
scope = ScopeRef.ROOT;
} else {
scope = entryPointBlock.getScope();
}
todo.push(scope);
}
for(ControlFlowBlock entryPointBlock : entryPointBlocks)
todo.push(entryPointBlock.getScope());
while(!todo.isEmpty()) {
ScopeRef currentScope = todo.pop();
@ -78,19 +70,19 @@ public class Pass3LoopDepthAnalysis extends Pass2Base {
Collection<NaturalLoop> callingLoops = loopSet.getLoopsContainingBlock(callingControlBlock.getLabel());
for(NaturalLoop callingLoop : callingLoops) {
Integer depth = callingLoop.getDepth();
if(depth!=null) {
if(depth != null) {
int potentialDepth = depth + 1;
if(potentialDepth > callingDepth) {
callingDepth = potentialDepth;
}
} else {
getLog().append("null depth in calling loop "+callingLoop.toString()+" in scope "+currentScope);
getLog().append("null depth in calling loop " + callingLoop.toString() + " in scope " + currentScope);
}
}
// Also look through all callers
int superCallingDepth = getCallingDepth(callingScope, path);
if(superCallingDepth>callingDepth) {
callingDepth= superCallingDepth;
if(superCallingDepth > callingDepth) {
callingDepth = superCallingDepth;
}
}
}

@ -1,11 +1,12 @@
package dk.camelot64.kickc.passes.calcs;
import dk.camelot64.kickc.model.InternalError;
import dk.camelot64.kickc.model.*;
import dk.camelot64.kickc.model.ControlFlowBlock;
import dk.camelot64.kickc.model.DominatorsBlock;
import dk.camelot64.kickc.model.DominatorsGraph;
import dk.camelot64.kickc.model.Program;
import dk.camelot64.kickc.model.symbols.Procedure;
import dk.camelot64.kickc.model.symbols.Scope;
import dk.camelot64.kickc.model.values.LabelRef;
import dk.camelot64.kickc.model.values.ScopeRef;
import java.util.ArrayList;
import java.util.Collection;
@ -35,27 +36,17 @@ public class PassNCalcDominators extends PassNCalcBase<DominatorsGraph> {
for(Procedure procedure : procedures) {
calculateDominators(procedure, dominatorsGraph);
}
calculateDominators(getScope(), dominatorsGraph);
return dominatorsGraph;
}
private void calculateDominators(Scope scope, DominatorsGraph dominatorsGraph) {
// Initialize dominators: Dom[first]={first}, Dom[block]={all}
List<LabelRef> firstBlocks = new ArrayList<>();
LabelRef firstBlock;
if(scope instanceof Procedure) {
firstBlock = ((Procedure)scope).getRef().getLabelRef();
} else if(scope.getRef().equals(ScopeRef.ROOT)) {
firstBlock = new LabelRef(LabelRef.BEGIN_BLOCK_NAME);
} else {
throw new InternalError("Scope type not handled! "+scope);
}
LabelRef firstBlock = ((Procedure) scope).getRef().getLabelRef();
DominatorsBlock firstDominators = dominatorsGraph.addDominators(firstBlock);
firstDominators.add(firstBlock);
firstBlocks.add(firstBlock);
List<LabelRef> procedureBlocks = getGraph().getScopeBlocks(scope.getRef()).stream().map(ControlFlowBlock::getLabel).collect(Collectors.toList());
for(LabelRef procedureBlock : procedureBlocks) {
if(!firstBlocks.contains(procedureBlock)) {

@ -1,11 +1,11 @@
// Test that address vars are turned into load/store and located at hardcoded addresses
// Hard-coded zero-page address - global variable
.pc = $801 "Basic"
:BasicUpstart(_start)
:BasicUpstart(__start)
.pc = $80d "Program"
.label SCREEN = $400
.label i = 2
_start: {
__start: {
// i = 3
lda #3
sta.z i

@ -1,21 +1,21 @@
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
[0] phi()
to:_start::_init1
_start::_init1: scope:[_start] from _start
to:__start::__init1
__start::__init1: scope:[__start] from __start
[1] (byte) i ← (byte) 3
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
[2] phi()
[3] call main
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@return
__start::@return: scope:[__start] from __start::@1
[4] return
to:@return
(void()) main()
main: scope:[main] from _start::@1
main: scope:[main] from __start::@1
[5] phi()
to:main::@1
main::@1: scope:[main] from main main::@2

@ -1,9 +1,9 @@
Inlined call call _init
Inlined call call __init
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start::@1
main: scope:[main] from __start::@1
to:main::@1
main::@1: scope:[main] from main main::@2
(bool~) main::$0 ← (byte) i < (number) 7
@ -17,28 +17,28 @@ main::@return: scope:[main] from main::@1
return
to:@return
(void()) _start()
_start: scope:[_start] from
to:_start::_init1
_start::_init1: scope:[_start] from _start
(void()) __start()
__start: scope:[__start] from
to:__start::__init1
__start::__init1: scope:[__start] from __start
(byte) i ← (byte) 3
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
call main
to:_start::@2
_start::@2: scope:[_start] from _start::@1
to:_start::@return
_start::@return: scope:[_start] from _start::@2
to:__start::@2
__start::@2: scope:[__start] from __start::@1
to:__start::@return
__start::@return: scope:[__start] from __start::@2
return
to:@return
SYMBOL TABLE SSA
(const nomodify byte*) SCREEN = (byte*)(number) $400
(void()) _start()
(label) _start::@1
(label) _start::@2
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@2
(label) __start::@return
(label) __start::__init1
(byte) i loadstore !zp[-1]:2
(void()) main()
(bool~) main::$0
@ -55,39 +55,39 @@ Finalized unsigned number type (byte) 7
Successful SSA optimization PassNFinalizeNumberTypeConversions
Simple Condition (bool~) main::$0 [1] if((byte) i<(byte) 7) goto main::@2
Successful SSA optimization Pass2ConditionalJumpSimplification
Adding NOP phi() at start of _start
Adding NOP phi() at start of _start::@1
Adding NOP phi() at start of _start::@2
Adding NOP phi() at start of __start
Adding NOP phi() at start of __start::@1
Adding NOP phi() at start of __start::@2
Adding NOP phi() at start of main
CALL GRAPH
Calls in [_start] to main:3
Calls in [__start] to main:3
Created 0 initial phi equivalence classes
Coalesced down to 0 phi equivalence classes
Culled Empty Block (label) _start::@2
Adding NOP phi() at start of _start
Adding NOP phi() at start of _start::@1
Culled Empty Block (label) __start::@2
Adding NOP phi() at start of __start
Adding NOP phi() at start of __start::@1
Adding NOP phi() at start of main
FINAL CONTROL FLOW GRAPH
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
[0] phi()
to:_start::_init1
_start::_init1: scope:[_start] from _start
to:__start::__init1
__start::__init1: scope:[__start] from __start
[1] (byte) i ← (byte) 3
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
[2] phi()
[3] call main
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@return
__start::@return: scope:[__start] from __start::@1
[4] return
to:@return
(void()) main()
main: scope:[main] from _start::@1
main: scope:[main] from __start::@1
[5] phi()
to:main::@1
main::@1: scope:[main] from main main::@2
@ -103,7 +103,7 @@ main::@2: scope:[main] from main::@1
VARIABLE REGISTER WEIGHTS
(void()) _start()
(void()) __start()
(byte) i loadstore !zp[-1]:2 84.49999999999999
(void()) main()
@ -119,30 +119,30 @@ Target platform is c64basic / MOS6502X
// Hard-coded zero-page address - global variable
// Upstart
.pc = $801 "Basic"
:BasicUpstart(_start)
:BasicUpstart(__start)
.pc = $80d "Program"
// Global Constants & labels
.label SCREEN = $400
.label i = 2
// _start
_start: {
jmp _init1
// _start::_init1
_init1:
// __start
__start: {
jmp __init1
// __start::__init1
__init1:
// [1] (byte) i ← (byte) 3 -- vbuz1=vbuc1
lda #3
sta.z i
// [2] phi from _start::_init1 to _start::@1 [phi:_start::_init1->_start::@1]
__b1_from__init1:
// [2] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1]
__b1_from___init1:
jmp __b1
// _start::@1
// __start::@1
__b1:
// [3] call main
// [5] phi from _start::@1 to main [phi:_start::@1->main]
// [5] phi from __start::@1 to main [phi:__start::@1->main]
main_from___b1:
jsr main
jmp __breturn
// _start::@return
// __start::@return
__breturn:
// [4] return
rts
@ -182,11 +182,11 @@ Potential registers zp[1]:2 [ i ] : zp[1]:2 ,
REGISTER UPLIFT SCOPES
Uplift Scope [] 84.5: zp[1]:2 [ i ]
Uplift Scope [main]
Uplift Scope [_start]
Uplift Scope [__start]
Uplifting [] best 374 combination zp[1]:2 [ i ]
Uplifting [main] best 374 combination
Uplifting [_start] best 374 combination
Uplifting [__start] best 374 combination
Attempting to uplift remaining variables inzp[1]:2 [ i ]
Uplifting [] best 374 combination zp[1]:2 [ i ]
@ -196,30 +196,30 @@ ASSEMBLER BEFORE OPTIMIZATION
// Hard-coded zero-page address - global variable
// Upstart
.pc = $801 "Basic"
:BasicUpstart(_start)
:BasicUpstart(__start)
.pc = $80d "Program"
// Global Constants & labels
.label SCREEN = $400
.label i = 2
// _start
_start: {
jmp _init1
// _start::_init1
_init1:
// __start
__start: {
jmp __init1
// __start::__init1
__init1:
// [1] (byte) i ← (byte) 3 -- vbuz1=vbuc1
lda #3
sta.z i
// [2] phi from _start::_init1 to _start::@1 [phi:_start::_init1->_start::@1]
__b1_from__init1:
// [2] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1]
__b1_from___init1:
jmp __b1
// _start::@1
// __start::@1
__b1:
// [3] call main
// [5] phi from _start::@1 to main [phi:_start::@1->main]
// [5] phi from __start::@1 to main [phi:__start::@1->main]
main_from___b1:
jsr main
jmp __breturn
// _start::@return
// __start::@return
__breturn:
// [4] return
rts
@ -251,16 +251,16 @@ main: {
// File Data
ASSEMBLER OPTIMIZATIONS
Removing instruction jmp _init1
Removing instruction jmp __init1
Removing instruction jmp __b1
Removing instruction jmp __breturn
Removing instruction jmp __b1
Removing instruction jmp __breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction __b1_from__init1:
Removing instruction __b1_from___init1:
Removing instruction main_from___b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction _init1:
Removing instruction __init1:
Removing instruction __b1:
Removing instruction __breturn:
Removing instruction __breturn:
@ -268,10 +268,10 @@ Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(const nomodify byte*) SCREEN = (byte*) 1024
(void()) _start()
(label) _start::@1
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@return
(label) __start::__init1
(byte) i loadstore !zp[-1]:2 zp[1]:2 84.49999999999999
(void()) main()
(label) main::@1
@ -289,24 +289,24 @@ Score: 278
// Hard-coded zero-page address - global variable
// Upstart
.pc = $801 "Basic"
:BasicUpstart(_start)
:BasicUpstart(__start)
.pc = $80d "Program"
// Global Constants & labels
.label SCREEN = $400
.label i = 2
// _start
_start: {
// _start::_init1
// __start
__start: {
// __start::__init1
// i = 3
// [1] (byte) i ← (byte) 3 -- vbuz1=vbuc1
lda #3
sta.z i
// [2] phi from _start::_init1 to _start::@1 [phi:_start::_init1->_start::@1]
// _start::@1
// [2] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1]
// __start::@1
// [3] call main
// [5] phi from _start::@1 to main [phi:_start::@1->main]
// [5] phi from __start::@1 to main [phi:__start::@1->main]
jsr main
// _start::@return
// __start::@return
// [4] return
rts
}

@ -1,8 +1,8 @@
(const nomodify byte*) SCREEN = (byte*) 1024
(void()) _start()
(label) _start::@1
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@return
(label) __start::__init1
(byte) i loadstore !zp[-1]:2 zp[1]:2 84.49999999999999
(void()) main()
(label) main::@1

@ -2,7 +2,7 @@
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start
main: scope:[main] from __start
(byte) main::i ← (byte) 3
to:main::@1
main::@1: scope:[main] from main main::@2
@ -17,21 +17,21 @@ main::@return: scope:[main] from main::@1
return
to:@return
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
call main
to:_start::@1
_start::@1: scope:[_start] from _start
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@1
__start::@1: scope:[__start] from __start
to:__start::@return
__start::@return: scope:[__start] from __start::@1
return
to:@return
SYMBOL TABLE SSA
(const nomodify byte*) SCREEN = (byte*)(number) $400
(void()) _start()
(label) _start::@1
(label) _start::@return
(void()) __start()
(label) __start::@1
(label) __start::@return
(void()) main()
(bool~) main::$0
(label) main::@1
@ -48,10 +48,10 @@ Finalized unsigned number type (byte) 7
Successful SSA optimization PassNFinalizeNumberTypeConversions
Simple Condition (bool~) main::$0 [2] if((byte) main::i<(byte) 7) goto main::@2
Successful SSA optimization Pass2ConditionalJumpSimplification
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::@1
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
CALL GRAPH

@ -1,11 +1,11 @@
// Test that address vars are turned into load/store and located at hardcoded addresses
// Hard-coded mainmem-page address - global variable
.pc = $801 "Basic"
:BasicUpstart(_start)
:BasicUpstart(__start)
.pc = $80d "Program"
.label SCREEN = $400
.label i = $2000
_start: {
__start: {
// i = 3
lda #3
sta i

@ -1,21 +1,21 @@
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
[0] phi()
to:_start::_init1
_start::_init1: scope:[_start] from _start
to:__start::__init1
__start::__init1: scope:[__start] from __start
[1] (byte) i ← (byte) 3
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
[2] phi()
[3] call main
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@return
__start::@return: scope:[__start] from __start::@1
[4] return
to:@return
(void()) main()
main: scope:[main] from _start::@1
main: scope:[main] from __start::@1
[5] phi()
to:main::@1
main::@1: scope:[main] from main main::@2

@ -1,9 +1,9 @@
Inlined call call _init
Inlined call call __init
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start::@1
main: scope:[main] from __start::@1
to:main::@1
main::@1: scope:[main] from main main::@2
(bool~) main::$0 ← (byte) i < (number) 7
@ -17,28 +17,28 @@ main::@return: scope:[main] from main::@1
return
to:@return
(void()) _start()
_start: scope:[_start] from
to:_start::_init1
_start::_init1: scope:[_start] from _start
(void()) __start()
__start: scope:[__start] from
to:__start::__init1
__start::__init1: scope:[__start] from __start
(byte) i ← (byte) 3
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
call main
to:_start::@2
_start::@2: scope:[_start] from _start::@1
to:_start::@return
_start::@return: scope:[_start] from _start::@2
to:__start::@2
__start::@2: scope:[__start] from __start::@1
to:__start::@return
__start::@return: scope:[__start] from __start::@2
return
to:@return
SYMBOL TABLE SSA
(const nomodify byte*) SCREEN = (byte*)(number) $400
(void()) _start()
(label) _start::@1
(label) _start::@2
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@2
(label) __start::@return
(label) __start::__init1
(byte) i loadstore !mem[-1]:8192
(void()) main()
(bool~) main::$0
@ -55,39 +55,39 @@ Finalized unsigned number type (byte) 7
Successful SSA optimization PassNFinalizeNumberTypeConversions
Simple Condition (bool~) main::$0 [1] if((byte) i<(byte) 7) goto main::@2
Successful SSA optimization Pass2ConditionalJumpSimplification
Adding NOP phi() at start of _start
Adding NOP phi() at start of _start::@1
Adding NOP phi() at start of _start::@2
Adding NOP phi() at start of __start
Adding NOP phi() at start of __start::@1
Adding NOP phi() at start of __start::@2
Adding NOP phi() at start of main
CALL GRAPH
Calls in [_start] to main:3
Calls in [__start] to main:3
Created 0 initial phi equivalence classes
Coalesced down to 0 phi equivalence classes
Culled Empty Block (label) _start::@2
Adding NOP phi() at start of _start
Adding NOP phi() at start of _start::@1
Culled Empty Block (label) __start::@2
Adding NOP phi() at start of __start
Adding NOP phi() at start of __start::@1
Adding NOP phi() at start of main
FINAL CONTROL FLOW GRAPH
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
[0] phi()
to:_start::_init1
_start::_init1: scope:[_start] from _start
to:__start::__init1
__start::__init1: scope:[__start] from __start
[1] (byte) i ← (byte) 3
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
[2] phi()
[3] call main
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@return
__start::@return: scope:[__start] from __start::@1
[4] return
to:@return
(void()) main()
main: scope:[main] from _start::@1
main: scope:[main] from __start::@1
[5] phi()
to:main::@1
main::@1: scope:[main] from main main::@2
@ -103,7 +103,7 @@ main::@2: scope:[main] from main::@1
VARIABLE REGISTER WEIGHTS
(void()) _start()
(void()) __start()
(byte) i loadstore !mem[-1]:8192 84.49999999999999
(void()) main()
@ -119,30 +119,30 @@ Target platform is c64basic / MOS6502X
// Hard-coded mainmem-page address - global variable
// Upstart
.pc = $801 "Basic"
:BasicUpstart(_start)
:BasicUpstart(__start)
.pc = $80d "Program"
// Global Constants & labels
.label SCREEN = $400
.label i = $2000
// _start
_start: {
jmp _init1
// _start::_init1
_init1:
// __start
__start: {
jmp __init1
// __start::__init1
__init1:
// [1] (byte) i ← (byte) 3 -- vbum1=vbuc1
lda #3
sta i
// [2] phi from _start::_init1 to _start::@1 [phi:_start::_init1->_start::@1]
__b1_from__init1:
// [2] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1]
__b1_from___init1:
jmp __b1
// _start::@1
// __start::@1
__b1:
// [3] call main
// [5] phi from _start::@1 to main [phi:_start::@1->main]
// [5] phi from __start::@1 to main [phi:__start::@1->main]
main_from___b1:
jsr main
jmp __breturn
// _start::@return
// __start::@return
__breturn:
// [4] return
rts
@ -182,11 +182,11 @@ Potential registers mem[1]:8192 [ i ] : mem[1]:8192 ,
REGISTER UPLIFT SCOPES
Uplift Scope [] 84.5: mem[1]:8192 [ i ]
Uplift Scope [main]
Uplift Scope [_start]
Uplift Scope [__start]
Uplifting [] best 405 combination mem[1]:8192 [ i ]
Uplifting [main] best 405 combination
Uplifting [_start] best 405 combination
Uplifting [__start] best 405 combination
Attempting to uplift remaining variables inmem[1]:8192 [ i ]
Uplifting [] best 405 combination mem[1]:8192 [ i ]
@ -196,30 +196,30 @@ ASSEMBLER BEFORE OPTIMIZATION
// Hard-coded mainmem-page address - global variable
// Upstart
.pc = $801 "Basic"
:BasicUpstart(_start)
:BasicUpstart(__start)
.pc = $80d "Program"
// Global Constants & labels
.label SCREEN = $400
.label i = $2000
// _start
_start: {
jmp _init1
// _start::_init1
_init1:
// __start
__start: {
jmp __init1
// __start::__init1
__init1:
// [1] (byte) i ← (byte) 3 -- vbum1=vbuc1
lda #3
sta i
// [2] phi from _start::_init1 to _start::@1 [phi:_start::_init1->_start::@1]
__b1_from__init1:
// [2] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1]
__b1_from___init1:
jmp __b1
// _start::@1
// __start::@1
__b1:
// [3] call main
// [5] phi from _start::@1 to main [phi:_start::@1->main]
// [5] phi from __start::@1 to main [phi:__start::@1->main]
main_from___b1:
jsr main
jmp __breturn
// _start::@return
// __start::@return
__breturn:
// [4] return
rts
@ -251,16 +251,16 @@ main: {
// File Data
ASSEMBLER OPTIMIZATIONS
Removing instruction jmp _init1
Removing instruction jmp __init1
Removing instruction jmp __b1
Removing instruction jmp __breturn
Removing instruction jmp __b1
Removing instruction jmp __breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction __b1_from__init1:
Removing instruction __b1_from___init1:
Removing instruction main_from___b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction _init1:
Removing instruction __init1:
Removing instruction __b1:
Removing instruction __breturn:
Removing instruction __breturn:
@ -268,10 +268,10 @@ Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(const nomodify byte*) SCREEN = (byte*) 1024
(void()) _start()
(label) _start::@1
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@return
(label) __start::__init1
(byte) i loadstore !mem[-1]:8192 mem[1]:8192 84.49999999999999
(void()) main()
(label) main::@1
@ -289,24 +289,24 @@ Score: 309
// Hard-coded mainmem-page address - global variable
// Upstart
.pc = $801 "Basic"
:BasicUpstart(_start)
:BasicUpstart(__start)
.pc = $80d "Program"
// Global Constants & labels
.label SCREEN = $400
.label i = $2000
// _start
_start: {
// _start::_init1
// __start
__start: {
// __start::__init1
// i = 3
// [1] (byte) i ← (byte) 3 -- vbum1=vbuc1
lda #3
sta i
// [2] phi from _start::_init1 to _start::@1 [phi:_start::_init1->_start::@1]
// _start::@1
// [2] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1]
// __start::@1
// [3] call main
// [5] phi from _start::@1 to main [phi:_start::@1->main]
// [5] phi from __start::@1 to main [phi:__start::@1->main]
jsr main
// _start::@return
// __start::@return
// [4] return
rts
}

@ -1,8 +1,8 @@
(const nomodify byte*) SCREEN = (byte*) 1024
(void()) _start()
(label) _start::@1
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@return
(label) __start::__init1
(byte) i loadstore !mem[-1]:8192 mem[1]:8192 84.49999999999999
(void()) main()
(label) main::@1

@ -2,7 +2,7 @@
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start
main: scope:[main] from __start
(byte) main::i ← (byte) 3
to:main::@1
main::@1: scope:[main] from main main::@2
@ -17,21 +17,21 @@ main::@return: scope:[main] from main::@1
return
to:@return
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
call main
to:_start::@1
_start::@1: scope:[_start] from _start
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@1
__start::@1: scope:[__start] from __start
to:__start::@return
__start::@return: scope:[__start] from __start::@1
return
to:@return
SYMBOL TABLE SSA
(const nomodify byte*) SCREEN = (byte*)(number) $400
(void()) _start()
(label) _start::@1
(label) _start::@return
(void()) __start()
(label) __start::@1
(label) __start::@return
(void()) main()
(bool~) main::$0
(label) main::@1
@ -48,10 +48,10 @@ Finalized unsigned number type (byte) 7
Successful SSA optimization PassNFinalizeNumberTypeConversions
Simple Condition (bool~) main::$0 [2] if((byte) main::i<(byte) 7) goto main::@2
Successful SSA optimization Pass2ConditionalJumpSimplification
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::@1
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
CALL GRAPH

@ -1,9 +1,9 @@
Inlined call call _init
Inlined call call __init
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start::@1
main: scope:[main] from __start::@1
(byte) main::i ← (byte) 0
to:main::@1
main::@1: scope:[main] from main main::@2
@ -22,28 +22,28 @@ main::@return: scope:[main] from main::@1
return
to:@return
(void()) _start()
_start: scope:[_start] from
to:_start::_init1
_start::_init1: scope:[_start] from _start
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
(void()) __start()
__start: scope:[__start] from
to:__start::__init1
__start::__init1: scope:[__start] from __start
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
call main
to:_start::@2
_start::@2: scope:[_start] from _start::@1
to:_start::@return
_start::@return: scope:[_start] from _start::@2
to:__start::@2
__start::@2: scope:[__start] from __start::@1
to:__start::@return
__start::@return: scope:[__start] from __start::@2
return
to:@return
SYMBOL TABLE SSA
(const word*) SCREEN = (word*)(number) $400
(const byte) SIZEOF_WORD = (byte) 2
(void()) _start()
(label) _start::@1
(label) _start::@2
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@2
(label) __start::@return
(label) __start::__init1
(void()) main()
(bool~) main::$0
(byte~) main::$1
@ -63,12 +63,12 @@ Finalized unsigned number type (byte) 8
Successful SSA optimization PassNFinalizeNumberTypeConversions
Simple Condition (bool~) main::$0 [2] if((byte) main::i<(byte) 8) goto main::@2
Successful SSA optimization Pass2ConditionalJumpSimplification
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::_init1
Removing unused procedure block _start::@1
Removing unused procedure block _start::@2
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::__init1
Removing unused procedure block __start::@1
Removing unused procedure block __start::@2
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Rewriting multiplication to use shift [2] (byte~) main::$1 ← (byte) main::i * (const byte) SIZEOF_WORD
Rewriting multiplication to use shift [5] (byte~) main::$2 ← (byte) main::i * (const byte) SIZEOF_WORD

@ -1,11 +1,11 @@
// Test declaring a variable as at a hard-coded address
// zero-page hard-coded address parameter
.pc = $801 "Basic"
:BasicUpstart(_start)
:BasicUpstart(__start)
.pc = $80d "Program"
.label SCREEN = $400
.label idx = 3
_start: {
__start: {
// idx
lda #0
sta.z idx

@ -1,21 +1,21 @@
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
[0] phi()
to:_start::_init1
_start::_init1: scope:[_start] from _start
to:__start::__init1
__start::__init1: scope:[__start] from __start
[1] (volatile byte) idx ← (byte) 0
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
[2] phi()
[3] call main
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@return
__start::@return: scope:[__start] from __start::@1
[4] return
to:@return
(void()) main()
main: scope:[main] from _start::@1
main: scope:[main] from __start::@1
[5] (byte) print::ch ← (byte) 'c'
[6] call print
to:main::@1

@ -1,9 +1,9 @@
Inlined call call _init
Inlined call call __init
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start::@1
main: scope:[main] from __start::@1
(byte) print::ch ← (byte) 'c'
call print
to:main::@1
@ -29,28 +29,28 @@ print::@return: scope:[print] from print
return
to:@return
(void()) _start()
_start: scope:[_start] from
to:_start::_init1
_start::_init1: scope:[_start] from _start
(void()) __start()
__start: scope:[__start] from
to:__start::__init1
__start::__init1: scope:[__start] from __start
(volatile byte) idx ← (byte) 0
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
call main
to:_start::@2
_start::@2: scope:[_start] from _start::@1
to:_start::@return
_start::@return: scope:[_start] from _start::@2
to:__start::@2
__start::@2: scope:[__start] from __start::@1
to:__start::@return
__start::@return: scope:[__start] from __start::@2
return
to:@return
SYMBOL TABLE SSA
(const nomodify byte*) SCREEN = (byte*)(number) $400
(void()) _start()
(label) _start::@1
(label) _start::@2
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@2
(label) __start::@return
(label) __start::__init1
(volatile byte) idx loadstore !zp[-1]:3
(void()) main()
(label) main::@1
@ -63,40 +63,40 @@ SYMBOL TABLE SSA
Simplifying constant pointer cast (byte*) 1024
Successful SSA optimization PassNCastSimplification
Adding NOP phi() at start of _start
Adding NOP phi() at start of _start::@1
Adding NOP phi() at start of _start::@2
Adding NOP phi() at start of __start
Adding NOP phi() at start of __start::@1
Adding NOP phi() at start of __start::@2
Adding NOP phi() at start of main::@3
CALL GRAPH
Calls in [_start] to main:3
Calls in [__start] to main:3
Calls in [main] to print:7 print:9 print:11
Created 0 initial phi equivalence classes
Coalesced down to 0 phi equivalence classes
Culled Empty Block (label) _start::@2
Culled Empty Block (label) __start::@2
Culled Empty Block (label) main::@3
Adding NOP phi() at start of _start
Adding NOP phi() at start of _start::@1
Adding NOP phi() at start of __start
Adding NOP phi() at start of __start::@1
FINAL CONTROL FLOW GRAPH
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
[0] phi()
to:_start::_init1
_start::_init1: scope:[_start] from _start
to:__start::__init1
__start::__init1: scope:[__start] from __start
[1] (volatile byte) idx ← (byte) 0
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
[2] phi()
[3] call main
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@return
__start::@return: scope:[__start] from __start::@1
[4] return
to:@return
(void()) main()
main: scope:[main] from _start::@1
main: scope:[main] from __start::@1
[5] (byte) print::ch ← (byte) 'c'
[6] call print
to:main::@1
@ -122,7 +122,7 @@ print::@return: scope:[print] from print
VARIABLE REGISTER WEIGHTS
(void()) _start()
(void()) __start()
(volatile byte) idx loadstore !zp[-1]:3 0.2222222222222222
(void()) main()
(void()) print((byte) print::ch)
@ -142,28 +142,28 @@ Target platform is c64basic / MOS6502X
// zero-page hard-coded address parameter
// Upstart
.pc = $801 "Basic"
:BasicUpstart(_start)
:BasicUpstart(__start)
.pc = $80d "Program"
// Global Constants & labels
.label SCREEN = $400
.label idx = 3
// _start
_start: {
jmp _init1
// _start::_init1
_init1:
// __start
__start: {
jmp __init1
// __start::__init1
__init1:
// [1] (volatile byte) idx ← (byte) 0 -- vbuz1=vbuc1
lda #0
sta.z idx
// [2] phi from _start::_init1 to _start::@1 [phi:_start::_init1->_start::@1]
__b1_from__init1:
// [2] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1]
__b1_from___init1:
jmp __b1
// _start::@1
// __start::@1
__b1:
// [3] call main
jsr main
jmp __breturn
// _start::@return
// __start::@return
__breturn:
// [4] return
rts
@ -227,12 +227,12 @@ REGISTER UPLIFT SCOPES
Uplift Scope [print] 11: zp[1]:2 [ print::ch ]
Uplift Scope [] 0.22: zp[1]:3 [ idx ]
Uplift Scope [main]
Uplift Scope [_start]
Uplift Scope [__start]
Uplifting [print] best 129 combination zp[1]:2 [ print::ch ]
Uplifting [] best 129 combination zp[1]:3 [ idx ]
Uplifting [main] best 129 combination
Uplifting [_start] best 129 combination
Uplifting [__start] best 129 combination
Attempting to uplift remaining variables inzp[1]:2 [ print::ch ]
Uplifting [print] best 129 combination zp[1]:2 [ print::ch ]
Attempting to uplift remaining variables inzp[1]:3 [ idx ]
@ -244,28 +244,28 @@ ASSEMBLER BEFORE OPTIMIZATION
// zero-page hard-coded address parameter
// Upstart
.pc = $801 "Basic"
:BasicUpstart(_start)
:BasicUpstart(__start)
.pc = $80d "Program"
// Global Constants & labels
.label SCREEN = $400
.label idx = 3
// _start
_start: {
jmp _init1
// _start::_init1
_init1:
// __start
__start: {
jmp __init1
// __start::__init1
__init1:
// [1] (volatile byte) idx ← (byte) 0 -- vbuz1=vbuc1
lda #0
sta.z idx
// [2] phi from _start::_init1 to _start::@1 [phi:_start::_init1->_start::@1]
__b1_from__init1:
// [2] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1]
__b1_from___init1:
jmp __b1
// _start::@1
// __start::@1
__b1:
// [3] call main
jsr main
jmp __breturn
// _start::@return
// __start::@return
__breturn:
// [4] return
rts
@ -317,7 +317,7 @@ print: {
// File Data
ASSEMBLER OPTIMIZATIONS
Removing instruction jmp _init1
Removing instruction jmp __init1
Removing instruction jmp __b1
Removing instruction jmp __breturn
Removing instruction jmp __b1
@ -325,9 +325,9 @@ Removing instruction jmp __b2
Removing instruction jmp __breturn
Removing instruction jmp __breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction __b1_from__init1:
Removing instruction __b1_from___init1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction _init1:
Removing instruction __init1:
Removing instruction __b1:
Removing instruction __breturn:
Removing instruction __b1:
@ -338,10 +338,10 @@ Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(const nomodify byte*) SCREEN = (byte*) 1024
(void()) _start()
(label) _start::@1
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@return
(label) __start::__init1
(volatile byte) idx loadstore !zp[-1]:3 zp[1]:3 0.2222222222222222
(void()) main()
(label) main::@1
@ -363,23 +363,23 @@ Score: 81
// zero-page hard-coded address parameter
// Upstart
.pc = $801 "Basic"
:BasicUpstart(_start)
:BasicUpstart(__start)
.pc = $80d "Program"
// Global Constants & labels
.label SCREEN = $400
.label idx = 3
// _start
_start: {
// _start::_init1
// __start
__start: {
// __start::__init1
// idx
// [1] (volatile byte) idx ← (byte) 0 -- vbuz1=vbuc1
lda #0
sta.z idx
// [2] phi from _start::_init1 to _start::@1 [phi:_start::_init1->_start::@1]
// _start::@1
// [2] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1]
// __start::@1
// [3] call main
jsr main
// _start::@return
// __start::@return
// [4] return
rts
}

@ -1,8 +1,8 @@
(const nomodify byte*) SCREEN = (byte*) 1024
(void()) _start()
(label) _start::@1
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@return
(label) __start::__init1
(volatile byte) idx loadstore !zp[-1]:3 zp[1]:3 0.2222222222222222
(void()) main()
(label) main::@1

@ -1,11 +1,11 @@
// Test declaring a variable as at a hard-coded address
// mainmem-page hard-coded address parameter
.pc = $801 "Basic"
:BasicUpstart(_start)
:BasicUpstart(__start)
.pc = $80d "Program"
.label SCREEN = $400
.label idx = $3000
_start: {
__start: {
// idx
lda #0
sta idx

@ -1,21 +1,21 @@
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
[0] phi()
to:_start::_init1
_start::_init1: scope:[_start] from _start
to:__start::__init1
__start::__init1: scope:[__start] from __start
[1] (volatile byte) idx ← (byte) 0
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
[2] phi()
[3] call main
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@return
__start::@return: scope:[__start] from __start::@1
[4] return
to:@return
(void()) main()
main: scope:[main] from _start::@1
main: scope:[main] from __start::@1
[5] (byte) print::ch ← (byte) 'c'
[6] call print
to:main::@1

@ -1,9 +1,9 @@
Inlined call call _init
Inlined call call __init
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start::@1
main: scope:[main] from __start::@1
(byte) print::ch ← (byte) 'c'
call print
to:main::@1
@ -29,28 +29,28 @@ print::@return: scope:[print] from print
return
to:@return
(void()) _start()
_start: scope:[_start] from
to:_start::_init1
_start::_init1: scope:[_start] from _start
(void()) __start()
__start: scope:[__start] from
to:__start::__init1
__start::__init1: scope:[__start] from __start
(volatile byte) idx ← (byte) 0
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
call main
to:_start::@2
_start::@2: scope:[_start] from _start::@1
to:_start::@return
_start::@return: scope:[_start] from _start::@2
to:__start::@2
__start::@2: scope:[__start] from __start::@1
to:__start::@return
__start::@return: scope:[__start] from __start::@2
return
to:@return
SYMBOL TABLE SSA
(const nomodify byte*) SCREEN = (byte*)(number) $400
(void()) _start()
(label) _start::@1
(label) _start::@2
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@2
(label) __start::@return
(label) __start::__init1
(volatile byte) idx loadstore !mem[-1]:12288
(void()) main()
(label) main::@1
@ -63,40 +63,40 @@ SYMBOL TABLE SSA
Simplifying constant pointer cast (byte*) 1024
Successful SSA optimization PassNCastSimplification
Adding NOP phi() at start of _start
Adding NOP phi() at start of _start::@1
Adding NOP phi() at start of _start::@2
Adding NOP phi() at start of __start
Adding NOP phi() at start of __start::@1
Adding NOP phi() at start of __start::@2
Adding NOP phi() at start of main::@3
CALL GRAPH
Calls in [_start] to main:3
Calls in [__start] to main:3
Calls in [main] to print:7 print:9 print:11
Created 0 initial phi equivalence classes
Coalesced down to 0 phi equivalence classes
Culled Empty Block (label) _start::@2
Culled Empty Block (label) __start::@2
Culled Empty Block (label) main::@3
Adding NOP phi() at start of _start
Adding NOP phi() at start of _start::@1
Adding NOP phi() at start of __start
Adding NOP phi() at start of __start::@1
FINAL CONTROL FLOW GRAPH
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
[0] phi()
to:_start::_init1
_start::_init1: scope:[_start] from _start
to:__start::__init1
__start::__init1: scope:[__start] from __start
[1] (volatile byte) idx ← (byte) 0
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
[2] phi()
[3] call main
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@return
__start::@return: scope:[__start] from __start::@1
[4] return
to:@return
(void()) main()
main: scope:[main] from _start::@1
main: scope:[main] from __start::@1
[5] (byte) print::ch ← (byte) 'c'
[6] call print
to:main::@1
@ -122,7 +122,7 @@ print::@return: scope:[print] from print
VARIABLE REGISTER WEIGHTS
(void()) _start()
(void()) __start()
(volatile byte) idx loadstore !mem[-1]:12288 0.2222222222222222
(void()) main()
(void()) print((byte) print::ch)
@ -142,28 +142,28 @@ Target platform is c64basic / MOS6502X
// mainmem-page hard-coded address parameter
// Upstart
.pc = $801 "Basic"
:BasicUpstart(_start)
:BasicUpstart(__start)
.pc = $80d "Program"
// Global Constants & labels
.label SCREEN = $400
.label idx = $3000
// _start
_start: {
jmp _init1
// _start::_init1
_init1:
// __start
__start: {
jmp __init1
// __start::__init1
__init1:
// [1] (volatile byte) idx ← (byte) 0 -- vbum1=vbuc1
lda #0
sta idx
// [2] phi from _start::_init1 to _start::@1 [phi:_start::_init1->_start::@1]
__b1_from__init1:
// [2] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1]
__b1_from___init1:
jmp __b1
// _start::@1
// __start::@1
__b1:
// [3] call main
jsr main
jmp __breturn
// _start::@return
// __start::@return
__breturn:
// [4] return
rts
@ -227,12 +227,12 @@ REGISTER UPLIFT SCOPES
Uplift Scope [print] 11: mem[1]:12289 [ print::ch ]
Uplift Scope [] 0.22: mem[1]:12288 [ idx ]
Uplift Scope [main]
Uplift Scope [_start]
Uplift Scope [__start]
Uplifting [print] best 133 combination mem[1]:12289 [ print::ch ]
Uplifting [] best 133 combination mem[1]:12288 [ idx ]
Uplifting [main] best 133 combination
Uplifting [_start] best 133 combination
Uplifting [__start] best 133 combination
Attempting to uplift remaining variables inmem[1]:12289 [ print::ch ]
Uplifting [print] best 133 combination mem[1]:12289 [ print::ch ]
Attempting to uplift remaining variables inmem[1]:12288 [ idx ]
@ -244,28 +244,28 @@ ASSEMBLER BEFORE OPTIMIZATION
// mainmem-page hard-coded address parameter
// Upstart
.pc = $801 "Basic"
:BasicUpstart(_start)
:BasicUpstart(__start)
.pc = $80d "Program"
// Global Constants & labels
.label SCREEN = $400
.label idx = $3000
// _start
_start: {
jmp _init1
// _start::_init1
_init1:
// __start
__start: {
jmp __init1
// __start::__init1
__init1:
// [1] (volatile byte) idx ← (byte) 0 -- vbum1=vbuc1
lda #0
sta idx
// [2] phi from _start::_init1 to _start::@1 [phi:_start::_init1->_start::@1]
__b1_from__init1:
// [2] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1]
__b1_from___init1:
jmp __b1
// _start::@1
// __start::@1
__b1:
// [3] call main
jsr main
jmp __breturn
// _start::@return
// __start::@return
__breturn:
// [4] return
rts
@ -317,7 +317,7 @@ print: {
// File Data
ASSEMBLER OPTIMIZATIONS
Removing instruction jmp _init1
Removing instruction jmp __init1
Removing instruction jmp __b1
Removing instruction jmp __breturn
Removing instruction jmp __b1
@ -325,9 +325,9 @@ Removing instruction jmp __b2
Removing instruction jmp __breturn
Removing instruction jmp __breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction __b1_from__init1:
Removing instruction __b1_from___init1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction _init1:
Removing instruction __init1:
Removing instruction __b1:
Removing instruction __breturn:
Removing instruction __b1:
@ -338,10 +338,10 @@ Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(const nomodify byte*) SCREEN = (byte*) 1024
(void()) _start()
(label) _start::@1
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@return
(label) __start::__init1
(volatile byte) idx loadstore !mem[-1]:12288 mem[1]:12288 0.2222222222222222
(void()) main()
(label) main::@1
@ -363,23 +363,23 @@ Score: 85
// mainmem-page hard-coded address parameter
// Upstart
.pc = $801 "Basic"
:BasicUpstart(_start)
:BasicUpstart(__start)
.pc = $80d "Program"
// Global Constants & labels
.label SCREEN = $400
.label idx = $3000
// _start
_start: {
// _start::_init1
// __start
__start: {
// __start::__init1
// idx
// [1] (volatile byte) idx ← (byte) 0 -- vbum1=vbuc1
lda #0
sta idx
// [2] phi from _start::_init1 to _start::@1 [phi:_start::_init1->_start::@1]
// _start::@1
// [2] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1]
// __start::@1
// [3] call main
jsr main
// _start::@return
// __start::@return
// [4] return
rts
}

@ -1,8 +1,8 @@
(const nomodify byte*) SCREEN = (byte*) 1024
(void()) _start()
(label) _start::@1
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@return
(label) __start::__init1
(volatile byte) idx loadstore !mem[-1]:12288 mem[1]:12288 0.2222222222222222
(void()) main()
(label) main::@1

@ -2,29 +2,29 @@
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start
main: scope:[main] from __start
*((const nomodify byte*) SCREEN + (number) 0) ← *((const byte*) DATA + (number) 0)
to:main::@return
main::@return: scope:[main] from main
return
to:@return
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
call main
to:_start::@1
_start::@1: scope:[_start] from _start
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@1
__start::@1: scope:[__start] from __start
to:__start::@return
__start::@return: scope:[__start] from __start::@1
return
to:@return
SYMBOL TABLE SSA
(const byte*) DATA[(number) $3e8] = { fill( $3e8, 0) }
(const nomodify byte*) SCREEN = (byte*)(number) $400
(void()) _start()
(label) _start::@1
(label) _start::@return
(void()) __start()
(label) __start::@1
(label) __start::@return
(void()) main()
(label) main::@return
@ -41,10 +41,10 @@ Successful SSA optimization PassNFinalizeNumberTypeConversions
Simplifying expression containing zero DATA in [0] *((const nomodify byte*) SCREEN + (byte) 0) ← *((const byte*) DATA + (byte) 0)
Simplifying expression containing zero SCREEN in [0] *((const nomodify byte*) SCREEN + (byte) 0) ← *((const byte*) DATA)
Successful SSA optimization PassNSimplifyExpressionWithZero
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::@1
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
CALL GRAPH

@ -2,7 +2,7 @@
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start
main: scope:[main] from __start
(number~) main::$0 ← (number) 0 * (const byte) SIZEOF_SIGNED_WORD
*((const nomodify signed word*) SCREEN + (number~) main::$0) ← *((const signed word*) DATA + (number~) main::$0)
to:main::@return
@ -10,13 +10,13 @@ main::@return: scope:[main] from main
return
to:@return
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
call main
to:_start::@1
_start::@1: scope:[_start] from _start
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@1
__start::@1: scope:[__start] from __start
to:__start::@return
__start::@return: scope:[__start] from __start::@1
return
to:@return
@ -24,9 +24,9 @@ SYMBOL TABLE SSA
(const signed word*) DATA[(number) $3e8] = { fill( $3e8, 0) }
(const nomodify signed word*) SCREEN = (signed word*)(number) $400
(const byte) SIZEOF_SIGNED_WORD = (byte) 2
(void()) _start()
(label) _start::@1
(label) _start::@return
(void()) __start()
(label) __start::@1
(label) __start::@return
(void()) main()
(number~) main::$0
(label) main::@return
@ -52,10 +52,10 @@ Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused constant (const byte) main::$0
Eliminating unused constant (const byte) SIZEOF_SIGNED_WORD
Successful SSA optimization PassNEliminateUnusedVars
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::@1
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
CALL GRAPH

@ -3,7 +3,7 @@ Setting inferred volatile on symbol affected by address-of (byte*) main::bp ←
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start
main: scope:[main] from __start
(volatile byte) main::b ← (byte) 0
to:main::@1
main::@1: scope:[main] from main main::@1
@ -18,20 +18,20 @@ main::@return: scope:[main] from main::@1
return
to:@return
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
call main
to:_start::@1
_start::@1: scope:[_start] from _start
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@1
__start::@1: scope:[__start] from __start
to:__start::@return
__start::@return: scope:[__start] from __start::@1
return
to:@return
SYMBOL TABLE SSA
(void()) _start()
(label) _start::@1
(label) _start::@return
(void()) __start()
(label) __start::@1
(label) __start::@return
(void()) main()
(number~) main::$0
(bool~) main::$1
@ -58,10 +58,10 @@ Simple Condition (bool~) main::$1 [5] if((volatile byte) main::b!=rangelast(0,$a
Successful SSA optimization Pass2ConditionalJumpSimplification
Resolved ranged next value [3] main::b ← ++ main::b to ++
Resolved ranged comparison value [5] if(main::b!=rangelast(0,$a)) goto main::@1 to (number) $b
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::@1
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Adding number conversion cast (unumber) $b in [4] if((volatile byte) main::b!=(number) $b) goto main::@1
Successful SSA optimization PassNAddNumberTypeConversions

@ -5,7 +5,7 @@ Setting inferred volatile on symbol affected by address-of (void~) main::$2 ←
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start
main: scope:[main] from __start
(volatile byte) main::b1 ← (byte) 0
(volatile byte) main::b2 ← (byte) 0
(volatile byte) main::b3 ← (byte) 0
@ -42,20 +42,20 @@ setByte::@return: scope:[setByte] from setByte
return
to:@return
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
call main
to:_start::@1
_start::@1: scope:[_start] from _start
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@1
__start::@1: scope:[__start] from __start
to:__start::@return
__start::@return: scope:[__start] from __start::@1
return
to:@return
SYMBOL TABLE SSA
(void()) _start()
(label) _start::@1
(label) _start::@return
(void()) __start()
(label) __start::@1
(label) __start::@return
(void()) main()
(label) main::@1
(label) main::@2
@ -100,10 +100,10 @@ Constant (const byte) setByte::b#2 = 'l'
Successful SSA optimization Pass2ConstantIdentification
Simplifying expression containing zero main::SCREEN in [12] *((const byte*) main::SCREEN + (byte) 0) ← (volatile byte) main::b1
Successful SSA optimization PassNSimplifyExpressionWithZero
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::@1
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Inlining constant with var siblings (const byte*) setByte::ptr#0
Inlining constant with var siblings (const byte) setByte::b#0

@ -1,9 +1,9 @@
// Test address-of by assigning the affected variable in multiple ways
.pc = $801 "Basic"
:BasicUpstart(_start)
:BasicUpstart(__start)
.pc = $80d "Program"
.label val = 2
_start: {
__start: {
// val = 0
lda #0
sta.z val

@ -1,21 +1,21 @@
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
[0] phi()
to:_start::_init1
_start::_init1: scope:[_start] from _start
to:__start::__init1
__start::__init1: scope:[__start] from __start
[1] (volatile byte) val ← (byte) 0
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
[2] phi()
[3] call main
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@return
__start::@return: scope:[__start] from __start::@1
[4] return
to:@return
(void()) main()
main: scope:[main] from _start::@1
main: scope:[main] from __start::@1
[5] *((const nomodify byte*) main::SCREEN1) ← (volatile byte) val
[6] *((const nomodify byte*) main::SCREEN2) ← (byte) '.'
[7] (volatile byte) val ← (byte) 1

@ -1,10 +1,10 @@
Setting inferred volatile on symbol affected by address-of (byte*) main::ptr ← &(byte) val
Inlined call call _init
Inlined call call __init
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start::@1
main: scope:[main] from __start::@1
(byte) main::idx#0 ← (byte) 0
*((const nomodify byte*) main::SCREEN1 + (byte) main::idx#0) ← (volatile byte) val
*((const nomodify byte*) main::SCREEN2 + (byte) main::idx#0) ← (byte) '.'
@ -62,27 +62,27 @@ setp::@return: scope:[setp] from setp
return
to:@return
(void()) _start()
_start: scope:[_start] from
to:_start::_init1
_start::_init1: scope:[_start] from _start
(void()) __start()
__start: scope:[__start] from
to:__start::__init1
__start::__init1: scope:[__start] from __start
(volatile byte) val ← (byte) 0
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
call main
to:_start::@2
_start::@2: scope:[_start] from _start::@1
to:_start::@return
_start::@return: scope:[_start] from _start::@2
to:__start::@2
__start::@2: scope:[__start] from __start::@1
to:__start::@return
__start::@return: scope:[__start] from __start::@2
return
to:@return
SYMBOL TABLE SSA
(void()) _start()
(label) _start::@1
(label) _start::@2
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@2
(label) __start::@return
(label) __start::__init1
(void()) main()
(label) main::@1
(label) main::@2
@ -221,38 +221,38 @@ Simplifying constant integer increment ++2
Simplifying constant integer increment ++3
Simplifying constant integer increment ++4
Successful SSA optimization Pass2ConstantSimplification
Adding NOP phi() at start of _start
Adding NOP phi() at start of _start::@1
Adding NOP phi() at start of _start::@2
Adding NOP phi() at start of __start
Adding NOP phi() at start of __start::@1
Adding NOP phi() at start of __start::@2
CALL GRAPH
Calls in [_start] to main:3
Calls in [__start] to main:3
Calls in [main] to setv:17 setp:20
Created 0 initial phi equivalence classes
Coalesced down to 0 phi equivalence classes
Culled Empty Block (label) _start::@2
Adding NOP phi() at start of _start
Adding NOP phi() at start of _start::@1
Culled Empty Block (label) __start::@2
Adding NOP phi() at start of __start
Adding NOP phi() at start of __start::@1
FINAL CONTROL FLOW GRAPH
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
[0] phi()
to:_start::_init1
_start::_init1: scope:[_start] from _start
to:__start::__init1
__start::__init1: scope:[__start] from __start
[1] (volatile byte) val ← (byte) 0
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
[2] phi()
[3] call main
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@return
__start::@return: scope:[__start] from __start::@1
[4] return
to:@return
(void()) main()
main: scope:[main] from _start::@1
main: scope:[main] from __start::@1
[5] *((const nomodify byte*) main::SCREEN1) ← (volatile byte) val
[6] *((const nomodify byte*) main::SCREEN2) ← (byte) '.'
[7] (volatile byte) val ← (byte) 1
@ -297,7 +297,7 @@ setv::@return: scope:[setv] from setv
VARIABLE REGISTER WEIGHTS
(void()) _start()
(void()) __start()
(void()) main()
(byte) main::idx
(void()) setp((byte*) setp::p , (byte) setp::v)
@ -319,27 +319,27 @@ Target platform is c64basic / MOS6502X
// Test address-of by assigning the affected variable in multiple ways
// Upstart
.pc = $801 "Basic"
:BasicUpstart(_start)
:BasicUpstart(__start)
.pc = $80d "Program"
// Global Constants & labels
.label val = 2
// _start
_start: {
jmp _init1
// _start::_init1
_init1:
// __start
__start: {
jmp __init1
// __start::__init1
__init1:
// [1] (volatile byte) val ← (byte) 0 -- vbuz1=vbuc1
lda #0
sta.z val
// [2] phi from _start::_init1 to _start::@1 [phi:_start::_init1->_start::@1]
__b1_from__init1:
// [2] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1]
__b1_from___init1:
jmp __b1
// _start::@1
// __start::@1
__b1:
// [3] call main
jsr main
jmp __breturn
// _start::@return
// __start::@return
__breturn:
// [4] return
rts
@ -468,13 +468,13 @@ Uplift Scope [] 14.69: zp[1]:2 [ val ]
Uplift Scope [main]
Uplift Scope [setv]
Uplift Scope [setp]
Uplift Scope [_start]
Uplift Scope [__start]
Uplifting [] best 205 combination zp[1]:2 [ val ]
Uplifting [main] best 205 combination
Uplifting [setv] best 205 combination
Uplifting [setp] best 205 combination
Uplifting [_start] best 205 combination
Uplifting [__start] best 205 combination
Attempting to uplift remaining variables inzp[1]:2 [ val ]
Uplifting [] best 205 combination zp[1]:2 [ val ]
@ -483,27 +483,27 @@ ASSEMBLER BEFORE OPTIMIZATION
// Test address-of by assigning the affected variable in multiple ways
// Upstart
.pc = $801 "Basic"
:BasicUpstart(_start)
:BasicUpstart(__start)
.pc = $80d "Program"
// Global Constants & labels
.label val = 2
// _start
_start: {
jmp _init1
// _start::_init1
_init1:
// __start
__start: {
jmp __init1
// __start::__init1
__init1:
// [1] (volatile byte) val ← (byte) 0 -- vbuz1=vbuc1
lda #0
sta.z val
// [2] phi from _start::_init1 to _start::@1 [phi:_start::_init1->_start::@1]
__b1_from__init1:
// [2] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1]
__b1_from___init1:
jmp __b1
// _start::@1
// __start::@1
__b1:
// [3] call main
jsr main
jmp __breturn
// _start::@return
// __start::@return
__breturn:
// [4] return
rts
@ -607,7 +607,7 @@ setv: {
// File Data
ASSEMBLER OPTIMIZATIONS
Removing instruction jmp _init1
Removing instruction jmp __init1
Removing instruction jmp __b1
Removing instruction jmp __breturn
Removing instruction jmp __b1
@ -619,9 +619,9 @@ Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda.z val
Removing instruction lda.z val
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Removing instruction __b1_from__init1:
Removing instruction __b1_from___init1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction _init1:
Removing instruction __init1:
Removing instruction __b1:
Removing instruction __breturn:
Removing instruction __b1:
@ -632,10 +632,10 @@ Removing instruction __breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(void()) _start()
(label) _start::@1
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@return
(label) __start::__init1
(void()) main()
(label) main::@1
(label) main::@2
@ -665,22 +665,22 @@ Score: 148
// Test address-of by assigning the affected variable in multiple ways
// Upstart
.pc = $801 "Basic"
:BasicUpstart(_start)
:BasicUpstart(__start)
.pc = $80d "Program"
// Global Constants & labels
.label val = 2
// _start
_start: {
// _start::_init1
// __start
__start: {
// __start::__init1
// val = 0
// [1] (volatile byte) val ← (byte) 0 -- vbuz1=vbuc1
lda #0
sta.z val
// [2] phi from _start::_init1 to _start::@1 [phi:_start::_init1->_start::@1]
// _start::@1
// [2] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1]
// __start::@1
// [3] call main
jsr main
// _start::@return
// __start::@return
// [4] return
rts
}

@ -1,7 +1,7 @@
(void()) _start()
(label) _start::@1
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@return
(label) __start::__init1
(void()) main()
(label) main::@1
(label) main::@2

@ -1,11 +1,11 @@
Fixing constant pointer addition (const signed word*) VALS+(number) 1
Inlined call call _init
Inlined call call __init
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start::@1
(byte) idx#17 ← phi( _start::@1/(byte) idx#19 )
main: scope:[main] from __start::@1
(byte) idx#17 ← phi( __start::@1/(byte) idx#19 )
(signed word*) print::p#0 ← (const signed word*) VALS
call print
to:main::@2
@ -56,22 +56,22 @@ print::@return: scope:[print] from print
return
to:@return
(void()) _start()
_start: scope:[_start] from
to:_start::_init1
_start::_init1: scope:[_start] from _start
(void()) __start()
__start: scope:[__start] from
to:__start::__init1
__start::__init1: scope:[__start] from __start
(byte) idx#6 ← (byte) 0
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
(byte) idx#19 ← phi( _start::_init1/(byte) idx#6 )
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
(byte) idx#19 ← phi( __start::__init1/(byte) idx#6 )
call main
to:_start::@2
_start::@2: scope:[_start] from _start::@1
(byte) idx#15 ← phi( _start::@1/(byte) idx#3 )
to:__start::@2
__start::@2: scope:[__start] from __start::@1
(byte) idx#15 ← phi( __start::@1/(byte) idx#3 )
(byte) idx#7 ← (byte) idx#15
to:_start::@return
_start::@return: scope:[_start] from _start::@2
(byte) idx#16 ← phi( _start::@2/(byte) idx#7 )
to:__start::@return
__start::@return: scope:[__start] from __start::@2
(byte) idx#16 ← phi( __start::@2/(byte) idx#7 )
(byte) idx#8 ← (byte) idx#16
return
to:@return
@ -80,11 +80,11 @@ SYMBOL TABLE SSA
(const nomodify signed word*) SCREEN = (signed word*)(number) $400
(const byte) SIZEOF_SIGNED_WORD = (byte) 2
(const signed word*) VALS[] = { (signed word) 1, (signed word) 2, (signed word) 3, (signed word) 4 }
(void()) _start()
(label) _start::@1
(label) _start::@2
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@2
(label) __start::@return
(label) __start::__init1
(byte) idx
(byte) idx#0
(byte) idx#1
@ -166,12 +166,12 @@ Constant (const byte) idx#19 = 0
Successful SSA optimization Pass2ConstantIdentification
Resolved ranged next value [13] main::i#1 ← ++ main::i#2 to ++
Resolved ranged comparison value [15] if(main::i#1!=rangelast(2,3)) goto main::@1 to (number) 4
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::_init1
Removing unused procedure block _start::@1
Removing unused procedure block _start::@2
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::__init1
Removing unused procedure block __start::@1
Removing unused procedure block __start::@2
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Adding number conversion cast (unumber) 4 in [7] if((byte) main::i#1!=(number) 4) goto main::@1
Successful SSA optimization PassNAddNumberTypeConversions

@ -2,7 +2,7 @@
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start
main: scope:[main] from __start
(byte) main::idx#0 ← (byte) 0
to:main::@1
main::@1: scope:[main] from main main::@2
@ -40,21 +40,21 @@ getValue::@return: scope:[getValue] from getValue
return
to:@return
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
call main
to:_start::@1
_start::@1: scope:[_start] from _start
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@1
__start::@1: scope:[__start] from __start
to:__start::@return
__start::@return: scope:[__start] from __start::@1
return
to:@return
SYMBOL TABLE SSA
(const byte) SIZEOF_WORD = (byte) 2
(void()) _start()
(label) _start::@1
(label) _start::@return
(void()) __start()
(label) __start::@1
(label) __start::@return
(const word*) arr16[(number) $80] = { fill( $80, 0) }
(word()) getValue((word) getValue::index)
(number~) getValue::$0
@ -118,10 +118,10 @@ Constant (const byte) main::idx#0 = 0
Successful SSA optimization Pass2ConstantIdentification
Resolved ranged next value [8] main::idx#1 ← ++ main::idx#2 to ++
Resolved ranged comparison value [10] if(main::idx#1!=rangelast(0,$80)) goto main::@1 to (number) $81
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::@1
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Adding number conversion cast (unumber) $81 in [8] if((byte) main::idx#1!=(number) $81) goto main::@1
Successful SSA optimization PassNAddNumberTypeConversions

@ -2,7 +2,7 @@
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start
main: scope:[main] from __start
(byte) main::sub#0 ← (byte) 0
to:main::@1
main::@1: scope:[main] from main main::@1
@ -16,21 +16,21 @@ main::@return: scope:[main] from main::@1
return
to:@return
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
call main
to:_start::@1
_start::@1: scope:[_start] from _start
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@1
__start::@1: scope:[__start] from __start
to:__start::@return
__start::@return: scope:[__start] from __start::@1
return
to:@return
SYMBOL TABLE SSA
(const nomodify byte) SZ = (byte) $f
(void()) _start()
(label) _start::@1
(label) _start::@return
(void()) __start()
(label) __start::@1
(label) __start::@return
(const byte*) items[(const nomodify byte) SZ] = { fill( SZ, 0) }
(void()) main()
(bool~) main::$0
@ -48,10 +48,10 @@ Constant (const byte) main::sub#0 = 0
Successful SSA optimization Pass2ConstantIdentification
Resolved ranged next value [3] main::sub#1 ← ++ main::sub#2 to ++
Resolved ranged comparison value [5] if(main::sub#1!=rangelast(0,SZ)) goto main::@1 to (const nomodify byte) SZ+(number) 1
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::@1
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Adding number conversion cast (unumber) SZ+1 in [3] if((byte) main::sub#1!=(const nomodify byte) SZ+(number) 1) goto main::@1
Adding number conversion cast (unumber) 1 in [3] if((byte) main::sub#1!=(unumber)(const nomodify byte) SZ+(number) 1) goto main::@1

@ -2,7 +2,7 @@
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start
main: scope:[main] from __start
(byte*) main::cur_item#0 ← (const byte*) items
(byte) main::item#0 ← (byte) 0
to:main::@1
@ -34,22 +34,22 @@ main::@return: scope:[main] from main::@3
return
to:@return
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
call main
to:_start::@1
_start::@1: scope:[_start] from _start
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@1
__start::@1: scope:[__start] from __start
to:__start::@return
__start::@return: scope:[__start] from __start::@1
return
to:@return
SYMBOL TABLE SSA
(const nomodify byte) ITEM_COUNT = (byte) 3
(const nomodify byte) ITEM_SIZE = (byte) 5
(void()) _start()
(label) _start::@1
(label) _start::@return
(void()) __start()
(label) __start::@1
(label) __start::@return
(const byte*) items[(const nomodify byte) ITEM_COUNT*(const nomodify byte) ITEM_SIZE] = { (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()
(number~) main::$0
@ -110,10 +110,10 @@ Resolved ranged next value [8] main::sub#1 ← ++ main::sub#2 to ++
Resolved ranged comparison value [10] if(main::sub#1!=rangelast(0,ITEM_SIZE-1)) goto main::@2 to (const nomodify byte) ITEM_SIZE-(byte) 1+(number) 1
Resolved ranged next value [12] main::item#1 ← ++ main::item#4 to ++
Resolved ranged comparison value [14] if(main::item#1!=rangelast(0,ITEM_COUNT-1)) goto main::@1 to (const nomodify byte) ITEM_COUNT-(byte) 1+(number) 1
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::@1
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Adding number conversion cast (unumber) ITEM_SIZE-1+1 in [6] if((byte) main::sub#1!=(const nomodify byte) ITEM_SIZE-(byte) 1+(number) 1) goto main::@2
Adding number conversion cast (unumber) 1 in [6] if((byte) main::sub#1!=(unumber)(const nomodify byte) ITEM_SIZE-(byte) 1+(number) 1) goto main::@2

@ -1,26 +1,26 @@
Inlined call call _init
Inlined call call __init
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start::@1
main: scope:[main] from __start::@1
*((const byte*) SCREEN + (number) 0) ← *((const byte*) SINTAB + (number) 0)
to:main::@return
main::@return: scope:[main] from main
return
to:@return
(void()) _start()
_start: scope:[_start] from
to:_start::_init1
_start::_init1: scope:[_start] from _start
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
(void()) __start()
__start: scope:[__start] from
to:__start::__init1
__start::__init1: scope:[__start] from __start
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
call main
to:_start::@2
_start::@2: scope:[_start] from _start::@1
to:_start::@return
_start::@return: scope:[_start] from _start::@2
to:__start::@2
__start::@2: scope:[__start] from __start::@1
to:__start::@return
__start::@return: scope:[__start] from __start::@2
return
to:@return
@ -28,11 +28,11 @@ SYMBOL TABLE SSA
(const byte*) SCREEN = (byte*)(number) $400
(const byte*) SINTAB[(number) $100] = kickasm {{ .fill 256, 128 + 128*sin(i*2*PI/256)
}}
(void()) _start()
(label) _start::@1
(label) _start::@2
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@2
(label) __start::@return
(label) __start::__init1
(void()) main()
(label) main::@return
@ -49,12 +49,12 @@ Successful SSA optimization PassNFinalizeNumberTypeConversions
Simplifying expression containing zero SINTAB in [0] *((const byte*) SCREEN + (byte) 0) ← *((const byte*) SINTAB + (byte) 0)
Simplifying expression containing zero SCREEN in [0] *((const byte*) SCREEN + (byte) 0) ← *((const byte*) SINTAB)
Successful SSA optimization PassNSimplifyExpressionWithZero
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::_init1
Removing unused procedure block _start::@1
Removing unused procedure block _start::@2
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::__init1
Removing unused procedure block __start::@1
Removing unused procedure block __start::@2
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
CALL GRAPH

@ -1,26 +1,26 @@
Inlined call call _init
Inlined call call __init
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start::@1
main: scope:[main] from __start::@1
*((const byte*) SCREEN + (number) 0) ← *((const byte*) SINTAB + (number) 0)
to:main::@return
main::@return: scope:[main] from main
return
to:@return
(void()) _start()
_start: scope:[_start] from
to:_start::_init1
_start::_init1: scope:[_start] from _start
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
(void()) __start()
__start: scope:[__start] from
to:__start::__init1
__start::__init1: scope:[__start] from __start
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
call main
to:_start::@2
_start::@2: scope:[_start] from _start::@1
to:_start::@return
_start::@return: scope:[_start] from _start::@2
to:__start::@2
__start::@2: scope:[__start] from __start::@1
to:__start::@return
__start::@return: scope:[__start] from __start::@2
return
to:@return
@ -28,11 +28,11 @@ SYMBOL TABLE SSA
(const byte*) SCREEN = (byte*)(number) $400
(const byte*) SINTAB[(number) $100] = kickasm {{ .fill 256, 128 + 128*sin(i*2*PI/256)
}}
(void()) _start()
(label) _start::@1
(label) _start::@2
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@2
(label) __start::@return
(label) __start::__init1
(void()) main()
(label) main::@return
@ -49,12 +49,12 @@ Successful SSA optimization PassNFinalizeNumberTypeConversions
Simplifying expression containing zero SINTAB in [0] *((const byte*) SCREEN + (byte) 0) ← *((const byte*) SINTAB + (byte) 0)
Simplifying expression containing zero SCREEN in [0] *((const byte*) SCREEN + (byte) 0) ← *((const byte*) SINTAB)
Successful SSA optimization PassNSimplifyExpressionWithZero
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::_init1
Removing unused procedure block _start::@1
Removing unused procedure block _start::@2
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::__init1
Removing unused procedure block __start::@1
Removing unused procedure block __start::@2
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
CALL GRAPH

@ -2,7 +2,7 @@
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start
main: scope:[main] from __start
(byte) main::i#0 ← (byte) 0
to:main::@1
main::@1: scope:[main] from main main::@2
@ -32,21 +32,21 @@ main::@return: scope:[main] from main::@4
return
to:@return
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
call main
to:_start::@1
_start::@1: scope:[_start] from _start
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@1
__start::@1: scope:[__start] from __start
to:__start::@return
__start::@return: scope:[__start] from __start::@1
return
to:@return
SYMBOL TABLE SSA
(const nomodify byte*) SCREEN = (byte*)(number) $400
(void()) _start()
(label) _start::@1
(label) _start::@return
(void()) __start()
(label) __start::@1
(label) __start::@return
(void()) main()
(bool~) main::$0
(bool~) main::$1
@ -91,10 +91,10 @@ Successful SSA optimization Pass2ConditionalJumpSimplification
Constant (const byte) main::i#0 = 0
Constant (const byte) main::i1#0 = 0
Successful SSA optimization Pass2ConstantIdentification
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::@1
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Inlining constant with var siblings (const byte) main::i#0
Inlining constant with var siblings (const byte) main::i1#0

@ -1,9 +1,9 @@
Inlined call call _init
Inlined call call __init
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start::@1
main: scope:[main] from __start::@1
*((const byte*) b + (number) 0) ← (byte) 'c'
*((const byte*) SCREEN) ← *((const byte*) b + (number) 0)
(byte*~) main::$0 ← (const byte*) SCREEN + (number) 1
@ -15,27 +15,27 @@ main::@return: scope:[main] from main
return
to:@return
(void()) _start()
_start: scope:[_start] from
to:_start::_init1
_start::_init1: scope:[_start] from _start
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
(void()) __start()
__start: scope:[__start] from
to:__start::__init1
__start::__init1: scope:[__start] from __start
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
call main
to:_start::@2
_start::@2: scope:[_start] from _start::@1
to:_start::@return
_start::@return: scope:[_start] from _start::@2
to:__start::@2
__start::@2: scope:[__start] from __start::@1
to:__start::@return
__start::@return: scope:[__start] from __start::@2
return
to:@return
SYMBOL TABLE SSA
(const byte*) SCREEN = (byte*)(number) $400
(void()) _start()
(label) _start::@1
(label) _start::@2
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@2
(label) __start::@return
(label) __start::__init1
(const byte*) b[(number) 3] = { fill( 3, 0) }
(const byte*) c[] = { (byte) 'c', (byte) 'm', (byte) 'l' }
(const byte*) d[] = (byte*) "cml"z
@ -75,12 +75,12 @@ Successful SSA optimization Pass2ConstantIdentification
Simplifying expression containing zero b in [0] *((const byte*) b + (byte) 0) ← (byte) 'c'
Simplifying expression containing zero b in [1] *((const byte*) SCREEN) ← *((const byte*) b + (byte) 0)
Successful SSA optimization PassNSimplifyExpressionWithZero
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::_init1
Removing unused procedure block _start::@1
Removing unused procedure block _start::@2
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::__init1
Removing unused procedure block __start::@1
Removing unused procedure block __start::@2
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Constant inlined main::$1 = (const byte*) SCREEN+(byte) 2
Constant inlined main::$0 = (const byte*) SCREEN+(byte) 1

@ -2,7 +2,7 @@
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start
main: scope:[main] from __start
asm { jmpqwe .byte0,25,51,76,102,128,153,179,204,230 qwe: lda#50 }
*((byte*)(number) $400) ← (byte) 'c'
to:main::@return
@ -10,29 +10,29 @@ main::@return: scope:[main] from main
return
to:@return
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
call main
to:_start::@1
_start::@1: scope:[_start] from _start
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@1
__start::@1: scope:[__start] from __start
to:__start::@return
__start::@return: scope:[__start] from __start::@1
return
to:@return
SYMBOL TABLE SSA
(void()) _start()
(label) _start::@1
(label) _start::@return
(void()) __start()
(label) __start::@1
(label) __start::@return
(void()) main()
(label) main::@return
Simplifying constant pointer cast (byte*) 1024
Successful SSA optimization PassNCastSimplification
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::@1
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
CALL GRAPH

@ -2,7 +2,7 @@
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start
main: scope:[main] from __start
*((const nomodify byte*) lda) ← (const byte) main::jmp
(byte) bne::jsr#0 ← (const byte) main::jmp
call bne
@ -23,20 +23,20 @@ bne::@return: scope:[bne] from bne
return
to:@return
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
call main
to:_start::@1
_start::@1: scope:[_start] from _start
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@1
__start::@1: scope:[__start] from __start
to:__start::@return
__start::@return: scope:[__start] from __start::@1
return
to:@return
SYMBOL TABLE SSA
(void()) _start()
(label) _start::@1
(label) _start::@return
(void()) __start()
(label) __start::@1
(label) __start::@return
(void()) bne((byte) bne::jsr)
(label) bne::@return
(byte) bne::jsr
@ -59,10 +59,10 @@ Identical Phi Values (byte) bne::jsr#1 (byte) bne::jsr#0
Successful SSA optimization Pass2IdenticalPhiElimination
Constant (const byte) bne::jsr#0 = main::jmp
Successful SSA optimization Pass2ConstantIdentification
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::@1
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Constant inlined bne::jsr#0 = (const byte) main::jmp
Successful SSA optimization Pass2ConstantInlining

@ -3,7 +3,7 @@ Resolved forward reference init to (void()) init()
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start
main: scope:[main] from __start
asm { jsrinit }
to:main::@return
main::@return: scope:[main] from main
@ -18,21 +18,21 @@ init::@return: scope:[init] from init
return
to:@return
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
call main
to:_start::@1
_start::@1: scope:[_start] from _start
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@1
__start::@1: scope:[__start] from __start
to:__start::@return
__start::@return: scope:[__start] from __start::@1
return
to:@return
SYMBOL TABLE SSA
(const nomodify byte*) BG_COLOR = (byte*)(number) $d020
(void()) _start()
(label) _start::@1
(label) _start::@return
(void()) __start()
(label) __start::@1
(label) __start::@return
(void()) init()
(label) init::@return
(void()) main()
@ -47,10 +47,10 @@ Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::@1
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
CALL GRAPH

@ -2,7 +2,7 @@
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start
main: scope:[main] from __start
(byte) main::a#0 ← (byte) 0
(byte) main::a#1 ← (byte) 'c'
*((const byte*) main::screen + (number) 0) ← (byte) main::a#1
@ -19,20 +19,20 @@ main::@return: scope:[main] from main
return
to:@return
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
call main
to:_start::@1
_start::@1: scope:[_start] from _start
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@1
__start::@1: scope:[__start] from __start
to:__start::@return
__start::@return: scope:[__start] from __start::@1
return
to:@return
SYMBOL TABLE SSA
(void()) _start()
(label) _start::@1
(label) _start::@return
(void()) __start()
(label) __start::@1
(label) __start::@return
(void()) main()
(number~) main::$0
(label) main::@return
@ -78,10 +78,10 @@ Simplifying expression containing zero main::screen in [2] *((const byte*) main:
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused constant (const byte) main::a#0
Successful SSA optimization PassNEliminateUnusedVars
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::@1
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Constant right-side identified [5] (byte~) main::$0 ← (byte) 1 + (const byte) main::a#3
Successful SSA optimization Pass2ConstantRValueConsolidation

@ -1,10 +1,10 @@
Inlined call call _init
Inlined call call __init
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start::@1
(byte*) screen2#4 ← phi( _start::@1/(byte*) screen2#16 )
main: scope:[main] from __start::@1
(byte*) screen2#4 ← phi( __start::@1/(byte*) screen2#16 )
(byte) main::i#0 ← (byte) 0
(byte) main::a#0 ← (byte) 3
(byte) test::i#0 ← (byte) main::i#0
@ -141,22 +141,22 @@ test::@return: scope:[test] from test::@1 test::@2
return
to:@return
(void()) _start()
_start: scope:[_start] from
to:_start::_init1
_start::_init1: scope:[_start] from _start
(byte*~) _start::_init1_$0 ← (const byte*) screen1 + (number) $28
(byte*) screen2#0 ← (byte*~) _start::_init1_$0
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
(byte*) screen2#16 ← phi( _start::_init1/(byte*) screen2#0 )
(void()) __start()
__start: scope:[__start] from
to:__start::__init1
__start::__init1: scope:[__start] from __start
(byte*~) __start::__init1_$0 ← (const byte*) screen1 + (number) $28
(byte*) screen2#0 ← (byte*~) __start::__init1_$0
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
(byte*) screen2#16 ← phi( __start::__init1/(byte*) screen2#0 )
call main
to:_start::@2
_start::@2: scope:[_start] from _start::@1
(byte*) screen2#15 ← phi( _start::@1/(byte*) screen2#16 )
to:_start::@return
_start::@return: scope:[_start] from _start::@2
(byte*) screen2#3 ← phi( _start::@2/(byte*) screen2#15 )
to:__start::@2
__start::@2: scope:[__start] from __start::@1
(byte*) screen2#15 ← phi( __start::@1/(byte*) screen2#16 )
to:__start::@return
__start::@return: scope:[__start] from __start::@2
(byte*) screen2#3 ← phi( __start::@2/(byte*) screen2#15 )
(byte*) screen2#1 ← (byte*) screen2#3
return
to:@return
@ -164,12 +164,12 @@ _start::@return: scope:[_start] from _start::@2
SYMBOL TABLE SSA
(const byte) GREEN = (byte) 5
(const byte) RED = (byte) 2
(void()) _start()
(label) _start::@1
(label) _start::@2
(label) _start::@return
(label) _start::_init1
(byte*~) _start::_init1_$0
(void()) __start()
(label) __start::@1
(label) __start::@2
(label) __start::@return
(label) __start::__init1
(byte*~) __start::__init1_$0
(const byte*) cols = (byte*)(number) $d800
(void()) main()
(label) main::@1
@ -294,7 +294,7 @@ Adding number conversion cast (unumber) 1 in (byte) main::a#7 ← (byte) main::a
Adding number conversion cast (unumber) 6 in (byte) main::a#8 ← (byte) main::a#18 ^ (number) 6
Adding number conversion cast (unumber) 1 in (byte) main::a#9 ← (byte) main::a#19 | (number) 1
Adding number conversion cast (unumber) 1 in (byte) main::a#10 ← (byte) main::a#20 & (number) 1
Adding number conversion cast (unumber) $28 in (byte*~) _start::_init1_$0 ← (const byte*) screen1 + (number) $28
Adding number conversion cast (unumber) $28 in (byte*~) __start::__init1_$0 ← (const byte*) screen1 + (number) $28
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant pointer cast (byte*) 1024
Simplifying constant pointer cast (byte*) 55296
@ -345,7 +345,7 @@ Alias main::i#21 = main::i#9
Alias main::a#20 = main::a#9
Alias main::i#10 = main::i#22
Alias test::i#11 = test::i#12 test::i#13
Alias screen2#0 = _start::_init1_$0 screen2#16 screen2#15 screen2#3 screen2#1
Alias screen2#0 = __start::__init1_$0 screen2#16 screen2#15 screen2#3 screen2#1
Successful SSA optimization Pass2AliasElimination
Identical Phi Values (byte*) screen2#10 (byte*) screen2#0
Identical Phi Values (byte*) screen2#2 (byte*) screen2#10
@ -363,12 +363,12 @@ Constant (const byte) test::a#0 = main::a#0
Successful SSA optimization Pass2ConstantIdentification
Eliminating unused variable (byte) main::i#11 and assignment [51] (byte) main::i#11 ← ++ (byte) main::i#10
Successful SSA optimization PassNEliminateUnusedVars
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::_init1
Removing unused procedure block _start::@1
Removing unused procedure block _start::@2
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::__init1
Removing unused procedure block __start::@1
Removing unused procedure block __start::@2
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Constant right-side identified [1] (byte) main::i#1 ← ++ (const byte) main::i#0
Constant right-side identified [2] (byte) main::a#1 ← (const byte) main::a#0 + (byte) 1

@ -1,6 +1,6 @@
// Test atoi()
.pc = $801 "Basic"
:BasicUpstart(_start)
:BasicUpstart(__start)
.pc = $80d "Program"
.const LIGHT_BLUE = $e
.const OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS = 1
@ -18,7 +18,7 @@
.label conio_line_text = $b
// The current color cursor line start
.label conio_line_color = $d
_start: {
__start: {
// conio_cursor_x = 0
lda #0
sta.z conio_cursor_x

@ -1,24 +1,24 @@
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
[0] phi()
to:_start::_init1
_start::_init1: scope:[_start] from _start
to:__start::__init1
__start::__init1: scope:[__start] from __start
[1] (byte) conio_cursor_x ← (byte) 0
[2] (byte) conio_cursor_y ← (byte) 0
[3] (byte*) conio_line_text ← (const nomodify byte*) DEFAULT_SCREEN
[4] (byte*) conio_line_color ← (const nomodify byte*) COLORRAM
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
[5] phi()
[6] call main
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@return
__start::@return: scope:[__start] from __start::@1
[7] return
to:@return
(void()) main()
main: scope:[main] from _start::@1
main: scope:[main] from __start::@1
[8] phi()
[9] call clrscr
to:main::@1

@ -5,7 +5,7 @@ Fixing struct type SIZE_OF struct printf_buffer_number to 12
Added struct type cast to parameter value list call printf_sint (signed word~) main::$1 (struct printf_format_number){ (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (const byte) DECIMAL }
Added struct type cast to parameter value list call printf_sint (signed word~) main::$3 (struct printf_format_number){ (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (const byte) DECIMAL }
Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx
Inlined call call _init
Inlined call call __init
Eliminating unused variable with no statement (void~) main::$2
Eliminating unused variable with no statement (void~) main::$4
@ -964,7 +964,7 @@ printf_number_buffer::@return: scope:[printf_number_buffer] from printf_number_
to:@return
(void()) main()
main: scope:[main] from _start::@1
main: scope:[main] from __start::@1
call clrscr
to:main::@1
main::@1: scope:[main] from main
@ -1015,23 +1015,23 @@ main::@return: scope:[main] from main::@7
return
to:@return
(void()) _start()
_start: scope:[_start] from
to:_start::_init1
_start::_init1: scope:[_start] from _start
(void()) __start()
__start: scope:[__start] from
to:__start::__init1
__start::__init1: scope:[__start] from __start
(byte) conio_cursor_x ← (byte) 0
(byte) conio_cursor_y ← (byte) 0
(byte*) conio_line_text ← (const nomodify byte*) CONIO_SCREEN_TEXT
(byte*) conio_line_color ← (const nomodify byte*) CONIO_SCREEN_COLORS
(byte) conio_textcolor ← (const nomodify byte) CONIO_TEXTCOLOR_DEFAULT
(byte) conio_scroll_enable ← (byte) 1
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
call main
to:_start::@2
_start::@2: scope:[_start] from _start::@1
to:_start::@return
_start::@return: scope:[_start] from _start::@2
to:__start::@2
__start::@2: scope:[__start] from __start::@1
to:__start::@return
__start::@return: scope:[__start] from __start::@2
return
to:@return
@ -1142,11 +1142,11 @@ SYMBOL TABLE SSA
(const word*) RADIX_HEXADECIMAL_VALUES[] = { (word) $1000, (word) $100, (word) $10 }
(const word*) RADIX_OCTAL_VALUES[] = { (word) $8000, (word) $1000, (word) $200, (word) $40, (word) 8 }
(const byte) SIZEOF_WORD = (byte) 2
(void()) _start()
(label) _start::@1
(label) _start::@2
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@2
(label) __start::@return
(label) __start::__init1
(signed word()) atoi((to_nomodify byte*) atoi::str)
(bool~) atoi::$0
(bool~) atoi::$1
@ -2936,9 +2936,9 @@ Constant inlined utoa::$4 = (byte) 5-(byte) 1
Constant inlined cputc::c#1 = (byte) ' '
Successful SSA optimization Pass2ConstantInlining
Added new block during phi lifting utoa::@17(between utoa::@16 and utoa::@13)
Adding NOP phi() at start of _start
Adding NOP phi() at start of _start::@1
Adding NOP phi() at start of _start::@2
Adding NOP phi() at start of __start
Adding NOP phi() at start of __start::@1
Adding NOP phi() at start of __start::@2
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@1
Adding NOP phi() at start of main::@3
@ -2973,7 +2973,7 @@ Adding NOP phi() at start of atoi::@2
Adding NOP phi() at start of clrscr
Adding NOP phi() at start of clrscr::@2
CALL GRAPH
Calls in [_start] to main:6
Calls in [__start] to main:6
Calls in [main] to clrscr:10 atoi:12 printf_sint:16 cputs:18 atoi:20 printf_sint:24 cputs:26
Calls in [cputs] to cputc:38
Calls in [cputc] to cputln:47 cputln:51
@ -3018,7 +3018,7 @@ Coalesced [202] clrscr::line_text#7 ← clrscr::line_text#1
Coalesced [203] clrscr::line_cols#7 ← clrscr::line_cols#1
Coalesced [207] clrscr::c#4 ← clrscr::c#1
Coalesced down to 24 phi equivalence classes
Culled Empty Block (label) _start::@2
Culled Empty Block (label) __start::@2
Culled Empty Block (label) main::@7
Culled Empty Block (label) cputs::@3
Culled Empty Block (label) cputc::@5
@ -3064,8 +3064,8 @@ Renumbering block printf_sint::@5 to printf_sint::@3
Renumbering block printf_number_buffer::@2 to printf_number_buffer::@1
Renumbering block printf_number_buffer::@5 to printf_number_buffer::@2
Renumbering block printf_number_buffer::@9 to printf_number_buffer::@3
Adding NOP phi() at start of _start
Adding NOP phi() at start of _start::@1
Adding NOP phi() at start of __start
Adding NOP phi() at start of __start::@1
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@1
Adding NOP phi() at start of main::@3
@ -3086,26 +3086,26 @@ Adding NOP phi() at start of clrscr
FINAL CONTROL FLOW GRAPH
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
[0] phi()
to:_start::_init1
_start::_init1: scope:[_start] from _start
to:__start::__init1
__start::__init1: scope:[__start] from __start
[1] (byte) conio_cursor_x ← (byte) 0
[2] (byte) conio_cursor_y ← (byte) 0
[3] (byte*) conio_line_text ← (const nomodify byte*) DEFAULT_SCREEN
[4] (byte*) conio_line_color ← (const nomodify byte*) COLORRAM
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
[5] phi()
[6] call main
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@return
__start::@return: scope:[__start] from __start::@1
[7] return
to:@return
(void()) main()
main: scope:[main] from _start::@1
main: scope:[main] from __start::@1
[8] phi()
[9] call clrscr
to:main::@1
@ -3526,7 +3526,7 @@ VARIABLE REGISTER WEIGHTS
(byte) MOS6581_SID::POT_X
(byte) MOS6581_SID::POT_Y
(byte) MOS6581_SID::VOLUME_FILTER_MODE
(void()) _start()
(void()) __start()
(signed word()) atoi((to_nomodify byte*) atoi::str)
(signed word~) atoi::$3 2002.0
(signed word~) atoi::$4 2002.0
@ -3834,7 +3834,7 @@ Target platform is c64basic / MOS6502X
// Test atoi()
// Upstart
.pc = $801 "Basic"
:BasicUpstart(_start)
:BasicUpstart(__start)
.pc = $80d "Program"
// Global Constants & labels
.const LIGHT_BLUE = $e
@ -3852,11 +3852,11 @@ Target platform is c64basic / MOS6502X
.label conio_line_text = $2b
// The current color cursor line start
.label conio_line_color = $2d
// _start
_start: {
jmp _init1
// _start::_init1
_init1:
// __start
__start: {
jmp __init1
// __start::__init1
__init1:
// [1] (byte) conio_cursor_x ← (byte) 0 -- vbuz1=vbuc1
lda #0
sta.z conio_cursor_x
@ -3873,17 +3873,17 @@ _start: {
sta.z conio_line_color
lda #>COLORRAM
sta.z conio_line_color+1
// [5] phi from _start::_init1 to _start::@1 [phi:_start::_init1->_start::@1]
__b1_from__init1:
// [5] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1]
__b1_from___init1:
jmp __b1
// _start::@1
// __start::@1
__b1:
// [6] call main
// [8] phi from _start::@1 to main [phi:_start::@1->main]
// [8] phi from __start::@1 to main [phi:__start::@1->main]
main_from___b1:
jsr main
jmp __breturn
// _start::@return
// __start::@return
__breturn:
// [7] return
rts
@ -5144,7 +5144,7 @@ Uplift Scope [printf_format_number]
Uplift Scope [printf_buffer_number]
Uplift Scope [printf_format_string]
Uplift Scope [main]
Uplift Scope [_start]
Uplift Scope [__start]
Uplifting [memcpy] best 28127 combination zp[2]:14 [ memcpy::src#2 memcpy::src#4 memcpy::src#1 ] zp[2]:16 [ memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 ] zp[2]:54 [ memcpy::src_end#0 ] zp[2]:10 [ memcpy::source#2 ] zp[2]:12 [ memcpy::destination#2 ]
Uplifting [memset] best 28021 combination zp[2]:8 [ memset::dst#2 memset::dst#4 memset::dst#1 ] zp[2]:52 [ memset::end#0 ] reg byte x [ memset::c#4 ] zp[2]:5 [ memset::str#3 ]
@ -5167,7 +5167,7 @@ Uplifting [printf_format_number] best 25343 combination
Uplifting [printf_buffer_number] best 25343 combination
Uplifting [printf_format_string] best 25343 combination
Uplifting [main] best 25343 combination
Uplifting [_start] best 25343 combination
Uplifting [__start] best 25343 combination
Attempting to uplift remaining variables inzp[1]:42 [ conio_cursor_y ]
Uplifting [] best 25343 combination zp[1]:42 [ conio_cursor_y ]
Attempting to uplift remaining variables inzp[1]:41 [ conio_cursor_x ]
@ -5213,7 +5213,7 @@ ASSEMBLER BEFORE OPTIMIZATION
// Test atoi()
// Upstart
.pc = $801 "Basic"
:BasicUpstart(_start)
:BasicUpstart(__start)
.pc = $80d "Program"
// Global Constants & labels
.const LIGHT_BLUE = $e
@ -5232,11 +5232,11 @@ ASSEMBLER BEFORE OPTIMIZATION
.label conio_line_text = $b
// The current color cursor line start
.label conio_line_color = $d
// _start
_start: {
jmp _init1
// _start::_init1
_init1:
// __start
__start: {
jmp __init1
// __start::__init1
__init1:
// [1] (byte) conio_cursor_x ← (byte) 0 -- vbuz1=vbuc1
lda #0
sta.z conio_cursor_x
@ -5253,17 +5253,17 @@ _start: {
sta.z conio_line_color
lda #>COLORRAM
sta.z conio_line_color+1
// [5] phi from _start::_init1 to _start::@1 [phi:_start::_init1->_start::@1]
__b1_from__init1:
// [5] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1]
__b1_from___init1:
jmp __b1
// _start::@1
// __start::@1
__b1:
// [6] call main
// [8] phi from _start::@1 to main [phi:_start::@1->main]
// [8] phi from __start::@1 to main [phi:__start::@1->main]
main_from___b1:
jsr main
jmp __breturn
// _start::@return
// __start::@return
__breturn:
// [7] return
rts
@ -6211,7 +6211,7 @@ clrscr: {
printf_buffer: .fill SIZEOF_STRUCT_PRINTF_BUFFER_NUMBER, 0
ASSEMBLER OPTIMIZATIONS
Removing instruction jmp _init1
Removing instruction jmp __init1
Removing instruction jmp __b1
Removing instruction jmp __breturn
Removing instruction jmp __b1
@ -6280,7 +6280,7 @@ Replacing label __b2_from___b3 with __b2
Replacing label __b1_from___b2 with __b1
Replacing label __b2_from___b1 with __b2
Replacing label __breturn_from___b1 with __breturn_from___b5
Removing instruction __b1_from__init1:
Removing instruction __b1_from___init1:
Removing instruction main_from___b1:
Removing instruction __b1_from_main:
Removing instruction atoi_from___b1:
@ -6321,7 +6321,7 @@ Removing instruction __b2_from_atoi:
Removing instruction __b3_from___b2:
Removing instruction __breturn_from___b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction _init1:
Removing instruction __init1:
Removing instruction __b1:
Removing instruction __breturn:
Removing instruction clrscr_from_main:
@ -6488,10 +6488,10 @@ FINAL SYMBOL TABLE
(const byte) RADIX::OCTAL = (number) 8
(const word*) RADIX_DECIMAL_VALUES[] = { (word) $2710, (word) $3e8, (word) $64, (word) $a }
(const byte) SIZEOF_STRUCT_PRINTF_BUFFER_NUMBER = (byte) $c
(void()) _start()
(label) _start::@1
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@return
(label) __start::__init1
(signed word()) atoi((to_nomodify byte*) atoi::str)
(signed word~) atoi::$3 zp[2]:2 2002.0
(signed word~) atoi::$4 zp[2]:2 2002.0
@ -6749,7 +6749,7 @@ Score: 21392
// Test atoi()
// Upstart
.pc = $801 "Basic"
:BasicUpstart(_start)
:BasicUpstart(__start)
.pc = $80d "Program"
// Global Constants & labels
.const LIGHT_BLUE = $e
@ -6768,9 +6768,9 @@ Score: 21392
.label conio_line_text = $b
// The current color cursor line start
.label conio_line_color = $d
// _start
_start: {
// _start::_init1
// __start
__start: {
// __start::__init1
// conio_cursor_x = 0
// [1] (byte) conio_cursor_x ← (byte) 0 -- vbuz1=vbuc1
lda #0
@ -6790,12 +6790,12 @@ _start: {
sta.z conio_line_color
lda #>COLORRAM
sta.z conio_line_color+1
// [5] phi from _start::_init1 to _start::@1 [phi:_start::_init1->_start::@1]
// _start::@1
// [5] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1]
// __start::@1
// [6] call main
// [8] phi from _start::@1 to main [phi:_start::@1->main]
// [8] phi from __start::@1 to main [phi:__start::@1->main]
jsr main
// _start::@return
// __start::@return
// [7] return
rts
}

@ -93,10 +93,10 @@
(const byte) RADIX::OCTAL = (number) 8
(const word*) RADIX_DECIMAL_VALUES[] = { (word) $2710, (word) $3e8, (word) $64, (word) $a }
(const byte) SIZEOF_STRUCT_PRINTF_BUFFER_NUMBER = (byte) $c
(void()) _start()
(label) _start::@1
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@return
(label) __start::__init1
(signed word()) atoi((to_nomodify byte*) atoi::str)
(signed word~) atoi::$3 zp[2]:2 2002.0
(signed word~) atoi::$4 zp[2]:2 2002.0

@ -2,38 +2,38 @@
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start
main: scope:[main] from __start
*((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK
to:main::@return
main::@return: scope:[main] from main
return
to:@return
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
call main
to:_start::@1
_start::@1: scope:[_start] from _start
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@1
__start::@1: scope:[__start] from __start
to:__start::@return
__start::@return: scope:[__start] from __start::@1
return
to:@return
SYMBOL TABLE SSA
(const nomodify byte*) BG_COLOR = (byte*)(number) $d021
(const nomodify byte) BLACK = (byte) 0
(void()) _start()
(label) _start::@1
(label) _start::@return
(void()) __start()
(label) __start::@1
(label) __start::@return
(void()) main()
(label) main::@return
Simplifying constant pointer cast (byte*) 53281
Successful SSA optimization PassNCastSimplification
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::@1
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
CALL GRAPH

@ -3,7 +3,7 @@ Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBa
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start
main: scope:[main] from __start
(byte*) fill::start#0 ← (const nomodify byte*) BITMAP
(signed word) fill::size#0 ← (number) $28*(number) $19*(number) 8
(byte) fill::val#0 ← (number) 0
@ -267,13 +267,13 @@ fill::@return: scope:[fill] from fill::@1
return
to:@return
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
call main
to:_start::@1
_start::@1: scope:[_start] from _start
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@1
__start::@1: scope:[__start] from __start
to:__start::@return
__start::@return: scope:[__start] from __start::@1
return
to:@return
@ -371,9 +371,9 @@ SYMBOL TABLE SSA
(const nomodify byte) VIC_DEN = (byte) $10
(const nomodify byte*) VIC_MEMORY = (byte*)(number) $d018
(const nomodify byte) VIC_RSEL = (byte) 8
(void()) _start()
(label) _start::@1
(label) _start::@return
(void()) __start()
(label) __start::@1
(label) __start::@return
(const byte*) bitmask[] = { (byte) $80, (byte) $40, (byte) $20, (byte) $10, (byte) 8, (byte) 4, (byte) 2, (byte) 1 }
(void()) circle((signed word) circle::xc , (signed word) circle::yc , (signed word) circle::r)
(signed word~) circle::$0
@ -794,10 +794,10 @@ if() condition always true - replacing block destination [20] if(true) goto main
Successful SSA optimization Pass2ConstantIfs
Removing unused block main::@return
Successful SSA optimization Pass2EliminateUnusedBlocks
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::@1
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Simple Condition (bool~) plot::$0 [55] if((signed word) plot::x#8<(signed byte) 0) goto plot::@return
Simple Condition (bool~) plot::$5 [75] if((signed word) plot::y#8>(signed word) $c7) goto plot::@return

@ -3,7 +3,7 @@ Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBa
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start
main: scope:[main] from __start
(byte*) fill::start#0 ← (const nomodify byte*) BITMAP
(signed word) fill::size#0 ← (number) $28*(number) $19*(number) 8
(byte) fill::val#0 ← (number) 0
@ -243,13 +243,13 @@ fill::@return: scope:[fill] from fill::@1
return
to:@return
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
call main
to:_start::@1
_start::@1: scope:[_start] from _start
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@1
__start::@1: scope:[__start] from __start
to:__start::@return
__start::@return: scope:[__start] from __start::@1
return
to:@return
@ -347,9 +347,9 @@ SYMBOL TABLE SSA
(const nomodify byte) VIC_DEN = (byte) $10
(const nomodify byte*) VIC_MEMORY = (byte*)(number) $d018
(const nomodify byte) VIC_RSEL = (byte) 8
(void()) _start()
(label) _start::@1
(label) _start::@return
(void()) __start()
(label) __start::@1
(label) __start::@return
(const byte*) bitmask[] = { (byte) $80, (byte) $40, (byte) $20, (byte) $10, (byte) 8, (byte) 4, (byte) 2, (byte) 1 }
(void()) circle((signed word) circle::xc , (signed word) circle::yc , (signed word) circle::r)
(signed word~) circle::$0
@ -727,10 +727,10 @@ if() condition always true - replacing block destination [15] if(true) goto main
Successful SSA optimization Pass2ConstantIfs
Removing unused block main::@return
Successful SSA optimization Pass2EliminateUnusedBlocks
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::@1
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Constant right-side identified [6] (signed word~) circle::$0 ← (const signed word) circle::r#0 << (signed byte) 1
Successful SSA optimization Pass2ConstantRValueConsolidation

@ -1,5 +1,5 @@
Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx
Inlined call call _init
Inlined call call __init
CONTROL FLOW GRAPH SSA
@ -563,8 +563,8 @@ bitmap_line_ydxd::@return: scope:[bitmap_line_ydxd] from bitmap_line_ydxd::@2
to:@return
(void()) main()
main: scope:[main] from _start::@1
(byte) next#14 ← phi( _start::@1/(byte) next#11 )
main: scope:[main] from __start::@1
(byte) next#14 ← phi( __start::@1/(byte) next#11 )
*((const nomodify byte*) BORDER_COLOR) ← (number) 0
*((const nomodify byte*) BG_COLOR) ← (number) 0
*((const nomodify byte*) D011) ← (const nomodify byte) VIC_BMM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(number) 3
@ -620,22 +620,22 @@ init_screen::@return: scope:[init_screen] from init_screen::@1
return
to:@return
(void()) _start()
_start: scope:[_start] from
to:_start::_init1
_start::_init1: scope:[_start] from _start
(void()) __start()
__start: scope:[__start] from
to:__start::__init1
__start::__init1: scope:[__start] from __start
(byte) next#2 ← (byte) 0
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
(byte) next#11 ← phi( _start::_init1/(byte) next#2 )
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
(byte) next#11 ← phi( __start::__init1/(byte) next#2 )
call main
to:_start::@2
_start::@2: scope:[_start] from _start::@1
(byte) next#8 ← phi( _start::@1/(byte) next#1 )
to:__start::@2
__start::@2: scope:[__start] from __start::@1
(byte) next#8 ← phi( __start::@1/(byte) next#1 )
(byte) next#3 ← (byte) next#8
to:_start::@return
_start::@return: scope:[_start] from _start::@2
(byte) next#9 ← phi( _start::@2/(byte) next#3 )
to:__start::@return
__start::@return: scope:[__start] from __start::@2
(byte) next#9 ← phi( __start::@2/(byte) next#3 )
(byte) next#4 ← (byte) next#9
return
to:@return
@ -734,11 +734,11 @@ SYMBOL TABLE SSA
(const nomodify byte) VIC_DEN = (byte) $10
(const nomodify byte*) VIC_MEMORY = (byte*)(number) $d018
(const nomodify byte) VIC_RSEL = (byte) 8
(void()) _start()
(label) _start::@1
(label) _start::@2
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@2
(label) __start::@return
(label) __start::__init1
(void()) bitmap_clear()
(bool~) bitmap_clear::$0
(bool~) bitmap_clear::$1
@ -1647,12 +1647,12 @@ Removing unused block bitmap_line::@6
Removing unused block bitmap_line::@20
Removing unused block main::@return
Successful SSA optimization Pass2EliminateUnusedBlocks
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::_init1
Removing unused procedure block _start::@1
Removing unused procedure block _start::@2
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::__init1
Removing unused procedure block __start::@1
Removing unused procedure block __start::@2
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Adding number conversion cast (unumber) 0 in [10] if((byte) bitmap_init::x#1!=(number) 0) goto bitmap_init::@1
Adding number conversion cast (unumber) 0 in [22] if((byte) bitmap_init::y#1!=(number) 0) goto bitmap_init::@5

@ -1,5 +1,5 @@
Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx
Inlined call call _init
Inlined call call __init
CONTROL FLOW GRAPH SSA
@ -457,10 +457,10 @@ sgn_u16::@return: scope:[sgn_u16] from sgn_u16::@1 sgn_u16::@2
to:@return
(void()) main()
main: scope:[main] from _start::@1
(word) next#15 ← phi( _start::@1/(word) next#13 )
(byte*) bitmap_screen#14 ← phi( _start::@1/(byte*) bitmap_screen#16 )
(byte*) bitmap_gfx#15 ← phi( _start::@1/(byte*) bitmap_gfx#17 )
main: scope:[main] from __start::@1
(word) next#15 ← phi( __start::@1/(word) next#13 )
(byte*) bitmap_screen#14 ← phi( __start::@1/(byte*) bitmap_screen#16 )
(byte*) bitmap_gfx#15 ← phi( __start::@1/(byte*) bitmap_gfx#17 )
*((const nomodify byte*) BORDER_COLOR) ← (number) 0
*((const nomodify byte*) BG_COLOR) ← (number) 0
*((const nomodify byte*) D011) ← (const nomodify byte) VIC_BMM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(number) 3
@ -524,32 +524,32 @@ main::@return: scope:[main] from main::@2
return
to:@return
(void()) _start()
_start: scope:[_start] from
to:_start::_init1
_start::_init1: scope:[_start] from _start
(void()) __start()
__start: scope:[__start] from
to:__start::__init1
__start::__init1: scope:[__start] from __start
(byte*) bitmap_screen#4 ← (byte*) 0
(byte*) bitmap_gfx#4 ← (byte*) 0
(word) next#3 ← (word) 0
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
(word) next#13 ← phi( _start::_init1/(word) next#3 )
(byte*) bitmap_screen#16 ← phi( _start::_init1/(byte*) bitmap_screen#4 )
(byte*) bitmap_gfx#17 ← phi( _start::_init1/(byte*) bitmap_gfx#4 )
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
(word) next#13 ← phi( __start::__init1/(word) next#3 )
(byte*) bitmap_screen#16 ← phi( __start::__init1/(byte*) bitmap_screen#4 )
(byte*) bitmap_gfx#17 ← phi( __start::__init1/(byte*) bitmap_gfx#4 )
call main
to:_start::@2
_start::@2: scope:[_start] from _start::@1
(word) next#9 ← phi( _start::@1/(word) next#2 )
(byte*) bitmap_screen#11 ← phi( _start::@1/(byte*) bitmap_screen#3 )
(byte*) bitmap_gfx#11 ← phi( _start::@1/(byte*) bitmap_gfx#3 )
to:__start::@2
__start::@2: scope:[__start] from __start::@1
(word) next#9 ← phi( __start::@1/(word) next#2 )
(byte*) bitmap_screen#11 ← phi( __start::@1/(byte*) bitmap_screen#3 )
(byte*) bitmap_gfx#11 ← phi( __start::@1/(byte*) bitmap_gfx#3 )
(byte*) bitmap_gfx#5 ← (byte*) bitmap_gfx#11
(byte*) bitmap_screen#5 ← (byte*) bitmap_screen#11
(word) next#4 ← (word) next#9
to:_start::@return
_start::@return: scope:[_start] from _start::@2
(word) next#10 ← phi( _start::@2/(word) next#4 )
(byte*) bitmap_gfx#12 ← phi( _start::@2/(byte*) bitmap_gfx#5 )
(byte*) bitmap_screen#12 ← phi( _start::@2/(byte*) bitmap_screen#5 )
to:__start::@return
__start::@return: scope:[__start] from __start::@2
(word) next#10 ← phi( __start::@2/(word) next#4 )
(byte*) bitmap_gfx#12 ← phi( __start::@2/(byte*) bitmap_gfx#5 )
(byte*) bitmap_screen#12 ← phi( __start::@2/(byte*) bitmap_screen#5 )
(byte*) bitmap_screen#6 ← (byte*) bitmap_screen#12
(byte*) bitmap_gfx#6 ← (byte*) bitmap_gfx#12
(word) next#5 ← (word) next#10
@ -652,11 +652,11 @@ SYMBOL TABLE SSA
(const nomodify byte*) VIC_MEMORY = (byte*)(number) $d018
(const nomodify byte) VIC_RSEL = (byte) 8
(const nomodify byte) WHITE = (byte) 1
(void()) _start()
(label) _start::@1
(label) _start::@2
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@2
(label) __start::@return
(label) __start::__init1
(word()) abs_u16((word) abs_u16::w)
(byte~) abs_u16::$0
(number~) abs_u16::$1
@ -1488,12 +1488,12 @@ Eliminating unused constant (const byte*) bitmap_gfx#17
Successful SSA optimization PassNEliminateUnusedVars
Removing unused block main::@return
Successful SSA optimization Pass2EliminateUnusedBlocks
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::_init1
Removing unused procedure block _start::@1
Removing unused procedure block _start::@2
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::__init1
Removing unused procedure block __start::@1
Removing unused procedure block __start::@2
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Adding number conversion cast (unumber) 0 in [16] if((byte) bitmap_init::x#1!=(number) 0) goto bitmap_init::@1
Adding number conversion cast (unumber) 0 in [28] if((byte) bitmap_init::y#1!=(number) 0) goto bitmap_init::@5

@ -4,7 +4,7 @@
// The MOS 6526 Complex Interface Adapter (CIA)
// http://archive.6502.org/datasheets/mos_6526_cia_recreated.pdf
.pc = $801 "Basic"
:BasicUpstart(_start)
:BasicUpstart(__start)
.pc = $80d "Program"
// Value that disables all CIA interrupts when stored to the CIA Interrupt registers
.const CIA_INTERRUPT_CLEAR = $7f
@ -42,7 +42,7 @@
.label SCREEN = $400
// Counts frames - updated by the IRQ
.label frame_cnt = 8
_start: {
__start: {
// frame_cnt = 1
lda #1
sta.z frame_cnt

@ -1,21 +1,21 @@
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
[0] phi()
to:_start::_init1
_start::_init1: scope:[_start] from _start
to:__start::__init1
__start::__init1: scope:[__start] from __start
[1] (volatile byte) frame_cnt ← (byte) 1
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
[2] phi()
[3] call main
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@return
__start::@return: scope:[__start] from __start::@1
[4] return
to:@return
(void()) main()
main: scope:[main] from _start::@1
main: scope:[main] from __start::@1
[5] phi()
[6] call bitmap_init
to:main::@8

@ -4,7 +4,7 @@ Resolved forward reference frame_cnt to (volatile byte) frame_cnt
Resolved forward reference irq to interrupt(HARDWARE_CLOBBER)(void()) irq()
Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx
Inlined call (byte~) main::$2 ← call toD018 (const byte*) SCREEN (const byte*) BITMAP
Inlined call call _init
Inlined call call __init
CONTROL FLOW GRAPH SSA
@ -182,9 +182,9 @@ bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot
to:@return
(void()) main()
main: scope:[main] from _start::@1
(byte*) bitmap_screen#14 ← phi( _start::@1/(byte*) bitmap_screen#16 )
(byte*) bitmap_gfx#15 ← phi( _start::@1/(byte*) bitmap_gfx#17 )
main: scope:[main] from __start::@1
(byte*) bitmap_screen#14 ← phi( __start::@1/(byte*) bitmap_screen#16 )
(byte*) bitmap_gfx#15 ← phi( __start::@1/(byte*) bitmap_gfx#17 )
(byte*) bitmap_init::gfx#0 ← (const byte*) BITMAP
(byte*) bitmap_init::screen#0 ← (const byte*) SCREEN
call bitmap_init
@ -361,28 +361,28 @@ irq::@return: scope:[irq] from irq::@1
return
to:@return
(void()) _start()
_start: scope:[_start] from
to:_start::_init1
_start::_init1: scope:[_start] from _start
(void()) __start()
__start: scope:[__start] from
to:__start::__init1
__start::__init1: scope:[__start] from __start
(byte*) bitmap_screen#4 ← (byte*) 0
(byte*) bitmap_gfx#4 ← (byte*) 0
(volatile byte) frame_cnt ← (byte) 1
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
(byte*) bitmap_screen#16 ← phi( _start::_init1/(byte*) bitmap_screen#4 )
(byte*) bitmap_gfx#17 ← phi( _start::_init1/(byte*) bitmap_gfx#4 )
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
(byte*) bitmap_screen#16 ← phi( __start::__init1/(byte*) bitmap_screen#4 )
(byte*) bitmap_gfx#17 ← phi( __start::__init1/(byte*) bitmap_gfx#4 )
call main
to:_start::@2
_start::@2: scope:[_start] from _start::@1
(byte*) bitmap_screen#11 ← phi( _start::@1/(byte*) bitmap_screen#3 )
(byte*) bitmap_gfx#11 ← phi( _start::@1/(byte*) bitmap_gfx#3 )
to:__start::@2
__start::@2: scope:[__start] from __start::@1
(byte*) bitmap_screen#11 ← phi( __start::@1/(byte*) bitmap_screen#3 )
(byte*) bitmap_gfx#11 ← phi( __start::@1/(byte*) bitmap_gfx#3 )
(byte*) bitmap_gfx#5 ← (byte*) bitmap_gfx#11
(byte*) bitmap_screen#5 ← (byte*) bitmap_screen#11
to:_start::@return
_start::@return: scope:[_start] from _start::@2
(byte*) bitmap_gfx#12 ← phi( _start::@2/(byte*) bitmap_gfx#5 )
(byte*) bitmap_screen#12 ← phi( _start::@2/(byte*) bitmap_screen#5 )
to:__start::@return
__start::@return: scope:[__start] from __start::@2
(byte*) bitmap_gfx#12 ← phi( __start::@2/(byte*) bitmap_gfx#5 )
(byte*) bitmap_screen#12 ← phi( __start::@2/(byte*) bitmap_screen#5 )
(byte*) bitmap_screen#6 ← (byte*) bitmap_screen#12
(byte*) bitmap_gfx#6 ← (byte*) bitmap_gfx#12
return
@ -496,11 +496,11 @@ SYMBOL TABLE SSA
(const nomodify byte) VIC_DEN = (byte) $10
(const nomodify byte) VIC_RSEL = (byte) 8
(const nomodify byte) WHITE = (byte) 1
(void()) _start()
(label) _start::@1
(label) _start::@2
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@2
(label) __start::@return
(label) __start::__init1
(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol)
(number~) bitmap_clear::$0
(number~) bitmap_clear::$1
@ -1180,9 +1180,9 @@ Added new block during phi lifting bitmap_init::@10(between bitmap_init::@6 and
Added new block during phi lifting bitmap_init::@11(between bitmap_init::@5 and bitmap_init::@6)
Added new block during phi lifting main::@14(between main::@12 and main::@3)
Added new block during phi lifting main::@15(between main::@13 and main::@4)
Adding NOP phi() at start of _start
Adding NOP phi() at start of _start::@1
Adding NOP phi() at start of _start::@2
Adding NOP phi() at start of __start
Adding NOP phi() at start of __start::@1
Adding NOP phi() at start of __start::@2
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@8
Adding NOP phi() at start of main::toD0181
@ -1196,7 +1196,7 @@ Adding NOP phi() at start of bitmap_init
Adding NOP phi() at start of bitmap_init::@3
Adding NOP phi() at start of bitmap_init::@4
CALL GRAPH
Calls in [_start] to main:3
Calls in [__start] to main:3
Calls in [main] to bitmap_init:7 bitmap_clear:9 init_irq:14 bitmap_plot:19
Calls in [bitmap_clear] to memset:56 memset:58
@ -1218,7 +1218,7 @@ Coalesced [99] bitmap_init::bits#5 ← bitmap_init::bits#4
Coalesced [100] bitmap_init::x#5 ← bitmap_init::x#1
Coalesced [101] bitmap_init::bits#6 ← bitmap_init::bits#1
Coalesced down to 12 phi equivalence classes
Culled Empty Block (label) _start::@2
Culled Empty Block (label) __start::@2
Culled Empty Block (label) main::toD0181_@return
Culled Empty Block (label) main::@10
Culled Empty Block (label) main::@15
@ -1240,8 +1240,8 @@ Renumbering block bitmap_init::@9 to bitmap_init::@6
Renumbering block main::@11 to main::@10
Renumbering block main::@12 to main::@11
Renumbering block main::@13 to main::@12
Adding NOP phi() at start of _start
Adding NOP phi() at start of _start::@1
Adding NOP phi() at start of __start
Adding NOP phi() at start of __start::@1
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@8
Adding NOP phi() at start of main::toD0181
@ -1252,23 +1252,23 @@ Adding NOP phi() at start of bitmap_init::@6
FINAL CONTROL FLOW GRAPH
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
[0] phi()
to:_start::_init1
_start::_init1: scope:[_start] from _start
to:__start::__init1
__start::__init1: scope:[__start] from __start
[1] (volatile byte) frame_cnt ← (byte) 1
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
[2] phi()
[3] call main
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@return
__start::@return: scope:[__start] from __start::@1
[4] return
to:@return
(void()) main()
main: scope:[main] from _start::@1
main: scope:[main] from __start::@1
[5] phi()
[6] call bitmap_init
to:main::@8
@ -1531,7 +1531,7 @@ VARIABLE REGISTER WEIGHTS
(byte) MOS6581_SID::POT_X
(byte) MOS6581_SID::POT_Y
(byte) MOS6581_SID::VOLUME_FILTER_MODE
(void()) _start()
(void()) __start()
(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol)
(byte) bitmap_clear::bgcol
(byte) bitmap_clear::col
@ -1690,7 +1690,7 @@ Target platform is c64basic / MOS6502X
// http://archive.6502.org/datasheets/mos_6526_cia_recreated.pdf
// Upstart
.pc = $801 "Basic"
:BasicUpstart(_start)
:BasicUpstart(__start)
.pc = $80d "Program"
// Global Constants & labels
// Value that disables all CIA interrupts when stored to the CIA Interrupt registers
@ -1729,25 +1729,25 @@ Target platform is c64basic / MOS6502X
.label SCREEN = $400
// Counts frames - updated by the IRQ
.label frame_cnt = $14
// _start
_start: {
jmp _init1
// _start::_init1
_init1:
// __start
__start: {
jmp __init1
// __start::__init1
__init1:
// [1] (volatile byte) frame_cnt ← (byte) 1 -- vbuz1=vbuc1
lda #1
sta.z frame_cnt
// [2] phi from _start::_init1 to _start::@1 [phi:_start::_init1->_start::@1]
__b1_from__init1:
// [2] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1]
__b1_from___init1:
jmp __b1
// _start::@1
// __start::@1
__b1:
// [3] call main
// [5] phi from _start::@1 to main [phi:_start::@1->main]
// [5] phi from __start::@1 to main [phi:__start::@1->main]
main_from___b1:
jsr main
jmp __breturn
// _start::@return
// __start::@return
__breturn:
// [4] return
rts
@ -2415,7 +2415,7 @@ Uplift Scope [MOS6581_SID]
Uplift Scope [bitmap_clear]
Uplift Scope [init_irq]
Uplift Scope [irq]
Uplift Scope [_start]
Uplift Scope [__start]
Uplifting [memset] best 4871 combination zp[2]:13 [ memset::dst#2 memset::dst#4 memset::dst#1 ] zp[2]:31 [ memset::end#0 ] reg byte x [ memset::c#4 ] zp[2]:8 [ memset::num#2 ] zp[2]:10 [ memset::str#3 ]
Uplifting [bitmap_init] best 4361 combination zp[2]:18 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ] reg byte a [ bitmap_init::$4 ] zp[1]:35 [ bitmap_init::$5 ] zp[1]:36 [ bitmap_init::$6 ] zp[1]:33 [ bitmap_init::$7 ]
@ -2429,7 +2429,7 @@ Uplifting [MOS6581_SID] best 4322 combination
Uplifting [bitmap_clear] best 4322 combination
Uplifting [init_irq] best 4322 combination
Uplifting [irq] best 4322 combination
Uplifting [_start] best 4322 combination
Uplifting [__start] best 4322 combination
Attempting to uplift remaining variables inzp[1]:35 [ bitmap_init::$5 ]
Uplifting [bitmap_init] best 4262 combination reg byte a [ bitmap_init::$5 ]
Attempting to uplift remaining variables inzp[1]:36 [ bitmap_init::$6 ]
@ -2470,7 +2470,7 @@ ASSEMBLER BEFORE OPTIMIZATION
// http://archive.6502.org/datasheets/mos_6526_cia_recreated.pdf
// Upstart
.pc = $801 "Basic"
:BasicUpstart(_start)
:BasicUpstart(__start)
.pc = $80d "Program"
// Global Constants & labels
// Value that disables all CIA interrupts when stored to the CIA Interrupt registers
@ -2509,25 +2509,25 @@ ASSEMBLER BEFORE OPTIMIZATION
.label SCREEN = $400
// Counts frames - updated by the IRQ
.label frame_cnt = 8
// _start
_start: {
jmp _init1
// _start::_init1
_init1:
// __start
__start: {
jmp __init1
// __start::__init1
__init1:
// [1] (volatile byte) frame_cnt ← (byte) 1 -- vbuz1=vbuc1
lda #1
sta.z frame_cnt
// [2] phi from _start::_init1 to _start::@1 [phi:_start::_init1->_start::@1]
__b1_from__init1:
// [2] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1]
__b1_from___init1:
jmp __b1
// _start::@1
// __start::@1
__b1:
// [3] call main
// [5] phi from _start::@1 to main [phi:_start::@1->main]
// [5] phi from __start::@1 to main [phi:__start::@1->main]
main_from___b1:
jsr main
jmp __breturn
// _start::@return
// __start::@return
__breturn:
// [4] return
rts
@ -3031,7 +3031,7 @@ irq: {
plots_per_frame: .fill $100, 0
ASSEMBLER OPTIMIZATIONS
Removing instruction jmp _init1
Removing instruction jmp __init1
Removing instruction jmp __b1
Removing instruction jmp __breturn
Removing instruction jmp __b8
@ -3080,7 +3080,7 @@ Replacing label __b6_from___b1 with __b2
Replacing label __b1_from___b2 with __b1
Replacing label __b4_from___b3 with __b4
Replacing label __b3_from___b4 with __b3
Removing instruction __b1_from__init1:
Removing instruction __b1_from___init1:
Removing instruction main_from___b1:
Removing instruction __b8_from_main:
Removing instruction bitmap_clear_from___b8:
@ -3104,7 +3104,7 @@ Removing instruction __b4_from___b3:
Removing instruction __b4_from___b5:
Removing instruction __breturn:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction _init1:
Removing instruction __init1:
Removing instruction __b1:
Removing instruction __breturn:
Removing instruction bitmap_init_from_main:
@ -3242,10 +3242,10 @@ FINAL SYMBOL TABLE
(const nomodify byte) VIC_DEN = (byte) $10
(const nomodify byte) VIC_RSEL = (byte) 8
(const nomodify byte) WHITE = (byte) 1
(void()) _start()
(label) _start::@1
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@return
(label) __start::__init1
(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol)
(label) bitmap_clear::@1
(label) bitmap_clear::@return
@ -3386,7 +3386,7 @@ Score: 3175
// http://archive.6502.org/datasheets/mos_6526_cia_recreated.pdf
// Upstart
.pc = $801 "Basic"
:BasicUpstart(_start)
:BasicUpstart(__start)
.pc = $80d "Program"
// Global Constants & labels
// Value that disables all CIA interrupts when stored to the CIA Interrupt registers
@ -3425,19 +3425,19 @@ Score: 3175
.label SCREEN = $400
// Counts frames - updated by the IRQ
.label frame_cnt = 8
// _start
_start: {
// _start::_init1
// __start
__start: {
// __start::__init1
// frame_cnt = 1
// [1] (volatile byte) frame_cnt ← (byte) 1 -- vbuz1=vbuc1
lda #1
sta.z frame_cnt
// [2] phi from _start::_init1 to _start::@1 [phi:_start::_init1->_start::@1]
// _start::@1
// [2] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1]
// __start::@1
// [3] call main
// [5] phi from _start::@1 to main [phi:_start::@1->main]
// [5] phi from __start::@1 to main [phi:__start::@1->main]
jsr main
// _start::@return
// __start::@return
// [4] return
rts
}

@ -105,10 +105,10 @@
(const nomodify byte) VIC_DEN = (byte) $10
(const nomodify byte) VIC_RSEL = (byte) 8
(const nomodify byte) WHITE = (byte) 1
(void()) _start()
(label) _start::@1
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@return
(label) __start::__init1
(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol)
(label) bitmap_clear::@1
(label) bitmap_clear::@return

@ -4,7 +4,7 @@
// The MOS 6526 Complex Interface Adapter (CIA)
// http://archive.6502.org/datasheets/mos_6526_cia_recreated.pdf
.pc = $801 "Basic"
:BasicUpstart(_start)
:BasicUpstart(__start)
.pc = $80d "Program"
// Value that disables all CIA interrupts when stored to the CIA Interrupt registers
.const CIA_INTERRUPT_CLEAR = $7f
@ -51,7 +51,7 @@
.label frame_cnt = $16
// Remainder after unsigned 16-bit division
.label rem16u = $2e
_start: {
__start: {
// frame_cnt = 1
lda #1
sta.z frame_cnt

@ -1,21 +1,21 @@
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
[0] phi()
to:_start::_init1
_start::_init1: scope:[_start] from _start
to:__start::__init1
__start::__init1: scope:[__start] from __start
[1] (volatile byte) frame_cnt ← (byte) 1
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
[2] phi()
[3] call main
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@return
__start::@return: scope:[__start] from __start::@1
[4] return
to:@return
(void()) main()
main: scope:[main] from _start::@1
main: scope:[main] from __start::@1
[5] phi()
[6] call sin16s_gen2
to:main::@6

@ -4,7 +4,7 @@ Resolved forward reference frame_cnt to (volatile byte) frame_cnt
Resolved forward reference irq to interrupt(HARDWARE_CLOBBER)(void()) irq()
Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx
Inlined call (byte~) main::$3 ← call toD018 (const byte*) SCREEN (const byte*) BITMAP
Inlined call call _init
Inlined call call __init
CONTROL FLOW GRAPH SSA
@ -653,10 +653,10 @@ bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot
to:@return
(void()) main()
main: scope:[main] from _start::@1
(byte*) bitmap_screen#19 ← phi( _start::@1/(byte*) bitmap_screen#16 )
(byte*) bitmap_gfx#20 ← phi( _start::@1/(byte*) bitmap_gfx#17 )
(word) rem16u#25 ← phi( _start::@1/(word) rem16u#27 )
main: scope:[main] from __start::@1
(byte*) bitmap_screen#19 ← phi( __start::@1/(byte*) bitmap_screen#16 )
(byte*) bitmap_gfx#20 ← phi( __start::@1/(byte*) bitmap_gfx#17 )
(word) rem16u#25 ← phi( __start::@1/(word) rem16u#27 )
(signed word*) sin16s_gen2::sintab#1 ← (const signed word*) SINUS
(word) sin16s_gen2::wavelength#0 ← (number) $200
(signed word) sin16s_gen2::min#0 ← (number) -$1001
@ -876,33 +876,33 @@ irq::@return: scope:[irq] from irq::@1
return
to:@return
(void()) _start()
_start: scope:[_start] from
to:_start::_init1
_start::_init1: scope:[_start] from _start
(void()) __start()
__start: scope:[__start] from
to:__start::__init1
__start::__init1: scope:[__start] from __start
(word) rem16u#9 ← (word) 0
(byte*) bitmap_screen#4 ← (byte*) 0
(byte*) bitmap_gfx#4 ← (byte*) 0
(volatile byte) frame_cnt ← (byte) 1
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
(byte*) bitmap_screen#16 ← phi( _start::_init1/(byte*) bitmap_screen#4 )
(byte*) bitmap_gfx#17 ← phi( _start::_init1/(byte*) bitmap_gfx#4 )
(word) rem16u#27 ← phi( _start::_init1/(word) rem16u#9 )
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
(byte*) bitmap_screen#16 ← phi( __start::__init1/(byte*) bitmap_screen#4 )
(byte*) bitmap_gfx#17 ← phi( __start::__init1/(byte*) bitmap_gfx#4 )
(word) rem16u#27 ← phi( __start::__init1/(word) rem16u#9 )
call main
to:_start::@2
_start::@2: scope:[_start] from _start::@1
(byte*) bitmap_screen#11 ← phi( _start::@1/(byte*) bitmap_screen#3 )
(byte*) bitmap_gfx#11 ← phi( _start::@1/(byte*) bitmap_gfx#3 )
(word) rem16u#20 ← phi( _start::@1/(word) rem16u#8 )
to:__start::@2
__start::@2: scope:[__start] from __start::@1
(byte*) bitmap_screen#11 ← phi( __start::@1/(byte*) bitmap_screen#3 )
(byte*) bitmap_gfx#11 ← phi( __start::@1/(byte*) bitmap_gfx#3 )
(word) rem16u#20 ← phi( __start::@1/(word) rem16u#8 )
(word) rem16u#10 ← (word) rem16u#20
(byte*) bitmap_gfx#5 ← (byte*) bitmap_gfx#11
(byte*) bitmap_screen#5 ← (byte*) bitmap_screen#11
to:_start::@return
_start::@return: scope:[_start] from _start::@2
(byte*) bitmap_gfx#12 ← phi( _start::@2/(byte*) bitmap_gfx#5 )
(byte*) bitmap_screen#12 ← phi( _start::@2/(byte*) bitmap_screen#5 )
(word) rem16u#21 ← phi( _start::@2/(word) rem16u#10 )
to:__start::@return
__start::@return: scope:[__start] from __start::@2
(byte*) bitmap_gfx#12 ← phi( __start::@2/(byte*) bitmap_gfx#5 )
(byte*) bitmap_screen#12 ← phi( __start::@2/(byte*) bitmap_screen#5 )
(word) rem16u#21 ← phi( __start::@2/(word) rem16u#10 )
(word) rem16u#11 ← (word) rem16u#21
(byte*) bitmap_screen#6 ← (byte*) bitmap_screen#12
(byte*) bitmap_gfx#6 ← (byte*) bitmap_gfx#12
@ -1022,11 +1022,11 @@ SYMBOL TABLE SSA
(const nomodify byte) VIC_DEN = (byte) $10
(const nomodify byte) VIC_RSEL = (byte) 8
(const nomodify byte) WHITE = (byte) 1
(void()) _start()
(label) _start::@1
(label) _start::@2
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@2
(label) __start::@return
(label) __start::__init1
(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol)
(number~) bitmap_clear::$0
(number~) bitmap_clear::$1
@ -2560,9 +2560,9 @@ Added new block during phi lifting bitmap_init::@10(between bitmap_init::@6 and
Added new block during phi lifting bitmap_init::@11(between bitmap_init::@5 and bitmap_init::@6)
Added new block during phi lifting main::@15(between main::@14 and main::@3)
Added new block during phi lifting main::@16(between main::@3 and main::@4)
Adding NOP phi() at start of _start
Adding NOP phi() at start of _start::@1
Adding NOP phi() at start of _start::@2
Adding NOP phi() at start of __start
Adding NOP phi() at start of __start::@1
Adding NOP phi() at start of __start::@2
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@8
Adding NOP phi() at start of main::@9
@ -2582,7 +2582,7 @@ Adding NOP phi() at start of bitmap_init::@4
Adding NOP phi() at start of sin16s_gen2
Adding NOP phi() at start of div32u16u
CALL GRAPH
Calls in [_start] to main:3
Calls in [__start] to main:3
Calls in [main] to sin16s_gen2:7 bitmap_init:9 bitmap_clear:11 init_irq:16 mul16s:24 mul16s:35 bitmap_plot:43
Calls in [mul16s] to mul16u:68
Calls in [bitmap_clear] to memset:117 memset:119
@ -2653,7 +2653,7 @@ Coalesced [289] divr16u::rem#17 ← divr16u::rem#6
Coalesced [290] divr16u::return#7 ← divr16u::quotient#1
Coalesced [291] divr16u::rem#15 ← divr16u::rem#0
Coalesced down to 30 phi equivalence classes
Culled Empty Block (label) _start::@2
Culled Empty Block (label) __start::@2
Culled Empty Block (label) main::toD0181_@return
Culled Empty Block (label) main::@11
Culled Empty Block (label) main::@5
@ -2693,8 +2693,8 @@ Renumbering block main::@13 to main::@10
Renumbering block main::@14 to main::@11
Renumbering block main::@15 to main::@12
Renumbering block main::@16 to main::@13
Adding NOP phi() at start of _start
Adding NOP phi() at start of _start::@1
Adding NOP phi() at start of __start
Adding NOP phi() at start of __start::@1
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@6
Adding NOP phi() at start of main::@7
@ -2710,23 +2710,23 @@ Adding NOP phi() at start of div32u16u
FINAL CONTROL FLOW GRAPH
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
[0] phi()
to:_start::_init1
_start::_init1: scope:[_start] from _start
to:__start::__init1
__start::__init1: scope:[__start] from __start
[1] (volatile byte) frame_cnt ← (byte) 1
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
[2] phi()
[3] call main
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@return
__start::@return: scope:[__start] from __start::@1
[4] return
to:@return
(void()) main()
main: scope:[main] from _start::@1
main: scope:[main] from __start::@1
[5] phi()
[6] call sin16s_gen2
to:main::@6
@ -3260,7 +3260,7 @@ VARIABLE REGISTER WEIGHTS
(byte) MOS6581_SID::POT_X
(byte) MOS6581_SID::POT_Y
(byte) MOS6581_SID::VOLUME_FILTER_MODE
(void()) _start()
(void()) __start()
(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol)
(byte) bitmap_clear::bgcol
(byte) bitmap_clear::col
@ -3819,7 +3819,7 @@ Target platform is c64basic / MOS6502X
// http://archive.6502.org/datasheets/mos_6526_cia_recreated.pdf
// Upstart
.pc = $801 "Basic"
:BasicUpstart(_start)
:BasicUpstart(__start)
.pc = $80d "Program"
// Global Constants & labels
// Value that disables all CIA interrupts when stored to the CIA Interrupt registers
@ -3867,25 +3867,25 @@ Target platform is c64basic / MOS6502X
.label frame_cnt = $41
// Remainder after unsigned 16-bit division
.label rem16u = $df
// _start
_start: {
jmp _init1
// _start::_init1
_init1:
// __start
__start: {
jmp __init1
// __start::__init1
__init1:
// [1] (volatile byte) frame_cnt ← (byte) 1 -- vbuz1=vbuc1
lda #1
sta.z frame_cnt
// [2] phi from _start::_init1 to _start::@1 [phi:_start::_init1->_start::@1]
__b1_from__init1:
// [2] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1]
__b1_from___init1:
jmp __b1
// _start::@1
// __start::@1
__b1:
// [3] call main
// [5] phi from _start::@1 to main [phi:_start::@1->main]
// [5] phi from __start::@1 to main [phi:__start::@1->main]
main_from___b1:
jsr main
jmp __breturn
// _start::@return
// __start::@return
__breturn:
// [4] return
rts
@ -6060,7 +6060,7 @@ Uplift Scope [MOS6581_SID]
Uplift Scope [bitmap_clear]
Uplift Scope [init_irq]
Uplift Scope [irq]
Uplift Scope [_start]
Uplift Scope [__start]
Uplifting [mul16u] best 27647 combination zp[4]:18 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] zp[4]:22 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ] reg byte a [ mul16u::$1 ] zp[2]:16 [ mul16u::a#3 mul16u::a#6 mul16u::a#1 mul16u::a#2 mul16u::a#0 ] zp[2]:14 [ mul16u::b#2 mul16u::b#0 mul16u::b#1 ] zp[4]:195 [ mul16u::return#3 ] zp[4]:120 [ mul16u::return#2 ]
Uplifting [divr16u] best 27437 combination zp[2]:58 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] zp[2]:62 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] zp[2]:60 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] zp[2]:209 [ divr16u::return#2 ] zp[2]:213 [ divr16u::return#3 ]
@ -6081,7 +6081,7 @@ Uplifting [MOS6581_SID] best 26609 combination
Uplifting [bitmap_clear] best 26609 combination
Uplifting [init_irq] best 26609 combination
Uplifting [irq] best 26609 combination
Uplifting [_start] best 26609 combination
Uplifting [__start] best 26609 combination
Attempting to uplift remaining variables inzp[1]:141 [ bitmap_init::$5 ]
Uplifting [bitmap_init] best 26549 combination reg byte a [ bitmap_init::$5 ]
Attempting to uplift remaining variables inzp[1]:142 [ bitmap_init::$6 ]
@ -6186,7 +6186,7 @@ ASSEMBLER BEFORE OPTIMIZATION
// http://archive.6502.org/datasheets/mos_6526_cia_recreated.pdf
// Upstart
.pc = $801 "Basic"
:BasicUpstart(_start)
:BasicUpstart(__start)
.pc = $80d "Program"
// Global Constants & labels
// Value that disables all CIA interrupts when stored to the CIA Interrupt registers
@ -6234,25 +6234,25 @@ ASSEMBLER BEFORE OPTIMIZATION
.label frame_cnt = $16
// Remainder after unsigned 16-bit division
.label rem16u = $2e
// _start
_start: {
jmp _init1
// _start::_init1
_init1:
// __start
__start: {
jmp __init1
// __start::__init1
__init1:
// [1] (volatile byte) frame_cnt ← (byte) 1 -- vbuz1=vbuc1
lda #1
sta.z frame_cnt
// [2] phi from _start::_init1 to _start::@1 [phi:_start::_init1->_start::@1]
__b1_from__init1:
// [2] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1]
__b1_from___init1:
jmp __b1
// _start::@1
// __start::@1
__b1:
// [3] call main
// [5] phi from _start::@1 to main [phi:_start::@1->main]
// [5] phi from __start::@1 to main [phi:__start::@1->main]
main_from___b1:
jsr main
jmp __breturn
// _start::@return
// __start::@return
__breturn:
// [4] return
rts
@ -7756,7 +7756,7 @@ irq: {
SINUS: .fill 2*$200, 0
ASSEMBLER OPTIMIZATIONS
Removing instruction jmp _init1
Removing instruction jmp __init1
Removing instruction jmp __b1
Removing instruction jmp __breturn
Removing instruction jmp __b6
@ -7863,7 +7863,7 @@ Replacing label __b2_from___b1 with __b2
Replacing label __b3_from___b2 with __b3
Replacing label __b3_from___b2 with __b3
Replacing label __b1_from___b3 with __b1
Removing instruction __b1_from__init1:
Removing instruction __b1_from___init1:
Removing instruction main_from___b1:
Removing instruction __b6_from_main:
Removing instruction bitmap_init_from___b6:
@ -7911,7 +7911,7 @@ Removing instruction __b3_from___b2:
Removing instruction __b3_from___b5:
Removing instruction __breturn:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction _init1:
Removing instruction __init1:
Removing instruction __b1:
Removing instruction __breturn:
Removing instruction sin16s_gen2_from_main:
@ -8113,10 +8113,10 @@ FINAL SYMBOL TABLE
(const nomodify byte) VIC_DEN = (byte) $10
(const nomodify byte) VIC_RSEL = (byte) 8
(const nomodify byte) WHITE = (byte) 1
(void()) _start()
(label) _start::@1
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@return
(label) __start::__init1
(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol)
(label) bitmap_clear::@1
(label) bitmap_clear::@return
@ -8501,7 +8501,7 @@ Score: 20672
// http://archive.6502.org/datasheets/mos_6526_cia_recreated.pdf
// Upstart
.pc = $801 "Basic"
:BasicUpstart(_start)
:BasicUpstart(__start)
.pc = $80d "Program"
// Global Constants & labels
// Value that disables all CIA interrupts when stored to the CIA Interrupt registers
@ -8549,19 +8549,19 @@ Score: 20672
.label frame_cnt = $16
// Remainder after unsigned 16-bit division
.label rem16u = $2e
// _start
_start: {
// _start::_init1
// __start
__start: {
// __start::__init1
// frame_cnt = 1
// [1] (volatile byte) frame_cnt ← (byte) 1 -- vbuz1=vbuc1
lda #1
sta.z frame_cnt
// [2] phi from _start::_init1 to _start::@1 [phi:_start::_init1->_start::@1]
// _start::@1
// [2] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1]
// __start::@1
// [3] call main
// [5] phi from _start::@1 to main [phi:_start::@1->main]
// [5] phi from __start::@1 to main [phi:__start::@1->main]
jsr main
// _start::@return
// __start::@return
// [4] return
rts
}

@ -110,10 +110,10 @@
(const nomodify byte) VIC_DEN = (byte) $10
(const nomodify byte) VIC_RSEL = (byte) 8
(const nomodify byte) WHITE = (byte) 1
(void()) _start()
(label) _start::@1
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@return
(label) __start::__init1
(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol)
(label) bitmap_clear::@1
(label) bitmap_clear::@return

@ -4,7 +4,7 @@
// The MOS 6526 Complex Interface Adapter (CIA)
// http://archive.6502.org/datasheets/mos_6526_cia_recreated.pdf
.pc = $801 "Basic"
:BasicUpstart(_start)
:BasicUpstart(__start)
.pc = $80d "Program"
// Value that disables all CIA interrupts when stored to the CIA Interrupt registers
.const CIA_INTERRUPT_CLEAR = $7f
@ -52,7 +52,7 @@
.label frame_cnt = $19
// Remainder after unsigned 16-bit division
.label rem16u = $2f
_start: {
__start: {
// frame_cnt = 1
lda #1
sta.z frame_cnt

@ -1,21 +1,21 @@
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
[0] phi()
to:_start::_init1
_start::_init1: scope:[_start] from _start
to:__start::__init1
__start::__init1: scope:[__start] from __start
[1] (volatile byte) frame_cnt ← (byte) 1
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
[2] phi()
[3] call main
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@return
__start::@return: scope:[__start] from __start::@1
[4] return
to:@return
(void()) main()
main: scope:[main] from _start::@1
main: scope:[main] from __start::@1
[5] phi()
[6] call sin16s_gen2
to:main::@9

@ -4,7 +4,7 @@ Resolved forward reference frame_cnt to (volatile byte) frame_cnt
Resolved forward reference irq to interrupt(HARDWARE_CLOBBER)(void()) irq()
Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx
Inlined call (byte~) main::$3 ← call toD018 (const byte*) SCREEN (const byte*) BITMAP
Inlined call call _init
Inlined call call __init
CONTROL FLOW GRAPH SSA
@ -653,10 +653,10 @@ bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot
to:@return
(void()) main()
main: scope:[main] from _start::@1
(byte*) bitmap_screen#19 ← phi( _start::@1/(byte*) bitmap_screen#16 )
(byte*) bitmap_gfx#20 ← phi( _start::@1/(byte*) bitmap_gfx#17 )
(word) rem16u#25 ← phi( _start::@1/(word) rem16u#27 )
main: scope:[main] from __start::@1
(byte*) bitmap_screen#19 ← phi( __start::@1/(byte*) bitmap_screen#16 )
(byte*) bitmap_gfx#20 ← phi( __start::@1/(byte*) bitmap_gfx#17 )
(word) rem16u#25 ← phi( __start::@1/(word) rem16u#27 )
(signed word*) sin16s_gen2::sintab#1 ← (const signed word*) SINUS
(word) sin16s_gen2::wavelength#0 ← (number) $200
(signed word) sin16s_gen2::min#0 ← (number) -$1001
@ -938,33 +938,33 @@ irq::@return: scope:[irq] from irq::@1
return
to:@return
(void()) _start()
_start: scope:[_start] from
to:_start::_init1
_start::_init1: scope:[_start] from _start
(void()) __start()
__start: scope:[__start] from
to:__start::__init1
__start::__init1: scope:[__start] from __start
(word) rem16u#9 ← (word) 0
(byte*) bitmap_screen#4 ← (byte*) 0
(byte*) bitmap_gfx#4 ← (byte*) 0
(volatile byte) frame_cnt ← (byte) 1
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
(byte*) bitmap_screen#16 ← phi( _start::_init1/(byte*) bitmap_screen#4 )
(byte*) bitmap_gfx#17 ← phi( _start::_init1/(byte*) bitmap_gfx#4 )
(word) rem16u#27 ← phi( _start::_init1/(word) rem16u#9 )
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
(byte*) bitmap_screen#16 ← phi( __start::__init1/(byte*) bitmap_screen#4 )
(byte*) bitmap_gfx#17 ← phi( __start::__init1/(byte*) bitmap_gfx#4 )
(word) rem16u#27 ← phi( __start::__init1/(word) rem16u#9 )
call main
to:_start::@2
_start::@2: scope:[_start] from _start::@1
(byte*) bitmap_screen#11 ← phi( _start::@1/(byte*) bitmap_screen#3 )
(byte*) bitmap_gfx#11 ← phi( _start::@1/(byte*) bitmap_gfx#3 )
(word) rem16u#20 ← phi( _start::@1/(word) rem16u#8 )
to:__start::@2
__start::@2: scope:[__start] from __start::@1
(byte*) bitmap_screen#11 ← phi( __start::@1/(byte*) bitmap_screen#3 )
(byte*) bitmap_gfx#11 ← phi( __start::@1/(byte*) bitmap_gfx#3 )
(word) rem16u#20 ← phi( __start::@1/(word) rem16u#8 )
(word) rem16u#10 ← (word) rem16u#20
(byte*) bitmap_gfx#5 ← (byte*) bitmap_gfx#11
(byte*) bitmap_screen#5 ← (byte*) bitmap_screen#11
to:_start::@return
_start::@return: scope:[_start] from _start::@2
(byte*) bitmap_gfx#12 ← phi( _start::@2/(byte*) bitmap_gfx#5 )
(byte*) bitmap_screen#12 ← phi( _start::@2/(byte*) bitmap_screen#5 )
(word) rem16u#21 ← phi( _start::@2/(word) rem16u#10 )
to:__start::@return
__start::@return: scope:[__start] from __start::@2
(byte*) bitmap_gfx#12 ← phi( __start::@2/(byte*) bitmap_gfx#5 )
(byte*) bitmap_screen#12 ← phi( __start::@2/(byte*) bitmap_screen#5 )
(word) rem16u#21 ← phi( __start::@2/(word) rem16u#10 )
(word) rem16u#11 ← (word) rem16u#21
(byte*) bitmap_screen#6 ← (byte*) bitmap_screen#12
(byte*) bitmap_gfx#6 ← (byte*) bitmap_gfx#12
@ -1085,11 +1085,11 @@ SYMBOL TABLE SSA
(const nomodify byte) VIC_DEN = (byte) $10
(const nomodify byte) VIC_RSEL = (byte) 8
(const nomodify byte) WHITE = (byte) 1
(void()) _start()
(label) _start::@1
(label) _start::@2
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@2
(label) __start::@return
(label) __start::__init1
(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol)
(number~) bitmap_clear::$0
(number~) bitmap_clear::$1
@ -2719,9 +2719,9 @@ Added new block during phi lifting main::@20(between main::@5 and main::@1)
Added new block during phi lifting main::@21(between main::@18 and main::@3)
Added new block during phi lifting main::@22(between main::@3 and main::@4)
Added new block during phi lifting main::@23(between main::@4 and main::@5)
Adding NOP phi() at start of _start
Adding NOP phi() at start of _start::@1
Adding NOP phi() at start of _start::@2
Adding NOP phi() at start of __start
Adding NOP phi() at start of __start::@1
Adding NOP phi() at start of __start::@2
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@12
Adding NOP phi() at start of main::@13
@ -2742,7 +2742,7 @@ Adding NOP phi() at start of bitmap_init::@4
Adding NOP phi() at start of sin16s_gen2
Adding NOP phi() at start of div32u16u
CALL GRAPH
Calls in [_start] to main:3
Calls in [__start] to main:3
Calls in [main] to sin16s_gen2:7 bitmap_init:9 bitmap_clear:11 init_irq:16 mul16s:26 mul16s:39 bitmap_plot:47
Calls in [mul16s] to mul16u:84
Calls in [bitmap_clear] to memset:133 memset:135
@ -2819,7 +2819,7 @@ Coalesced [305] divr16u::rem#17 ← divr16u::rem#6
Coalesced [306] divr16u::return#7 ← divr16u::quotient#1
Coalesced [307] divr16u::rem#15 ← divr16u::rem#0
Coalesced down to 32 phi equivalence classes
Culled Empty Block (label) _start::@2
Culled Empty Block (label) __start::@2
Culled Empty Block (label) main::toD0181_@return
Culled Empty Block (label) main::@15
Culled Empty Block (label) main::@6
@ -2865,8 +2865,8 @@ Renumbering block main::@18 to main::@14
Renumbering block main::@19 to main::@15
Renumbering block main::@21 to main::@16
Renumbering block main::@22 to main::@17
Adding NOP phi() at start of _start
Adding NOP phi() at start of _start::@1
Adding NOP phi() at start of __start
Adding NOP phi() at start of __start::@1
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@9
Adding NOP phi() at start of main::@10
@ -2882,23 +2882,23 @@ Adding NOP phi() at start of div32u16u
FINAL CONTROL FLOW GRAPH
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
[0] phi()
to:_start::_init1
_start::_init1: scope:[_start] from _start
to:__start::__init1
__start::__init1: scope:[__start] from __start
[1] (volatile byte) frame_cnt ← (byte) 1
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
[2] phi()
[3] call main
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@return
__start::@return: scope:[__start] from __start::@1
[4] return
to:@return
(void()) main()
main: scope:[main] from _start::@1
main: scope:[main] from __start::@1
[5] phi()
[6] call sin16s_gen2
to:main::@9
@ -3451,7 +3451,7 @@ VARIABLE REGISTER WEIGHTS
(byte) MOS6581_SID::POT_X
(byte) MOS6581_SID::POT_Y
(byte) MOS6581_SID::VOLUME_FILTER_MODE
(void()) _start()
(void()) __start()
(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol)
(byte) bitmap_clear::bgcol
(byte) bitmap_clear::col
@ -4025,7 +4025,7 @@ Target platform is c64basic / MOS6502X
// http://archive.6502.org/datasheets/mos_6526_cia_recreated.pdf
// Upstart
.pc = $801 "Basic"
:BasicUpstart(_start)
:BasicUpstart(__start)
.pc = $80d "Program"
// Global Constants & labels
// Value that disables all CIA interrupts when stored to the CIA Interrupt registers
@ -4074,25 +4074,25 @@ Target platform is c64basic / MOS6502X
.label frame_cnt = $44
// Remainder after unsigned 16-bit division
.label rem16u = $de
// _start
_start: {
jmp _init1
// _start::_init1
_init1:
// __start
__start: {
jmp __init1
// __start::__init1
__init1:
// [1] (volatile byte) frame_cnt ← (byte) 1 -- vbuz1=vbuc1
lda #1
sta.z frame_cnt
// [2] phi from _start::_init1 to _start::@1 [phi:_start::_init1->_start::@1]
__b1_from__init1:
// [2] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1]
__b1_from___init1:
jmp __b1
// _start::@1
// __start::@1
__b1:
// [3] call main
// [5] phi from _start::@1 to main [phi:_start::@1->main]
// [5] phi from __start::@1 to main [phi:__start::@1->main]
main_from___b1:
jsr main
jmp __breturn
// _start::@return
// __start::@return
__breturn:
// [4] return
rts
@ -6337,7 +6337,7 @@ Uplift Scope [MOS6581_SID]
Uplift Scope [bitmap_clear]
Uplift Scope [init_irq]
Uplift Scope [irq]
Uplift Scope [_start]
Uplift Scope [__start]
Uplifting [mul16u] best 27572 combination zp[4]:21 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] zp[4]:25 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ] reg byte a [ mul16u::$1 ] zp[2]:19 [ mul16u::a#3 mul16u::a#6 mul16u::a#1 mul16u::a#2 mul16u::a#0 ] zp[2]:17 [ mul16u::b#2 mul16u::b#0 mul16u::b#1 ] zp[4]:194 [ mul16u::return#3 ] zp[4]:119 [ mul16u::return#2 ]
Uplifting [divr16u] best 27362 combination zp[2]:61 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] zp[2]:65 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] zp[2]:63 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] zp[2]:208 [ divr16u::return#2 ] zp[2]:212 [ divr16u::return#3 ]
@ -6358,7 +6358,7 @@ Uplifting [MOS6581_SID] best 26774 combination
Uplifting [bitmap_clear] best 26774 combination
Uplifting [init_irq] best 26774 combination
Uplifting [irq] best 26774 combination
Uplifting [_start] best 26774 combination
Uplifting [__start] best 26774 combination
Attempting to uplift remaining variables inzp[1]:140 [ bitmap_init::$5 ]
Uplifting [bitmap_init] best 26714 combination reg byte a [ bitmap_init::$5 ]
Attempting to uplift remaining variables inzp[1]:141 [ bitmap_init::$6 ]
@ -6467,7 +6467,7 @@ ASSEMBLER BEFORE OPTIMIZATION
// http://archive.6502.org/datasheets/mos_6526_cia_recreated.pdf
// Upstart
.pc = $801 "Basic"
:BasicUpstart(_start)
:BasicUpstart(__start)
.pc = $80d "Program"
// Global Constants & labels
// Value that disables all CIA interrupts when stored to the CIA Interrupt registers
@ -6516,25 +6516,25 @@ ASSEMBLER BEFORE OPTIMIZATION
.label frame_cnt = $19
// Remainder after unsigned 16-bit division
.label rem16u = $2f
// _start
_start: {
jmp _init1
// _start::_init1
_init1:
// __start
__start: {
jmp __init1
// __start::__init1
__init1:
// [1] (volatile byte) frame_cnt ← (byte) 1 -- vbuz1=vbuc1
lda #1
sta.z frame_cnt
// [2] phi from _start::_init1 to _start::@1 [phi:_start::_init1->_start::@1]
__b1_from__init1:
// [2] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1]
__b1_from___init1:
jmp __b1
// _start::@1
// __start::@1
__b1:
// [3] call main
// [5] phi from _start::@1 to main [phi:_start::@1->main]
// [5] phi from __start::@1 to main [phi:__start::@1->main]
main_from___b1:
jsr main
jmp __breturn
// _start::@return
// __start::@return
__breturn:
// [4] return
rts
@ -8097,7 +8097,7 @@ irq: {
SINUS: .fill 2*$200, 0
ASSEMBLER OPTIMIZATIONS
Removing instruction jmp _init1
Removing instruction jmp __init1
Removing instruction jmp __b1
Removing instruction jmp __breturn
Removing instruction jmp __b9
@ -8212,7 +8212,7 @@ Replacing label __b2_from___b1 with __b2
Replacing label __b3_from___b2 with __b3
Replacing label __b3_from___b2 with __b3
Replacing label __b1_from___b3 with __b1
Removing instruction __b1_from__init1:
Removing instruction __b1_from___init1:
Removing instruction main_from___b1:
Removing instruction __b9_from_main:
Removing instruction bitmap_init_from___b9:
@ -8262,7 +8262,7 @@ Removing instruction __b3_from___b2:
Removing instruction __b3_from___b5:
Removing instruction __breturn:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction _init1:
Removing instruction __init1:
Removing instruction __b1:
Removing instruction __breturn:
Removing instruction sin16s_gen2_from_main:
@ -8473,10 +8473,10 @@ FINAL SYMBOL TABLE
(const nomodify byte) VIC_DEN = (byte) $10
(const nomodify byte) VIC_RSEL = (byte) 8
(const nomodify byte) WHITE = (byte) 1
(void()) _start()
(label) _start::@1
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@return
(label) __start::__init1
(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol)
(label) bitmap_clear::@1
(label) bitmap_clear::@return
@ -8873,7 +8873,7 @@ Score: 20857
// http://archive.6502.org/datasheets/mos_6526_cia_recreated.pdf
// Upstart
.pc = $801 "Basic"
:BasicUpstart(_start)
:BasicUpstart(__start)
.pc = $80d "Program"
// Global Constants & labels
// Value that disables all CIA interrupts when stored to the CIA Interrupt registers
@ -8922,19 +8922,19 @@ Score: 20857
.label frame_cnt = $19
// Remainder after unsigned 16-bit division
.label rem16u = $2f
// _start
_start: {
// _start::_init1
// __start
__start: {
// __start::__init1
// frame_cnt = 1
// [1] (volatile byte) frame_cnt ← (byte) 1 -- vbuz1=vbuc1
lda #1
sta.z frame_cnt
// [2] phi from _start::_init1 to _start::@1 [phi:_start::_init1->_start::@1]
// _start::@1
// [2] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1]
// __start::@1
// [3] call main
// [5] phi from _start::@1 to main [phi:_start::@1->main]
// [5] phi from __start::@1 to main [phi:__start::@1->main]
jsr main
// _start::@return
// __start::@return
// [4] return
rts
}

@ -111,10 +111,10 @@
(const nomodify byte) VIC_DEN = (byte) $10
(const nomodify byte) VIC_RSEL = (byte) 8
(const nomodify byte) WHITE = (byte) 1
(void()) _start()
(label) _start::@1
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@return
(label) __start::__init1
(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol)
(label) bitmap_clear::@1
(label) bitmap_clear::@return

@ -1,6 +1,6 @@
Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx
Inlined call (byte~) main::$2 ← call toD018 (const byte*) SCREEN (const byte*) BITMAP
Inlined call call _init
Inlined call call __init
CONTROL FLOW GRAPH SSA
@ -458,9 +458,9 @@ sgn_u16::@return: scope:[sgn_u16] from sgn_u16::@1 sgn_u16::@2
to:@return
(void()) main()
main: scope:[main] from _start::@1
(byte*) bitmap_screen#14 ← phi( _start::@1/(byte*) bitmap_screen#16 )
(byte*) bitmap_gfx#15 ← phi( _start::@1/(byte*) bitmap_gfx#17 )
main: scope:[main] from __start::@1
(byte*) bitmap_screen#14 ← phi( __start::@1/(byte*) bitmap_screen#16 )
(byte*) bitmap_gfx#15 ← phi( __start::@1/(byte*) bitmap_gfx#17 )
(byte*) bitmap_init::gfx#0 ← (const byte*) BITMAP
(byte*) bitmap_init::screen#0 ← (const byte*) SCREEN
call bitmap_init
@ -563,27 +563,27 @@ main::@return: scope:[main] from main::@3
return
to:@return
(void()) _start()
_start: scope:[_start] from
to:_start::_init1
_start::_init1: scope:[_start] from _start
(void()) __start()
__start: scope:[__start] from
to:__start::__init1
__start::__init1: scope:[__start] from __start
(byte*) bitmap_screen#4 ← (byte*) 0
(byte*) bitmap_gfx#4 ← (byte*) 0
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
(byte*) bitmap_screen#16 ← phi( _start::_init1/(byte*) bitmap_screen#4 )
(byte*) bitmap_gfx#17 ← phi( _start::_init1/(byte*) bitmap_gfx#4 )
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
(byte*) bitmap_screen#16 ← phi( __start::__init1/(byte*) bitmap_screen#4 )
(byte*) bitmap_gfx#17 ← phi( __start::__init1/(byte*) bitmap_gfx#4 )
call main
to:_start::@2
_start::@2: scope:[_start] from _start::@1
(byte*) bitmap_screen#11 ← phi( _start::@1/(byte*) bitmap_screen#3 )
(byte*) bitmap_gfx#11 ← phi( _start::@1/(byte*) bitmap_gfx#3 )
to:__start::@2
__start::@2: scope:[__start] from __start::@1
(byte*) bitmap_screen#11 ← phi( __start::@1/(byte*) bitmap_screen#3 )
(byte*) bitmap_gfx#11 ← phi( __start::@1/(byte*) bitmap_gfx#3 )
(byte*) bitmap_gfx#5 ← (byte*) bitmap_gfx#11
(byte*) bitmap_screen#5 ← (byte*) bitmap_screen#11
to:_start::@return
_start::@return: scope:[_start] from _start::@2
(byte*) bitmap_gfx#12 ← phi( _start::@2/(byte*) bitmap_gfx#5 )
(byte*) bitmap_screen#12 ← phi( _start::@2/(byte*) bitmap_screen#5 )
to:__start::@return
__start::@return: scope:[__start] from __start::@2
(byte*) bitmap_gfx#12 ← phi( __start::@2/(byte*) bitmap_gfx#5 )
(byte*) bitmap_screen#12 ← phi( __start::@2/(byte*) bitmap_screen#5 )
(byte*) bitmap_screen#6 ← (byte*) bitmap_screen#12
(byte*) bitmap_gfx#6 ← (byte*) bitmap_gfx#12
return
@ -689,11 +689,11 @@ SYMBOL TABLE SSA
(const nomodify byte) VIC_DEN = (byte) $10
(const nomodify byte) VIC_RSEL = (byte) 8
(const nomodify byte) WHITE = (byte) 1
(void()) _start()
(label) _start::@1
(label) _start::@2
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@2
(label) __start::@return
(label) __start::__init1
(word()) abs_u16((word) abs_u16::w)
(byte~) abs_u16::$0
(number~) abs_u16::$1
@ -1572,12 +1572,12 @@ Eliminating unused constant (const nomodify byte) BLACK
Successful SSA optimization PassNEliminateUnusedVars
Removing unused block main::@return
Successful SSA optimization Pass2EliminateUnusedBlocks
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::_init1
Removing unused procedure block _start::@1
Removing unused procedure block _start::@2
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::__init1
Removing unused procedure block __start::@1
Removing unused procedure block __start::@2
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Adding number conversion cast (unumber) 0 in [16] if((byte) bitmap_init::x#1!=(number) 0) goto bitmap_init::@1
Adding number conversion cast (unumber) 0 in [28] if((byte) bitmap_init::y#1!=(number) 0) goto bitmap_init::@5

@ -1,9 +1,9 @@
Inlined call call _init
Inlined call call __init
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start::@1
main: scope:[main] from __start::@1
*((const byte*) BG_COLOR) ← (number) 0
*((const byte*) FGCOL) ← (number) 0
(byte~) main::$0 ← (const byte) BMM | (const byte) DEN
@ -179,17 +179,17 @@ init_screen::@return: scope:[init_screen] from init_screen::@4
return
to:@return
(void()) _start()
_start: scope:[_start] from
to:_start::_init1
_start::_init1: scope:[_start] from _start
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
(void()) __start()
__start: scope:[__start] from
to:__start::__init1
__start::__init1: scope:[__start] from __start
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
call main
to:_start::@2
_start::@2: scope:[_start] from _start::@1
to:_start::@return
_start::@return: scope:[_start] from _start::@2
to:__start::@2
__start::@2: scope:[__start] from __start::@1
to:__start::@return
__start::@return: scope:[__start] from __start::@2
return
to:@return
@ -204,11 +204,11 @@ SYMBOL TABLE SSA
(const byte*) RASTER = (byte*)(number) $d012
(const byte) RSEL = (byte) 8
(const byte*) SCREEN = (byte*)(number) $400
(void()) _start()
(label) _start::@1
(label) _start::@2
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@2
(label) __start::@return
(label) __start::__init1
(void()) init_plot_tables()
(number~) init_plot_tables::$0
(number~) init_plot_tables::$1
@ -479,12 +479,12 @@ Resolved ranged next value [71] init_plot_tables::y#1 ← ++ init_plot_tables::y
Resolved ranged comparison value [73] if(init_plot_tables::y#1!=rangelast(0,$ff)) goto init_plot_tables::@5 to (number) 0
Removing unused block main::@return
Successful SSA optimization Pass2EliminateUnusedBlocks
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::_init1
Removing unused procedure block _start::@1
Removing unused procedure block _start::@2
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::__init1
Removing unused procedure block __start::@1
Removing unused procedure block __start::@2
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Adding number conversion cast (unumber) 0 in [42] if((byte) init_plot_tables::x#1!=(number) 0) goto init_plot_tables::@1
Adding number conversion cast (unumber) 0 in [54] if((byte) init_plot_tables::y#1!=(number) 0) goto init_plot_tables::@5

@ -2,7 +2,7 @@
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start
main: scope:[main] from __start
*((const byte*) main::SCREEN) ← ~(byte) 1
(byte) main::c#0 ← (byte) 1
to:main::@1
@ -18,20 +18,20 @@ main::@return: scope:[main] from main::@1
return
to:@return
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
call main
to:_start::@1
_start::@1: scope:[_start] from _start
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@1
__start::@1: scope:[__start] from __start
to:__start::@return
__start::@return: scope:[__start] from __start::@1
return
to:@return
SYMBOL TABLE SSA
(void()) _start()
(label) _start::@1
(label) _start::@return
(void()) __start()
(label) __start::@1
(label) __start::@return
(void()) main()
(byte~) main::$0
(bool~) main::$1
@ -51,10 +51,10 @@ Constant (const byte) main::c#0 = 1
Successful SSA optimization Pass2ConstantIdentification
Resolved ranged next value [5] main::c#1 ← ++ main::c#2 to ++
Resolved ranged comparison value [7] if(main::c#1!=rangelast(1,$1a)) goto main::@1 to (number) $1b
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::@1
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Adding number conversion cast (unumber) $1b in [5] if((byte) main::c#1!=(number) $1b) goto main::@1
Successful SSA optimization PassNAddNumberTypeConversions

@ -2,7 +2,7 @@
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start
main: scope:[main] from __start
call bool_const_if
to:main::@1
main::@1: scope:[main] from main
@ -80,21 +80,21 @@ bool_const_inline::@return: scope:[bool_const_inline] from bool_const_inline::@
return
to:@return
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
call main
to:_start::@1
_start::@1: scope:[_start] from _start
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@1
__start::@1: scope:[__start] from __start
to:__start::@return
__start::@return: scope:[__start] from __start::@1
return
to:@return
SYMBOL TABLE SSA
(const nomodify byte*) SCREEN = (byte*)(number) $400
(void()) _start()
(label) _start::@1
(label) _start::@return
(void()) __start()
(label) __start::@1
(label) __start::@return
(void()) bool_const_if()
(label) bool_const_if::@1
(label) bool_const_if::@2
@ -255,10 +255,10 @@ Removing unused block bool_const_inline::@4
Removing unused block bool_const_vars::@6
Removing unused block bool_const_inline::@5
Successful SSA optimization Pass2EliminateUnusedBlocks
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::@1
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Consolidated array index constant in *(SCREEN+1)
Consolidated array index constant in *(SCREEN+2)

@ -2,7 +2,7 @@
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start
main: scope:[main] from __start
(byte) main::i#0 ← (byte) 0
to:main::@1
main::@1: scope:[main] from main main::@3
@ -53,20 +53,20 @@ isSet::@return: scope:[isSet] from isSet
return
to:@return
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
call main
to:_start::@1
_start::@1: scope:[_start] from _start
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@1
__start::@1: scope:[__start] from __start
to:__start::@return
__start::@return: scope:[__start] from __start::@1
return
to:@return
SYMBOL TABLE SSA
(void()) _start()
(label) _start::@1
(label) _start::@return
(void()) __start()
(label) __start::@1
(label) __start::@return
(bool()) isSet((byte) isSet::i , (bool) isSet::b)
(number~) isSet::$0
(bool~) isSet::$1
@ -141,10 +141,10 @@ Constant (const byte) main::i#0 = 0
Successful SSA optimization Pass2ConstantIdentification
Resolved ranged next value [11] main::i#1 ← ++ main::i#2 to ++
Resolved ranged comparison value [13] if(main::i#1!=rangelast(0,$64)) goto main::@1 to (number) $65
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::@1
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Adding number conversion cast (unumber) $65 in [11] if((byte) main::i#1!=(number) $65) goto main::@1
Successful SSA optimization PassNAddNumberTypeConversions

@ -2,7 +2,7 @@
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start
main: scope:[main] from __start
(byte) main::i#0 ← (byte) 0
to:main::@1
main::@1: scope:[main] from main main::@2
@ -28,20 +28,20 @@ main::@return: scope:[main] from main::@2
return
to:@return
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
call main
to:_start::@1
_start::@1: scope:[_start] from _start
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@1
__start::@1: scope:[__start] from __start
to:__start::@return
__start::@return: scope:[__start] from __start::@1
return
to:@return
SYMBOL TABLE SSA
(void()) _start()
(label) _start::@1
(label) _start::@return
(void()) __start()
(label) __start::@1
(label) __start::@return
(void()) main()
(bool~) main::$0
(number~) main::$1
@ -89,10 +89,10 @@ Constant (const byte) main::i#0 = 0
Successful SSA optimization Pass2ConstantIdentification
Resolved ranged next value [8] main::i#1 ← ++ main::i#2 to ++
Resolved ranged comparison value [10] if(main::i#1!=rangelast(0,$14)) goto main::@1 to (number) $15
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::@1
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Adding number conversion cast (unumber) $15 in [6] if((byte) main::i#1!=(number) $15) goto main::@1
Successful SSA optimization PassNAddNumberTypeConversions

@ -2,7 +2,7 @@
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start
main: scope:[main] from __start
call bool_and
to:main::@1
main::@1: scope:[main] from main
@ -147,20 +147,20 @@ bool_complex::@return: scope:[bool_complex] from bool_complex::@3
return
to:@return
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
call main
to:_start::@1
_start::@1: scope:[_start] from _start
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@1
__start::@1: scope:[__start] from __start
to:__start::@return
__start::@return: scope:[__start] from __start::@1
return
to:@return
SYMBOL TABLE SSA
(void()) _start()
(label) _start::@1
(label) _start::@return
(void()) __start()
(label) __start::@1
(label) __start::@return
(void()) bool_and()
(bool~) bool_and::$0
(number~) bool_and::$1
@ -352,10 +352,10 @@ Resolved ranged next value [41] bool_not::i#1 ← ++ bool_not::i#2 to ++
Resolved ranged comparison value [43] if(bool_not::i#1!=rangelast(0,$14)) goto bool_not::@1 to (number) $15
Resolved ranged next value [60] bool_complex::i#1 ← ++ bool_complex::i#2 to ++
Resolved ranged comparison value [62] if(bool_complex::i#1!=rangelast(0,$14)) goto bool_complex::@1 to (number) $15
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::@1
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Adding number conversion cast (unumber) $15 in [13] if((byte) bool_and::i#1!=(number) $15) goto bool_and::@1
Adding number conversion cast (unumber) $15 in [23] if((byte) bool_or::i#1!=(number) $15) goto bool_or::@1

@ -1,10 +1,10 @@
Inlined call call _init
Inlined call call __init
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start::@1
(bool) framedone#11 ← phi( _start::@1/(bool) framedone#10 )
main: scope:[main] from __start::@1
(bool) framedone#11 ← phi( __start::@1/(bool) framedone#10 )
to:main::@1
main::@1: scope:[main] from main main::@3
(bool) framedone#9 ← phi( main/(bool) framedone#11 main::@3/(bool) framedone#0 )
@ -24,32 +24,32 @@ main::@return: scope:[main] from main::@1
return
to:@return
(void()) _start()
_start: scope:[_start] from
to:_start::_init1
_start::_init1: scope:[_start] from _start
(void()) __start()
__start: scope:[__start] from
to:__start::__init1
__start::__init1: scope:[__start] from __start
(bool) framedone#2 ← true
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
(bool) framedone#10 ← phi( _start::_init1/(bool) framedone#2 )
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
(bool) framedone#10 ← phi( __start::__init1/(bool) framedone#2 )
call main
to:_start::@2
_start::@2: scope:[_start] from _start::@1
(bool) framedone#7 ← phi( _start::@1/(bool) framedone#1 )
to:__start::@2
__start::@2: scope:[__start] from __start::@1
(bool) framedone#7 ← phi( __start::@1/(bool) framedone#1 )
(bool) framedone#3 ← (bool) framedone#7
to:_start::@return
_start::@return: scope:[_start] from _start::@2
(bool) framedone#8 ← phi( _start::@2/(bool) framedone#3 )
to:__start::@return
__start::@return: scope:[__start] from __start::@2
(bool) framedone#8 ← phi( __start::@2/(bool) framedone#3 )
(bool) framedone#4 ← (bool) framedone#8
return
to:@return
SYMBOL TABLE SSA
(void()) _start()
(label) _start::@1
(label) _start::@2
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@2
(label) __start::@return
(label) __start::__init1
(bool) framedone
(bool) framedone#0
(bool) framedone#1
@ -87,12 +87,12 @@ if() condition always true - replacing block destination [2] if(true) goto main:
Successful SSA optimization Pass2ConstantIfs
Removing unused block main::@return
Successful SSA optimization Pass2EliminateUnusedBlocks
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::_init1
Removing unused procedure block _start::@1
Removing unused procedure block _start::@2
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::__init1
Removing unused procedure block __start::@1
Removing unused procedure block __start::@2
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Inlining constant with var siblings (const bool) framedone#0
Inlining constant with var siblings (const bool) framedone#10

@ -2,7 +2,7 @@
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start
main: scope:[main] from __start
(bool*) main::bscreen#0 ← (bool*)(number) $400
*((bool*) main::bscreen#0 + (number) 0) ← true
*((bool*) main::bscreen#0 + (number) 1) ← false
@ -21,20 +21,20 @@ main::@return: scope:[main] from main main::@1
return
to:@return
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
call main
to:_start::@1
_start::@1: scope:[_start] from _start
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@1
__start::@1: scope:[__start] from __start
to:__start::@return
__start::@return: scope:[__start] from __start::@1
return
to:@return
SYMBOL TABLE SSA
(void()) _start()
(label) _start::@1
(label) _start::@return
(void()) __start()
(label) __start::@1
(label) __start::@return
(void()) main()
(bool*~) main::$0
(bool~) main::$1
@ -67,10 +67,10 @@ Constant (const bool*) main::bscreen#0 = (bool*) 1024
Successful SSA optimization Pass2ConstantIdentification
Simplifying expression containing zero main::bscreen#0 in [1] *((const bool*) main::bscreen#0 + (byte) 0) ← true
Successful SSA optimization PassNSimplifyExpressionWithZero
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::@1
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Constant right-side identified [2] (bool*) main::bscreen#1 ← (const bool*) main::bscreen#0 + (byte) 2
Successful SSA optimization Pass2ConstantRValueConsolidation

@ -2,7 +2,7 @@
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start
main: scope:[main] from __start
call bool_and
to:main::@1
main::@1: scope:[main] from main
@ -158,20 +158,20 @@ bool_complex::@return: scope:[bool_complex] from bool_complex::@3
return
to:@return
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
call main
to:_start::@1
_start::@1: scope:[_start] from _start
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@1
__start::@1: scope:[__start] from __start
to:__start::@return
__start::@return: scope:[__start] from __start::@1
return
to:@return
SYMBOL TABLE SSA
(void()) _start()
(label) _start::@1
(label) _start::@return
(void()) __start()
(label) __start::@1
(label) __start::@return
(void()) bool_and()
(bool~) bool_and::$0
(number~) bool_and::$1
@ -389,10 +389,10 @@ Resolved ranged next value [41] bool_not::i#1 ← ++ bool_not::i#2 to ++
Resolved ranged comparison value [43] if(bool_not::i#1!=rangelast(0,$14)) goto bool_not::@1 to (number) $15
Resolved ranged next value [57] bool_complex::i#1 ← ++ bool_complex::i#2 to ++
Resolved ranged comparison value [59] if(bool_complex::i#1!=rangelast(0,$14)) goto bool_complex::@1 to (number) $15
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::@1
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Adding number conversion cast (unumber) $15 in [13] if((byte) bool_and::i#1!=(number) $15) goto bool_and::@1
Adding number conversion cast (unumber) $15 in [23] if((byte) bool_or::i#1!=(number) $15) goto bool_or::@1

@ -1,9 +1,9 @@
Inlined call call _init
Inlined call call __init
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start::@1
main: scope:[main] from __start::@1
(byte~) main::$0 ← (const byte) main::x1 - (const byte) main::x0
(byte) main::xd#0 ← (byte~) main::$0
(byte~) main::$1 ← (const byte) main::y1 - (const byte) main::y0
@ -64,28 +64,28 @@ main::@return: scope:[main] from main::@2
return
to:@return
(void()) _start()
_start: scope:[_start] from
to:_start::_init1
_start::_init1: scope:[_start] from _start
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
(void()) __start()
__start: scope:[__start] from
to:__start::__init1
__start::__init1: scope:[__start] from __start
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
call main
to:_start::@2
_start::@2: scope:[_start] from _start::@1
to:_start::@return
_start::@return: scope:[_start] from _start::@2
to:__start::@2
__start::@2: scope:[__start] from __start::@1
to:__start::@return
__start::@return: scope:[__start] from __start::@2
return
to:@return
SYMBOL TABLE SSA
(const byte*) SCREEN[(number) $28*(number) $19] = (byte*)(number) $400
(const byte) STAR = (byte) $51
(void()) _start()
(label) _start::@1
(label) _start::@2
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@2
(label) __start::@return
(label) __start::__init1
(void()) main()
(byte~) main::$0
(byte~) main::$1
@ -219,12 +219,12 @@ Constant (const byte) main::x#0 = main::x0
Constant (const byte) main::y#0 = main::y0
Constant (const byte) main::$14 = main::x1+1
Successful SSA optimization Pass2ConstantIdentification
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::_init1
Removing unused procedure block _start::@1
Removing unused procedure block _start::@2
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::__init1
Removing unused procedure block __start::@1
Removing unused procedure block __start::@2
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Constant right-side identified [0] (byte) main::e#0 ← (const byte) main::yd#0 / (byte) 2
Constant right-side identified [1] (byte~) main::$3 ← (const byte) main::y#0 * (byte) $28

@ -2,7 +2,7 @@
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start
main: scope:[main] from __start
(byte~) main::$0 ← (const byte) main::x1 - (const byte) main::x0
(byte) main::xd#0 ← (byte~) main::$0
(byte~) main::$1 ← (const byte) main::y1 - (const byte) main::y0
@ -62,20 +62,20 @@ main::@return: scope:[main] from main::@2
return
to:@return
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
call main
to:_start::@1
_start::@1: scope:[_start] from _start
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@1
__start::@1: scope:[__start] from __start
to:__start::@return
__start::@return: scope:[__start] from __start::@1
return
to:@return
SYMBOL TABLE SSA
(void()) _start()
(label) _start::@1
(label) _start::@return
(void()) __start()
(label) __start::@1
(label) __start::@return
(void()) main()
(byte~) main::$0
(byte~) main::$1
@ -222,10 +222,10 @@ Simplifying expression containing zero main::x1 in
Simplifying expression containing zero main::y1 in
Simplifying expression containing zero main::$3 in [6] (word) main::idx#0 ← (const byte) main::x#0 + (byte~) main::$3
Successful SSA optimization PassNSimplifyExpressionWithZero
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::@1
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Alias main::idx#0 = main::$3
Successful SSA optimization Pass2AliasElimination

@ -1,4 +1,4 @@
Inlined call call _init
Inlined call call __init
CONTROL FLOW GRAPH SSA
@ -355,10 +355,10 @@ print_cls::@return: scope:[print_cls] from print_cls::@1
to:@return
(void()) main()
main: scope:[main] from _start::@1
(byte*) print_char_cursor#153 ← phi( _start::@1/(byte*) print_char_cursor#158 )
(byte*) print_line_cursor#42 ← phi( _start::@1/(byte*) print_line_cursor#47 )
(byte*) print_screen#5 ← phi( _start::@1/(byte*) print_screen#7 )
main: scope:[main] from __start::@1
(byte*) print_char_cursor#153 ← phi( __start::@1/(byte*) print_char_cursor#158 )
(byte*) print_line_cursor#42 ← phi( __start::@1/(byte*) print_line_cursor#47 )
(byte*) print_screen#5 ← phi( __start::@1/(byte*) print_screen#7 )
call print_cls
to:main::@1
main::@1: scope:[main] from main
@ -651,31 +651,31 @@ testLong::@return: scope:[testLong] from testLong::@7
return
to:@return
(void()) _start()
_start: scope:[_start] from
to:_start::_init1
_start::_init1: scope:[_start] from _start
(void()) __start()
__start: scope:[__start] from
to:__start::__init1
__start::__init1: scope:[__start] from __start
(byte*) print_screen#0 ← (byte*)(number) $400
(byte*) print_line_cursor#18 ← (byte*) print_screen#0
(byte*) print_char_cursor#67 ← (byte*) print_line_cursor#18
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
(byte*) print_screen#7 ← phi( _start::_init1/(byte*) print_screen#0 )
(byte*) print_char_cursor#158 ← phi( _start::_init1/(byte*) print_char_cursor#67 )
(byte*) print_line_cursor#47 ← phi( _start::_init1/(byte*) print_line_cursor#18 )
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
(byte*) print_screen#7 ← phi( __start::__init1/(byte*) print_screen#0 )
(byte*) print_char_cursor#158 ← phi( __start::__init1/(byte*) print_char_cursor#67 )
(byte*) print_line_cursor#47 ← phi( __start::__init1/(byte*) print_line_cursor#18 )
call main
to:_start::@2
_start::@2: scope:[_start] from _start::@1
(byte*) print_screen#6 ← phi( _start::@1/(byte*) print_screen#7 )
(byte*) print_char_cursor#136 ← phi( _start::@1/(byte*) print_char_cursor#34 )
(byte*) print_line_cursor#39 ← phi( _start::@1/(byte*) print_line_cursor#9 )
to:__start::@2
__start::@2: scope:[__start] from __start::@1
(byte*) print_screen#6 ← phi( __start::@1/(byte*) print_screen#7 )
(byte*) print_char_cursor#136 ← phi( __start::@1/(byte*) print_char_cursor#34 )
(byte*) print_line_cursor#39 ← phi( __start::@1/(byte*) print_line_cursor#9 )
(byte*) print_line_cursor#19 ← (byte*) print_line_cursor#39
(byte*) print_char_cursor#68 ← (byte*) print_char_cursor#136
to:_start::@return
_start::@return: scope:[_start] from _start::@2
(byte*) print_char_cursor#137 ← phi( _start::@2/(byte*) print_char_cursor#68 )
(byte*) print_line_cursor#40 ← phi( _start::@2/(byte*) print_line_cursor#19 )
(byte*) print_screen#4 ← phi( _start::@2/(byte*) print_screen#6 )
to:__start::@return
__start::@return: scope:[__start] from __start::@2
(byte*) print_char_cursor#137 ← phi( __start::@2/(byte*) print_char_cursor#68 )
(byte*) print_line_cursor#40 ← phi( __start::@2/(byte*) print_line_cursor#19 )
(byte*) print_screen#4 ← phi( __start::@2/(byte*) print_screen#6 )
(byte*) print_screen#1 ← (byte*) print_screen#4
(byte*) print_line_cursor#20 ← (byte*) print_line_cursor#40
(byte*) print_char_cursor#69 ← (byte*) print_char_cursor#137
@ -687,11 +687,11 @@ SYMBOL TABLE SSA
(const byte) RADIX::DECIMAL = (number) $a
(const byte) RADIX::HEXADECIMAL = (number) $10
(const byte) RADIX::OCTAL = (number) 8
(void()) _start()
(label) _start::@1
(label) _start::@2
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@2
(label) __start::@return
(label) __start::__init1
(void()) main()
(label) main::@1
(label) main::@2
@ -1470,12 +1470,12 @@ Removing unused block print_schar::@3
Removing PHI-reference to removed block (print_schar::@5) in block print_schar::@2
Removing unused block print_schar::@5
Successful SSA optimization Pass2EliminateUnusedBlocks
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::_init1
Removing unused procedure block _start::@1
Removing unused procedure block _start::@2
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::__init1
Removing unused procedure block __start::@1
Removing unused procedure block __start::@2
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Alias print_schar::b#0 = print_schar::b#4
Successful SSA optimization Pass2AliasElimination

@ -1,5 +1,5 @@
Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx
Inlined call call _init
Inlined call call __init
CONTROL FLOW GRAPH SSA
@ -14,7 +14,7 @@ dtvSetCpuBankSegment1::@return: scope:[dtvSetCpuBankSegment1] from dtvSetCpuBan
to:@return
(void()) main()
main: scope:[main] from _start::@1
main: scope:[main] from __start::@1
asm { sei }
*((const nomodify byte*) PROCPORT_DDR) ← (const nomodify byte) PROCPORT_DDR_MEMORY_MASK
*((const nomodify byte*) PROCPORT) ← (const nomodify byte) PROCPORT_RAM_IO
@ -233,17 +233,17 @@ gfx_init_plane_charset8::@return: scope:[gfx_init_plane_charset8] from gfx_init
return
to:@return
(void()) _start()
_start: scope:[_start] from
to:_start::_init1
_start::_init1: scope:[_start] from _start
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
(void()) __start()
__start: scope:[__start] from
to:__start::__init1
__start::__init1: scope:[__start] from __start
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
call main
to:_start::@2
_start::@2: scope:[_start] from _start::@1
to:_start::@return
_start::@return: scope:[_start] from _start::@2
to:__start::@2
__start::@2: scope:[__start] from __start::@1
to:__start::@return
__start::@return: scope:[__start] from __start::@2
return
to:@return
@ -373,11 +373,11 @@ SYMBOL TABLE SSA
(const nomodify byte) VIC_MCM = (byte) $10
(const nomodify byte*) VIC_MEMORY = (byte*)(number) $d018
(const nomodify byte) VIC_RSEL = (byte) 8
(void()) _start()
(label) _start::@1
(label) _start::@2
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@2
(label) __start::@return
(label) __start::__init1
(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx)
(label) dtvSetCpuBankSegment1::@return
(const byte*) dtvSetCpuBankSegment1::cpuBank = (byte*)(number) $ff
@ -782,12 +782,12 @@ Eliminating unused constant (const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A
Successful SSA optimization PassNEliminateUnusedVars
Removing unused block main::@return
Successful SSA optimization Pass2EliminateUnusedBlocks
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::_init1
Removing unused procedure block _start::@1
Removing unused procedure block _start::@2
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::__init1
Removing unused procedure block __start::@1
Removing unused procedure block __start::@2
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Adding number conversion cast (unumber) $10 in [30] if((byte) main::j#1!=(number) $10) goto main::@1
Adding number conversion cast (unumber) $28 in [56] if((byte) gfx_init_screen0::cx#1!=(number) $28) goto gfx_init_screen0::@2

@ -1,5 +1,5 @@
Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx
Inlined call call _init
Inlined call call __init
CONTROL FLOW GRAPH SSA
@ -14,7 +14,7 @@ dtvSetCpuBankSegment1::@return: scope:[dtvSetCpuBankSegment1] from dtvSetCpuBan
to:@return
(void()) main()
main: scope:[main] from _start::@1
main: scope:[main] from __start::@1
asm { sei }
*((const nomodify byte*) PROCPORT_DDR) ← (const nomodify byte) PROCPORT_DDR_MEMORY_MASK
*((const nomodify byte*) PROCPORT) ← (const nomodify byte) PROCPORT_RAM_IO
@ -147,17 +147,17 @@ gfx_init_chunky::@return: scope:[gfx_init_chunky] from gfx_init_chunky::@9
return
to:@return
(void()) _start()
_start: scope:[_start] from
to:_start::_init1
_start::_init1: scope:[_start] from _start
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
(void()) __start()
__start: scope:[__start] from
to:__start::__init1
__start::__init1: scope:[__start] from __start
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
call main
to:_start::@2
_start::@2: scope:[_start] from _start::@1
to:_start::@return
_start::@return: scope:[_start] from _start::@2
to:__start::@2
__start::@2: scope:[__start] from __start::@1
to:__start::@return
__start::@return: scope:[__start] from __start::@2
return
to:@return
@ -279,11 +279,11 @@ SYMBOL TABLE SSA
(const nomodify byte) VIC_MCM = (byte) $10
(const nomodify byte*) VIC_MEMORY = (byte*)(number) $d018
(const nomodify byte) VIC_RSEL = (byte) 8
(void()) _start()
(label) _start::@1
(label) _start::@2
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@2
(label) __start::@return
(label) __start::__init1
(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx)
(label) dtvSetCpuBankSegment1::@return
(const byte*) dtvSetCpuBankSegment1::cpuBank = (byte*)(number) $ff
@ -530,12 +530,12 @@ Eliminating unused constant (const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A
Successful SSA optimization PassNEliminateUnusedVars
Removing unused block main::@return
Successful SSA optimization Pass2EliminateUnusedBlocks
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::_init1
Removing unused procedure block _start::@1
Removing unused procedure block _start::@2
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::__init1
Removing unused procedure block __start::@1
Removing unused procedure block __start::@2
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Adding number conversion cast (unumber) $10 in [24] if((byte) main::j#1!=(number) $10) goto main::@1
Adding number conversion cast (unumber) $140 in [49] if((word) gfx_init_chunky::x#1!=(number) $140) goto gfx_init_chunky::@2

@ -1,10 +1,10 @@
Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx
Inlined call call _init
Inlined call call __init
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start::@1
main: scope:[main] from __start::@1
*((const nomodify byte*) DTV_FEATURE) ← (const nomodify byte) DTV_FEATURE_ENABLE
*((const nomodify byte*) DTV_BLITTER_CONTROL2) ← (const nomodify byte) DTV_BLIT_CLEAR_IRQ
*((const nomodify byte*) DTV_BLITTER_SRCA_LO) ← <(const to_nomodify byte*) SRCA
@ -47,17 +47,17 @@ main::@return: scope:[main] from main::@1
return
to:@return
(void()) _start()
_start: scope:[_start] from
to:_start::_init1
_start::_init1: scope:[_start] from _start
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
(void()) __start()
__start: scope:[__start] from
to:__start::__init1
__start::__init1: scope:[__start] from __start
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
call main
to:_start::@2
_start::@2: scope:[_start] from _start::@1
to:_start::@return
_start::@return: scope:[_start] from _start::@2
to:__start::@2
__start::@2: scope:[__start] from __start::@1
to:__start::@return
__start::@return: scope:[__start] from __start::@2
return
to:@return
@ -190,11 +190,11 @@ SYMBOL TABLE SSA
(const nomodify byte*) SCREEN = (byte*)(number) $400
(const to_nomodify byte*) SRCA[] = (byte*) "camelot rules!"
(const to_nomodify byte*) SRCB[] = { (byte) $80 }
(void()) _start()
(label) _start::@1
(label) _start::@2
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@2
(label) __start::@return
(label) __start::__init1
(void()) main()
(byte~) main::$0
(bool~) main::$1
@ -312,12 +312,12 @@ Simplifying constant evaluating to zero >(word) $15 in [22] *((const nomodify by
Simplifying constant evaluating to zero >(word) $13 in [24] *((const nomodify byte*) DTV_BLITTER_DEST_LIN_HI) ← >(word) $13
Simplifying constant evaluating to zero >(byte) $14*(word) $a in [27] *((const nomodify byte*) DTV_BLITTER_LEN_HI) ← >(byte) $14*(word) $a
Successful SSA optimization PassNSimplifyConstantZero
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::_init1
Removing unused procedure block _start::@1
Removing unused procedure block _start::@2
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::__init1
Removing unused procedure block __start::@1
Removing unused procedure block __start::@2
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
CALL GRAPH

@ -1,10 +1,10 @@
Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx
Inlined call call _init
Inlined call call __init
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start::@1
main: scope:[main] from __start::@1
*((const nomodify byte*) DTV_FEATURE) ← (const nomodify byte) DTV_FEATURE_ENABLE
*((const nomodify byte*) DTV_BLITTER_CONTROL2) ← (const nomodify byte) DTV_BLIT_CLEAR_IRQ
*((const nomodify byte*) DTV_BLITTER_SRCA_LO) ← <(const to_nomodify byte*) SRCA
@ -56,17 +56,17 @@ main::@return: scope:[main] from main::@2
return
to:@return
(void()) _start()
_start: scope:[_start] from
to:_start::_init1
_start::_init1: scope:[_start] from _start
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
(void()) __start()
__start: scope:[__start] from
to:__start::__init1
__start::__init1: scope:[__start] from __start
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
call main
to:_start::@2
_start::@2: scope:[_start] from _start::@1
to:_start::@return
_start::@return: scope:[_start] from _start::@2
to:__start::@2
__start::@2: scope:[__start] from __start::@1
to:__start::@return
__start::@return: scope:[__start] from __start::@2
return
to:@return
@ -200,11 +200,11 @@ SYMBOL TABLE SSA
(const to_nomodify byte*) SRCA[] = { (byte) 'c', (byte) 'a', (byte) 'm', (byte) 'e', (byte) 'l', (byte) 'o', (byte) 't', (byte) '!', (byte) ' ' }
(const nomodify byte) SRCA_LEN = (byte) 9
(const to_nomodify byte*) SRCB[] = { (byte) $80 }
(void()) _start()
(label) _start::@1
(label) _start::@2
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@2
(label) __start::@return
(label) __start::__init1
(void()) main()
(byte~) main::$0
(bool~) main::$1
@ -323,12 +323,12 @@ Simplifying constant evaluating to zero <(word) $100 in [15] *((const nomodify b
Simplifying constant evaluating to zero <(const nomodify byte*) SCREEN in [18] *((const nomodify byte*) DTV_BLITTER_DEST_LO) ← <(const nomodify byte*) SCREEN
Simplifying constant evaluating to zero <(word) $100 in [23] *((const nomodify byte*) DTV_BLITTER_DEST_LIN_LO) ← <(word) $100
Successful SSA optimization PassNSimplifyConstantZero
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::_init1
Removing unused procedure block _start::@1
Removing unused procedure block _start::@2
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::__init1
Removing unused procedure block __start::@1
Removing unused procedure block __start::@2
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Adding number conversion cast (unumber) 8 in [37] if((byte) main::r#1!=(number) 8) goto main::@1
Successful SSA optimization PassNAddNumberTypeConversions

@ -1,10 +1,10 @@
Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx
Inlined call call _init
Inlined call call __init
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start::@1
main: scope:[main] from __start::@1
asm { sei }
*((const nomodify byte*) DTV_FEATURE) ← (const nomodify byte) DTV_FEATURE_ENABLE
*((const nomodify byte*) DTV_CONTROL) ← (const nomodify byte) DTV_HIGHCOLOR|(const nomodify byte) DTV_BORDER_OFF|(const nomodify byte) DTV_BADLINE_OFF
@ -43,17 +43,17 @@ main::@return: scope:[main] from main::@1
return
to:@return
(void()) _start()
_start: scope:[_start] from
to:_start::_init1
_start::_init1: scope:[_start] from _start
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
(void()) __start()
__start: scope:[__start] from
to:__start::__init1
__start::__init1: scope:[__start] from __start
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
call main
to:_start::@2
_start::@2: scope:[_start] from _start::@1
to:_start::@return
_start::@return: scope:[_start] from _start::@2
to:__start::@2
__start::@2: scope:[__start] from __start::@1
to:__start::@return
__start::@return: scope:[__start] from __start::@2
return
to:@return
@ -151,11 +151,11 @@ SYMBOL TABLE SSA
(byte) MOS6581_SID::POT_Y
(byte) MOS6581_SID::VOLUME_FILTER_MODE
(const nomodify byte*) RASTER = (byte*)(number) $d012
(void()) _start()
(label) _start::@1
(label) _start::@2
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@2
(label) __start::@return
(label) __start::__init1
(void()) main()
(bool~) main::$0
(bool~) main::$2
@ -208,12 +208,12 @@ Resolved ranged next value [18] main::c#1 ← ++ main::c#2 to ++
Resolved ranged comparison value [20] if(main::c#1!=rangelast(0,$f)) goto main::@6 to (number) $10
Removing unused block main::@return
Successful SSA optimization Pass2EliminateUnusedBlocks
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::_init1
Removing unused procedure block _start::@1
Removing unused procedure block _start::@2
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::__init1
Removing unused procedure block __start::@1
Removing unused procedure block __start::@2
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Adding number conversion cast (unumber) 0 in [9] if((byte) main::r#1!=(number) 0) goto main::@4
Adding number conversion cast (unumber) $10 in [14] if((byte) main::c#1!=(number) $10) goto main::@6

@ -1,5 +1,5 @@
Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx
Inlined call call _init
Inlined call call __init
CONTROL FLOW GRAPH SSA
@ -1056,14 +1056,14 @@ bitmap_line_ydxd::@return: scope:[bitmap_line_ydxd] from bitmap_line_ydxd::@2
to:@return
(void()) main()
main: scope:[main] from _start::@1
(byte) form_field_idx#50 ← phi( _start::@1/(byte) form_field_idx#36 )
(byte) keyboard_modifiers#83 ← phi( _start::@1/(byte) keyboard_modifiers#54 )
(byte) keyboard_events_size#92 ← phi( _start::@1/(byte) keyboard_events_size#55 )
(signed byte) form_cursor_count#45 ← phi( _start::@1/(signed byte) form_cursor_count#28 )
(byte*) print_char_cursor#66 ← phi( _start::@1/(byte*) print_char_cursor#52 )
(byte*) print_line_cursor#62 ← phi( _start::@1/(byte*) print_line_cursor#46 )
(byte*) print_screen#38 ← phi( _start::@1/(byte*) print_screen#26 )
main: scope:[main] from __start::@1
(byte) form_field_idx#50 ← phi( __start::@1/(byte) form_field_idx#36 )
(byte) keyboard_modifiers#83 ← phi( __start::@1/(byte) keyboard_modifiers#54 )
(byte) keyboard_events_size#92 ← phi( __start::@1/(byte) keyboard_events_size#55 )
(signed byte) form_cursor_count#45 ← phi( __start::@1/(signed byte) form_cursor_count#28 )
(byte*) print_char_cursor#66 ← phi( __start::@1/(byte*) print_char_cursor#52 )
(byte*) print_line_cursor#62 ← phi( __start::@1/(byte*) print_line_cursor#46 )
(byte*) print_screen#38 ← phi( __start::@1/(byte*) print_screen#26 )
asm { sei }
*((const nomodify byte*) PROCPORT_DDR) ← (const nomodify byte) PROCPORT_DDR_MEMORY_MASK
*((const nomodify byte*) PROCPORT) ← (const nomodify byte) PROCPORT_RAM_IO
@ -3265,10 +3265,10 @@ form_control::@15: scope:[form_control] from form_control::@5
(byte) form_control::return#5 ← (number) $ff
to:form_control::@return
(void()) _start()
_start: scope:[_start] from
to:_start::_init1
_start::_init1: scope:[_start] from _start
(void()) __start()
__start: scope:[__start] from
to:__start::__init1
__start::__init1: scope:[__start] from __start
(byte*) print_screen#7 ← (byte*)(number) $400
(byte*) print_line_cursor#17 ← (byte*) print_screen#7
(byte*) print_char_cursor#20 ← (byte*) print_line_cursor#17
@ -3276,25 +3276,25 @@ _start::_init1: scope:[_start] from _start
(byte) keyboard_modifiers#15 ← (byte) 0
(byte) form_field_idx#9 ← (byte) 0
(signed byte) form_cursor_count#8 ← (signed byte)(const nomodify signed byte) FORM_CURSOR_BLINK/(number) 2
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
(byte) form_field_idx#36 ← phi( _start::_init1/(byte) form_field_idx#9 )
(byte) keyboard_modifiers#54 ← phi( _start::_init1/(byte) keyboard_modifiers#15 )
(byte) keyboard_events_size#55 ← phi( _start::_init1/(byte) keyboard_events_size#16 )
(signed byte) form_cursor_count#28 ← phi( _start::_init1/(signed byte) form_cursor_count#8 )
(byte*) print_char_cursor#52 ← phi( _start::_init1/(byte*) print_char_cursor#20 )
(byte*) print_line_cursor#46 ← phi( _start::_init1/(byte*) print_line_cursor#17 )
(byte*) print_screen#26 ← phi( _start::_init1/(byte*) print_screen#7 )
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
(byte) form_field_idx#36 ← phi( __start::__init1/(byte) form_field_idx#9 )
(byte) keyboard_modifiers#54 ← phi( __start::__init1/(byte) keyboard_modifiers#15 )
(byte) keyboard_events_size#55 ← phi( __start::__init1/(byte) keyboard_events_size#16 )
(signed byte) form_cursor_count#28 ← phi( __start::__init1/(signed byte) form_cursor_count#8 )
(byte*) print_char_cursor#52 ← phi( __start::__init1/(byte*) print_char_cursor#20 )
(byte*) print_line_cursor#46 ← phi( __start::__init1/(byte*) print_line_cursor#17 )
(byte*) print_screen#26 ← phi( __start::__init1/(byte*) print_screen#7 )
call main
to:_start::@2
_start::@2: scope:[_start] from _start::@1
(byte) form_field_idx#25 ← phi( _start::@1/(byte) form_field_idx#1 )
(byte) keyboard_modifiers#34 ← phi( _start::@1/(byte) keyboard_modifiers#8 )
(byte) keyboard_events_size#37 ← phi( _start::@1/(byte) keyboard_events_size#7 )
(signed byte) form_cursor_count#18 ← phi( _start::@1/(signed byte) form_cursor_count#1 )
(byte*) print_char_cursor#41 ← phi( _start::@1/(byte*) print_char_cursor#12 )
(byte*) print_line_cursor#36 ← phi( _start::@1/(byte*) print_line_cursor#9 )
(byte*) print_screen#18 ← phi( _start::@1/(byte*) print_screen#3 )
to:__start::@2
__start::@2: scope:[__start] from __start::@1
(byte) form_field_idx#25 ← phi( __start::@1/(byte) form_field_idx#1 )
(byte) keyboard_modifiers#34 ← phi( __start::@1/(byte) keyboard_modifiers#8 )
(byte) keyboard_events_size#37 ← phi( __start::@1/(byte) keyboard_events_size#7 )
(signed byte) form_cursor_count#18 ← phi( __start::@1/(signed byte) form_cursor_count#1 )
(byte*) print_char_cursor#41 ← phi( __start::@1/(byte*) print_char_cursor#12 )
(byte*) print_line_cursor#36 ← phi( __start::@1/(byte*) print_line_cursor#9 )
(byte*) print_screen#18 ← phi( __start::@1/(byte*) print_screen#3 )
(byte*) print_screen#8 ← (byte*) print_screen#18
(byte*) print_line_cursor#18 ← (byte*) print_line_cursor#36
(byte*) print_char_cursor#21 ← (byte*) print_char_cursor#41
@ -3302,15 +3302,15 @@ _start::@2: scope:[_start] from _start::@1
(byte) keyboard_events_size#17 ← (byte) keyboard_events_size#37
(byte) keyboard_modifiers#16 ← (byte) keyboard_modifiers#34
(byte) form_field_idx#10 ← (byte) form_field_idx#25
to:_start::@return
_start::@return: scope:[_start] from _start::@2
(signed byte) form_cursor_count#19 ← phi( _start::@2/(signed byte) form_cursor_count#9 )
(byte) form_field_idx#26 ← phi( _start::@2/(byte) form_field_idx#10 )
(byte) keyboard_modifiers#35 ← phi( _start::@2/(byte) keyboard_modifiers#16 )
(byte) keyboard_events_size#38 ← phi( _start::@2/(byte) keyboard_events_size#17 )
(byte*) print_char_cursor#42 ← phi( _start::@2/(byte*) print_char_cursor#21 )
(byte*) print_line_cursor#37 ← phi( _start::@2/(byte*) print_line_cursor#18 )
(byte*) print_screen#19 ← phi( _start::@2/(byte*) print_screen#8 )
to:__start::@return
__start::@return: scope:[__start] from __start::@2
(signed byte) form_cursor_count#19 ← phi( __start::@2/(signed byte) form_cursor_count#9 )
(byte) form_field_idx#26 ← phi( __start::@2/(byte) form_field_idx#10 )
(byte) keyboard_modifiers#35 ← phi( __start::@2/(byte) keyboard_modifiers#16 )
(byte) keyboard_events_size#38 ← phi( __start::@2/(byte) keyboard_events_size#17 )
(byte*) print_char_cursor#42 ← phi( __start::@2/(byte*) print_char_cursor#21 )
(byte*) print_line_cursor#37 ← phi( __start::@2/(byte*) print_line_cursor#18 )
(byte*) print_screen#19 ← phi( __start::@2/(byte*) print_screen#8 )
(byte*) print_screen#9 ← (byte*) print_screen#19
(byte*) print_line_cursor#19 ← (byte*) print_line_cursor#37
(byte*) print_char_cursor#22 ← (byte*) print_char_cursor#42
@ -3501,11 +3501,11 @@ SYMBOL TABLE SSA
(const nomodify byte*) VIC_SCREEN2 = (byte*)(number) $4800
(const nomodify byte*) VIC_SCREEN3 = (byte*)(number) $4c00
(const nomodify byte*) VIC_SCREEN4 = (byte*)(number) $5000
(void()) _start()
(label) _start::@1
(label) _start::@2
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@2
(label) __start::@return
(label) __start::__init1
(void()) apply_preset((byte) apply_preset::idx)
(bool~) apply_preset::$0
(bool~) apply_preset::$1
@ -8167,12 +8167,12 @@ Eliminating unused constant (const byte) keyboard_modifiers#15
Successful SSA optimization PassNEliminateUnusedVars
Removing unused block main::@return
Successful SSA optimization Pass2EliminateUnusedBlocks
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::_init1
Removing unused procedure block _start::@1
Removing unused procedure block _start::@2
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::__init1
Removing unused procedure block __start::@1
Removing unused procedure block __start::@2
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Adding number conversion cast (unumber) 8 in [60] if((byte) keyboard_event_scan::row#1!=(number) 8) goto keyboard_event_scan::@7
Adding number conversion cast (unumber) 8 in [68] if((byte) keyboard_event_scan::col#1!=(number) 8) goto keyboard_event_scan::@10

@ -1,5 +1,5 @@
Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx
Inlined call call _init
Inlined call call __init
CONTROL FLOW GRAPH SSA
@ -799,11 +799,11 @@ bitmap_line_ydxd::@return: scope:[bitmap_line_ydxd] from bitmap_line_ydxd::@2
to:@return
(void()) main()
main: scope:[main] from _start::@1
(byte) dtv_control#132 ← phi( _start::@1/(byte) dtv_control#131 )
(byte*) print_char_cursor#61 ← phi( _start::@1/(byte*) print_char_cursor#57 )
(byte*) print_line_cursor#54 ← phi( _start::@1/(byte*) print_line_cursor#51 )
(byte*) print_screen#35 ← phi( _start::@1/(byte*) print_screen#34 )
main: scope:[main] from __start::@1
(byte) dtv_control#132 ← phi( __start::@1/(byte) dtv_control#131 )
(byte*) print_char_cursor#61 ← phi( __start::@1/(byte*) print_char_cursor#57 )
(byte*) print_line_cursor#54 ← phi( __start::@1/(byte*) print_line_cursor#51 )
(byte*) print_screen#35 ← phi( __start::@1/(byte*) print_screen#34 )
asm { sei }
*((const nomodify byte*) PROCPORT_DDR) ← (const nomodify byte) PROCPORT_DDR_MEMORY_MASK
*((const nomodify byte*) PROCPORT) ← (const nomodify byte) PROCPORT_RAM_IO
@ -2884,37 +2884,37 @@ mode_8bppchunkybmm::@return: scope:[mode_8bppchunkybmm] from mode_8bppchunkybmm
return
to:@return
(void()) _start()
_start: scope:[_start] from
to:_start::_init1
_start::_init1: scope:[_start] from _start
(void()) __start()
__start: scope:[__start] from
to:__start::__init1
__start::__init1: scope:[__start] from __start
(byte*) print_screen#6 ← (byte*)(number) $400
(byte*) print_line_cursor#14 ← (byte*) print_screen#6
(byte*) print_char_cursor#17 ← (byte*) print_line_cursor#14
(byte) dtv_control#53 ← (byte) 0
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
(byte) dtv_control#131 ← phi( _start::_init1/(byte) dtv_control#53 )
(byte*) print_char_cursor#57 ← phi( _start::_init1/(byte*) print_char_cursor#17 )
(byte*) print_line_cursor#51 ← phi( _start::_init1/(byte*) print_line_cursor#14 )
(byte*) print_screen#34 ← phi( _start::_init1/(byte*) print_screen#6 )
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
(byte) dtv_control#131 ← phi( __start::__init1/(byte) dtv_control#53 )
(byte*) print_char_cursor#57 ← phi( __start::__init1/(byte*) print_char_cursor#17 )
(byte*) print_line_cursor#51 ← phi( __start::__init1/(byte*) print_line_cursor#14 )
(byte*) print_screen#34 ← phi( __start::__init1/(byte*) print_screen#6 )
call main
to:_start::@2
_start::@2: scope:[_start] from _start::@1
(byte) dtv_control#98 ← phi( _start::@1/(byte) dtv_control#1 )
(byte*) print_char_cursor#35 ← phi( _start::@1/(byte*) print_char_cursor#12 )
(byte*) print_line_cursor#30 ← phi( _start::@1/(byte*) print_line_cursor#9 )
(byte*) print_screen#16 ← phi( _start::@1/(byte*) print_screen#3 )
to:__start::@2
__start::@2: scope:[__start] from __start::@1
(byte) dtv_control#98 ← phi( __start::@1/(byte) dtv_control#1 )
(byte*) print_char_cursor#35 ← phi( __start::@1/(byte*) print_char_cursor#12 )
(byte*) print_line_cursor#30 ← phi( __start::@1/(byte*) print_line_cursor#9 )
(byte*) print_screen#16 ← phi( __start::@1/(byte*) print_screen#3 )
(byte*) print_screen#7 ← (byte*) print_screen#16
(byte*) print_line_cursor#15 ← (byte*) print_line_cursor#30
(byte*) print_char_cursor#18 ← (byte*) print_char_cursor#35
(byte) dtv_control#54 ← (byte) dtv_control#98
to:_start::@return
_start::@return: scope:[_start] from _start::@2
(byte) dtv_control#99 ← phi( _start::@2/(byte) dtv_control#54 )
(byte*) print_char_cursor#36 ← phi( _start::@2/(byte*) print_char_cursor#18 )
(byte*) print_line_cursor#31 ← phi( _start::@2/(byte*) print_line_cursor#15 )
(byte*) print_screen#17 ← phi( _start::@2/(byte*) print_screen#7 )
to:__start::@return
__start::@return: scope:[__start] from __start::@2
(byte) dtv_control#99 ← phi( __start::@2/(byte) dtv_control#54 )
(byte*) print_char_cursor#36 ← phi( __start::@2/(byte*) print_char_cursor#18 )
(byte*) print_line_cursor#31 ← phi( __start::@2/(byte*) print_line_cursor#15 )
(byte*) print_screen#17 ← phi( __start::@2/(byte*) print_screen#7 )
(byte*) print_screen#8 ← (byte*) print_screen#17
(byte*) print_line_cursor#16 ← (byte*) print_line_cursor#31
(byte*) print_char_cursor#19 ← (byte*) print_char_cursor#36
@ -3087,11 +3087,11 @@ SYMBOL TABLE SSA
(const nomodify byte) VIC_MCM = (byte) $10
(const nomodify byte*) VIC_MEMORY = (byte*)(number) $d018
(const nomodify byte) VIC_RSEL = (byte) 8
(void()) _start()
(label) _start::@1
(label) _start::@2
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@2
(label) __start::@return
(label) __start::__init1
(void()) bitmap_clear()
(bool~) bitmap_clear::$0
(bool~) bitmap_clear::$1
@ -7522,12 +7522,12 @@ Eliminating unused constant (const byte) dtv_control#131
Successful SSA optimization PassNEliminateUnusedVars
Removing unused block main::@return
Successful SSA optimization Pass2EliminateUnusedBlocks
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::_init1
Removing unused procedure block _start::@1
Removing unused procedure block _start::@2
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::__init1
Removing unused procedure block __start::@1
Removing unused procedure block __start::@2
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Adding number conversion cast (unumber) 0 in [54] if((byte) bitmap_init::x#1!=(number) 0) goto bitmap_init::@1
Adding number conversion cast (unumber) 0 in [66] if((byte) bitmap_init::y#1!=(number) 0) goto bitmap_init::@5

@ -1,10 +1,10 @@
Inlined call call _init
Inlined call call __init
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start::@1
(byte) idx#17 ← phi( _start::@1/(byte) idx#18 )
main: scope:[main] from __start::@1
(byte) idx#17 ← phi( __start::@1/(byte) idx#18 )
(word) print::w#0 ← (number) $1234
call print
to:main::@1
@ -44,22 +44,22 @@ print::@return: scope:[print] from print
return
to:@return
(void()) _start()
_start: scope:[_start] from
to:_start::_init1
_start::_init1: scope:[_start] from _start
(void()) __start()
__start: scope:[__start] from
to:__start::__init1
__start::__init1: scope:[__start] from __start
(byte) idx#6 ← (byte) 0
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
(byte) idx#18 ← phi( _start::_init1/(byte) idx#6 )
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
(byte) idx#18 ← phi( __start::__init1/(byte) idx#6 )
call main
to:_start::@2
_start::@2: scope:[_start] from _start::@1
(byte) idx#15 ← phi( _start::@1/(byte) idx#3 )
to:__start::@2
__start::@2: scope:[__start] from __start::@1
(byte) idx#15 ← phi( __start::@1/(byte) idx#3 )
(byte) idx#7 ← (byte) idx#15
to:_start::@return
_start::@return: scope:[_start] from _start::@2
(byte) idx#16 ← phi( _start::@2/(byte) idx#7 )
to:__start::@return
__start::@return: scope:[__start] from __start::@2
(byte) idx#16 ← phi( __start::@2/(byte) idx#7 )
(byte) idx#8 ← (byte) idx#16
return
to:@return
@ -67,11 +67,11 @@ _start::@return: scope:[_start] from _start::@2
SYMBOL TABLE SSA
(const nomodify word*) SCREEN = (word*)(number) $400
(const byte) SIZEOF_WORD = (byte) 2
(void()) _start()
(label) _start::@1
(label) _start::@2
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@2
(label) __start::@return
(label) __start::__init1
(byte) idx
(byte) idx#0
(byte) idx#1
@ -140,12 +140,12 @@ Constant (const word) print::w#0 = $1234
Constant (const word) print::w#1 = main::w
Constant (const byte) idx#18 = 0
Successful SSA optimization Pass2ConstantIdentification
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::_init1
Removing unused procedure block _start::@1
Removing unused procedure block _start::@2
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::__init1
Removing unused procedure block __start::@1
Removing unused procedure block __start::@2
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Adding number conversion cast (unumber) $12*$100+$34 in [2] (word) print::w#2 ← (byte) $12*(number) $100+(byte) $34
Adding number conversion cast (unumber) $12*$100 in [2] (word) print::w#2 ← ((unumber)) (byte) $12*(number) $100+(byte) $34

@ -1,10 +1,10 @@
Inlined call call _init
Inlined call call __init
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start::@1
(byte*) screen#15 ← phi( _start::@1/(byte*) screen#17 )
main: scope:[main] from __start::@1
(byte*) screen#15 ← phi( __start::@1/(byte*) screen#17 )
(byte) line::x0#0 ← (number) 1
(byte) line::x1#0 ← (number) 2
call line
@ -54,32 +54,32 @@ line::@return: scope:[line] from line::@1
return
to:@return
(void()) _start()
_start: scope:[_start] from
to:_start::_init1
_start::_init1: scope:[_start] from _start
(void()) __start()
__start: scope:[__start] from
to:__start::__init1
__start::__init1: scope:[__start] from __start
(byte*) screen#5 ← (byte*)(number) $400
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
(byte*) screen#17 ← phi( _start::_init1/(byte*) screen#5 )
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
(byte*) screen#17 ← phi( __start::__init1/(byte*) screen#5 )
call main
to:_start::@2
_start::@2: scope:[_start] from _start::@1
(byte*) screen#13 ← phi( _start::@1/(byte*) screen#2 )
to:__start::@2
__start::@2: scope:[__start] from __start::@1
(byte*) screen#13 ← phi( __start::@1/(byte*) screen#2 )
(byte*) screen#6 ← (byte*) screen#13
to:_start::@return
_start::@return: scope:[_start] from _start::@2
(byte*) screen#14 ← phi( _start::@2/(byte*) screen#6 )
to:__start::@return
__start::@return: scope:[__start] from __start::@2
(byte*) screen#14 ← phi( __start::@2/(byte*) screen#6 )
(byte*) screen#7 ← (byte*) screen#14
return
to:@return
SYMBOL TABLE SSA
(void()) _start()
(label) _start::@1
(label) _start::@2
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@2
(label) __start::@return
(label) __start::__init1
(void()) line((byte) line::x0 , (byte) line::x1)
(bool~) line::$0
(label) line::@1
@ -169,12 +169,12 @@ Constant (const byte) line::x0#1 = 3
Constant (const byte) line::x1#1 = 5
Constant (const byte*) screen#17 = (byte*) 1024
Successful SSA optimization Pass2ConstantIdentification
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::_init1
Removing unused procedure block _start::@1
Removing unused procedure block _start::@2
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::__init1
Removing unused procedure block __start::@1
Removing unused procedure block __start::@2
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Inlining constant with different constant siblings (const byte) line::x0#0
Inlining constant with var siblings (const byte) line::x1#0

@ -2,7 +2,7 @@
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start
main: scope:[main] from __start
(byte) main::i#0 ← (byte) 0
to:main::@1
main::@1: scope:[main] from main main::@1
@ -16,20 +16,20 @@ main::@return: scope:[main] from main::@1
return
to:@return
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
call main
to:_start::@1
_start::@1: scope:[_start] from _start
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@1
__start::@1: scope:[__start] from __start
to:__start::@return
__start::@return: scope:[__start] from __start::@1
return
to:@return
SYMBOL TABLE SSA
(void()) _start()
(label) _start::@1
(label) _start::@return
(void()) __start()
(label) __start::@1
(label) __start::@return
(void()) main()
(bool~) main::$0
(label) main::@1
@ -49,10 +49,10 @@ Constant (const byte) main::i#0 = 0
Successful SSA optimization Pass2ConstantIdentification
Resolved ranged next value [3] main::i#1 ← ++ main::i#2 to ++
Resolved ranged comparison value [5] if(main::i#1!=rangelast(0,3)) goto main::@1 to (number) 4
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::@1
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Adding number conversion cast (unumber) 4 in [3] if((byte) main::i#1!=(number) 4) goto main::@1
Successful SSA optimization PassNAddNumberTypeConversions

@ -4,7 +4,7 @@ Inlined call (byte*~) main::$1 ← call spritePtr (byte*) main::screen
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start
main: scope:[main] from __start
(byte*) main::screen#0 ← (byte*) 0
(byte) main::getScreen1_id#0 ← (number) 0
to:main::getScreen1
@ -41,21 +41,21 @@ main::@return: scope:[main] from main::@2
return
to:@return
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
call main
to:_start::@1
_start::@1: scope:[_start] from _start
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@1
__start::@1: scope:[__start] from __start
to:__start::@return
__start::@return: scope:[__start] from __start::@1
return
to:@return
SYMBOL TABLE SSA
(const byte) SIZEOF_POINTER = (byte) 2
(void()) _start()
(label) _start::@1
(label) _start::@return
(void()) __start()
(label) __start::@1
(label) __start::@return
(void()) main()
(byte*~) main::$0
(byte*~) main::$1
@ -116,10 +116,10 @@ Constant (const byte) main::getScreen1_id#0 = 0
Successful SSA optimization Pass2ConstantIdentification
Eliminating unused constant (const byte*) main::screen#0
Successful SSA optimization PassNEliminateUnusedVars
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::@1
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Constant right-side identified [0] (byte~) main::getScreen1_$0 ← (const byte) main::getScreen1_id#0 * (const byte) SIZEOF_POINTER
Successful SSA optimization Pass2ConstantRValueConsolidation

@ -4,7 +4,7 @@ Inlined call (byte~) main::$1 ← call spritePtr (byte*~) main::$0
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start
main: scope:[main] from __start
(byte) main::getScreen1_id#0 ← (number) 0
to:main::getScreen1
main::getScreen1: scope:[main] from main
@ -39,21 +39,21 @@ main::@return: scope:[main] from main::@2
return
to:@return
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
call main
to:_start::@1
_start::@1: scope:[_start] from _start
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@1
__start::@1: scope:[__start] from __start
to:__start::@return
__start::@return: scope:[__start] from __start::@1
return
to:@return
SYMBOL TABLE SSA
(const byte) SIZEOF_POINTER = (byte) 2
(void()) _start()
(label) _start::@1
(label) _start::@return
(void()) __start()
(label) __start::@1
(label) __start::@return
(void()) main()
(byte*~) main::$0
(byte~) main::$1
@ -111,10 +111,10 @@ Constant (const byte) main::getScreen1_id#0 = 0
Successful SSA optimization Pass2ConstantIdentification
Simplifying expression containing zero main::DSP in [5] *((const byte*) main::DSP + (byte) 0) ← (byte) main::spritePtr1_return#0
Successful SSA optimization PassNSimplifyExpressionWithZero
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::@1
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Constant right-side identified [0] (byte~) main::getScreen1_$0 ← (const byte) main::getScreen1_id#0 * (const byte) SIZEOF_POINTER
Successful SSA optimization Pass2ConstantRValueConsolidation

@ -1,9 +1,9 @@
Inlined call call _init
Inlined call call __init
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start::@1
main: scope:[main] from __start::@1
(byte*~) main::$0 ← (const byte*) SCREEN + (number) $378
(byte*) main::sprite_ptr#0 ← (byte*~) main::$0
(byte*~) main::$1 ← (const byte*) sprite / (number) $40
@ -13,27 +13,27 @@ main::@return: scope:[main] from main
return
to:@return
(void()) _start()
_start: scope:[_start] from
to:_start::_init1
_start::_init1: scope:[_start] from _start
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
(void()) __start()
__start: scope:[__start] from
to:__start::__init1
__start::__init1: scope:[__start] from __start
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
call main
to:_start::@2
_start::@2: scope:[_start] from _start::@1
to:_start::@return
_start::@return: scope:[_start] from _start::@2
to:__start::@2
__start::@2: scope:[__start] from __start::@1
to:__start::@return
__start::@return: scope:[__start] from __start::@2
return
to:@return
SYMBOL TABLE SSA
(const byte*) SCREEN = (byte*)(number) $4400
(void()) _start()
(label) _start::@1
(label) _start::@2
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@2
(label) __start::@return
(label) __start::__init1
(void()) main()
(byte*~) main::$0
(byte*~) main::$1
@ -68,12 +68,12 @@ Constant value identified (byte)main::$1 in [2] *((const byte*) main::sprite_ptr
Successful SSA optimization Pass2ConstantValues
Simplifying expression containing zero main::sprite_ptr#0 in [2] *((const byte*) main::sprite_ptr#0 + (byte) 0) ← (byte)(const byte*) main::$1
Successful SSA optimization PassNSimplifyExpressionWithZero
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::_init1
Removing unused procedure block _start::@1
Removing unused procedure block _start::@2
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::__init1
Removing unused procedure block __start::@1
Removing unused procedure block __start::@2
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Constant inlined main::$1 = (const byte*) sprite/(byte) $40
Successful SSA optimization Pass2ConstantInlining

@ -2,7 +2,7 @@
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start
main: scope:[main] from __start
(byte~) main::$0 ← (const byte) main::min + (const byte) main::max
(word) main::sumw#0 ← (byte~) main::$0
(word~) main::$1 ← (word) main::sumw#0 >> (number) 1
@ -29,20 +29,20 @@ main::@return: scope:[main] from main::@1 main::@2
return
to:@return
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
call main
to:_start::@1
_start::@1: scope:[_start] from _start
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@1
__start::@1: scope:[__start] from __start
to:__start::@return
__start::@return: scope:[__start] from __start::@1
return
to:@return
SYMBOL TABLE SSA
(void()) _start()
(label) _start::@1
(label) _start::@return
(void()) __start()
(label) __start::@1
(label) __start::@return
(void()) main()
(byte~) main::$0
(word~) main::$1
@ -126,10 +126,10 @@ Successful SSA optimization Pass2ConstantIdentification
Simplifying expression containing zero main::SCREEN in [4] *((const byte*) main::SCREEN + (byte) 0) ← (byte) main::midw#0
Simplifying expression containing zero main::SCREEN in [10] if(*((const byte*) main::SCREEN + (byte) 0)==*((const byte*) main::SCREEN + (byte) 1)) goto main::@1
Successful SSA optimization PassNSimplifyExpressionWithZero
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::@1
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Constant right-side identified [0] (word~) main::$1 ← (const word) main::sumw#0 >> (byte) 1
Constant right-side identified [4] (byte~) main::$4 ← (const byte) main::sumb#0 >> (byte) 1

@ -1,12 +1,12 @@
Inlined call call _init
Inlined call call __init
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start::@1
(byte*) SCREEN4#9 ← phi( _start::@1/(byte*) SCREEN4#7 )
(byte*) SCREEN3#9 ← phi( _start::@1/(byte*) SCREEN3#7 )
(byte*) SCREEN2#4 ← phi( _start::@1/(byte*) SCREEN2#6 )
main: scope:[main] from __start::@1
(byte*) SCREEN4#9 ← phi( __start::@1/(byte*) SCREEN4#7 )
(byte*) SCREEN3#9 ← phi( __start::@1/(byte*) SCREEN3#7 )
(byte*) SCREEN2#4 ← phi( __start::@1/(byte*) SCREEN2#6 )
(byte) main::b#0 ← (byte) 0
to:main::@1
main::@1: scope:[main] from main main::@1
@ -59,32 +59,32 @@ w::@return: scope:[w] from w::@1
return
to:@return
(void()) _start()
_start: scope:[_start] from
to:_start::_init1
_start::_init1: scope:[_start] from _start
(byte*~) _start::_init1_$0 ← (const byte*) SCREEN + (number) $28*(number) 3
(byte*) SCREEN2#0 ← (byte*~) _start::_init1_$0
(byte*~) _start::_init1_$1 ← (const byte*) SCREEN + (number) $28*(number) 6
(byte*) SCREEN3#0 ← (byte*~) _start::_init1_$1
(byte*~) _start::_init1_$2 ← (const byte*) SCREEN + (number) $28*(number) 9
(byte*) SCREEN4#0 ← (byte*~) _start::_init1_$2
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
(byte*) SCREEN4#7 ← phi( _start::_init1/(byte*) SCREEN4#0 )
(byte*) SCREEN3#7 ← phi( _start::_init1/(byte*) SCREEN3#0 )
(byte*) SCREEN2#6 ← phi( _start::_init1/(byte*) SCREEN2#0 )
(void()) __start()
__start: scope:[__start] from
to:__start::__init1
__start::__init1: scope:[__start] from __start
(byte*~) __start::__init1_$0 ← (const byte*) SCREEN + (number) $28*(number) 3
(byte*) SCREEN2#0 ← (byte*~) __start::__init1_$0
(byte*~) __start::__init1_$1 ← (const byte*) SCREEN + (number) $28*(number) 6
(byte*) SCREEN3#0 ← (byte*~) __start::__init1_$1
(byte*~) __start::__init1_$2 ← (const byte*) SCREEN + (number) $28*(number) 9
(byte*) SCREEN4#0 ← (byte*~) __start::__init1_$2
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
(byte*) SCREEN4#7 ← phi( __start::__init1/(byte*) SCREEN4#0 )
(byte*) SCREEN3#7 ← phi( __start::__init1/(byte*) SCREEN3#0 )
(byte*) SCREEN2#6 ← phi( __start::__init1/(byte*) SCREEN2#0 )
call main
to:_start::@2
_start::@2: scope:[_start] from _start::@1
(byte*) SCREEN4#5 ← phi( _start::@1/(byte*) SCREEN4#7 )
(byte*) SCREEN3#5 ← phi( _start::@1/(byte*) SCREEN3#7 )
(byte*) SCREEN2#5 ← phi( _start::@1/(byte*) SCREEN2#6 )
to:_start::@return
_start::@return: scope:[_start] from _start::@2
(byte*) SCREEN4#3 ← phi( _start::@2/(byte*) SCREEN4#5 )
(byte*) SCREEN3#3 ← phi( _start::@2/(byte*) SCREEN3#5 )
(byte*) SCREEN2#3 ← phi( _start::@2/(byte*) SCREEN2#5 )
to:__start::@2
__start::@2: scope:[__start] from __start::@1
(byte*) SCREEN4#5 ← phi( __start::@1/(byte*) SCREEN4#7 )
(byte*) SCREEN3#5 ← phi( __start::@1/(byte*) SCREEN3#7 )
(byte*) SCREEN2#5 ← phi( __start::@1/(byte*) SCREEN2#6 )
to:__start::@return
__start::@return: scope:[__start] from __start::@2
(byte*) SCREEN4#3 ← phi( __start::@2/(byte*) SCREEN4#5 )
(byte*) SCREEN3#3 ← phi( __start::@2/(byte*) SCREEN3#5 )
(byte*) SCREEN2#3 ← phi( __start::@2/(byte*) SCREEN2#5 )
(byte*) SCREEN2#1 ← (byte*) SCREEN2#3
(byte*) SCREEN3#1 ← (byte*) SCREEN3#3
(byte*) SCREEN4#1 ← (byte*) SCREEN4#3
@ -123,14 +123,14 @@ SYMBOL TABLE SSA
(byte*) SCREEN4#7
(byte*) SCREEN4#8
(byte*) SCREEN4#9
(void()) _start()
(label) _start::@1
(label) _start::@2
(label) _start::@return
(label) _start::_init1
(byte*~) _start::_init1_$0
(byte*~) _start::_init1_$1
(byte*~) _start::_init1_$2
(void()) __start()
(label) __start::@1
(label) __start::@2
(label) __start::@return
(label) __start::__init1
(byte*~) __start::__init1_$0
(byte*~) __start::__init1_$1
(byte*~) __start::__init1_$2
(void()) main()
(number~) main::$1
(signed byte~) main::$2
@ -168,9 +168,9 @@ Adding number conversion cast (unumber) $c8 in (number~) main::$1 ← (number) $
Adding number conversion cast (unumber) main::$1 in (number~) main::$1 ← (unumber)(number) $c8 - (byte) main::b#2
Adding number conversion cast (unumber) $578-$546 in (number~) w::$1 ← (number) $578-(number) $546 + (byte) w::i#2
Adding number conversion cast (unumber) w::$1 in (number~) w::$1 ← (unumber)(number) $578-(number) $546 + (byte) w::i#2
Adding number conversion cast (unumber) $28*3 in (byte*~) _start::_init1_$0 ← (const byte*) SCREEN + (number) $28*(number) 3
Adding number conversion cast (unumber) $28*6 in (byte*~) _start::_init1_$1 ← (const byte*) SCREEN + (number) $28*(number) 6
Adding number conversion cast (unumber) $28*9 in (byte*~) _start::_init1_$2 ← (const byte*) SCREEN + (number) $28*(number) 9
Adding number conversion cast (unumber) $28*3 in (byte*~) __start::__init1_$0 ← (const byte*) SCREEN + (number) $28*(number) 3
Adding number conversion cast (unumber) $28*6 in (byte*~) __start::__init1_$1 ← (const byte*) SCREEN + (number) $28*(number) 6
Adding number conversion cast (unumber) $28*9 in (byte*~) __start::__init1_$2 ← (const byte*) SCREEN + (number) $28*(number) 9
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast $c8
@ -184,9 +184,9 @@ Alias main::sb#0 = main::$2
Alias SCREEN3#6 = SCREEN3#8
Alias SCREEN4#6 = SCREEN4#8
Alias w::b2#0 = w::$1
Alias SCREEN2#0 = _start::_init1_$0 SCREEN2#6 SCREEN2#5 SCREEN2#3 SCREEN2#1
Alias SCREEN3#0 = _start::_init1_$1 SCREEN3#7 SCREEN3#5 SCREEN3#3 SCREEN3#1
Alias SCREEN4#0 = _start::_init1_$2 SCREEN4#7 SCREEN4#5 SCREEN4#3 SCREEN4#1
Alias SCREEN2#0 = __start::__init1_$0 SCREEN2#6 SCREEN2#5 SCREEN2#3 SCREEN2#1
Alias SCREEN3#0 = __start::__init1_$1 SCREEN3#7 SCREEN3#5 SCREEN3#3 SCREEN3#1
Alias SCREEN4#0 = __start::__init1_$2 SCREEN4#7 SCREEN4#5 SCREEN4#3 SCREEN4#1
Successful SSA optimization Pass2AliasElimination
Identical Phi Values (byte*) SCREEN2#4 (byte*) SCREEN2#0
Identical Phi Values (byte*) SCREEN3#9 (byte*) SCREEN3#0
@ -220,12 +220,12 @@ Resolved ranged next value [7] main::b#1 ← ++ main::b#2 to ++
Resolved ranged comparison value [9] if(main::b#1!=rangelast(0,$64)) goto main::@1 to (number) $65
Resolved ranged next value [20] w::i#1 ← ++ w::i#2 to ++
Resolved ranged comparison value [22] if(w::i#1!=rangelast(0,$a)) goto w::@1 to (number) $b
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::_init1
Removing unused procedure block _start::@1
Removing unused procedure block _start::@2
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::__init1
Removing unused procedure block __start::@1
Removing unused procedure block __start::@2
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Adding number conversion cast (unumber) $65 in [6] if((byte) main::b#1!=(number) $65) goto main::@1
Adding number conversion cast (unumber) $b in [14] if((byte) w::i#1!=(number) $b) goto w::@1

@ -1,9 +1,9 @@
Inlined call call _init
Inlined call call __init
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start::@1
main: scope:[main] from __start::@1
asm { sei }
(byte*~) main::$0 ← (const byte*) CHARGEN + (number) 8
(byte*) main::CHAR_A#0 ← (byte*~) main::$0
@ -71,17 +71,17 @@ main::@return: scope:[main] from main::@6
return
to:@return
(void()) _start()
_start: scope:[_start] from
to:_start::_init1
_start::_init1: scope:[_start] from _start
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
(void()) __start()
__start: scope:[__start] from
to:__start::__init1
__start::__init1: scope:[__start] from __start
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
call main
to:_start::@2
_start::@2: scope:[_start] from _start::@1
to:_start::@return
_start::@return: scope:[_start] from _start::@2
to:__start::@2
__start::@2: scope:[__start] from __start::@1
to:__start::@return
__start::@return: scope:[__start] from __start::@2
return
to:@return
@ -89,11 +89,11 @@ SYMBOL TABLE SSA
(const byte*) CHARGEN = (byte*)(number) $d000
(const byte*) PROCPORT = (byte*)(number) 1
(const byte*) SCREEN = (byte*)(number) $400
(void()) _start()
(label) _start::@1
(label) _start::@2
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@2
(label) __start::@return
(label) __start::__init1
(void()) main()
(byte*~) main::$0
(number~) main::$1
@ -227,12 +227,12 @@ Resolved ranged next value [17] main::x#1 ← ++ main::x#2 to ++
Resolved ranged comparison value [19] if(main::x#1!=rangelast(0,7)) goto main::@2 to (number) 8
Resolved ranged next value [22] main::y#1 ← ++ main::y#2 to ++
Resolved ranged comparison value [24] if(main::y#1!=rangelast(0,7)) goto main::@1 to (number) 8
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::_init1
Removing unused procedure block _start::@1
Removing unused procedure block _start::@2
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::__init1
Removing unused procedure block __start::@1
Removing unused procedure block __start::@2
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Adding number conversion cast (unumber) 8 in [12] if((byte) main::x#1!=(number) 8) goto main::@2
Adding number conversion cast (unumber) 8 in [15] if((byte) main::y#1!=(number) 8) goto main::@1

@ -2,7 +2,7 @@
CONTROL FLOW GRAPH SSA
(void()) main()
main: scope:[main] from _start
main: scope:[main] from __start
(byte*) main::screen#0 ← (byte*)(number) $400
(byte*) main::colors#0 ← (byte*)(number) $d800
(byte) main::color#0 ← (byte) 1
@ -48,20 +48,20 @@ main::@return: scope:[main] from main::@3
return
to:@return
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
call main
to:_start::@1
_start::@1: scope:[_start] from _start
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@1
__start::@1: scope:[__start] from __start
to:__start::@return
__start::@return: scope:[__start] from __start::@1
return
to:@return
SYMBOL TABLE SSA
(void()) _start()
(label) _start::@1
(label) _start::@return
(void()) __start()
(label) __start::@1
(label) __start::@return
(void()) main()
(number~) main::$0
(bool~) main::$1
@ -154,10 +154,10 @@ Resolved ranged next value [10] main::column#1 ← ++ main::column#2 to ++
Resolved ranged comparison value [12] if(main::column#1!=rangelast(0,7)) goto main::@2 to (number) 8
Resolved ranged next value [16] main::row#1 ← ++ main::row#4 to ++
Resolved ranged comparison value [18] if(main::row#1!=rangelast(0,7)) goto main::@1 to (number) 8
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::@1
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Adding number conversion cast (unumber) 8 in [6] if((byte) main::column#1!=(number) 8) goto main::@2
Adding number conversion cast (unumber) 8 in [11] if((byte) main::row#1!=(number) 8) goto main::@1

@ -1,5 +1,5 @@
Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx
Inlined call call _init
Inlined call call __init
CONTROL FLOW GRAPH SSA
@ -109,7 +109,7 @@ print_char_at::@return: scope:[print_char_at] from print_char_at
to:@return
(void()) main()
main: scope:[main] from _start::@1
main: scope:[main] from __start::@1
to:main::@1
main::@1: scope:[main] from main main::@5
if(true) goto main::@2
@ -137,17 +137,17 @@ main::@return: scope:[main] from main::@1
return
to:@return
(void()) _start()
_start: scope:[_start] from
to:_start::_init1
_start::_init1: scope:[_start] from _start
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
(void()) __start()
__start: scope:[__start] from
to:__start::__init1
__start::__init1: scope:[__start] from __start
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
call main
to:_start::@2
_start::@2: scope:[_start] from _start::@1
to:_start::@return
_start::@return: scope:[_start] from _start::@2
to:__start::@2
__start::@2: scope:[__start] from __start::@1
to:__start::@return
__start::@return: scope:[__start] from __start::@2
return
to:@return
@ -251,11 +251,11 @@ SYMBOL TABLE SSA
(const byte) RADIX::HEXADECIMAL = (number) $10
(const byte) RADIX::OCTAL = (number) 8
(const nomodify byte*) SCREEN = (byte*)(number) $400
(void()) _start()
(label) _start::@1
(label) _start::@2
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@2
(label) __start::@return
(label) __start::__init1
(dword()) clock()
(number~) clock::$0
(label) clock::@return
@ -413,12 +413,12 @@ Eliminating unused constant (const nomodify byte) CIA_TIMER_CONTROL_A_COUNT_CYCL
Successful SSA optimization PassNEliminateUnusedVars
Removing unused block main::@return
Successful SSA optimization Pass2EliminateUnusedBlocks
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::_init1
Removing unused procedure block _start::@1
Removing unused procedure block _start::@2
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::__init1
Removing unused procedure block __start::@1
Removing unused procedure block __start::@2
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Constant right-side identified [19] (byte*) print_uint_at::at#1 ← (const byte*) print_ulong_at::at#0 + (byte) 4
Successful SSA optimization Pass2ConstantRValueConsolidation

@ -1,5 +1,5 @@
Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx
Inlined call call _init
Inlined call call __init
CONTROL FLOW GRAPH SSA
@ -109,7 +109,7 @@ print_char_at::@return: scope:[print_char_at] from print_char_at
to:@return
(void()) main()
main: scope:[main] from _start::@1
main: scope:[main] from __start::@1
call clock_start
to:main::@3
main::@3: scope:[main] from main
@ -134,17 +134,17 @@ main::@return: scope:[main] from main::@1
return
to:@return
(void()) _start()
_start: scope:[_start] from
to:_start::_init1
_start::_init1: scope:[_start] from _start
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
(void()) __start()
__start: scope:[__start] from
to:__start::__init1
__start::__init1: scope:[__start] from __start
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
call main
to:_start::@2
_start::@2: scope:[_start] from _start::@1
to:_start::@return
_start::@return: scope:[_start] from _start::@2
to:__start::@2
__start::@2: scope:[__start] from __start::@1
to:__start::@return
__start::@return: scope:[__start] from __start::@2
return
to:@return
@ -247,11 +247,11 @@ SYMBOL TABLE SSA
(const byte) RADIX::HEXADECIMAL = (number) $10
(const byte) RADIX::OCTAL = (number) 8
(const nomodify byte*) SCREEN = (byte*)(number) $400
(void()) _start()
(label) _start::@1
(label) _start::@2
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@2
(label) __start::@return
(label) __start::__init1
(dword()) clock()
(number~) clock::$0
(label) clock::@return
@ -406,12 +406,12 @@ Eliminating unused constant (const nomodify byte) CIA_TIMER_CONTROL_A_COUNT_CYCL
Successful SSA optimization PassNEliminateUnusedVars
Removing unused block main::@return
Successful SSA optimization Pass2EliminateUnusedBlocks
Removing unused procedure _start
Removing unused procedure block _start
Removing unused procedure block _start::_init1
Removing unused procedure block _start::@1
Removing unused procedure block _start::@2
Removing unused procedure block _start::@return
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::__init1
Removing unused procedure block __start::@1
Removing unused procedure block __start::@2
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Constant right-side identified [19] (byte*) print_uint_at::at#1 ← (const byte*) print_ulong_at::at#0 + (byte) 4
Successful SSA optimization Pass2ConstantRValueConsolidation

@ -2,7 +2,7 @@
// C standard library string.h
// Functions to manipulate C strings and arrays.
.pc = $801 "Basic"
:BasicUpstart(_start)
:BasicUpstart(__start)
.pc = $80d "Program"
.const LIGHT_BLUE = $e
.const OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS = 1
@ -21,7 +21,7 @@
.label conio_line_text = $b
// The current color cursor line start
.label conio_line_color = $d
_start: {
__start: {
// conio_cursor_x = 0
lda #0
sta.z conio_cursor_x

@ -1,24 +1,24 @@
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
[0] phi()
to:_start::_init1
_start::_init1: scope:[_start] from _start
to:__start::__init1
__start::__init1: scope:[__start] from __start
[1] (byte) conio_cursor_x ← (byte) 0
[2] (byte) conio_cursor_y ← (byte) 0
[3] (byte*) conio_line_text ← (const nomodify byte*) DEFAULT_SCREEN
[4] (byte*) conio_line_color ← (const nomodify byte*) COLORRAM
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
[5] phi()
[6] call main
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@return
__start::@return: scope:[__start] from __start::@1
[7] return
to:@return
(void()) main()
main: scope:[main] from _start::@1
main: scope:[main] from __start::@1
[8] phi()
[9] call memset
to:main::@1

@ -4,7 +4,7 @@ Fixing struct type SIZE_OF struct printf_buffer_number to 12
Fixing struct type SIZE_OF struct printf_buffer_number to 12
Added struct type cast to parameter value list call printf_uint (word) main::count (struct printf_format_number){ (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (const byte) DECIMAL }
Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx
Inlined call call _init
Inlined call call __init
Eliminating unused variable with no statement (void~) main::$2
CONTROL FLOW GRAPH SSA
@ -942,7 +942,7 @@ printf_number_buffer::@return: scope:[printf_number_buffer] from printf_number_
to:@return
(void()) main()
main: scope:[main] from _start::@1
main: scope:[main] from __start::@1
(void*) memset::str#2 ← (void*)(const nomodify byte*) SCREEN
(byte) memset::c#2 ← (byte) ' '
(word) memset::num#2 ← (number) $3e8
@ -1066,23 +1066,23 @@ main::@return: scope:[main] from main::@12
return
to:@return
(void()) _start()
_start: scope:[_start] from
to:_start::_init1
_start::_init1: scope:[_start] from _start
(void()) __start()
__start: scope:[__start] from
to:__start::__init1
__start::__init1: scope:[__start] from __start
(byte) conio_cursor_x ← (byte) 0
(byte) conio_cursor_y ← (byte) 0
(byte*) conio_line_text ← (const nomodify byte*) CONIO_SCREEN_TEXT
(byte*) conio_line_color ← (const nomodify byte*) CONIO_SCREEN_COLORS
(byte) conio_textcolor ← (const nomodify byte) CONIO_TEXTCOLOR_DEFAULT
(byte) conio_scroll_enable ← (byte) 1
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
call main
to:_start::@2
_start::@2: scope:[_start] from _start::@1
to:_start::@return
_start::@return: scope:[_start] from _start::@2
to:__start::@2
__start::@2: scope:[__start] from __start::@1
to:__start::@return
__start::@return: scope:[__start] from __start::@2
return
to:@return
@ -1194,11 +1194,11 @@ SYMBOL TABLE SSA
(const word*) RADIX_OCTAL_VALUES[] = { (word) $8000, (word) $1000, (word) $200, (word) $40, (word) 8 }
(const nomodify byte*) SCREEN = (byte*)(number) $400
(const byte) SIZEOF_WORD = (byte) 2
(void()) _start()
(label) _start::@1
(label) _start::@2
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@2
(label) __start::@return
(label) __start::__init1
(byte) conio_cursor_x loadstore
(byte) conio_cursor_y loadstore
(byte*) conio_line_color loadstore
@ -3043,9 +3043,9 @@ Added new block during phi lifting mul8s::@6(between mul8s::@5 and mul8s::@1)
Added new block during phi lifting mul8s::@7(between mul8s::@1 and mul8s::@2)
Added new block during phi lifting utoa::@17(between utoa::@16 and utoa::@13)
Added new block during phi lifting main::@15(between main::@14 and main::@7)
Adding NOP phi() at start of _start
Adding NOP phi() at start of _start::@1
Adding NOP phi() at start of _start::@2
Adding NOP phi() at start of __start
Adding NOP phi() at start of __start::@1
Adding NOP phi() at start of __start::@2
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@9
Adding NOP phi() at start of main::@3
@ -3081,7 +3081,7 @@ Adding NOP phi() at start of utoa::@1
Adding NOP phi() at start of gotoxy
Adding NOP phi() at start of gotoxy::@1
CALL GRAPH
Calls in [_start] to main:6
Calls in [__start] to main:6
Calls in [main] to memset:10 gotoxy:15 printf_uint:17 cputs:19 mul8s:38 mul8s:44
Calls in [mul8s] to mul8u:61
Calls in [cputs] to cputc:106
@ -3139,7 +3139,7 @@ Coalesced [222] utoa_append::value#6 ← utoa_append::value#0
Coalesced [229] utoa_append::value#7 ← utoa_append::value#1
Coalesced [230] utoa_append::digit#5 ← utoa_append::digit#1
Coalesced down to 26 phi equivalence classes
Culled Empty Block (label) _start::@2
Culled Empty Block (label) __start::@2
Culled Empty Block (label) main::@9
Culled Empty Block (label) main::@12
Culled Empty Block (label) main::@2
@ -3201,8 +3201,8 @@ Renumbering block main::@10 to main::@8
Renumbering block main::@11 to main::@9
Renumbering block main::@13 to main::@10
Renumbering block main::@14 to main::@11
Adding NOP phi() at start of _start
Adding NOP phi() at start of _start::@1
Adding NOP phi() at start of __start
Adding NOP phi() at start of __start::@1
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@2
Adding NOP phi() at start of main::@9
@ -3221,26 +3221,26 @@ Adding NOP phi() at start of gotoxy
FINAL CONTROL FLOW GRAPH
(void()) _start()
_start: scope:[_start] from
(void()) __start()
__start: scope:[__start] from
[0] phi()
to:_start::_init1
_start::_init1: scope:[_start] from _start
to:__start::__init1
__start::__init1: scope:[__start] from __start
[1] (byte) conio_cursor_x ← (byte) 0
[2] (byte) conio_cursor_y ← (byte) 0
[3] (byte*) conio_line_text ← (const nomodify byte*) DEFAULT_SCREEN
[4] (byte*) conio_line_color ← (const nomodify byte*) COLORRAM
to:_start::@1
_start::@1: scope:[_start] from _start::_init1
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
[5] phi()
[6] call main
to:_start::@return
_start::@return: scope:[_start] from _start::@1
to:__start::@return
__start::@return: scope:[__start] from __start::@1
[7] return
to:@return
(void()) main()
main: scope:[main] from _start::@1
main: scope:[main] from __start::@1
[8] phi()
[9] call memset
to:main::@1
@ -3698,7 +3698,7 @@ VARIABLE REGISTER WEIGHTS
(byte) MOS6581_SID::POT_X
(byte) MOS6581_SID::POT_Y
(byte) MOS6581_SID::VOLUME_FILTER_MODE
(void()) _start()
(void()) __start()
(byte) conio_cursor_x loadstore 340911.5681818182
(byte) conio_cursor_y loadstore 5333335.133333334
(byte*) conio_line_color loadstore 3810346.6896551726
@ -4071,7 +4071,7 @@ Target platform is c64basic / MOS6502X
// Functions to manipulate C strings and arrays.
// Upstart
.pc = $801 "Basic"
:BasicUpstart(_start)
:BasicUpstart(__start)
.pc = $80d "Program"
// Global Constants & labels
.const LIGHT_BLUE = $e
@ -4090,11 +4090,11 @@ Target platform is c64basic / MOS6502X
.label conio_line_text = $2e
// The current color cursor line start
.label conio_line_color = $30
// _start
_start: {
jmp _init1
// _start::_init1
_init1:
// __start
__start: {
jmp __init1
// __start::__init1
__init1:
// [1] (byte) conio_cursor_x ← (byte) 0 -- vbuz1=vbuc1
lda #0
sta.z conio_cursor_x
@ -4111,17 +4111,17 @@ _start: {
sta.z conio_line_color
lda #>COLORRAM
sta.z conio_line_color+1
// [5] phi from _start::_init1 to _start::@1 [phi:_start::_init1->_start::@1]
__b1_from__init1:
// [5] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1]
__b1_from___init1:
jmp __b1
// _start::@1
// __start::@1
__b1:
// [6] call main
// [8] phi from _start::@1 to main [phi:_start::@1->main]
// [8] phi from __start::@1 to main [phi:__start::@1->main]
main_from___b1:
jsr main
jmp __breturn
// _start::@return
// __start::@return
__breturn:
// [7] return
rts
@ -5463,7 +5463,7 @@ Uplift Scope [RADIX]
Uplift Scope [printf_format_number]
Uplift Scope [printf_buffer_number]
Uplift Scope [printf_format_string]
Uplift Scope [_start]
Uplift Scope [__start]
Uplifting [memcpy] best 118966 combination zp[2]:31 [ memcpy::src#2 memcpy::src#4 memcpy::src#1 ] zp[2]:33 [ memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 ] zp[2]:73 [ memcpy::src_end#0 ] zp[2]:27 [ memcpy::source#2 ] zp[2]:29 [ memcpy::destination#2 ]
Uplifting [memset] best 118947 combination zp[2]:25 [ memset::dst#2 memset::dst#4 memset::dst#1 ] zp[2]:71 [ memset::end#0 ] reg byte x [ memset::c#5 ] zp[2]:20 [ memset::num#3 ] zp[2]:22 [ memset::str#4 ]
@ -5489,7 +5489,7 @@ Uplifting [RADIX] best 107339 combination
Uplifting [printf_format_number] best 107339 combination
Uplifting [printf_buffer_number] best 107339 combination
Uplifting [printf_format_string] best 107339 combination
Uplifting [_start] best 107339 combination
Uplifting [__start] best 107339 combination
Attempting to uplift remaining variables inzp[1]:45 [ conio_cursor_y ]
Uplifting [] best 107339 combination zp[1]:45 [ conio_cursor_y ]
Attempting to uplift remaining variables inzp[1]:44 [ conio_cursor_x ]
@ -5551,7 +5551,7 @@ ASSEMBLER BEFORE OPTIMIZATION
// Functions to manipulate C strings and arrays.
// Upstart
.pc = $801 "Basic"
:BasicUpstart(_start)
:BasicUpstart(__start)
.pc = $80d "Program"
// Global Constants & labels
.const LIGHT_BLUE = $e
@ -5571,11 +5571,11 @@ ASSEMBLER BEFORE OPTIMIZATION
.label conio_line_text = $b
// The current color cursor line start
.label conio_line_color = $d
// _start
_start: {
jmp _init1
// _start::_init1
_init1:
// __start
__start: {
jmp __init1
// __start::__init1
__init1:
// [1] (byte) conio_cursor_x ← (byte) 0 -- vbuz1=vbuc1
lda #0
sta.z conio_cursor_x
@ -5592,17 +5592,17 @@ _start: {
sta.z conio_line_color
lda #>COLORRAM
sta.z conio_line_color+1
// [5] phi from _start::_init1 to _start::@1 [phi:_start::_init1->_start::@1]
__b1_from__init1:
// [5] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1]
__b1_from___init1:
jmp __b1
// _start::@1
// __start::@1
__b1:
// [6] call main
// [8] phi from _start::@1 to main [phi:_start::@1->main]
// [8] phi from __start::@1 to main [phi:__start::@1->main]
main_from___b1:
jsr main
jmp __breturn
// _start::@return
// __start::@return
__breturn:
// [7] return
rts
@ -6612,7 +6612,7 @@ gotoxy: {
printf_buffer: .fill SIZEOF_STRUCT_PRINTF_BUFFER_NUMBER, 0
ASSEMBLER OPTIMIZATIONS
Removing instruction jmp _init1
Removing instruction jmp __init1
Removing instruction jmp __b1
Removing instruction jmp __breturn
Removing instruction jmp __b1
@ -6691,7 +6691,7 @@ Replacing label __b1_from_cputc with __b1
Replacing label __b2_from___b3 with __b2
Replacing label __b1_from___b2 with __b1
Replacing label __b2_from___b1 with __b2
Removing instruction __b1_from__init1:
Removing instruction __b1_from___init1:
Removing instruction main_from___b1:
Removing instruction __b2_from___b1:
Removing instruction gotoxy_from___b2:
@ -6731,7 +6731,7 @@ Removing instruction cputs_from___b2:
Removing instruction __b4_from___b7:
Removing instruction utoa_append_from___b5:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction _init1:
Removing instruction __init1:
Removing instruction __b1:
Removing instruction __breturn:
Removing instruction memset_from_main:
@ -6893,10 +6893,10 @@ FINAL SYMBOL TABLE
(const word*) RADIX_DECIMAL_VALUES[] = { (word) $2710, (word) $3e8, (word) $64, (word) $a }
(const nomodify byte*) SCREEN = (byte*) 1024
(const byte) SIZEOF_STRUCT_PRINTF_BUFFER_NUMBER = (byte) $c
(void()) _start()
(label) _start::@1
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@return
(label) __start::__init1
(byte) conio_cursor_x loadstore zp[1]:9 340911.5681818182
(byte) conio_cursor_y loadstore zp[1]:10 5333335.133333334
(byte*) conio_line_color loadstore zp[2]:13 3810346.6896551726
@ -7200,7 +7200,7 @@ Score: 86027
// Functions to manipulate C strings and arrays.
// Upstart
.pc = $801 "Basic"
:BasicUpstart(_start)
:BasicUpstart(__start)
.pc = $80d "Program"
// Global Constants & labels
.const LIGHT_BLUE = $e
@ -7220,9 +7220,9 @@ Score: 86027
.label conio_line_text = $b
// The current color cursor line start
.label conio_line_color = $d
// _start
_start: {
// _start::_init1
// __start
__start: {
// __start::__init1
// conio_cursor_x = 0
// [1] (byte) conio_cursor_x ← (byte) 0 -- vbuz1=vbuc1
lda #0
@ -7242,12 +7242,12 @@ _start: {
sta.z conio_line_color
lda #>COLORRAM
sta.z conio_line_color+1
// [5] phi from _start::_init1 to _start::@1 [phi:_start::_init1->_start::@1]
// _start::@1
// [5] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1]
// __start::@1
// [6] call main
// [8] phi from _start::@1 to main [phi:_start::@1->main]
// [8] phi from __start::@1 to main [phi:__start::@1->main]
jsr main
// _start::@return
// __start::@return
// [7] return
rts
}

@ -94,10 +94,10 @@
(const word*) RADIX_DECIMAL_VALUES[] = { (word) $2710, (word) $3e8, (word) $64, (word) $a }
(const nomodify byte*) SCREEN = (byte*) 1024
(const byte) SIZEOF_STRUCT_PRINTF_BUFFER_NUMBER = (byte) $c
(void()) _start()
(label) _start::@1
(label) _start::@return
(label) _start::_init1
(void()) __start()
(label) __start::@1
(label) __start::@return
(label) __start::__init1
(byte) conio_cursor_x loadstore zp[1]:9 340911.5681818182
(byte) conio_cursor_y loadstore zp[1]:10 5333335.133333334
(byte*) conio_line_color loadstore zp[2]:13 3810346.6896551726

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