1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2025-02-22 13:29:18 +00:00

Dropped SelfPhiEliminate pass - so now phi-variables have value for all predecessor-blocks. Added self-phi-handling to Identical-PHI optimization step instead. Closes #231

This commit is contained in:
jespergravgaard 2019-07-25 14:35:43 +02:00
parent ca8d68891c
commit 02ff354d3f
187 changed files with 12582 additions and 4627 deletions

View File

@ -275,7 +275,7 @@ public class Compiler {
optimizations.add(new PassNVariableReferenceInfos(program));
optimizations.add(new Pass2UnaryNotSimplification(program));
optimizations.add(new Pass2AliasElimination(program));
optimizations.add(new Pass2SelfPhiElimination(program));
//optimizations.add(new Pass2SelfPhiElimination(program));
optimizations.add(new Pass2IdenticalPhiElimination(program));
optimizations.add(new Pass2DuplicateRValueIdentification(program));
optimizations.add(new Pass2ConditionalJumpSimplification(program));

View File

@ -11,7 +11,7 @@ import java.util.LinkedHashMap;
import java.util.ListIterator;
import java.util.Map;
/** Compiler Pass eliminating phi varialbes where all rValues are the same */
/** Compiler Pass eliminating phi variables where all rValues are the same */
public class Pass2IdenticalPhiElimination extends Pass2SsaOptimization {
public Pass2IdenticalPhiElimination(Program program) {
@ -23,7 +23,7 @@ public class Pass2IdenticalPhiElimination extends Pass2SsaOptimization {
*/
@Override
public boolean step() {
Map<VariableRef,RValue> phiIdentical = new LinkedHashMap<>();
Map<VariableRef, RValue> phiIdentical = new LinkedHashMap<>();
for(ControlFlowBlock block : getGraph().getAllBlocks()) {
for(Statement statement : block.getStatements()) {
if(statement instanceof StatementPhiBlock) {
@ -34,6 +34,10 @@ public class Pass2IdenticalPhiElimination extends Pass2SsaOptimization {
RValue rValue = null;
boolean identical = true;
for(StatementPhiBlock.PhiRValue phiRValue : phiVariable.getValues()) {
if(phiRValue.getrValue().equals(phiVariable.getVariable())) {
// Self PHI - skip that
continue;
}
if(rValue == null) {
rValue = phiRValue.getrValue();
} else {
@ -58,7 +62,7 @@ public class Pass2IdenticalPhiElimination extends Pass2SsaOptimization {
getLog().append("Identical Phi Values " + var.toString(getProgram()) + " " + alias.toString(getProgram()));
}
deleteSymbols(getScope(), phiIdentical.keySet());
return phiIdentical.size()>0;
return phiIdentical.size() > 0;
}
}

View File

@ -1,42 +0,0 @@
package dk.camelot64.kickc.passes;
import dk.camelot64.kickc.model.ControlFlowGraphBaseVisitor;
import dk.camelot64.kickc.model.Program;
import dk.camelot64.kickc.model.statements.StatementPhiBlock;
import java.util.Iterator;
/** Compiler Pass eliminating phi self assignments */
public class Pass2SelfPhiElimination extends Pass2SsaOptimization {
public Pass2SelfPhiElimination(Program program) {
super(program);
}
/**
* Eliminate phi variables pointing to themselves
*/
@Override
public boolean step() {
final Boolean[] optimized = {Boolean.FALSE};
ControlFlowGraphBaseVisitor<Void> visitor = new ControlFlowGraphBaseVisitor<Void>() {
@Override
public Void visitPhiBlock(StatementPhiBlock phi) {
for(StatementPhiBlock.PhiVariable phiVariable : phi.getPhiVariables()) {
Iterator<StatementPhiBlock.PhiRValue> iterator = phiVariable.getValues().iterator();
while(iterator.hasNext()) {
StatementPhiBlock.PhiRValue phiRValue = iterator.next();
if(phiRValue.getrValue().equals(phiVariable.getVariable())) {
iterator.remove();
optimized[0] = Boolean.TRUE;
getLog().append("Self Phi Eliminated " + phiVariable.getVariable().toString(getProgram()));
}
}
}
return null;
}
};
visitor.visitGraph(getGraph());
return optimized[0];
}
}

View File

@ -35,6 +35,21 @@ public class TestPrograms {
public TestPrograms() {
}
@Test
public void testEuclidProblem2() throws IOException, URISyntaxException {
compileAndCompare("euclid-problem-2");
}
@Test
public void testEuclidProblem() throws IOException, URISyntaxException {
compileAndCompare("euclid-problem");
}
@Test
public void testFastMultiply127() throws IOException, URISyntaxException {
compileAndCompare("fastmultiply-127");
}
@Test
public void testSieve() throws IOException, URISyntaxException {
compileAndCompare("sieve");

View File

@ -0,0 +1,25 @@
// Demonstrates a problem where wrong alive ranges result in clobbering an alive variable
// The compiler does not realize that A is alive in the statement b=b-a - and thus can clobber it.
const char* SCREEN = 0x0400;
char idx = 0;
void main() {
SCREEN[idx++] = euclid(128,2);
SCREEN[idx++] = euclid(169,69);
SCREEN[idx++] = euclid(255,155);
SCREEN[idx++] = euclid(99,3);
}
// Calculate least common denominator using euclids subtraction method
unsigned char euclid(unsigned char a, unsigned char b) {
while (a!=b) {
if(a>b) {
a = a-b;
} else {
b = b-a;
}
}
return a;
}

View File

@ -0,0 +1,18 @@
// Demonstrates a problem where wrong alive ranges result in clobbering an alive variable
// The compiler does not realize that A is alive in the statement b=b-a - and thus can clobber it.
char* SCREEN = 0x0400;
void main() {
char a = 128;
char b = 2;
while (a!=b) {
if(a>b) {
a = a-b;
} else {
b = b-a;
}
}
*SCREEN = a;
}

View File

@ -0,0 +1,114 @@
// An implementation of seriously fast multiply for integer values in the interval [-1;1] with the best possible precision
// NOTE: So far unsuccessful - since the handling of sign and values where a+b>sqrt2) makes the code slower than regular fast multiply
// In this model 255 binary represents 1.0 - meaning that 255*255 = 255
// Uses principles from C=Hacking #16 https://codebase64.org/doku.php?id=magazines:chacking16
// Utilizes the fact that a*b = ((a+b)/2)^2 - ((a-b)/2)^2
import "print"
void main() {
print_cls();
print_str("unsigned");
print_ln();
print_mulf8u127(0,0);
print_mulf8u127(127,127);
print_mulf8u127(64,64);
print_mulf8u127(64,127);
print_mulf8u127(64,192);
print_mulf8u127(255,127);
print_mulf8u127(192,192);
print_mulf8u127(255,255);
print_str("signed");
print_ln();
print_mulf8s127(0,0);
print_mulf8s127(64,64);
print_mulf8s127(64,127);
print_mulf8s127(-64,64);
print_mulf8s127(64,-64);
print_mulf8s127(-64,-64);
print_mulf8s127(127,127);
print_mulf8s127(-127,127);
print_mulf8s127(127,-127);
print_mulf8s127(-127,-127);
}
void print_mulf8u127(unsigned char a, unsigned char b) {
unsigned word c = mulf8u127(a,b);
print_byte(a);
print_char('*');
print_byte(b);
print_char('=');
print_word(c);
print_ln();
}
void print_mulf8s127(signed char a, signed char b) {
signed word c = mulf8s127(a,b);
print_sbyte(a);
print_char('*');
print_sbyte(b);
print_char('=');
print_sword(c);
print_ln();
}
// mulf_sqr tables will contain f(x)=int(x*x/4) and g(x) = f(x-255).
// f(x) = ( x * x )/4
unsigned char[512] align($100) mulf127_sqr1_lo = kickasm{{ .fill 512, <round((i/127*i/127)*127/4) }};
unsigned char[512] align($100) mulf127_sqr1_hi = kickasm{{ .fill 512, >round((i/127*i/127)*127/4) }};
// g(x) = <((( x - 255) * ( x - 255 ))/4)
unsigned char[512] align($100) mulf127_sqr2_lo = kickasm{{ .fill 512, <round(((i-255)/127*(i-255)/127)*127/4) }};
unsigned char[512] align($100) mulf127_sqr2_hi = kickasm{{ .fill 512, >round(((i-255)/127*(i-255)/127)*127/4) }};
unsigned word mulf8u127(unsigned char a, unsigned char b) {
const byte* memA = $fc;
const byte* memB = $fd;
const word* res = $fe;
const byte* resL = $fe;
const byte* resH = $ff;
*memA = a;
*memB = b;
asm {
lda memA
sta sm1+1
sta sm3+1
eor #$ff
sta sm2+1
sta sm4+1
ldx memB
sec
sm1:
lda mulf127_sqr1_lo,x
sm2:
sbc mulf127_sqr2_lo,x
sta resL
sm3:
lda mulf127_sqr1_hi,x
sm4:
sbc mulf127_sqr2_hi,x
sta resH
}
return *res;
}
signed word mulf8s127(signed char a, signed char b) {
signed word c = (signed word)mulf8u127((unsigned char)a, (unsigned char)b);
if(a<0) {
c -= (signed word)b*2;
}
if(b<0) {
c -= (signed word)a*2;
}
if(a<0 && b<0) {
c -= 0x200;
}
return c;
}

View File

@ -57,8 +57,6 @@ Simplifying constant integer cast $f
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) $f
Successful SSA optimization PassNFinalizeNumberTypeConversions
Self Phi Eliminated (byte*) main::cur_item#1
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte*) main::cur_item#1 (byte*) main::cur_item#0
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) main::$0 [8] if((byte) main::sub#1!=rangelast(0,SZ#0)) goto main::@1

View File

@ -138,9 +138,6 @@ Inferred type updated to byte in (unumber~) main::$3 ← (byte~) main::$2 | (byt
Alias (byte*) main::cur_item#2 = (byte*) main::cur_item#3
Alias (byte) main::item#2 = (byte) main::item#3
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte) main::item#2
Self Phi Eliminated (byte*) main::cur_item#2
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte) main::item#2 (byte) main::item#4
Identical Phi Values (byte*) main::cur_item#2 (byte*) main::cur_item#4
Successful SSA optimization Pass2IdenticalPhiElimination

View File

@ -1101,18 +1101,6 @@ Alias (byte*) bitmap_gfx#14 = (byte*) bitmap_gfx#23 (byte*) bitmap_gfx#19
Alias (byte*) bitmap_screen#13 = (byte*) bitmap_screen#22 (byte*) bitmap_screen#18
Alias (word) main::vx#6 = (word) main::vx#7
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte) memset::c#2
Self Phi Eliminated (byte*) memset::end#1
Self Phi Eliminated (void*) memset::str#5
Self Phi Eliminated (byte*) bitmap_init::gfx#2
Self Phi Eliminated (byte*) bitmap_gfx#21
Self Phi Eliminated (byte*) bitmap_screen#20
Self Phi Eliminated (byte*) bitmap_gfx#11
Self Phi Eliminated (byte*) bitmap_screen#11
Self Phi Eliminated (byte*) bitmap_gfx#14
Self Phi Eliminated (byte*) bitmap_screen#13
Self Phi Eliminated (byte) frame_cnt#11
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte) memset::c#2 (byte) memset::c#3
Identical Phi Values (byte*) memset::end#1 (byte*) memset::end#0
Identical Phi Values (void*) memset::str#5 (void*) memset::str#3

View File

@ -2418,25 +2418,6 @@ Alias (byte*) bitmap_gfx#14 = (byte*) bitmap_gfx#24 (byte*) bitmap_gfx#20
Alias (byte*) bitmap_screen#13 = (byte*) bitmap_screen#23 (byte*) bitmap_screen#19
Alias (word) main::idx_x#10 = (word) main::idx_x#7
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (word) divr16u::divisor#2
Self Phi Eliminated (signed word) sin16s_gen2::ampl#1
Self Phi Eliminated (signed word) sin16s_gen2::offs#1
Self Phi Eliminated (dword) sin16s_gen2::step#1
Self Phi Eliminated (word) sin16s_gen2::wavelength#2
Self Phi Eliminated (word) rem16u#16
Self Phi Eliminated (byte) memset::c#2
Self Phi Eliminated (byte*) memset::end#1
Self Phi Eliminated (void*) memset::str#5
Self Phi Eliminated (byte*) bitmap_init::gfx#2
Self Phi Eliminated (byte*) bitmap_gfx#22
Self Phi Eliminated (byte*) bitmap_screen#21
Self Phi Eliminated (byte*) bitmap_gfx#11
Self Phi Eliminated (byte*) bitmap_screen#11
Self Phi Eliminated (word) rem16u#18
Self Phi Eliminated (byte*) bitmap_gfx#14
Self Phi Eliminated (byte*) bitmap_screen#13
Self Phi Eliminated (byte) frame_cnt#11
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (word) divr16u::divisor#2 (word) divr16u::divisor#6
Identical Phi Values (dword) div32u16u::dividend#1 (dword) div32u16u::dividend#0
Identical Phi Values (word) div32u16u::divisor#1 (word) div32u16u::divisor#0

View File

@ -2585,28 +2585,6 @@ Alias (word) main::idx_x#10 = (word) main::idx_x#12 (word) main::idx_x#8
Alias (signed word) main::r#1 = (signed word) main::r#5
Alias (word) main::idx_y#10 = (word) main::idx_y#11
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (word) divr16u::divisor#2
Self Phi Eliminated (signed word) sin16s_gen2::ampl#1
Self Phi Eliminated (signed word) sin16s_gen2::offs#1
Self Phi Eliminated (dword) sin16s_gen2::step#1
Self Phi Eliminated (word) sin16s_gen2::wavelength#2
Self Phi Eliminated (word) rem16u#16
Self Phi Eliminated (byte) memset::c#2
Self Phi Eliminated (byte*) memset::end#1
Self Phi Eliminated (void*) memset::str#5
Self Phi Eliminated (byte*) bitmap_init::gfx#2
Self Phi Eliminated (byte*) bitmap_gfx#23
Self Phi Eliminated (byte*) bitmap_screen#22
Self Phi Eliminated (byte*) bitmap_gfx#11
Self Phi Eliminated (byte*) bitmap_screen#11
Self Phi Eliminated (word) rem16u#27
Self Phi Eliminated (byte*) bitmap_gfx#19
Self Phi Eliminated (byte*) bitmap_screen#18
Self Phi Eliminated (byte) frame_cnt#10
Self Phi Eliminated (word) rem16u#18
Self Phi Eliminated (byte*) bitmap_gfx#14
Self Phi Eliminated (byte*) bitmap_screen#13
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (word) divr16u::divisor#2 (word) divr16u::divisor#6
Identical Phi Values (dword) div32u16u::dividend#1 (dword) div32u16u::dividend#0
Identical Phi Values (word) div32u16u::divisor#1 (word) div32u16u::divisor#0

View File

@ -1538,30 +1538,6 @@ Alias (word) bitmap_line::dy#12 = (word) bitmap_line::dy#13
Alias (word) bitmap_line::dx#12 = (word) bitmap_line::dx#5
Alias (word) bitmap_line::sy#2 = (word) bitmap_line::sy#9
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte) memset::c#2
Self Phi Eliminated (byte*) memset::end#1
Self Phi Eliminated (void*) memset::str#5
Self Phi Eliminated (byte*) bitmap_init::gfx#2
Self Phi Eliminated (byte*) bitmap_gfx#21
Self Phi Eliminated (byte*) bitmap_screen#20
Self Phi Eliminated (byte*) bitmap_gfx#11
Self Phi Eliminated (byte*) bitmap_screen#11
Self Phi Eliminated (word) bitmap_line::sy#1
Self Phi Eliminated (word) bitmap_line::dx#11
Self Phi Eliminated (word) bitmap_line::dy#11
Self Phi Eliminated (word) bitmap_line::y2#3
Self Phi Eliminated (word) bitmap_line::sx#1
Self Phi Eliminated (word) bitmap_line::sx#11
Self Phi Eliminated (word) bitmap_line::dy#12
Self Phi Eliminated (word) bitmap_line::dx#12
Self Phi Eliminated (word) bitmap_line::x2#3
Self Phi Eliminated (word) bitmap_line::sy#2
Self Phi Eliminated (byte*) COSTAB#1
Self Phi Eliminated (byte*) bitmap_gfx#18
Self Phi Eliminated (byte*) bitmap_screen#17
Self Phi Eliminated (byte*) bitmap_gfx#14
Self Phi Eliminated (byte*) bitmap_screen#13
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte) memset::c#2 (byte) memset::c#3
Identical Phi Values (byte*) memset::end#1 (byte*) memset::end#0
Identical Phi Values (void*) memset::str#5 (void*) memset::str#3

View File

@ -69,8 +69,6 @@ Alias (bool) framedone#2 = (bool) framedone#5 (bool) framedone#7
Alias (bool) framedone#0 = (bool) framedone#8
Alias (bool) framedone#3 = (bool) framedone#6
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (bool) framedone#4
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (bool) framedone#9 (bool) framedone#0
Identical Phi Values (bool) framedone#4 (bool) framedone#2
Identical Phi Values (bool) framedone#3 (bool) framedone#2

View File

@ -235,9 +235,6 @@ Alias (byte) main::x#1 = (byte) main::x#3
Alias (byte) main::yd#1 = (byte) main::yd#2
Alias (byte) main::xd#1 = (byte) main::xd#3
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte) main::yd#1
Self Phi Eliminated (byte) main::xd#1
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte) main::yd#1 (byte) main::yd#0
Identical Phi Values (byte) main::xd#1 (byte) main::xd#0
Successful SSA optimization Pass2IdenticalPhiElimination

View File

@ -239,9 +239,6 @@ Alias (byte) main::x#1 = (byte) main::x#3
Alias (byte) main::yd#1 = (byte) main::yd#2
Alias (byte) main::xd#1 = (byte) main::xd#3
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte) main::yd#1
Self Phi Eliminated (byte) main::xd#1
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte) main::yd#1 (byte) main::yd#0
Identical Phi Values (byte) main::xd#1 (byte) main::xd#0
Successful SSA optimization Pass2IdenticalPhiElimination

View File

@ -1405,11 +1405,6 @@ Alias (byte*) print_char_cursor#133 = (byte*) print_char_cursor#66 (byte*) print
Alias (byte*) print_line_cursor#19 = (byte*) print_line_cursor#38
Alias (byte*) print_char_cursor#135 = (byte*) print_char_cursor#68
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte) memset::c#1
Self Phi Eliminated (byte*) memset::end#1
Self Phi Eliminated (void*) memset::str#4
Self Phi Eliminated (byte*) print_char_cursor#71
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (word) memset::num#1 (word) memset::num#0
Identical Phi Values (void*) memset::str#2 (void*) memset::str#0
Identical Phi Values (byte) memset::c#2 (byte) memset::c#0

View File

@ -910,18 +910,14 @@ Alias (byte) gfx_init_plane_charset8::cr#2 = (byte) gfx_init_plane_charset8::cr#
Alias (byte*) gfx_init_plane_charset8::chargen#4 = (byte*) gfx_init_plane_charset8::chargen#7
Alias (byte) gfx_init_plane_charset8::ch#2 = (byte) gfx_init_plane_charset8::ch#5
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte) main::rst#2
Self Phi Eliminated (byte) gfx_init_screen0::cy#2
Self Phi Eliminated (byte) gfx_init_plane_charset8::cr#2
Self Phi Eliminated (byte*) gfx_init_plane_charset8::chargen#4
Self Phi Eliminated (byte) gfx_init_plane_charset8::ch#2
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte) main::rst#2 (byte) main::rst#0
Identical Phi Values (byte) gfx_init_screen0::cy#2 (byte) gfx_init_screen0::cy#4
Identical Phi Values (byte) gfx_init_plane_charset8::cr#2 (byte) gfx_init_plane_charset8::cr#6
Identical Phi Values (byte*) gfx_init_plane_charset8::chargen#4 (byte*) gfx_init_plane_charset8::chargen#1
Identical Phi Values (byte) gfx_init_plane_charset8::ch#2 (byte) gfx_init_plane_charset8::ch#7
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values (byte) gfx_init_plane_charset8::ch#7 (byte) gfx_init_plane_charset8::ch#8
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) main::$25 [97] if((byte) main::j#1!=rangelast(0,$f)) goto main::@1
Simple Condition (bool~) main::$29 [108] if(*((byte*) RASTER#0)!=(byte) main::rst#0) goto main::@6
Simple Condition (bool~) main::$35 [120] if((byte) main::rst#1!=(byte) $f2) goto main::@12
@ -1005,7 +1001,7 @@ Resolved ranged next value [178] gfx_init_plane_charset8::cp#1 ← ++ gfx_init_p
Resolved ranged comparison value [180] if(gfx_init_plane_charset8::cp#1!=rangelast(0,7)) goto gfx_init_plane_charset8::@3 to (number) 8
Resolved ranged next value [184] gfx_init_plane_charset8::cr#1 ← ++ gfx_init_plane_charset8::cr#6 to ++
Resolved ranged comparison value [186] if(gfx_init_plane_charset8::cr#1!=rangelast(0,7)) goto gfx_init_plane_charset8::@2 to (number) 8
Resolved ranged next value [188] gfx_init_plane_charset8::ch#1 ← ++ gfx_init_plane_charset8::ch#7 to ++
Resolved ranged next value [188] gfx_init_plane_charset8::ch#1 ← ++ gfx_init_plane_charset8::ch#8 to ++
Resolved ranged comparison value [190] if(gfx_init_plane_charset8::ch#1!=rangelast(0,$ff)) goto gfx_init_plane_charset8::@1 to (number) 0
Eliminating unused variable (byte) gfx_init_plane_charset8::gfxbCpuBank#1 and assignment [94] (byte) gfx_init_plane_charset8::gfxbCpuBank#1 ← ++ (byte) gfx_init_plane_charset8::gfxbCpuBank#0
Successful SSA optimization PassNEliminateUnusedVars
@ -1032,10 +1028,6 @@ Finalized unsigned number type (byte) 8
Finalized unsigned number type (byte) 8
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Self Phi Eliminated (byte) gfx_init_plane_charset8::ch#7
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte) gfx_init_plane_charset8::ch#7 (byte) gfx_init_plane_charset8::ch#8
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [9] (byte~) main::$1 ← (const byte) DTV_HIGHCOLOR#0 | (const byte) DTV_LINEAR#0
Constant right-side identified [13] (byte~) main::$4 ← (const byte) VIC_DEN#0 | (const byte) VIC_ECM#0
Constant right-side identified [17] (byte~) main::$7 ← (const byte) VIC_MCM#0 | (const byte) VIC_CSEL#0

View File

@ -638,9 +638,6 @@ Successful SSA optimization Pass2AliasElimination
Alias (word) gfx_init_chunky::x#2 = (word) gfx_init_chunky::x#3
Alias (byte) gfx_init_chunky::y#2 = (byte) gfx_init_chunky::y#4
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte) main::rst#2
Self Phi Eliminated (byte) gfx_init_chunky::y#2
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte) main::rst#2 (byte) main::rst#0
Identical Phi Values (byte) gfx_init_chunky::y#2 (byte) gfx_init_chunky::y#6
Successful SSA optimization Pass2IdenticalPhiElimination

View File

@ -42,7 +42,7 @@ main: scope:[main] from @1
[35] *((const byte*) DTV_BLITTER_CONTROL2#0) ← (const byte) DTV_BLIT_DEST_CONT#0
to:main::@1
main::@1: scope:[main] from main main::@1 main::@2
[36] (byte) main::r#2 ← phi( main/(byte) 0 main::@2/(byte) main::r#1 )
[36] (byte) main::r#2 ← phi( main/(byte) 0 main::@1/(byte) main::r#2 main::@2/(byte) main::r#1 )
[37] (byte~) main::$9 ← *((const byte*) DTV_BLITTER_CONTROL2#0) & (const byte) DTV_BLIT_STATUS_BUSY#0
[38] if((byte~) main::$9!=(byte) 0) goto main::@1
to:main::@2

View File

@ -423,8 +423,6 @@ Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias (byte) main::r#2 = (byte) main::r#3
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte) main::r#2
Successful SSA optimization Pass2SelfPhiElimination
Simple Condition (bool~) main::$10 [90] if((byte~) main::$9!=(byte) 0) goto main::@2
Simple Condition (bool~) main::$14 [98] if((byte) main::r#1!=rangelast(0,7)) goto main::@2
Successful SSA optimization Pass2ConditionalJumpSimplification
@ -537,7 +535,8 @@ Constant inlined main::$4 = (byte) 0
Constant inlined main::$7 = (const byte) DTV_BLIT_FORCE_START#0|(const byte) DTV_BLIT_SRCA_FWD#0|(const byte) DTV_BLIT_SRCB_FWD#0
Constant inlined main::$8 = (const byte) DTV_BLIT_FORCE_START#0|(const byte) DTV_BLIT_SRCA_FWD#0|(const byte) DTV_BLIT_SRCB_FWD#0|(const byte) DTV_BLIT_DEST_FWD#0
Successful SSA optimization Pass2ConstantInlining
Added new block during phi lifting main::@5(between main::@3 and main::@2)
Added new block during phi lifting main::@5(between main::@2 and main::@2)
Added new block during phi lifting main::@6(between main::@3 and main::@2)
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @4
Adding NOP phi() at start of @5
@ -548,11 +547,13 @@ CALL GRAPH
Calls in [] to main:4
Created 1 initial phi equivalence classes
Coalesced [46] main::r#4 ← main::r#1
Coalesced [46] main::r#5 ← main::r#1
Coalesced (already) [47] main::r#4 ← main::r#2
Coalesced down to 1 phi equivalence classes
Culled Empty Block (label) @4
Culled Empty Block (label) @5
Culled Empty Block (label) @7
Culled Empty Block (label) main::@6
Culled Empty Block (label) main::@5
Renumbering block @6 to @1
Renumbering block main::@2 to main::@1
@ -606,7 +607,7 @@ main: scope:[main] from @1
[35] *((const byte*) DTV_BLITTER_CONTROL2#0) ← (const byte) DTV_BLIT_DEST_CONT#0
to:main::@1
main::@1: scope:[main] from main main::@1 main::@2
[36] (byte) main::r#2 ← phi( main/(byte) 0 main::@2/(byte) main::r#1 )
[36] (byte) main::r#2 ← phi( main/(byte) 0 main::@1/(byte) main::r#2 main::@2/(byte) main::r#1 )
[37] (byte~) main::$9 ← *((const byte*) DTV_BLITTER_CONTROL2#0) & (const byte) DTV_BLIT_STATUS_BUSY#0
[38] if((byte~) main::$9!=(byte) 0) goto main::@1
to:main::@2
@ -670,7 +671,7 @@ VARIABLE REGISTER WEIGHTS
(byte~) main::$9 202.0
(byte) main::r
(byte) main::r#1 16.5
(byte) main::r#2 5.5
(byte) main::r#2 56.0
Initial phi equivalence classes
[ main::r#2 main::r#1 ]
@ -885,12 +886,10 @@ main: {
sta r
jmp b1
// wait til blitter is ready
// [36] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
// [36] phi from main::@1 main::@2 to main::@1 [phi:main::@1/main::@2->main::@1]
b1_from_b1:
jmp b1
// [36] phi from main::@2 to main::@1 [phi:main::@2->main::@1]
b1_from_b2:
// [36] phi (byte) main::r#2 = (byte) main::r#1 [phi:main::@2->main::@1#0] -- register_copy
// [36] phi (byte) main::r#2 = (byte) main::r#2 [phi:main::@1/main::@2->main::@1#0] -- register_copy
jmp b1
// main::@1
b1:
@ -999,11 +998,11 @@ Potential registers zp ZP_BYTE:2 [ main::r#2 main::r#1 ] : zp ZP_BYTE:2 , reg by
Potential registers zp ZP_BYTE:3 [ main::$9 ] : zp ZP_BYTE:3 , reg byte a , reg byte x , reg byte y ,
REGISTER UPLIFT SCOPES
Uplift Scope [main] 202: zp ZP_BYTE:3 [ main::$9 ] 22: zp ZP_BYTE:2 [ main::r#2 main::r#1 ]
Uplift Scope [main] 202: zp ZP_BYTE:3 [ main::$9 ] 72.5: zp ZP_BYTE:2 [ main::r#2 main::r#1 ]
Uplift Scope []
Uplifting [main] best 2815 combination reg byte a [ main::$9 ] reg byte x [ main::r#2 main::r#1 ]
Uplifting [] best 2815 combination
Uplifting [main] best 2515 combination reg byte a [ main::$9 ] reg byte x [ main::r#2 main::r#1 ]
Uplifting [] best 2515 combination
ASSEMBLER BEFORE OPTIMIZATION
// File Comments
@ -1206,12 +1205,10 @@ main: {
ldx #0
jmp b1
// wait til blitter is ready
// [36] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
// [36] phi from main::@1 main::@2 to main::@1 [phi:main::@1/main::@2->main::@1]
b1_from_b1:
jmp b1
// [36] phi from main::@2 to main::@1 [phi:main::@2->main::@1]
b1_from_b2:
// [36] phi (byte) main::r#2 = (byte) main::r#1 [phi:main::@2->main::@1#0] -- register_copy
// [36] phi (byte) main::r#2 = (byte) main::r#2 [phi:main::@1/main::@2->main::@1#0] -- register_copy
jmp b1
// main::@1
b1:
@ -1261,10 +1258,12 @@ Removing instruction lda #0
Removing instruction lda #0
Removing instruction lda #0
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Replacing label b1_from_b1 with b1
Replacing label b1_from_b2 with b1
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction bend_from_b1:
Removing instruction b1_from_b1:
Removing instruction b1_from_b2:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction bend:
@ -1275,18 +1274,10 @@ Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Skipping double jump to b1 in bne b1_from_b1
Succesful ASM optimization Pass5DoubleJumpElimination
Relabelling long label b1_from_b1 to b2
Succesful ASM optimization Pass5RelabelLongLabels
Removing instruction jmp b1
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction b2:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
Removing instruction jmp b1
Succesful ASM optimization Pass5NextJumpElimination
FINAL SYMBOL TABLE
(label) @1
@ -1389,7 +1380,7 @@ FINAL SYMBOL TABLE
(label) main::@return
(byte) main::r
(byte) main::r#1 reg byte x 16.5
(byte) main::r#2 reg byte x 5.5
(byte) main::r#2 reg byte x 56.0
reg byte x [ main::r#2 main::r#1 ]
reg byte a [ main::$9 ]
@ -1610,9 +1601,8 @@ main: {
// [36] phi (byte) main::r#2 = (byte) 0 [phi:main->main::@1#0] -- vbuxx=vbuc1
ldx #0
// wait til blitter is ready
// [36] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
// [36] phi from main::@2 to main::@1 [phi:main::@2->main::@1]
// [36] phi (byte) main::r#2 = (byte) main::r#1 [phi:main::@2->main::@1#0] -- register_copy
// [36] phi from main::@1 main::@2 to main::@1 [phi:main::@1/main::@2->main::@1]
// [36] phi (byte) main::r#2 = (byte) main::r#2 [phi:main::@1/main::@2->main::@1#0] -- register_copy
// main::@1
b1:
// *DTV_BLITTER_CONTROL2 & DTV_BLIT_STATUS_BUSY

View File

@ -98,7 +98,7 @@
(label) main::@return
(byte) main::r
(byte) main::r#1 reg byte x 16.5
(byte) main::r#2 reg byte x 5.5
(byte) main::r#2 reg byte x 56.0
reg byte x [ main::r#2 main::r#1 ]
reg byte a [ main::$9 ]

View File

@ -970,6 +970,7 @@ form_mode: {
sta BORDERCOL
lda form_fields_val
sta preset_current
b2:
// Let the user change values in the form
b4:
lda #$ff
@ -983,14 +984,14 @@ form_mode: {
b6:
lda form_fields_val
cmp preset_current
beq b4
beq b2
jsr apply_preset
lda form_fields_val
sta preset_current
jsr form_render_values
lda form_fields_val
jsr render_preset_name
jmp b4
jmp b2
}
// Render form preset name in the form
// idx is the ID of the preset

View File

@ -527,7 +527,7 @@ form_mode::@2: scope:[form_mode] from form_mode::@1
[288] (byte) form_mode::preset_current#0 ← *((const byte[]) form_fields_val#0)
to:form_mode::@3
form_mode::@3: scope:[form_mode] from form_mode::@19 form_mode::@2 form_mode::@6
[289] (byte) form_mode::preset_current#6 ← phi( form_mode::@2/(byte) form_mode::preset_current#0 form_mode::@19/(byte) form_mode::preset_current#1 )
[289] (byte) form_mode::preset_current#6 ← phi( form_mode::@6/(byte) form_mode::preset_current#6 form_mode::@2/(byte) form_mode::preset_current#0 form_mode::@19/(byte) form_mode::preset_current#1 )
[289] (byte) form_field_idx#28 ← phi( form_mode::@6/(byte) form_field_idx#18 form_mode::@2/(byte) form_field_idx#1 form_mode::@19/(byte) form_field_idx#18 )
[289] (byte) keyboard_events_size#47 ← phi( form_mode::@6/(byte) keyboard_events_size#24 form_mode::@2/(byte) keyboard_events_size#27 form_mode::@19/(byte) keyboard_events_size#24 )
[289] (signed byte) form_cursor_count#21 ← phi( form_mode::@6/(signed byte) form_cursor_count#16 form_mode::@2/(signed byte) form_cursor_count#1 form_mode::@19/(signed byte) form_cursor_count#16 )

File diff suppressed because it is too large Load Diff

View File

@ -600,7 +600,7 @@
(byte) form_mode::preset_current
(byte) form_mode::preset_current#0 preset_current zp ZP_BYTE:19 4.0
(byte) form_mode::preset_current#1 preset_current zp ZP_BYTE:19 50.5
(byte) form_mode::preset_current#6 preset_current zp ZP_BYTE:19 157.71428571428572
(byte) form_mode::preset_current#6 preset_current zp ZP_BYTE:19 388.25
(byte*) form_preset
(void()) form_render_values()
(label) form_render_values::@1

View File

@ -281,7 +281,7 @@ mode_ctrl: scope:[mode_ctrl] from mode_8bppchunkybmm::@10 mode_8bpppixelcell::@
[155] (byte) dtv_control#144 ← phi( mode_8bppchunkybmm::@10/(const byte) DTV_HIGHCOLOR#0|(const byte) DTV_LINEAR#0|(const byte) DTV_CHUNKY#0|(const byte) DTV_COLORRAM_OFF#0 mode_8bpppixelcell::@13/(const byte) DTV_HIGHCOLOR#0|(const byte) DTV_LINEAR#0|(const byte) DTV_CHUNKY#0 mode_ecmchar::@6/(byte) 0 mode_hicolecmchar::@6/(const byte) DTV_HIGHCOLOR#0 mode_hicolmcchar::@6/(const byte) DTV_HIGHCOLOR#0 mode_hicolstdchar::@6/(const byte) DTV_HIGHCOLOR#0 mode_mcchar::@6/(byte) 0 mode_sixsfred2::@12/(const byte) DTV_LINEAR#0 mode_sixsfred::@12/(const byte) DTV_HIGHCOLOR#0|(const byte) DTV_LINEAR#0 mode_stdbitmap::@8/(byte) 0 mode_stdchar::@6/(byte) 0 mode_twoplanebitmap::@15/(const byte) DTV_HIGHCOLOR#0|(const byte) DTV_LINEAR#0 )
to:mode_ctrl::@1
mode_ctrl::@1: scope:[mode_ctrl] from mode_ctrl mode_ctrl::@11 mode_ctrl::@18
[156] (byte) dtv_control#114 ← phi( mode_ctrl/(byte) dtv_control#144 mode_ctrl::@18/(byte) dtv_control#17 )
[156] (byte) dtv_control#114 ← phi( mode_ctrl/(byte) dtv_control#144 mode_ctrl::@11/(byte) dtv_control#114 mode_ctrl::@18/(byte) dtv_control#17 )
to:mode_ctrl::@2
mode_ctrl::@2: scope:[mode_ctrl] from mode_ctrl::@1 mode_ctrl::@2
[157] if(*((const byte*) RASTER#0)!=(byte) $ff) goto mode_ctrl::@2

File diff suppressed because it is too large Load Diff

View File

@ -425,7 +425,7 @@
(byte) dtvSetCpuBankSegment1::cpuBankIdx#1 reg byte a 2002.0
(byte) dtvSetCpuBankSegment1::cpuBankIdx#3 reg byte a 1003.0
(byte) dtv_control
(byte) dtv_control#114 dtv_control zp ZP_BYTE:9 42.099999999999994
(byte) dtv_control#114 dtv_control zp ZP_BYTE:9 80.52941176470588
(byte) dtv_control#144 dtv_control zp ZP_BYTE:9 2.0
(byte) dtv_control#17 dtv_control zp ZP_BYTE:9 67.33333333333333
(byte()) keyboard_key_pressed((byte) keyboard_key_pressed::key)

View File

@ -131,8 +131,6 @@ Alias (byte*) screen#11 = (byte*) screen#4 (byte*) screen#5
Alias (byte*) screen#0 = (byte*) screen#15
Alias (byte*) screen#12 = (byte*) screen#6
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte) line::x1#2
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte*) screen#13 (byte*) screen#0
Identical Phi Values (byte*) screen#1 (byte*) screen#11
Identical Phi Values (byte*) screen#2 (byte*) screen#11

View File

@ -189,12 +189,6 @@ Alias (byte*) SCREEN4#3 = (byte*) SCREEN4#4
Alias (byte) w::b#0 = (byte~) w::$1
Alias (byte) w::b2#0 = (byte~) w::$2
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte*) SCREEN2#1
Self Phi Eliminated (byte*) SCREEN3#3
Self Phi Eliminated (byte*) SCREEN4#3
Self Phi Eliminated (byte*) SCREEN3#1
Self Phi Eliminated (byte*) SCREEN4#1
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte*) SCREEN2#2 (byte*) SCREEN2#0
Identical Phi Values (byte*) SCREEN3#5 (byte*) SCREEN3#0
Identical Phi Values (byte*) SCREEN4#5 (byte*) SCREEN4#0

View File

@ -207,12 +207,11 @@ Alias (byte) main::x#2 = (byte) main::x#3
Alias (byte) main::y#3 = (byte) main::y#5
Alias (byte*) main::CHAR_A#2 = (byte*) main::CHAR_A#4
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte) main::y#3
Self Phi Eliminated (byte*) main::CHAR_A#2
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte) main::y#3 (byte) main::y#2
Identical Phi Values (byte*) main::CHAR_A#2 (byte*) main::CHAR_A#1
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values (byte*) main::CHAR_A#1 (byte*) main::CHAR_A#0
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) main::$3 [17] if((byte~) main::$1==(byte) 0) goto main::@3
Simple Condition (bool~) main::$5 [25] if((byte) main::x#1!=rangelast(0,7)) goto main::@2
Simple Condition (bool~) main::$7 [33] if((byte) main::y#1!=rangelast(0,7)) goto main::@1
@ -240,10 +239,6 @@ Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 8
Finalized unsigned number type (byte) 8
Successful SSA optimization PassNFinalizeNumberTypeConversions
Self Phi Eliminated (byte*) main::CHAR_A#1
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte*) main::CHAR_A#1 (byte*) main::CHAR_A#0
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [1] (byte*) main::CHAR_A#0 ← (const byte*) CHARGEN#0 + (byte) 8
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte*) main::CHAR_A#0 = CHARGEN#0+8

View File

@ -141,10 +141,6 @@ Alias (byte) main::color#2 = (byte~) main::$2
Alias (byte*) main::screen#1 = (byte*~) main::$3
Alias (byte*) main::colors#1 = (byte*~) main::$4
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte*) main::screen#2
Self Phi Eliminated (byte*) main::colors#2
Self Phi Eliminated (byte) main::row#2
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte*) main::screen#2 (byte*) main::screen#4
Identical Phi Values (byte*) main::colors#2 (byte*) main::colors#4
Identical Phi Values (byte) main::row#2 (byte) main::row#4

View File

@ -276,9 +276,6 @@ Successful SSA optimization Pass2AliasElimination
Alias (byte) main::i1#10 = (byte) main::i1#3 (byte) main::i1#2 (byte) main::i1#11 (byte) main::i1#12 (byte) main::i1#7
Alias (byte*) main::screen#1 = (byte*) main::screen#13 (byte*) main::screen#14 (byte*) main::screen#15 (byte*) main::screen#16 (byte*) main::screen#11
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte*) main::screen#10
Self Phi Eliminated (byte*) main::screen#12
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte*) main::screen#10 (byte*) main::sc#0
Identical Phi Values (byte*) main::screen#12 (byte*) main::screen#10
Successful SSA optimization Pass2IdenticalPhiElimination

View File

@ -3013,33 +3013,6 @@ Alias candidate removed (phi-usage) (byte) getCharToProcess::x#2
Alias candidate removed (phi-usage) (byte) getCharToProcess::y#2
Alias candidate removed (solo) (byte) getCharToProcess::x#3 =
Alias candidate removed (solo) (byte) getCharToProcess::y#3 =
Self Phi Eliminated (signed word) atan2_16::yi#10
Self Phi Eliminated (signed word) atan2_16::xi#10
Self Phi Eliminated (byte) atan2_16::i#10
Self Phi Eliminated (word) atan2_16::angle#14
Self Phi Eliminated (signed word) atan2_16::x#11
Self Phi Eliminated (signed word) atan2_16::y#10
Self Phi Eliminated (byte*) SCREEN_COPY#24
Self Phi Eliminated (byte*) SCREEN_DIST#15
Self Phi Eliminated (byte*) SCREEN_COPY#11
Self Phi Eliminated (byte*) SCREEN_DIST#11
Self Phi Eliminated (byte*) SCREEN_COPY#12
Self Phi Eliminated (byte*) SCREEN_DIST#12
Self Phi Eliminated (byte*) getCharToProcess::screen_line#2
Self Phi Eliminated (byte*) getCharToProcess::dist_line#2
Self Phi Eliminated (byte*) SCREEN_COPY#10
Self Phi Eliminated (byte) startProcessing::freeIdx#4
Self Phi Eliminated (byte) startProcessing::center_y#1
Self Phi Eliminated (byte) startProcessing::center_x#1
Self Phi Eliminated (byte) startProcessing::center_x#2
Self Phi Eliminated (byte) startProcessing::center_y#2
Self Phi Eliminated (byte) startProcessing::spriteIdx#1
Self Phi Eliminated (byte) startProcessing::spriteCol#1
Self Phi Eliminated (byte*) startProcessing::screenPtr#1
Self Phi Eliminated (byte) init_angle_screen::y#2
Self Phi Eliminated (byte*) init_angle_screen::screen_bottomline#2
Self Phi Eliminated (byte*) init_angle_screen::screen_topline#2
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (signed word) atan2_16::y#1 (signed word) atan2_16::y#0
Identical Phi Values (signed word) atan2_16::x#1 (signed word) atan2_16::x#0
Identical Phi Values (signed word) atan2_16::yi#10 (signed word) atan2_16::yi#3
@ -3082,20 +3055,26 @@ Identical Phi Values (byte*) init_angle_screen::screen_topline#2 (byte*) init_an
Identical Phi Values (word) setupRasterIrq::raster#1 (word) setupRasterIrq::raster#0
Identical Phi Values (void()*) setupRasterIrq::irqRoutine#1 (void()*) setupRasterIrq::irqRoutine#0
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values (signed word) atan2_16::x#17 (signed word) atan2_16::x#0
Identical Phi Values (signed word) atan2_16::y#19 (signed word) atan2_16::y#0
Identical Phi Values (signed word) atan2_16::x#4 (signed word) atan2_16::x#17
Identical Phi Values (signed word) atan2_16::y#4 (signed word) atan2_16::y#19
Identical Phi Values (byte*) SCREEN_COPY#22 (byte*) SCREEN_COPY#0
Identical Phi Values (byte) getCharToProcess::y#2 (byte) getCharToProcess::y#7
Identical Phi Values (byte) startProcessing::center_y#8 (byte) startProcessing::center_y#0
Identical Phi Values (byte) startProcessing::center_x#8 (byte) startProcessing::center_x#0
Successful SSA optimization Pass2IdenticalPhiElimination
Identified duplicate assignment right side [441] (byte~) processChars::$17 ← (byte) processChars::i#10 * (byte) 2
Successful SSA optimization Pass2DuplicateRValueIdentification
Simple Condition (bool~) atan2_16::$0 [16] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1
Simple Condition (bool~) atan2_16::$5 [25] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4
Simple Condition (bool~) atan2_16::$18 [39] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@16
Simple Condition (bool~) atan2_16::$11 [48] if((signed word) atan2_16::x#17>=(signed byte) 0) goto atan2_16::@7
Simple Condition (bool~) atan2_16::$11 [48] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7
Simple Condition (bool~) atan2_16::$19 [51] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@19
Simple Condition (bool~) atan2_16::$20 [59] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@25
Simple Condition (bool~) atan2_16::$21 [62] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@26
Simple Condition (bool~) atan2_16::$22 [79] if((byte) atan2_16::i#1!=rangelast(0,atan2_16::$16)) goto atan2_16::@15
Simple Condition (bool~) atan2_16::$14 [83] if((signed word) atan2_16::y#19>=(signed byte) 0) goto atan2_16::@8
Simple Condition (bool~) atan2_16::$14 [83] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8
Simple Condition (bool~) main::$6 [164] if((byte*) main::src#1!=(byte*~) main::$5) goto main::@1
Simple Condition (bool~) main::$8 [190] if((byte) main::i#1!=rangelast(0,main::$7)) goto main::@3
Simple Condition (bool~) main::$11 [213] if((byte) main::center_dist#0!=(byte) NOT_FOUND#0) goto main::@6
@ -3236,7 +3215,7 @@ if() condition always false - eliminating [611] if((const bool) DEBUG#0) goto ir
Successful SSA optimization Pass2ConstantIfs
Resolved ranged next value [241] getCharToProcess::x#1 ← ++ getCharToProcess::x#2 to ++
Resolved ranged comparison value [243] if(getCharToProcess::x#1!=rangelast(0,$27)) goto getCharToProcess::@4 to (number) $28
Resolved ranged next value [256] getCharToProcess::y#1 ← ++ getCharToProcess::y#2 to ++
Resolved ranged next value [256] getCharToProcess::y#1 ← ++ getCharToProcess::y#7 to ++
Resolved ranged comparison value [258] if(getCharToProcess::y#1!=rangelast(0,$18)) goto getCharToProcess::@3 to (number) $19
Resolved ranged next value [327] startProcessing::i1#1 ← ++ startProcessing::i1#2 to ++
Resolved ranged comparison value [329] if(startProcessing::i1#1!=rangelast(0,7)) goto startProcessing::@9 to (number) 8
@ -3380,20 +3359,6 @@ Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias (byte~) processChars::$17 = (byte~) processChars::$13
Alias (byte~) processChars::$30 = (byte~) processChars::$29
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (signed word) atan2_16::x#17
Self Phi Eliminated (signed word) atan2_16::y#19
Self Phi Eliminated (byte*) SCREEN_COPY#22
Self Phi Eliminated (byte) getCharToProcess::y#2
Self Phi Eliminated (byte) startProcessing::center_y#8
Self Phi Eliminated (byte) startProcessing::center_x#8
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (signed word) atan2_16::x#17 (signed word) atan2_16::x#0
Identical Phi Values (signed word) atan2_16::y#19 (signed word) atan2_16::y#0
Identical Phi Values (byte*) SCREEN_COPY#22 (byte*) SCREEN_COPY#0
Identical Phi Values (byte) getCharToProcess::y#2 (byte) getCharToProcess::y#7
Identical Phi Values (byte) startProcessing::center_y#8 (byte) startProcessing::center_y#0
Identical Phi Values (byte) startProcessing::center_x#8 (byte) startProcessing::center_x#0
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) processChars::$18 [230] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)<(word) XPOS_LEFTMOST#0) goto processChars::@7
Simple Condition (bool~) processChars::$23 [318] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)>(word) YPOS_BOTTOMMOST#0) goto processChars::@7
Simple Condition (bool~) processChars::$21 [319] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)<(word) YPOS_TOPMOST#0) goto processChars::@7

View File

@ -208,9 +208,6 @@ Alias (byte*) memcpy::dst#2 = (byte*) memcpy::dst#3
Alias (byte*) memcpy::src_end#1 = (byte*) memcpy::src_end#2
Alias (void*) memcpy::destination#3 = (void*) memcpy::destination#5 (void*) memcpy::destination#4 (void*) memcpy::return#0 (void*) memcpy::return#4 (void*) memcpy::return#1
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte*) memcpy::src_end#1
Self Phi Eliminated (void*) memcpy::destination#3
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte*) memcpy::src_end#1 (byte*) memcpy::src_end#0
Identical Phi Values (void*) memcpy::destination#3 (void*) memcpy::destination#2
Successful SSA optimization Pass2IdenticalPhiElimination

View File

@ -156,7 +156,7 @@ main::@10: scope:[main] from main::@2
[129] call show_letter
to:main::@3
main::@3: scope:[main] from main::@10 main::@3 main::@5
[130] (byte) main::w#4 ← phi( main::@10/(byte) 0 main::@5/(byte) main::w#1 )
[130] (byte) main::w#4 ← phi( main::@10/(byte) 0 main::@3/(byte) main::w#4 main::@5/(byte) main::w#1 )
[131] if(*((const byte*) RASTER#0)!=(byte) $fe) goto main::@3
to:main::@4
main::@4: scope:[main] from main::@3 main::@4

View File

@ -4749,41 +4749,6 @@ Alias (signed byte*) COS#11 = (signed byte*) COS#5
Alias (signed word) show_letter::current_x#10 = (signed word) show_letter::segment_to_x#0
Alias (signed word) show_letter::current_y#10 = (signed word) show_letter::segment_to_y#0
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (signed word) spline_8segB::j_x#1
Self Phi Eliminated (signed word) spline_8segB::j_y#1
Self Phi Eliminated (byte) memset::c#2
Self Phi Eliminated (byte*) memset::end#1
Self Phi Eliminated (void*) memset::str#5
Self Phi Eliminated (byte*) bitmap_init::gfx#2
Self Phi Eliminated (byte*) bitmap_gfx#23
Self Phi Eliminated (byte*) bitmap_screen#22
Self Phi Eliminated (byte*) bitmap_gfx#11
Self Phi Eliminated (byte*) bitmap_screen#11
Self Phi Eliminated (word) bitmap_line::sy#1
Self Phi Eliminated (word) bitmap_line::dx#11
Self Phi Eliminated (word) bitmap_line::dy#11
Self Phi Eliminated (word) bitmap_line::y2#10
Self Phi Eliminated (word) bitmap_line::sx#1
Self Phi Eliminated (word) bitmap_line::sx#11
Self Phi Eliminated (word) bitmap_line::dy#12
Self Phi Eliminated (word) bitmap_line::dx#12
Self Phi Eliminated (word) bitmap_line::x2#4
Self Phi Eliminated (word) bitmap_line::sy#2
Self Phi Eliminated (byte) main::w#4
Self Phi Eliminated (byte) main::angle#8
Self Phi Eliminated (byte*) bitmap_screen#36
Self Phi Eliminated (byte*) bitmap_gfx#37
Self Phi Eliminated (signed byte*) COS#24
Self Phi Eliminated (byte) main::w#2
Self Phi Eliminated (byte) main::angle#3
Self Phi Eliminated (byte*) bitmap_screen#24
Self Phi Eliminated (byte*) bitmap_gfx#25
Self Phi Eliminated (signed byte*) COS#18
Self Phi Eliminated (byte*) bitmap_gfx#14
Self Phi Eliminated (byte*) bitmap_screen#14
Self Phi Eliminated (byte) show_letter::angle#1
Self Phi Eliminated (signed byte*) COS#11
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (signed word) spline_8segB::p1_x#1 (signed word) spline_8segB::p1_x#0
Identical Phi Values (signed word) spline_8segB::p2_x#1 (signed word) spline_8segB::p2_x#0
Identical Phi Values (signed word) spline_8segB::p0_x#1 (signed word) spline_8segB::p0_x#0
@ -4835,6 +4800,17 @@ Identical Phi Values (byte*) bitmap_gfx#10 (byte*) bitmap_gfx#14
Identical Phi Values (byte*) bitmap_screen#10 (byte*) bitmap_screen#14
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values (void*) memset::return#0 (void*) memset::str#3
Identical Phi Values (byte) main::angle#8 (byte) main::angle#2
Identical Phi Values (byte*) bitmap_screen#36 (byte*) bitmap_screen#12
Identical Phi Values (byte*) bitmap_gfx#37 (byte*) bitmap_gfx#18
Identical Phi Values (signed byte*) COS#24 (signed byte*) COS#10
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values (byte*) bitmap_screen#12 (byte*) bitmap_screen#1
Identical Phi Values (byte*) bitmap_gfx#18 (byte*) bitmap_gfx#1
Identical Phi Values (signed byte*) COS#10 (signed byte*) COS#0
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values (byte*) bitmap_screen#7 (byte*) bitmap_screen#1
Identical Phi Values (byte*) bitmap_gfx#12 (byte*) bitmap_gfx#1
Successful SSA optimization Pass2IdenticalPhiElimination
Identified duplicate assignment right side [114] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7
Identified duplicate assignment right side [875] (byte~) bitmap_plot_spline_8seg::$8 ← (byte) bitmap_plot_spline_8seg::n#2 * (const byte) SIZEOF_STRUCT_SPLINEVECTOR16
@ -5001,6 +4977,8 @@ Constant value identified (signed word*)SPLINE_8SEG#0 in [37] (signed word*) spl
Constant value identified (signed word*)SPLINE_8SEG#0 in [39] (signed word*) spline_8segB::$34 ← (signed word*)(const struct SplineVector16[9]) SPLINE_8SEG#0 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant value identified (signed word*)SPLINE_8SEG#0 in [58] (signed word*) spline_8segB::$35 ← (signed word*)(const struct SplineVector16[9]) SPLINE_8SEG#0 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_X
Constant value identified (signed word*)SPLINE_8SEG#0 in [60] (signed word*) spline_8segB::$36 ← (signed word*)(const struct SplineVector16[9]) SPLINE_8SEG#0 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant value identified (void*)bitmap_screen#1 in [133] (void*) memset::str#0 ← (void*)(const byte*) bitmap_screen#1
Constant value identified (void*)bitmap_gfx#1 in [139] (void*) memset::str#1 ← (void*)(const byte*) bitmap_gfx#1
Constant value identified (byte*)letter_c#0 in [392] (byte*) main::$38 ← (byte*)(const struct Segment[$16]) letter_c#0 + (const byte) OFFSET_STRUCT_SEGMENT_TYPE
Constant value identified (struct SplineVector16*)letter_c#0 in [394] (struct SplineVector16*) main::$39 ← (struct SplineVector16*)(const struct Segment[$16]) letter_c#0 + (const byte) OFFSET_STRUCT_SEGMENT_TO
Constant value identified (struct SplineVector16*)letter_c#0 in [399] (struct SplineVector16*) main::$40 ← (struct SplineVector16*)(const struct Segment[$16]) letter_c#0 + (const byte) OFFSET_STRUCT_SEGMENT_VIA
@ -5224,16 +5202,6 @@ Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias (byte~) bitmap_init::$7 = (byte~) bitmap_init::$3
Alias (byte~) bitmap_plot_spline_8seg::$8 = (byte~) bitmap_plot_spline_8seg::$7
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte) main::angle#8
Self Phi Eliminated (byte*) bitmap_screen#36
Self Phi Eliminated (byte*) bitmap_gfx#37
Self Phi Eliminated (signed byte*) COS#24
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte) main::angle#8 (byte) main::angle#2
Identical Phi Values (byte*) bitmap_screen#36 (byte*) bitmap_screen#12
Identical Phi Values (byte*) bitmap_gfx#37 (byte*) bitmap_gfx#18
Identical Phi Values (signed byte*) COS#24 (signed byte*) COS#10
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) bitmap_line::$4 [102] if((word) bitmap_line::dx#0==(byte) 0) goto bitmap_line::@24
Simple Condition (bool~) bitmap_line::$5 [638] if((word) bitmap_line::dy#0==(byte) 0) goto bitmap_line::@4
Successful SSA optimization Pass2ConditionalJumpSimplification
@ -5307,6 +5275,8 @@ Constant (const signed word*) spline_8segB::$33 = (signed word*)SPLINE_8SEG#0
Constant (const signed word*) spline_8segB::$34 = (signed word*)SPLINE_8SEG#0+OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant (const signed word*) spline_8segB::$35 = (signed word*)SPLINE_8SEG#0
Constant (const signed word*) spline_8segB::$36 = (signed word*)SPLINE_8SEG#0+OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant (const void*) memset::str#0 = (void*)bitmap_screen#1
Constant (const void*) memset::str#1 = (void*)bitmap_gfx#1
Constant (const byte*) mulf_init::sqr1_hi#0 = mulf_sqr1_hi#0+1
Constant (const byte*) mulf_init::sqr1_lo#0 = mulf_sqr1_lo#0+1
Constant (const byte*) mulf_init::$13 = mulf_sqr1_lo#0+$200
@ -5494,74 +5464,59 @@ Successful SSA optimization Pass2ConstantValues
Converting *(pointer+n) to pointer[n] [223] *((signed word*) main::$105) ← (signed word) $92 -- *((signed word*)main::$39 + OFFSET_STRUCT_SPLINEVECTOR16_Y)
Converting *(pointer+n) to pointer[n] [228] *((signed word*) main::$107) ← (signed byte) 0 -- *((signed word*)main::$40 + OFFSET_STRUCT_SPLINEVECTOR16_Y)
Successful SSA optimization Pass2InlineDerefIdx
Eliminating unused variable (signed word*) main::$105 and assignment [205] (signed word*) main::$105 ← (signed word*)(const struct SplineVector16*) main::$39 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Eliminating unused variable (signed word*) main::$107 and assignment [209] (signed word*) main::$107 ← (signed word*)(const struct SplineVector16*) main::$40 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Eliminating unused variable (signed word*) main::$105 and assignment [203] (signed word*) main::$105 ← (signed word*)(const struct SplineVector16*) main::$39 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Eliminating unused variable (signed word*) main::$107 and assignment [207] (signed word*) main::$107 ← (signed word*)(const struct SplineVector16*) main::$40 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Eliminating unused constant (const byte*) PRINT_SCREEN#0
Successful SSA optimization PassNEliminateUnusedVars
Self Phi Eliminated (byte*) bitmap_screen#12
Self Phi Eliminated (byte*) bitmap_gfx#18
Self Phi Eliminated (signed byte*) COS#10
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte*) bitmap_screen#12 (const byte*) bitmap_screen#1
Identical Phi Values (byte*) bitmap_gfx#18 (const byte*) bitmap_gfx#1
Identical Phi Values (signed byte*) COS#10 (const signed byte*) COS#0
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values (byte*) bitmap_screen#7 (const byte*) bitmap_screen#1
Identical Phi Values (byte*) bitmap_gfx#12 (const byte*) bitmap_gfx#1
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [72] (void*) memset::str#0 ← (void*)(const byte*) bitmap_screen#1
Constant right-side identified [75] (void*) memset::str#1 ← (void*)(const byte*) bitmap_gfx#1
Constant right-side identified [212] (signed word*) main::$109 ← (signed word*)(const struct SplineVector16*) main::$42 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [216] (signed word*) main::$111 ← (signed word*)(const struct SplineVector16*) main::$43 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [221] (signed word*) main::$113 ← (signed word*)(const struct SplineVector16*) main::$45 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [225] (signed word*) main::$115 ← (signed word*)(const struct SplineVector16*) main::$46 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [230] (signed word*) main::$117 ← (signed word*)(const struct SplineVector16*) main::$48 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [234] (signed word*) main::$119 ← (signed word*)(const struct SplineVector16*) main::$49 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [239] (signed word*) main::$121 ← (signed word*)(const struct SplineVector16*) main::$51 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [243] (signed word*) main::$123 ← (signed word*)(const struct SplineVector16*) main::$52 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [248] (signed word*) main::$125 ← (signed word*)(const struct SplineVector16*) main::$54 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [252] (signed word*) main::$127 ← (signed word*)(const struct SplineVector16*) main::$55 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [257] (signed word*) main::$129 ← (signed word*)(const struct SplineVector16*) main::$57 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [261] (signed word*) main::$131 ← (signed word*)(const struct SplineVector16*) main::$58 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [266] (signed word*) main::$133 ← (signed word*)(const struct SplineVector16*) main::$60 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [270] (signed word*) main::$135 ← (signed word*)(const struct SplineVector16*) main::$61 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [275] (signed word*) main::$137 ← (signed word*)(const struct SplineVector16*) main::$63 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [279] (signed word*) main::$139 ← (signed word*)(const struct SplineVector16*) main::$64 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [284] (signed word*) main::$141 ← (signed word*)(const struct SplineVector16*) main::$66 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [288] (signed word*) main::$143 ← (signed word*)(const struct SplineVector16*) main::$67 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [293] (signed word*) main::$145 ← (signed word*)(const struct SplineVector16*) main::$69 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [297] (signed word*) main::$147 ← (signed word*)(const struct SplineVector16*) main::$70 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [302] (signed word*) main::$149 ← (signed word*)(const struct SplineVector16*) main::$72 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [306] (signed word*) main::$151 ← (signed word*)(const struct SplineVector16*) main::$73 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [311] (signed word*) main::$153 ← (signed word*)(const struct SplineVector16*) main::$75 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [315] (signed word*) main::$155 ← (signed word*)(const struct SplineVector16*) main::$76 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [320] (signed word*) main::$157 ← (signed word*)(const struct SplineVector16*) main::$78 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [324] (signed word*) main::$159 ← (signed word*)(const struct SplineVector16*) main::$79 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [329] (signed word*) main::$161 ← (signed word*)(const struct SplineVector16*) main::$81 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [333] (signed word*) main::$163 ← (signed word*)(const struct SplineVector16*) main::$82 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [338] (signed word*) main::$165 ← (signed word*)(const struct SplineVector16*) main::$84 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [342] (signed word*) main::$167 ← (signed word*)(const struct SplineVector16*) main::$85 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [347] (signed word*) main::$169 ← (signed word*)(const struct SplineVector16*) main::$87 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [351] (signed word*) main::$171 ← (signed word*)(const struct SplineVector16*) main::$88 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [356] (signed word*) main::$173 ← (signed word*)(const struct SplineVector16*) main::$90 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [360] (signed word*) main::$175 ← (signed word*)(const struct SplineVector16*) main::$91 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [365] (signed word*) main::$177 ← (signed word*)(const struct SplineVector16*) main::$93 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [369] (signed word*) main::$179 ← (signed word*)(const struct SplineVector16*) main::$94 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [374] (signed word*) main::$181 ← (signed word*)(const struct SplineVector16*) main::$96 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [378] (signed word*) main::$183 ← (signed word*)(const struct SplineVector16*) main::$97 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [383] (signed word*) main::$185 ← (signed word*)(const struct SplineVector16*) main::$99 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [387] (signed word*) main::$187 ← (signed word*)(const struct SplineVector16*) main::$100 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [392] (signed word*) main::$189 ← (signed word*)(const struct SplineVector16*) main::$102 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [396] (signed word*) main::$191 ← (signed word*)(const struct SplineVector16*) main::$103 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [402] (byte~) main::vicSelectGfxBank1_toDd001_$1#0 ← > (const word) main::vicSelectGfxBank1_toDd001_$0#0
Constant right-side identified [406] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff
Constant right-side identified [409] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0
Constant right-side identified [414] (byte~) main::$6 ← (const byte) main::$5 | (const byte) VIC_RSEL#0
Constant right-side identified [431] (signed word*) show_letter::$29 ← (signed word*)(const struct SplineVector16*) show_letter::$24 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [448] (signed word*) show_letter::$31 ← (signed word*)(const struct SplineVector16*) show_letter::$26 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [210] (signed word*) main::$109 ← (signed word*)(const struct SplineVector16*) main::$42 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [214] (signed word*) main::$111 ← (signed word*)(const struct SplineVector16*) main::$43 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [219] (signed word*) main::$113 ← (signed word*)(const struct SplineVector16*) main::$45 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [223] (signed word*) main::$115 ← (signed word*)(const struct SplineVector16*) main::$46 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [228] (signed word*) main::$117 ← (signed word*)(const struct SplineVector16*) main::$48 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [232] (signed word*) main::$119 ← (signed word*)(const struct SplineVector16*) main::$49 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [237] (signed word*) main::$121 ← (signed word*)(const struct SplineVector16*) main::$51 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [241] (signed word*) main::$123 ← (signed word*)(const struct SplineVector16*) main::$52 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [246] (signed word*) main::$125 ← (signed word*)(const struct SplineVector16*) main::$54 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [250] (signed word*) main::$127 ← (signed word*)(const struct SplineVector16*) main::$55 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [255] (signed word*) main::$129 ← (signed word*)(const struct SplineVector16*) main::$57 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [259] (signed word*) main::$131 ← (signed word*)(const struct SplineVector16*) main::$58 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [264] (signed word*) main::$133 ← (signed word*)(const struct SplineVector16*) main::$60 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [268] (signed word*) main::$135 ← (signed word*)(const struct SplineVector16*) main::$61 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [273] (signed word*) main::$137 ← (signed word*)(const struct SplineVector16*) main::$63 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [277] (signed word*) main::$139 ← (signed word*)(const struct SplineVector16*) main::$64 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [282] (signed word*) main::$141 ← (signed word*)(const struct SplineVector16*) main::$66 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [286] (signed word*) main::$143 ← (signed word*)(const struct SplineVector16*) main::$67 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [291] (signed word*) main::$145 ← (signed word*)(const struct SplineVector16*) main::$69 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [295] (signed word*) main::$147 ← (signed word*)(const struct SplineVector16*) main::$70 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [300] (signed word*) main::$149 ← (signed word*)(const struct SplineVector16*) main::$72 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [304] (signed word*) main::$151 ← (signed word*)(const struct SplineVector16*) main::$73 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [309] (signed word*) main::$153 ← (signed word*)(const struct SplineVector16*) main::$75 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [313] (signed word*) main::$155 ← (signed word*)(const struct SplineVector16*) main::$76 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [318] (signed word*) main::$157 ← (signed word*)(const struct SplineVector16*) main::$78 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [322] (signed word*) main::$159 ← (signed word*)(const struct SplineVector16*) main::$79 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [327] (signed word*) main::$161 ← (signed word*)(const struct SplineVector16*) main::$81 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [331] (signed word*) main::$163 ← (signed word*)(const struct SplineVector16*) main::$82 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [336] (signed word*) main::$165 ← (signed word*)(const struct SplineVector16*) main::$84 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [340] (signed word*) main::$167 ← (signed word*)(const struct SplineVector16*) main::$85 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [345] (signed word*) main::$169 ← (signed word*)(const struct SplineVector16*) main::$87 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [349] (signed word*) main::$171 ← (signed word*)(const struct SplineVector16*) main::$88 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [354] (signed word*) main::$173 ← (signed word*)(const struct SplineVector16*) main::$90 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [358] (signed word*) main::$175 ← (signed word*)(const struct SplineVector16*) main::$91 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [363] (signed word*) main::$177 ← (signed word*)(const struct SplineVector16*) main::$93 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [367] (signed word*) main::$179 ← (signed word*)(const struct SplineVector16*) main::$94 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [372] (signed word*) main::$181 ← (signed word*)(const struct SplineVector16*) main::$96 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [376] (signed word*) main::$183 ← (signed word*)(const struct SplineVector16*) main::$97 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [381] (signed word*) main::$185 ← (signed word*)(const struct SplineVector16*) main::$99 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [385] (signed word*) main::$187 ← (signed word*)(const struct SplineVector16*) main::$100 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [390] (signed word*) main::$189 ← (signed word*)(const struct SplineVector16*) main::$102 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [394] (signed word*) main::$191 ← (signed word*)(const struct SplineVector16*) main::$103 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [400] (byte~) main::vicSelectGfxBank1_toDd001_$1#0 ← > (const word) main::vicSelectGfxBank1_toDd001_$0#0
Constant right-side identified [404] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff
Constant right-side identified [407] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0
Constant right-side identified [412] (byte~) main::$6 ← (const byte) main::$5 | (const byte) VIC_RSEL#0
Constant right-side identified [429] (signed word*) show_letter::$29 ← (signed word*)(const struct SplineVector16*) show_letter::$24 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Constant right-side identified [446] (signed word*) show_letter::$31 ← (signed word*)(const struct SplineVector16*) show_letter::$26 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const void*) memset::str#0 = (void*)bitmap_screen#1
Constant (const void*) memset::str#1 = (void*)bitmap_gfx#1
Constant (const signed word*) main::$104 = (signed word*)main::$39
Constant (const signed word*) main::$106 = (signed word*)main::$40
Constant (const signed word*) main::$108 = (signed word*)main::$42
@ -6155,7 +6110,8 @@ Added new block during phi lifting mulf_init::@11(between mulf_init::@6 and mulf
Added new block during phi lifting mulf_init::@12(between mulf_init::@5 and mulf_init::@6)
Added new block during phi lifting mulf16s::@7(between mulf16s::@6 and mulf16s::@1)
Added new block during phi lifting mulf16s::@8(between mulf16s::@1 and mulf16s::@2)
Added new block during phi lifting main::@26(between main::@8 and main::@5)
Added new block during phi lifting main::@26(between main::@5 and main::@5)
Added new block during phi lifting main::@27(between main::@8 and main::@5)
Added new block during phi lifting show_letter::@16(between show_letter::@5 and show_letter::@1)
Added new block during phi lifting bitmap_plot_spline_8seg::@4(between bitmap_plot_spline_8seg::@3 and bitmap_plot_spline_8seg::@1)
Adding NOP phi() at start of @begin
@ -6200,117 +6156,118 @@ Adding NOP phi() at start of mulf_init::@7
CALL GRAPH
Calls in [] to main:8
Calls in [main] to mulf_init:121 bitmap_init:123 bitmap_clear:125 bitmap_clear:138 show_letter:140
Calls in [show_letter] to rotate:164 rotate:183 bitmap_line:203 spline_8segB:217 bitmap_plot_spline_8seg:219
Calls in [bitmap_plot_spline_8seg] to bitmap_line:234
Calls in [bitmap_line] to abs_u16:247 abs_u16:252 sgn_u16:259 sgn_u16:264 bitmap_plot:277 bitmap_plot:294 bitmap_plot:311 bitmap_plot:332
Calls in [rotate] to mulf16s:412 mulf16s:421 mulf16s:431 mulf16s:441
Calls in [mulf16s] to mulf16u:455
Calls in [bitmap_clear] to memset:480 memset:482
Calls in [show_letter] to rotate:165 rotate:184 bitmap_line:204 spline_8segB:218 bitmap_plot_spline_8seg:220
Calls in [bitmap_plot_spline_8seg] to bitmap_line:235
Calls in [bitmap_line] to abs_u16:248 abs_u16:253 sgn_u16:260 sgn_u16:265 bitmap_plot:278 bitmap_plot:295 bitmap_plot:312 bitmap_plot:333
Calls in [rotate] to mulf16s:413 mulf16s:422 mulf16s:432 mulf16s:442
Calls in [mulf16s] to mulf16u:456
Calls in [bitmap_clear] to memset:481 memset:483
Created 64 initial phi equivalence classes
Coalesced [148] main::angle#10 ← main::angle#1
Coalesced [149] main::w#5 ← main::w#1
Coalesced [161] rotate::angle#5 ← rotate::angle#0
Coalesced [162] rotate::vector_x#6 ← rotate::vector_x#0
Coalesced [163] rotate::vector_y#5 ← rotate::vector_y#0
Coalesced [180] rotate::angle#6 ← rotate::angle#1
Coalesced [181] rotate::vector_x#7 ← rotate::vector_x#1
Coalesced [182] rotate::vector_y#6 ← rotate::vector_y#1
Coalesced [199] bitmap_line::x#21 ← bitmap_line::x1#0
Coalesced [200] bitmap_line::y#21 ← bitmap_line::y1#0
Coalesced [201] bitmap_line::x2#14 ← bitmap_line::x2#0
Coalesced [202] bitmap_line::y2#14 ← bitmap_line::y2#0
Coalesced [208] show_letter::i#13 ← show_letter::i#1
Not coalescing [209] show_letter::current_x#11 ← show_letter::current_x#10
Not coalescing [210] show_letter::current_y#11 ← show_letter::current_y#10
Coalesced [224] bitmap_plot_spline_8seg::current_x#3 ← bitmap_plot_spline_8seg::current_x#0
Coalesced [225] bitmap_plot_spline_8seg::current_y#3 ← bitmap_plot_spline_8seg::current_y#0
Coalesced [230] bitmap_line::x#20 ← bitmap_line::x1#1
Coalesced [231] bitmap_line::y#20 ← bitmap_line::y1#1
Coalesced [241] bitmap_plot_spline_8seg::current_x#4 ← bitmap_plot_spline_8seg::current_x#1
Coalesced [242] bitmap_plot_spline_8seg::current_y#4 ← bitmap_plot_spline_8seg::current_y#1
Coalesced [243] bitmap_plot_spline_8seg::n#4 ← bitmap_plot_spline_8seg::n#1
Coalesced [246] abs_u16::w#5 ← abs_u16::w#0
Coalesced [251] abs_u16::w#6 ← abs_u16::w#1
Coalesced [258] sgn_u16::w#3 ← sgn_u16::w#0
Coalesced [263] sgn_u16::w#4 ← sgn_u16::w#1
Coalesced [269] bitmap_line::y#22 ← bitmap_line::y#0
Coalesced [270] bitmap_line::x#22 ← bitmap_line::x#0
Coalesced [271] bitmap_line::e#7 ← bitmap_line::e#0
Coalesced [275] bitmap_plot::y#8 ← bitmap_plot::y#1
Coalesced [276] bitmap_plot::x#8 ← bitmap_plot::x#1
Coalesced [283] bitmap_line::x#25 ← bitmap_line::x#1
Coalesced [284] bitmap_line::e#10 ← bitmap_line::e#2
Coalesced [287] bitmap_line::y#25 ← bitmap_line::y#1
Coalesced [288] bitmap_line::x#27 ← bitmap_line::x#12
Coalesced [292] bitmap_plot::y#6 ← bitmap_plot::y#2
Coalesced [293] bitmap_plot::x#6 ← bitmap_plot::x#2
Coalesced [297] bitmap_line::y#23 ← bitmap_line::y#1
Coalesced [298] bitmap_line::x#23 ← bitmap_line::x#12
Coalesced [299] bitmap_line::e#8 ← bitmap_line::e#6
Coalesced (already) [300] bitmap_line::x#24 ← bitmap_line::x#13
Coalesced [301] bitmap_line::e#9 ← bitmap_line::e#1
Coalesced [303] bitmap_line::y#27 ← bitmap_line::y#0
Coalesced [304] bitmap_line::x#29 ← bitmap_line::x#0
Coalesced [305] bitmap_line::e1#8 ← bitmap_line::e1#0
Coalesced [309] bitmap_plot::y#5 ← bitmap_plot::y#3
Coalesced [310] bitmap_plot::x#5 ← bitmap_plot::x#3
Coalesced [317] bitmap_line::y#28 ← bitmap_line::y#2
Coalesced [318] bitmap_line::e1#9 ← bitmap_line::e1#2
Coalesced [321] bitmap_line::y#24 ← bitmap_line::y#13
Coalesced [322] bitmap_line::x#26 ← bitmap_line::x#15
Coalesced (already) [323] bitmap_line::y#26 ← bitmap_line::y#13
Coalesced (already) [324] bitmap_line::x#28 ← bitmap_line::x#15
Coalesced [325] bitmap_line::e1#7 ← bitmap_line::e1#6
Coalesced (already) [326] bitmap_line::y#29 ← bitmap_line::y#15
Coalesced [327] bitmap_line::e1#10 ← bitmap_line::e1#1
Coalesced [330] bitmap_plot::y#7 ← bitmap_plot::y#0
Coalesced [331] bitmap_plot::x#7 ← bitmap_plot::x#0
Coalesced [353] abs_u16::return#9 ← abs_u16::w#2
Coalesced [357] abs_u16::return#8 ← abs_u16::return#2
Coalesced [376] spline_8segB::p_x#4 ← spline_8segB::p_x#0
Coalesced [377] spline_8segB::p_y#4 ← spline_8segB::p_y#0
Coalesced [378] spline_8segB::i_x#3 ← spline_8segB::i_x#0
Coalesced [379] spline_8segB::i_y#3 ← spline_8segB::i_y#0
Coalesced [401] spline_8segB::p_x#5 ← spline_8segB::p_x#1
Coalesced [402] spline_8segB::p_y#5 ← spline_8segB::p_y#1
Coalesced [403] spline_8segB::n#3 ← spline_8segB::n#1
Coalesced [404] spline_8segB::i_x#4 ← spline_8segB::i_x#1
Coalesced [405] spline_8segB::i_y#4 ← spline_8segB::i_y#1
Coalesced [410] mulf16s::a#9 ← mulf16s::a#0
Coalesced [411] mulf16s::b#8 ← mulf16s::b#0
Coalesced [419] mulf16s::a#10 ← mulf16s::a#1
Coalesced [420] mulf16s::b#9 ← mulf16s::b#1
Coalesced [429] mulf16s::a#11 ← mulf16s::a#2
Coalesced [430] mulf16s::b#10 ← mulf16s::b#2
Coalesced [439] mulf16s::a#12 ← mulf16s::a#3
Coalesced [440] mulf16s::b#11 ← mulf16s::b#3
Coalesced [462] mulf16s::m#7 ← mulf16s::m#1
Coalesced [468] mulf16s::m#10 ← mulf16s::m#2
Coalesced [472] mulf16s::m#9 ← mulf16s::m#5
Coalesced [473] mulf16s::m#8 ← mulf16s::m#0
Coalesced [495] memset::dst#4 ← memset::dst#1
Coalesced [515] bitmap_init::yoffs#7 ← bitmap_init::yoffs#1
Coalesced [520] bitmap_init::y#5 ← bitmap_init::y#1
Coalesced [521] bitmap_init::yoffs#5 ← bitmap_init::yoffs#4
Coalesced (already) [522] bitmap_init::yoffs#6 ← bitmap_init::yoffs#2
Coalesced [523] bitmap_init::bits#5 ← bitmap_init::bits#4
Coalesced [524] bitmap_init::x#5 ← bitmap_init::x#1
Coalesced [525] bitmap_init::bits#6 ← bitmap_init::bits#1
Coalesced [533] mulf_init::sqr#8 ← mulf_init::sqr#2
Coalesced [534] mulf_init::x_2#7 ← mulf_init::x_2#1
Coalesced [558] mulf_init::x_255#5 ← mulf_init::x_255#1
Coalesced [559] mulf_init::sqr2_lo#5 ← mulf_init::sqr2_lo#1
Coalesced [560] mulf_init::sqr2_hi#5 ← mulf_init::sqr2_hi#1
Coalesced [561] mulf_init::dir#4 ← mulf_init::dir#3
Coalesced (already) [562] mulf_init::dir#5 ← mulf_init::dir#2
Coalesced [563] mulf_init::c#5 ← mulf_init::c#1
Coalesced [564] mulf_init::sqr#6 ← mulf_init::sqr#1
Coalesced [565] mulf_init::sqr1_lo#5 ← mulf_init::sqr1_lo#1
Coalesced [566] mulf_init::sqr1_hi#5 ← mulf_init::sqr1_hi#1
Coalesced [567] mulf_init::x_2#5 ← mulf_init::x_2#2
Coalesced [568] mulf_init::sqr#7 ← mulf_init::sqr#4
Coalesced (already) [569] mulf_init::x_2#6 ← mulf_init::x_2#3
Coalesced [149] main::w#6 ← main::w#1
Coalesced (already) [150] main::w#5 ← main::w#4
Coalesced [162] rotate::angle#5 ← rotate::angle#0
Coalesced [163] rotate::vector_x#6 ← rotate::vector_x#0
Coalesced [164] rotate::vector_y#5 ← rotate::vector_y#0
Coalesced [181] rotate::angle#6 ← rotate::angle#1
Coalesced [182] rotate::vector_x#7 ← rotate::vector_x#1
Coalesced [183] rotate::vector_y#6 ← rotate::vector_y#1
Coalesced [200] bitmap_line::x#21 ← bitmap_line::x1#0
Coalesced [201] bitmap_line::y#21 ← bitmap_line::y1#0
Coalesced [202] bitmap_line::x2#14 ← bitmap_line::x2#0
Coalesced [203] bitmap_line::y2#14 ← bitmap_line::y2#0
Coalesced [209] show_letter::i#13 ← show_letter::i#1
Not coalescing [210] show_letter::current_x#11 ← show_letter::current_x#10
Not coalescing [211] show_letter::current_y#11 ← show_letter::current_y#10
Coalesced [225] bitmap_plot_spline_8seg::current_x#3 ← bitmap_plot_spline_8seg::current_x#0
Coalesced [226] bitmap_plot_spline_8seg::current_y#3 ← bitmap_plot_spline_8seg::current_y#0
Coalesced [231] bitmap_line::x#20 ← bitmap_line::x1#1
Coalesced [232] bitmap_line::y#20 ← bitmap_line::y1#1
Coalesced [242] bitmap_plot_spline_8seg::current_x#4 ← bitmap_plot_spline_8seg::current_x#1
Coalesced [243] bitmap_plot_spline_8seg::current_y#4 ← bitmap_plot_spline_8seg::current_y#1
Coalesced [244] bitmap_plot_spline_8seg::n#4 ← bitmap_plot_spline_8seg::n#1
Coalesced [247] abs_u16::w#5 ← abs_u16::w#0
Coalesced [252] abs_u16::w#6 ← abs_u16::w#1
Coalesced [259] sgn_u16::w#3 ← sgn_u16::w#0
Coalesced [264] sgn_u16::w#4 ← sgn_u16::w#1
Coalesced [270] bitmap_line::y#22 ← bitmap_line::y#0
Coalesced [271] bitmap_line::x#22 ← bitmap_line::x#0
Coalesced [272] bitmap_line::e#7 ← bitmap_line::e#0
Coalesced [276] bitmap_plot::y#8 ← bitmap_plot::y#1
Coalesced [277] bitmap_plot::x#8 ← bitmap_plot::x#1
Coalesced [284] bitmap_line::x#25 ← bitmap_line::x#1
Coalesced [285] bitmap_line::e#10 ← bitmap_line::e#2
Coalesced [288] bitmap_line::y#25 ← bitmap_line::y#1
Coalesced [289] bitmap_line::x#27 ← bitmap_line::x#12
Coalesced [293] bitmap_plot::y#6 ← bitmap_plot::y#2
Coalesced [294] bitmap_plot::x#6 ← bitmap_plot::x#2
Coalesced [298] bitmap_line::y#23 ← bitmap_line::y#1
Coalesced [299] bitmap_line::x#23 ← bitmap_line::x#12
Coalesced [300] bitmap_line::e#8 ← bitmap_line::e#6
Coalesced (already) [301] bitmap_line::x#24 ← bitmap_line::x#13
Coalesced [302] bitmap_line::e#9 ← bitmap_line::e#1
Coalesced [304] bitmap_line::y#27 ← bitmap_line::y#0
Coalesced [305] bitmap_line::x#29 ← bitmap_line::x#0
Coalesced [306] bitmap_line::e1#8 ← bitmap_line::e1#0
Coalesced [310] bitmap_plot::y#5 ← bitmap_plot::y#3
Coalesced [311] bitmap_plot::x#5 ← bitmap_plot::x#3
Coalesced [318] bitmap_line::y#28 ← bitmap_line::y#2
Coalesced [319] bitmap_line::e1#9 ← bitmap_line::e1#2
Coalesced [322] bitmap_line::y#24 ← bitmap_line::y#13
Coalesced [323] bitmap_line::x#26 ← bitmap_line::x#15
Coalesced (already) [324] bitmap_line::y#26 ← bitmap_line::y#13
Coalesced (already) [325] bitmap_line::x#28 ← bitmap_line::x#15
Coalesced [326] bitmap_line::e1#7 ← bitmap_line::e1#6
Coalesced (already) [327] bitmap_line::y#29 ← bitmap_line::y#15
Coalesced [328] bitmap_line::e1#10 ← bitmap_line::e1#1
Coalesced [331] bitmap_plot::y#7 ← bitmap_plot::y#0
Coalesced [332] bitmap_plot::x#7 ← bitmap_plot::x#0
Coalesced [354] abs_u16::return#9 ← abs_u16::w#2
Coalesced [358] abs_u16::return#8 ← abs_u16::return#2
Coalesced [377] spline_8segB::p_x#4 ← spline_8segB::p_x#0
Coalesced [378] spline_8segB::p_y#4 ← spline_8segB::p_y#0
Coalesced [379] spline_8segB::i_x#3 ← spline_8segB::i_x#0
Coalesced [380] spline_8segB::i_y#3 ← spline_8segB::i_y#0
Coalesced [402] spline_8segB::p_x#5 ← spline_8segB::p_x#1
Coalesced [403] spline_8segB::p_y#5 ← spline_8segB::p_y#1
Coalesced [404] spline_8segB::n#3 ← spline_8segB::n#1
Coalesced [405] spline_8segB::i_x#4 ← spline_8segB::i_x#1
Coalesced [406] spline_8segB::i_y#4 ← spline_8segB::i_y#1
Coalesced [411] mulf16s::a#9 ← mulf16s::a#0
Coalesced [412] mulf16s::b#8 ← mulf16s::b#0
Coalesced [420] mulf16s::a#10 ← mulf16s::a#1
Coalesced [421] mulf16s::b#9 ← mulf16s::b#1
Coalesced [430] mulf16s::a#11 ← mulf16s::a#2
Coalesced [431] mulf16s::b#10 ← mulf16s::b#2
Coalesced [440] mulf16s::a#12 ← mulf16s::a#3
Coalesced [441] mulf16s::b#11 ← mulf16s::b#3
Coalesced [463] mulf16s::m#7 ← mulf16s::m#1
Coalesced [469] mulf16s::m#10 ← mulf16s::m#2
Coalesced [473] mulf16s::m#9 ← mulf16s::m#5
Coalesced [474] mulf16s::m#8 ← mulf16s::m#0
Coalesced [496] memset::dst#4 ← memset::dst#1
Coalesced [516] bitmap_init::yoffs#7 ← bitmap_init::yoffs#1
Coalesced [521] bitmap_init::y#5 ← bitmap_init::y#1
Coalesced [522] bitmap_init::yoffs#5 ← bitmap_init::yoffs#4
Coalesced (already) [523] bitmap_init::yoffs#6 ← bitmap_init::yoffs#2
Coalesced [524] bitmap_init::bits#5 ← bitmap_init::bits#4
Coalesced [525] bitmap_init::x#5 ← bitmap_init::x#1
Coalesced [526] bitmap_init::bits#6 ← bitmap_init::bits#1
Coalesced [534] mulf_init::sqr#8 ← mulf_init::sqr#2
Coalesced [535] mulf_init::x_2#7 ← mulf_init::x_2#1
Coalesced [559] mulf_init::x_255#5 ← mulf_init::x_255#1
Coalesced [560] mulf_init::sqr2_lo#5 ← mulf_init::sqr2_lo#1
Coalesced [561] mulf_init::sqr2_hi#5 ← mulf_init::sqr2_hi#1
Coalesced [562] mulf_init::dir#4 ← mulf_init::dir#3
Coalesced (already) [563] mulf_init::dir#5 ← mulf_init::dir#2
Coalesced [564] mulf_init::c#5 ← mulf_init::c#1
Coalesced [565] mulf_init::sqr#6 ← mulf_init::sqr#1
Coalesced [566] mulf_init::sqr1_lo#5 ← mulf_init::sqr1_lo#1
Coalesced [567] mulf_init::sqr1_hi#5 ← mulf_init::sqr1_hi#1
Coalesced [568] mulf_init::x_2#5 ← mulf_init::x_2#2
Coalesced [569] mulf_init::sqr#7 ← mulf_init::sqr#4
Coalesced (already) [570] mulf_init::x_2#6 ← mulf_init::x_2#3
Coalesced down to 49 phi equivalence classes
Culled Empty Block (label) @1
Culled Empty Block (label) @7
@ -6324,6 +6281,7 @@ Culled Empty Block (label) main::vicSelectGfxBank1_toDd001_@return
Culled Empty Block (label) main::@19
Culled Empty Block (label) main::toD0181_@return
Culled Empty Block (label) main::@25
Culled Empty Block (label) main::@27
Culled Empty Block (label) main::@26
Culled Empty Block (label) show_letter::@15
Culled Empty Block (label) show_letter::@14
@ -6579,7 +6537,7 @@ main::@10: scope:[main] from main::@2
[129] call show_letter
to:main::@3
main::@3: scope:[main] from main::@10 main::@3 main::@5
[130] (byte) main::w#4 ← phi( main::@10/(byte) 0 main::@5/(byte) main::w#1 )
[130] (byte) main::w#4 ← phi( main::@10/(byte) 0 main::@3/(byte) main::w#4 main::@5/(byte) main::w#1 )
[131] if(*((const byte*) RASTER#0)!=(byte) $fe) goto main::@3
to:main::@4
main::@4: scope:[main] from main::@3 main::@4
@ -7288,7 +7246,7 @@ VARIABLE REGISTER WEIGHTS
(byte) main::vicSelectGfxBank1_toDd001_return
(byte) main::w
(byte) main::w#1 151.5
(byte) main::w#4 67.33333333333333
(byte) main::w#4 734.6666666666666
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
(byte) memset::c
(byte) memset::c#3 12.625
@ -8684,12 +8642,10 @@ main: {
lda #0
sta w
jmp b3
// [130] phi from main::@3 to main::@3 [phi:main::@3->main::@3]
// [130] phi from main::@3 main::@5 to main::@3 [phi:main::@3/main::@5->main::@3]
b3_from_b3:
jmp b3
// [130] phi from main::@5 to main::@3 [phi:main::@5->main::@3]
b3_from_b5:
// [130] phi (byte) main::w#4 = (byte) main::w#1 [phi:main::@5->main::@3#0] -- register_copy
// [130] phi (byte) main::w#4 = (byte) main::w#4 [phi:main::@3/main::@5->main::@3#0] -- register_copy
jmp b3
// main::@3
b3:
@ -12029,9 +11985,9 @@ Uplift Scope [bitmap_plot] 4,514.5: zp ZP_WORD:27 [ bitmap_plot::x#4 bitmap_plot
Uplift Scope [bitmap_plot_spline_8seg] 1,901.9: zp ZP_BYTE:13 [ bitmap_plot_spline_8seg::n#2 bitmap_plot_spline_8seg::n#1 ] 1,505.5: zp ZP_WORD:9 [ bitmap_plot_spline_8seg::current_x#2 bitmap_plot_spline_8seg::current_x#0 bitmap_plot_spline_8seg::current_x#1 ] 1,501.5: zp ZP_BYTE:144 [ bitmap_plot_spline_8seg::$9 ] 1,172.83: zp ZP_WORD:11 [ bitmap_plot_spline_8seg::current_y#2 bitmap_plot_spline_8seg::current_y#0 bitmap_plot_spline_8seg::current_y#1 ] 500.5: zp ZP_BYTE:143 [ bitmap_plot_spline_8seg::$8 ]
Uplift Scope [show_letter] 207.05: zp ZP_WORD:7 [ show_letter::current_y#4 show_letter::current_y#11 ] 202: zp ZP_BYTE:84 [ show_letter::$32 ] 202: zp ZP_BYTE:106 [ show_letter::$34 ] 202: zp ZP_BYTE:128 [ show_letter::$36 ] 202: zp ZP_BYTE:129 [ show_letter::$22 ] 151.5: zp ZP_BYTE:85 [ show_letter::$20 ] 151.5: zp ZP_BYTE:107 [ show_letter::$21 ] 151.5: zp ZP_BYTE:130 [ show_letter::segment_type#0 ] 106.32: zp ZP_WORD:5 [ show_letter::current_x#4 show_letter::current_x#11 ] 101: zp ZP_WORD:86 [ show_letter::to_x#0 ] 101: zp ZP_WORD:88 [ show_letter::to_y#0 ] 101: zp ZP_WORD:90 [ show_letter::to_x#1 ] 101: zp ZP_WORD:92 [ show_letter::to_y#1 ] 101: zp ZP_WORD:98 [ show_letter::to_x#2 ] 101: zp ZP_WORD:100 [ show_letter::to_y#2 ] 101: zp ZP_WORD:108 [ show_letter::via_x#0 ] 101: zp ZP_WORD:110 [ show_letter::via_y#0 ] 101: zp ZP_WORD:112 [ show_letter::via_x#1 ] 101: zp ZP_WORD:114 [ show_letter::via_y#1 ] 101: zp ZP_WORD:120 [ show_letter::via_x#2 ] 101: zp ZP_WORD:122 [ show_letter::via_y#2 ] 91.29: zp ZP_BYTE:4 [ show_letter::i#10 show_letter::i#1 ] 22.44: zp ZP_WORD:124 [ show_letter::segment_via_x#0 ] 22.44: zp ZP_WORD:126 [ show_letter::segment_via_y#0 ] 7.77: zp ZP_WORD:102 [ show_letter::current_x#10 ] 7.77: zp ZP_WORD:104 [ show_letter::current_y#10 ] 3.67: zp ZP_BYTE:83 [ show_letter::angle#0 ]
Uplift Scope [rotate] 416.62: zp ZP_BYTE:44 [ rotate::angle#2 rotate::angle#0 rotate::angle#1 ] 213.44: zp ZP_WORD:47 [ rotate::vector_y#2 rotate::vector_y#0 rotate::vector_y#1 ] 142.59: zp ZP_WORD:45 [ rotate::vector_x#2 rotate::vector_x#0 rotate::vector_x#1 ] 101: zp ZP_WORD:94 [ rotate::return_x#0 ] 101: zp ZP_WORD:96 [ rotate::return_y#0 ] 101: zp ZP_WORD:116 [ rotate::return_x#1 ] 101: zp ZP_WORD:118 [ rotate::return_y#1 ] 34: zp ZP_WORD:274 [ rotate::return_x#2 ] 34: zp ZP_WORD:277 [ rotate::return_y#2 ] 4: zp ZP_WORD:227 [ rotate::$2 ] 4: zp ZP_WORD:239 [ rotate::$5 ] 4: zp ZP_WORD:253 [ rotate::$9 ] 4: zp ZP_WORD:255 [ rotate::$10 ] 4: zp ZP_WORD:267 [ rotate::$12 ] 4: zp ZP_WORD:269 [ rotate::$13 ] 2: zp ZP_DWORD:223 [ rotate::$1 ] 2: zp ZP_DWORD:235 [ rotate::$4 ] 2: zp ZP_DWORD:249 [ rotate::$8 ] 2: zp ZP_DWORD:263 [ rotate::$11 ] 2: zp ZP_BYTE:273 [ rotate::$15 ] 2: zp ZP_BYTE:276 [ rotate::$18 ] 1.33: zp ZP_WORD:271 [ rotate::yr#1 ] 0.75: zp ZP_WORD:217 [ rotate::cos_a#0 ] 0.67: zp ZP_WORD:243 [ rotate::sin_a#0 ] 0.44: zp ZP_WORD:257 [ rotate::xr#1 ] 0.25: zp ZP_WORD:229 [ rotate::xr#0 ] 0.24: zp ZP_WORD:241 [ rotate::yr#0 ]
Uplift Scope [main] 886.17: zp ZP_BYTE:3 [ main::w#4 main::w#1 ] 25.3: zp ZP_BYTE:2 [ main::angle#2 main::angle#1 ]
Uplift Scope [memset] 308: zp ZP_WORD:62 [ memset::dst#2 memset::dst#3 memset::dst#1 ] 17.17: zp ZP_WORD:303 [ memset::end#0 ] 12.62: zp ZP_BYTE:61 [ memset::c#3 ] 2: zp ZP_WORD:57 [ memset::num#2 ] 0: zp ZP_WORD:59 [ memset::str#3 ]
Uplift Scope [mulf_init] 45.1: zp ZP_WORD:75 [ mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ] 24.36: zp ZP_BYTE:69 [ mulf_init::c#2 mulf_init::c#1 ] 24.14: zp ZP_BYTE:74 [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ] 22: zp ZP_BYTE:309 [ mulf_init::$7 ] 22: zp ZP_BYTE:310 [ mulf_init::$10 ] 22: zp ZP_BYTE:311 [ mulf_init::$11 ] 20.62: zp ZP_WORD:78 [ mulf_init::sqr2_lo#2 mulf_init::sqr2_lo#1 ] 19.04: zp ZP_WORD:70 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 ] 16.5: zp ZP_BYTE:77 [ mulf_init::x_255#2 mulf_init::x_255#1 ] 14.14: zp ZP_WORD:80 [ mulf_init::sqr2_hi#2 mulf_init::sqr2_hi#1 ] 12.05: zp ZP_BYTE:82 [ mulf_init::dir#2 mulf_init::dir#3 ] 8.5: zp ZP_WORD:72 [ mulf_init::sqr1_hi#2 mulf_init::sqr1_hi#1 ]
Uplift Scope [main] 218.83: zp ZP_BYTE:3 [ main::w#4 main::w#1 ] 25.3: zp ZP_BYTE:2 [ main::angle#2 main::angle#1 ]
Uplift Scope [bitmap_init] 39.88: zp ZP_WORD:67 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] 34.83: zp ZP_BYTE:64 [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] 22: zp ZP_BYTE:65 [ bitmap_init::x#2 bitmap_init::x#1 ] 22: zp ZP_BYTE:66 [ bitmap_init::y#2 bitmap_init::y#1 ] 22: zp ZP_BYTE:306 [ bitmap_init::$4 ] 22: zp ZP_BYTE:307 [ bitmap_init::$5 ] 22: zp ZP_BYTE:308 [ bitmap_init::$6 ] 5.5: zp ZP_BYTE:305 [ bitmap_init::$7 ]
Uplift Scope [mulf16s] 16.91: zp ZP_WORD:51 [ mulf16s::b#4 mulf16s::b#0 mulf16s::b#1 mulf16s::b#2 mulf16s::b#3 ] 16.5: zp ZP_DWORD:53 [ mulf16s::m#4 mulf16s::m#5 mulf16s::m#1 mulf16s::m#0 mulf16s::m#2 ] 8.77: zp ZP_WORD:49 [ mulf16s::a#4 mulf16s::a#0 mulf16s::a#1 mulf16s::a#2 mulf16s::a#3 ] 4: zp ZP_DWORD:219 [ mulf16s::return#2 ] 4: zp ZP_DWORD:231 [ mulf16s::return#3 ] 4: zp ZP_DWORD:245 [ mulf16s::return#4 ] 4: zp ZP_DWORD:259 [ mulf16s::return#10 ] 4: zp ZP_WORD:287 [ mulf16s::$9 ] 4: zp ZP_WORD:289 [ mulf16s::$16 ] 4: zp ZP_WORD:291 [ mulf16s::$13 ] 4: zp ZP_WORD:293 [ mulf16s::$17 ] 1.67: zp ZP_DWORD:295 [ mulf16s::return#0 ]
Uplift Scope [abs_u16] 16.5: zp ZP_WORD:33 [ abs_u16::return#4 abs_u16::return#2 abs_u16::w#2 abs_u16::w#0 abs_u16::w#1 ] 4: zp ZP_WORD:145 [ abs_u16::return#0 ] 4: zp ZP_WORD:149 [ abs_u16::return#1 ] 4: zp ZP_BYTE:170 [ abs_u16::$0 ] 4: zp ZP_BYTE:171 [ abs_u16::$1 ]
@ -12045,56 +12001,56 @@ Uplift Scope [Segment]
Uplift Scope [Segment::SegmentType]
Uplift Scope []
Uplifting [bitmap_line] best 853271 combination zp ZP_WORD:20 [ bitmap_line::y#15 bitmap_line::y#7 bitmap_line::y#13 bitmap_line::y#4 bitmap_line::y#0 bitmap_line::y1#1 bitmap_line::y1#0 bitmap_line::y#1 bitmap_line::y#2 ] zp ZP_WORD:22 [ bitmap_line::x#7 bitmap_line::x#6 bitmap_line::x#15 bitmap_line::x#13 bitmap_line::x#0 bitmap_line::x1#1 bitmap_line::x1#0 bitmap_line::x#12 bitmap_line::x#1 ] zp ZP_WORD:18 [ bitmap_line::e#3 bitmap_line::e#0 bitmap_line::e#6 bitmap_line::e#1 bitmap_line::e#2 ] zp ZP_WORD:24 [ bitmap_line::e1#3 bitmap_line::e1#6 bitmap_line::e1#0 bitmap_line::e1#2 bitmap_line::e1#1 ] zp ZP_WORD:16 [ bitmap_line::y2#11 bitmap_line::y2#13 bitmap_line::y2#0 ] zp ZP_WORD:14 [ bitmap_line::x2#10 bitmap_line::x2#13 bitmap_line::x2#0 ] zp ZP_WORD:151 [ bitmap_line::dy#0 ] zp ZP_WORD:159 [ bitmap_line::sy#0 ] zp ZP_WORD:147 [ bitmap_line::dx#0 ] zp ZP_WORD:155 [ bitmap_line::sx#0 ]
Uplifting [spline_8segB] best 836271 combination zp ZP_WORD:200 [ spline_8segB::$22 ] zp ZP_WORD:204 [ spline_8segB::$24 ] reg byte y [ spline_8segB::n#2 spline_8segB::n#1 ] reg byte x [ spline_8segB::$31 ] zp ZP_WORD:42 [ spline_8segB::i_y#2 spline_8segB::i_y#0 spline_8segB::i_y#1 ] zp ZP_WORD:40 [ spline_8segB::i_x#2 spline_8segB::i_x#0 spline_8segB::i_x#1 ] zp ZP_WORD:35 [ spline_8segB::p_x#2 spline_8segB::p_x#0 spline_8segB::p_x#1 ] zp ZP_WORD:206 [ spline_8segB::$25 ] zp ZP_WORD:37 [ spline_8segB::p_y#2 spline_8segB::p_y#0 spline_8segB::p_y#1 ] zp ZP_WORD:202 [ spline_8segB::$23 ] zp ZP_WORD:198 [ spline_8segB::j_y#0 ] zp ZP_WORD:196 [ spline_8segB::j_x#0 ] zp ZP_WORD:139 [ spline_8segB::p2_x#0 ] zp ZP_WORD:141 [ spline_8segB::p2_y#0 ] zp ZP_WORD:135 [ spline_8segB::p1_x#0 ] zp ZP_WORD:137 [ spline_8segB::p1_y#0 ] zp ZP_WORD:131 [ spline_8segB::p0_x#0 ] zp ZP_WORD:133 [ spline_8segB::p0_y#0 ] zp ZP_WORD:172 [ spline_8segB::$0 ] zp ZP_WORD:174 [ spline_8segB::$1 ] zp ZP_WORD:178 [ spline_8segB::$3 ] zp ZP_WORD:180 [ spline_8segB::$4 ] zp ZP_WORD:184 [ spline_8segB::$6 ] zp ZP_WORD:188 [ spline_8segB::$8 ] zp ZP_WORD:192 [ spline_8segB::$10 ] zp ZP_WORD:194 [ spline_8segB::$12 ] zp ZP_WORD:209 [ spline_8segB::$18 ] zp ZP_WORD:213 [ spline_8segB::$20 ] zp ZP_WORD:215 [ spline_8segB::$21 ] zp ZP_WORD:186 [ spline_8segB::b_x#0 ] zp ZP_WORD:190 [ spline_8segB::b_y#0 ] zp ZP_WORD:211 [ spline_8segB::$19 ] zp ZP_WORD:182 [ spline_8segB::a_y#0 ] zp ZP_WORD:176 [ spline_8segB::a_x#0 ]
Uplifting [bitmap_plot] best 834262 combination zp ZP_WORD:27 [ bitmap_plot::x#4 bitmap_plot::x#3 bitmap_plot::x#2 bitmap_plot::x#0 bitmap_plot::x#1 ] reg byte x [ bitmap_plot::y#4 bitmap_plot::y#3 bitmap_plot::y#2 bitmap_plot::y#0 bitmap_plot::y#1 ] zp ZP_WORD:163 [ bitmap_plot::$1 ] reg byte a [ bitmap_plot::$2 ] zp ZP_WORD:165 [ bitmap_plot::plotter#1 ] zp ZP_WORD:161 [ bitmap_plot::plotter#0 ]
Uplifting [bitmap_plot_spline_8seg] best 820262 combination zp ZP_BYTE:13 [ bitmap_plot_spline_8seg::n#2 bitmap_plot_spline_8seg::n#1 ] zp ZP_WORD:9 [ bitmap_plot_spline_8seg::current_x#2 bitmap_plot_spline_8seg::current_x#0 bitmap_plot_spline_8seg::current_x#1 ] reg byte x [ bitmap_plot_spline_8seg::$9 ] zp ZP_WORD:11 [ bitmap_plot_spline_8seg::current_y#2 bitmap_plot_spline_8seg::current_y#0 bitmap_plot_spline_8seg::current_y#1 ] reg byte x [ bitmap_plot_spline_8seg::$8 ]
Uplifting [show_letter] best 818062 combination zp ZP_WORD:7 [ show_letter::current_y#4 show_letter::current_y#11 ] reg byte a [ show_letter::$32 ] reg byte a [ show_letter::$34 ] reg byte a [ show_letter::$36 ] reg byte a [ show_letter::$22 ] zp ZP_BYTE:85 [ show_letter::$20 ] zp ZP_BYTE:107 [ show_letter::$21 ] zp ZP_BYTE:130 [ show_letter::segment_type#0 ] zp ZP_WORD:5 [ show_letter::current_x#4 show_letter::current_x#11 ] zp ZP_WORD:86 [ show_letter::to_x#0 ] zp ZP_WORD:88 [ show_letter::to_y#0 ] zp ZP_WORD:90 [ show_letter::to_x#1 ] zp ZP_WORD:92 [ show_letter::to_y#1 ] zp ZP_WORD:98 [ show_letter::to_x#2 ] zp ZP_WORD:100 [ show_letter::to_y#2 ] zp ZP_WORD:108 [ show_letter::via_x#0 ] zp ZP_WORD:110 [ show_letter::via_y#0 ] zp ZP_WORD:112 [ show_letter::via_x#1 ] zp ZP_WORD:114 [ show_letter::via_y#1 ] zp ZP_WORD:120 [ show_letter::via_x#2 ] zp ZP_WORD:122 [ show_letter::via_y#2 ] zp ZP_BYTE:4 [ show_letter::i#10 show_letter::i#1 ] zp ZP_WORD:124 [ show_letter::segment_via_x#0 ] zp ZP_WORD:126 [ show_letter::segment_via_y#0 ] zp ZP_WORD:102 [ show_letter::current_x#10 ] zp ZP_WORD:104 [ show_letter::current_y#10 ] zp ZP_BYTE:83 [ show_letter::angle#0 ]
Uplifting [bitmap_line] best 850271 combination zp ZP_WORD:20 [ bitmap_line::y#15 bitmap_line::y#7 bitmap_line::y#13 bitmap_line::y#4 bitmap_line::y#0 bitmap_line::y1#1 bitmap_line::y1#0 bitmap_line::y#1 bitmap_line::y#2 ] zp ZP_WORD:22 [ bitmap_line::x#7 bitmap_line::x#6 bitmap_line::x#15 bitmap_line::x#13 bitmap_line::x#0 bitmap_line::x1#1 bitmap_line::x1#0 bitmap_line::x#12 bitmap_line::x#1 ] zp ZP_WORD:18 [ bitmap_line::e#3 bitmap_line::e#0 bitmap_line::e#6 bitmap_line::e#1 bitmap_line::e#2 ] zp ZP_WORD:24 [ bitmap_line::e1#3 bitmap_line::e1#6 bitmap_line::e1#0 bitmap_line::e1#2 bitmap_line::e1#1 ] zp ZP_WORD:16 [ bitmap_line::y2#11 bitmap_line::y2#13 bitmap_line::y2#0 ] zp ZP_WORD:14 [ bitmap_line::x2#10 bitmap_line::x2#13 bitmap_line::x2#0 ] zp ZP_WORD:151 [ bitmap_line::dy#0 ] zp ZP_WORD:159 [ bitmap_line::sy#0 ] zp ZP_WORD:147 [ bitmap_line::dx#0 ] zp ZP_WORD:155 [ bitmap_line::sx#0 ]
Uplifting [spline_8segB] best 833271 combination zp ZP_WORD:200 [ spline_8segB::$22 ] zp ZP_WORD:204 [ spline_8segB::$24 ] reg byte y [ spline_8segB::n#2 spline_8segB::n#1 ] reg byte x [ spline_8segB::$31 ] zp ZP_WORD:42 [ spline_8segB::i_y#2 spline_8segB::i_y#0 spline_8segB::i_y#1 ] zp ZP_WORD:40 [ spline_8segB::i_x#2 spline_8segB::i_x#0 spline_8segB::i_x#1 ] zp ZP_WORD:35 [ spline_8segB::p_x#2 spline_8segB::p_x#0 spline_8segB::p_x#1 ] zp ZP_WORD:206 [ spline_8segB::$25 ] zp ZP_WORD:37 [ spline_8segB::p_y#2 spline_8segB::p_y#0 spline_8segB::p_y#1 ] zp ZP_WORD:202 [ spline_8segB::$23 ] zp ZP_WORD:198 [ spline_8segB::j_y#0 ] zp ZP_WORD:196 [ spline_8segB::j_x#0 ] zp ZP_WORD:139 [ spline_8segB::p2_x#0 ] zp ZP_WORD:141 [ spline_8segB::p2_y#0 ] zp ZP_WORD:135 [ spline_8segB::p1_x#0 ] zp ZP_WORD:137 [ spline_8segB::p1_y#0 ] zp ZP_WORD:131 [ spline_8segB::p0_x#0 ] zp ZP_WORD:133 [ spline_8segB::p0_y#0 ] zp ZP_WORD:172 [ spline_8segB::$0 ] zp ZP_WORD:174 [ spline_8segB::$1 ] zp ZP_WORD:178 [ spline_8segB::$3 ] zp ZP_WORD:180 [ spline_8segB::$4 ] zp ZP_WORD:184 [ spline_8segB::$6 ] zp ZP_WORD:188 [ spline_8segB::$8 ] zp ZP_WORD:192 [ spline_8segB::$10 ] zp ZP_WORD:194 [ spline_8segB::$12 ] zp ZP_WORD:209 [ spline_8segB::$18 ] zp ZP_WORD:213 [ spline_8segB::$20 ] zp ZP_WORD:215 [ spline_8segB::$21 ] zp ZP_WORD:186 [ spline_8segB::b_x#0 ] zp ZP_WORD:190 [ spline_8segB::b_y#0 ] zp ZP_WORD:211 [ spline_8segB::$19 ] zp ZP_WORD:182 [ spline_8segB::a_y#0 ] zp ZP_WORD:176 [ spline_8segB::a_x#0 ]
Uplifting [bitmap_plot] best 831262 combination zp ZP_WORD:27 [ bitmap_plot::x#4 bitmap_plot::x#3 bitmap_plot::x#2 bitmap_plot::x#0 bitmap_plot::x#1 ] reg byte x [ bitmap_plot::y#4 bitmap_plot::y#3 bitmap_plot::y#2 bitmap_plot::y#0 bitmap_plot::y#1 ] zp ZP_WORD:163 [ bitmap_plot::$1 ] reg byte a [ bitmap_plot::$2 ] zp ZP_WORD:165 [ bitmap_plot::plotter#1 ] zp ZP_WORD:161 [ bitmap_plot::plotter#0 ]
Uplifting [bitmap_plot_spline_8seg] best 817262 combination zp ZP_BYTE:13 [ bitmap_plot_spline_8seg::n#2 bitmap_plot_spline_8seg::n#1 ] zp ZP_WORD:9 [ bitmap_plot_spline_8seg::current_x#2 bitmap_plot_spline_8seg::current_x#0 bitmap_plot_spline_8seg::current_x#1 ] reg byte x [ bitmap_plot_spline_8seg::$9 ] zp ZP_WORD:11 [ bitmap_plot_spline_8seg::current_y#2 bitmap_plot_spline_8seg::current_y#0 bitmap_plot_spline_8seg::current_y#1 ] reg byte x [ bitmap_plot_spline_8seg::$8 ]
Uplifting [show_letter] best 815062 combination zp ZP_WORD:7 [ show_letter::current_y#4 show_letter::current_y#11 ] reg byte a [ show_letter::$32 ] reg byte a [ show_letter::$34 ] reg byte a [ show_letter::$36 ] reg byte a [ show_letter::$22 ] zp ZP_BYTE:85 [ show_letter::$20 ] zp ZP_BYTE:107 [ show_letter::$21 ] zp ZP_BYTE:130 [ show_letter::segment_type#0 ] zp ZP_WORD:5 [ show_letter::current_x#4 show_letter::current_x#11 ] zp ZP_WORD:86 [ show_letter::to_x#0 ] zp ZP_WORD:88 [ show_letter::to_y#0 ] zp ZP_WORD:90 [ show_letter::to_x#1 ] zp ZP_WORD:92 [ show_letter::to_y#1 ] zp ZP_WORD:98 [ show_letter::to_x#2 ] zp ZP_WORD:100 [ show_letter::to_y#2 ] zp ZP_WORD:108 [ show_letter::via_x#0 ] zp ZP_WORD:110 [ show_letter::via_y#0 ] zp ZP_WORD:112 [ show_letter::via_x#1 ] zp ZP_WORD:114 [ show_letter::via_y#1 ] zp ZP_WORD:120 [ show_letter::via_x#2 ] zp ZP_WORD:122 [ show_letter::via_y#2 ] zp ZP_BYTE:4 [ show_letter::i#10 show_letter::i#1 ] zp ZP_WORD:124 [ show_letter::segment_via_x#0 ] zp ZP_WORD:126 [ show_letter::segment_via_y#0 ] zp ZP_WORD:102 [ show_letter::current_x#10 ] zp ZP_WORD:104 [ show_letter::current_y#10 ] zp ZP_BYTE:83 [ show_letter::angle#0 ]
Limited combination testing to 100 combinations of 9216 possible.
Uplifting [rotate] best 817444 combination reg byte y [ rotate::angle#2 rotate::angle#0 rotate::angle#1 ] zp ZP_WORD:47 [ rotate::vector_y#2 rotate::vector_y#0 rotate::vector_y#1 ] zp ZP_WORD:45 [ rotate::vector_x#2 rotate::vector_x#0 rotate::vector_x#1 ] zp ZP_WORD:94 [ rotate::return_x#0 ] zp ZP_WORD:96 [ rotate::return_y#0 ] zp ZP_WORD:116 [ rotate::return_x#1 ] zp ZP_WORD:118 [ rotate::return_y#1 ] zp ZP_WORD:274 [ rotate::return_x#2 ] zp ZP_WORD:277 [ rotate::return_y#2 ] zp ZP_WORD:227 [ rotate::$2 ] zp ZP_WORD:239 [ rotate::$5 ] zp ZP_WORD:253 [ rotate::$9 ] zp ZP_WORD:255 [ rotate::$10 ] zp ZP_WORD:267 [ rotate::$12 ] zp ZP_WORD:269 [ rotate::$13 ] zp ZP_DWORD:223 [ rotate::$1 ] zp ZP_DWORD:235 [ rotate::$4 ] zp ZP_DWORD:249 [ rotate::$8 ] zp ZP_DWORD:263 [ rotate::$11 ] reg byte a [ rotate::$15 ] reg byte a [ rotate::$18 ] zp ZP_WORD:271 [ rotate::yr#1 ] zp ZP_WORD:217 [ rotate::cos_a#0 ] zp ZP_WORD:243 [ rotate::sin_a#0 ] zp ZP_WORD:257 [ rotate::xr#1 ] zp ZP_WORD:229 [ rotate::xr#0 ] zp ZP_WORD:241 [ rotate::yr#0 ]
Uplifting [memset] best 817338 combination zp ZP_WORD:62 [ memset::dst#2 memset::dst#3 memset::dst#1 ] zp ZP_WORD:303 [ memset::end#0 ] reg byte x [ memset::c#3 ] zp ZP_WORD:57 [ memset::num#2 ] zp ZP_WORD:59 [ memset::str#3 ]
Uplifting [mulf_init] best 817088 combination zp ZP_WORD:75 [ mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ] reg byte x [ mulf_init::c#2 mulf_init::c#1 ] zp ZP_BYTE:74 [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ] reg byte a [ mulf_init::$7 ] reg byte a [ mulf_init::$10 ] reg byte a [ mulf_init::$11 ] zp ZP_WORD:78 [ mulf_init::sqr2_lo#2 mulf_init::sqr2_lo#1 ] zp ZP_WORD:70 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 ] zp ZP_BYTE:77 [ mulf_init::x_255#2 mulf_init::x_255#1 ] zp ZP_WORD:80 [ mulf_init::sqr2_hi#2 mulf_init::sqr2_hi#1 ] zp ZP_BYTE:82 [ mulf_init::dir#2 mulf_init::dir#3 ] zp ZP_WORD:72 [ mulf_init::sqr1_hi#2 mulf_init::sqr1_hi#1 ]
Uplifting [rotate] best 814444 combination reg byte y [ rotate::angle#2 rotate::angle#0 rotate::angle#1 ] zp ZP_WORD:47 [ rotate::vector_y#2 rotate::vector_y#0 rotate::vector_y#1 ] zp ZP_WORD:45 [ rotate::vector_x#2 rotate::vector_x#0 rotate::vector_x#1 ] zp ZP_WORD:94 [ rotate::return_x#0 ] zp ZP_WORD:96 [ rotate::return_y#0 ] zp ZP_WORD:116 [ rotate::return_x#1 ] zp ZP_WORD:118 [ rotate::return_y#1 ] zp ZP_WORD:274 [ rotate::return_x#2 ] zp ZP_WORD:277 [ rotate::return_y#2 ] zp ZP_WORD:227 [ rotate::$2 ] zp ZP_WORD:239 [ rotate::$5 ] zp ZP_WORD:253 [ rotate::$9 ] zp ZP_WORD:255 [ rotate::$10 ] zp ZP_WORD:267 [ rotate::$12 ] zp ZP_WORD:269 [ rotate::$13 ] zp ZP_DWORD:223 [ rotate::$1 ] zp ZP_DWORD:235 [ rotate::$4 ] zp ZP_DWORD:249 [ rotate::$8 ] zp ZP_DWORD:263 [ rotate::$11 ] reg byte a [ rotate::$15 ] reg byte a [ rotate::$18 ] zp ZP_WORD:271 [ rotate::yr#1 ] zp ZP_WORD:217 [ rotate::cos_a#0 ] zp ZP_WORD:243 [ rotate::sin_a#0 ] zp ZP_WORD:257 [ rotate::xr#1 ] zp ZP_WORD:229 [ rotate::xr#0 ] zp ZP_WORD:241 [ rotate::yr#0 ]
Uplifting [main] best 810844 combination reg byte x [ main::w#4 main::w#1 ] zp ZP_BYTE:2 [ main::angle#2 main::angle#1 ]
Uplifting [memset] best 810738 combination zp ZP_WORD:62 [ memset::dst#2 memset::dst#3 memset::dst#1 ] zp ZP_WORD:303 [ memset::end#0 ] reg byte x [ memset::c#3 ] zp ZP_WORD:57 [ memset::num#2 ] zp ZP_WORD:59 [ memset::str#3 ]
Uplifting [mulf_init] best 810488 combination zp ZP_WORD:75 [ mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ] reg byte x [ mulf_init::c#2 mulf_init::c#1 ] zp ZP_BYTE:74 [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ] reg byte a [ mulf_init::$7 ] reg byte a [ mulf_init::$10 ] reg byte a [ mulf_init::$11 ] zp ZP_WORD:78 [ mulf_init::sqr2_lo#2 mulf_init::sqr2_lo#1 ] zp ZP_WORD:70 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 ] zp ZP_BYTE:77 [ mulf_init::x_255#2 mulf_init::x_255#1 ] zp ZP_WORD:80 [ mulf_init::sqr2_hi#2 mulf_init::sqr2_hi#1 ] zp ZP_BYTE:82 [ mulf_init::dir#2 mulf_init::dir#3 ] zp ZP_WORD:72 [ mulf_init::sqr1_hi#2 mulf_init::sqr1_hi#1 ]
Limited combination testing to 100 combinations of 1024 possible.
Uplifting [main] best 813488 combination reg byte x [ main::w#4 main::w#1 ] zp ZP_BYTE:2 [ main::angle#2 main::angle#1 ]
Uplifting [bitmap_init] best 812978 combination zp ZP_WORD:67 [ 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 ZP_BYTE:307 [ bitmap_init::$5 ] zp ZP_BYTE:308 [ bitmap_init::$6 ] zp ZP_BYTE:305 [ bitmap_init::$7 ]
Uplifting [bitmap_init] best 809978 combination zp ZP_WORD:67 [ 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 ZP_BYTE:307 [ bitmap_init::$5 ] zp ZP_BYTE:308 [ bitmap_init::$6 ] zp ZP_BYTE:305 [ bitmap_init::$7 ]
Limited combination testing to 100 combinations of 15360 possible.
Uplifting [mulf16s] best 812978 combination zp ZP_WORD:51 [ mulf16s::b#4 mulf16s::b#0 mulf16s::b#1 mulf16s::b#2 mulf16s::b#3 ] zp ZP_DWORD:53 [ mulf16s::m#4 mulf16s::m#5 mulf16s::m#1 mulf16s::m#0 mulf16s::m#2 ] zp ZP_WORD:49 [ mulf16s::a#4 mulf16s::a#0 mulf16s::a#1 mulf16s::a#2 mulf16s::a#3 ] zp ZP_DWORD:219 [ mulf16s::return#2 ] zp ZP_DWORD:231 [ mulf16s::return#3 ] zp ZP_DWORD:245 [ mulf16s::return#4 ] zp ZP_DWORD:259 [ mulf16s::return#10 ] zp ZP_WORD:287 [ mulf16s::$9 ] zp ZP_WORD:289 [ mulf16s::$16 ] zp ZP_WORD:291 [ mulf16s::$13 ] zp ZP_WORD:293 [ mulf16s::$17 ] zp ZP_DWORD:295 [ mulf16s::return#0 ]
Uplifting [abs_u16] best 812966 combination zp ZP_WORD:33 [ abs_u16::return#4 abs_u16::return#2 abs_u16::w#2 abs_u16::w#0 abs_u16::w#1 ] zp ZP_WORD:145 [ abs_u16::return#0 ] zp ZP_WORD:149 [ abs_u16::return#1 ] reg byte a [ abs_u16::$0 ] reg byte a [ abs_u16::$1 ]
Uplifting [sgn_u16] best 812954 combination zp ZP_WORD:29 [ sgn_u16::w#2 sgn_u16::w#0 sgn_u16::w#1 ] zp ZP_WORD:153 [ sgn_u16::return#0 ] zp ZP_WORD:157 [ sgn_u16::return#1 ] reg byte a [ sgn_u16::$0 ] reg byte a [ sgn_u16::$1 ] zp ZP_WORD:31 [ sgn_u16::return#4 ]
Uplifting [mulf16u] best 812954 combination zp ZP_DWORD:283 [ mulf16u::return#2 ] zp ZP_WORD:279 [ mulf16u::a#0 ] zp ZP_WORD:281 [ mulf16u::b#0 ] zp ZP_DWORD:299 [ mulf16u::return#0 ]
Uplifting [SplineVector16] best 812954 combination
Uplifting [SplineVector32] best 812954 combination
Uplifting [bitmap_clear] best 812954 combination
Uplifting [RADIX] best 812954 combination
Uplifting [Segment] best 812954 combination
Uplifting [Segment::SegmentType] best 812954 combination
Uplifting [] best 812954 combination
Uplifting [mulf16s] best 809978 combination zp ZP_WORD:51 [ mulf16s::b#4 mulf16s::b#0 mulf16s::b#1 mulf16s::b#2 mulf16s::b#3 ] zp ZP_DWORD:53 [ mulf16s::m#4 mulf16s::m#5 mulf16s::m#1 mulf16s::m#0 mulf16s::m#2 ] zp ZP_WORD:49 [ mulf16s::a#4 mulf16s::a#0 mulf16s::a#1 mulf16s::a#2 mulf16s::a#3 ] zp ZP_DWORD:219 [ mulf16s::return#2 ] zp ZP_DWORD:231 [ mulf16s::return#3 ] zp ZP_DWORD:245 [ mulf16s::return#4 ] zp ZP_DWORD:259 [ mulf16s::return#10 ] zp ZP_WORD:287 [ mulf16s::$9 ] zp ZP_WORD:289 [ mulf16s::$16 ] zp ZP_WORD:291 [ mulf16s::$13 ] zp ZP_WORD:293 [ mulf16s::$17 ] zp ZP_DWORD:295 [ mulf16s::return#0 ]
Uplifting [abs_u16] best 809966 combination zp ZP_WORD:33 [ abs_u16::return#4 abs_u16::return#2 abs_u16::w#2 abs_u16::w#0 abs_u16::w#1 ] zp ZP_WORD:145 [ abs_u16::return#0 ] zp ZP_WORD:149 [ abs_u16::return#1 ] reg byte a [ abs_u16::$0 ] reg byte a [ abs_u16::$1 ]
Uplifting [sgn_u16] best 809954 combination zp ZP_WORD:29 [ sgn_u16::w#2 sgn_u16::w#0 sgn_u16::w#1 ] zp ZP_WORD:153 [ sgn_u16::return#0 ] zp ZP_WORD:157 [ sgn_u16::return#1 ] reg byte a [ sgn_u16::$0 ] reg byte a [ sgn_u16::$1 ] zp ZP_WORD:31 [ sgn_u16::return#4 ]
Uplifting [mulf16u] best 809954 combination zp ZP_DWORD:283 [ mulf16u::return#2 ] zp ZP_WORD:279 [ mulf16u::a#0 ] zp ZP_WORD:281 [ mulf16u::b#0 ] zp ZP_DWORD:299 [ mulf16u::return#0 ]
Uplifting [SplineVector16] best 809954 combination
Uplifting [SplineVector32] best 809954 combination
Uplifting [bitmap_clear] best 809954 combination
Uplifting [RADIX] best 809954 combination
Uplifting [Segment] best 809954 combination
Uplifting [Segment::SegmentType] best 809954 combination
Uplifting [] best 809954 combination
Attempting to uplift remaining variables inzp ZP_BYTE:13 [ bitmap_plot_spline_8seg::n#2 bitmap_plot_spline_8seg::n#1 ]
Uplifting [bitmap_plot_spline_8seg] best 812954 combination zp ZP_BYTE:13 [ bitmap_plot_spline_8seg::n#2 bitmap_plot_spline_8seg::n#1 ]
Uplifting [bitmap_plot_spline_8seg] best 809954 combination zp ZP_BYTE:13 [ bitmap_plot_spline_8seg::n#2 bitmap_plot_spline_8seg::n#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:85 [ show_letter::$20 ]
Uplifting [show_letter] best 812254 combination reg byte x [ show_letter::$20 ]
Uplifting [show_letter] best 809254 combination reg byte x [ show_letter::$20 ]
Attempting to uplift remaining variables inzp ZP_BYTE:107 [ show_letter::$21 ]
Uplifting [show_letter] best 811554 combination reg byte x [ show_letter::$21 ]
Uplifting [show_letter] best 808554 combination reg byte x [ show_letter::$21 ]
Attempting to uplift remaining variables inzp ZP_BYTE:130 [ show_letter::segment_type#0 ]
Uplifting [show_letter] best 810654 combination reg byte a [ show_letter::segment_type#0 ]
Uplifting [show_letter] best 807654 combination reg byte a [ show_letter::segment_type#0 ]
Attempting to uplift remaining variables inzp ZP_BYTE:4 [ show_letter::i#10 show_letter::i#1 ]
Uplifting [show_letter] best 810654 combination zp ZP_BYTE:4 [ show_letter::i#10 show_letter::i#1 ]
Uplifting [show_letter] best 807654 combination zp ZP_BYTE:4 [ show_letter::i#10 show_letter::i#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:2 [ main::angle#2 main::angle#1 ]
Uplifting [main] best 810654 combination zp ZP_BYTE:2 [ main::angle#2 main::angle#1 ]
Uplifting [main] best 807654 combination zp ZP_BYTE:2 [ main::angle#2 main::angle#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:74 [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ]
Uplifting [mulf_init] best 810654 combination zp ZP_BYTE:74 [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ]
Uplifting [mulf_init] best 807654 combination zp ZP_BYTE:74 [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:307 [ bitmap_init::$5 ]
Uplifting [bitmap_init] best 810594 combination reg byte a [ bitmap_init::$5 ]
Uplifting [bitmap_init] best 807594 combination reg byte a [ bitmap_init::$5 ]
Attempting to uplift remaining variables inzp ZP_BYTE:308 [ bitmap_init::$6 ]
Uplifting [bitmap_init] best 810534 combination reg byte a [ bitmap_init::$6 ]
Uplifting [bitmap_init] best 807534 combination reg byte a [ bitmap_init::$6 ]
Attempting to uplift remaining variables inzp ZP_BYTE:77 [ mulf_init::x_255#2 mulf_init::x_255#1 ]
Uplifting [mulf_init] best 810394 combination reg byte x [ mulf_init::x_255#2 mulf_init::x_255#1 ]
Uplifting [mulf_init] best 807394 combination reg byte x [ mulf_init::x_255#2 mulf_init::x_255#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:82 [ mulf_init::dir#2 mulf_init::dir#3 ]
Uplifting [mulf_init] best 810394 combination zp ZP_BYTE:82 [ mulf_init::dir#2 mulf_init::dir#3 ]
Uplifting [mulf_init] best 807394 combination zp ZP_BYTE:82 [ mulf_init::dir#2 mulf_init::dir#3 ]
Attempting to uplift remaining variables inzp ZP_BYTE:305 [ bitmap_init::$7 ]
Uplifting [bitmap_init] best 810394 combination zp ZP_BYTE:305 [ bitmap_init::$7 ]
Uplifting [bitmap_init] best 807394 combination zp ZP_BYTE:305 [ bitmap_init::$7 ]
Attempting to uplift remaining variables inzp ZP_BYTE:83 [ show_letter::angle#0 ]
Uplifting [show_letter] best 810394 combination zp ZP_BYTE:83 [ show_letter::angle#0 ]
Uplifting [show_letter] best 807394 combination zp ZP_BYTE:83 [ show_letter::angle#0 ]
Coalescing zero page register with common assignment [ zp ZP_WORD:22 [ bitmap_line::x#7 bitmap_line::x#6 bitmap_line::x#15 bitmap_line::x#13 bitmap_line::x#0 bitmap_line::x1#1 bitmap_line::x1#0 bitmap_line::x#12 bitmap_line::x#1 ] ] with [ zp ZP_WORD:27 [ bitmap_plot::x#4 bitmap_plot::x#3 bitmap_plot::x#2 bitmap_plot::x#0 bitmap_plot::x#1 ] ] - score: 4
Coalescing zero page register with common assignment [ zp ZP_WORD:49 [ mulf16s::a#4 mulf16s::a#0 mulf16s::a#1 mulf16s::a#2 mulf16s::a#3 ] ] with [ zp ZP_WORD:217 [ rotate::cos_a#0 ] ] - score: 2
Coalescing zero page register with common assignment [ zp ZP_WORD:49 [ mulf16s::a#4 mulf16s::a#0 mulf16s::a#1 mulf16s::a#2 mulf16s::a#3 rotate::cos_a#0 ] ] with [ zp ZP_WORD:243 [ rotate::sin_a#0 ] ] - score: 2
@ -12863,12 +12819,10 @@ main: {
// [130] phi (byte) main::w#4 = (byte) 0 [phi:main::@10->main::@3#0] -- vbuxx=vbuc1
ldx #0
jmp b3
// [130] phi from main::@3 to main::@3 [phi:main::@3->main::@3]
// [130] phi from main::@3 main::@5 to main::@3 [phi:main::@3/main::@5->main::@3]
b3_from_b3:
jmp b3
// [130] phi from main::@5 to main::@3 [phi:main::@5->main::@3]
b3_from_b5:
// [130] phi (byte) main::w#4 = (byte) main::w#1 [phi:main::@5->main::@3#0] -- register_copy
// [130] phi (byte) main::w#4 = (byte) main::w#4 [phi:main::@3/main::@5->main::@3#0] -- register_copy
jmp b3
// main::@3
b3:
@ -15028,6 +14982,7 @@ Replacing instruction ldx #0 with TAX
Removing instruction ldy #0
Removing instruction ldy #0
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Replacing label b3_from_b3 with b3
Replacing label b3_from_b5 with b3
Replacing label b1 with b2
Replacing label b1_from_b2 with b1
@ -15071,6 +15026,7 @@ Removing instruction b1:
Removing instruction b2_from_b1:
Removing instruction bitmap_clear_from_b2:
Removing instruction show_letter_from_b10:
Removing instruction b3_from_b3:
Removing instruction b3_from_b5:
Removing instruction b8_from_b2:
Removing instruction b1_from_b2:
@ -15195,13 +15151,11 @@ Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Skipping double jump to b3 in bne b3_from_b3
Replacing jump to rts with rts in jmp breturn
Replacing jump to rts with rts in jmp breturn
Replacing jump to rts with rts in jmp breturn
Skipping double jump to breturn in jmp breturn_from_b1
Succesful ASM optimization Pass5DoubleJumpElimination
Relabelling long label b3_from_b3 to b1
Relabelling long label breturn_from_b1 to b2
Succesful ASM optimization Pass5RelabelLongLabels
Removing instruction jmp b3
@ -15216,16 +15170,12 @@ Removing instruction jmp b4
Removing instruction jmp b5
Succesful ASM optimization Pass5NextJumpElimination
Replacing instruction ldy #0 with TAY
Removing instruction b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction bbegin:
Removing instruction breturn:
Removing instruction breturn:
Removing instruction b2:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Removing instruction jmp b3
Succesful ASM optimization Pass5NextJumpElimination
Fixing long branch [1161] bne b1 to beq
Fixing long branch [699] beq b4 to bne
@ -15494,7 +15444,7 @@ FINAL SYMBOL TABLE
(const byte) main::vicSelectGfxBank1_toDd001_return#0 vicSelectGfxBank1_toDd001_return = (byte) 3^>(word)(const byte*) BITMAP_SCREEN#0/(byte) $40
(byte) main::w
(byte) main::w#1 reg byte x 151.5
(byte) main::w#4 reg byte x 67.33333333333333
(byte) main::w#4 reg byte x 734.6666666666666
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
(label) memset::@1
(label) memset::@2
@ -16509,9 +16459,8 @@ main: {
// [130] phi from main::@10 to main::@3 [phi:main::@10->main::@3]
// [130] phi (byte) main::w#4 = (byte) 0 [phi:main::@10->main::@3#0] -- vbuxx=vbuc1
ldx #0
// [130] phi from main::@3 to main::@3 [phi:main::@3->main::@3]
// [130] phi from main::@5 to main::@3 [phi:main::@5->main::@3]
// [130] phi (byte) main::w#4 = (byte) main::w#1 [phi:main::@5->main::@3#0] -- register_copy
// [130] phi from main::@3 main::@5 to main::@3 [phi:main::@3/main::@5->main::@3]
// [130] phi (byte) main::w#4 = (byte) main::w#4 [phi:main::@3/main::@5->main::@3#0] -- register_copy
// main::@3
b3:
// while(*RASTER!=0xfe)

View File

@ -262,7 +262,7 @@
(const byte) main::vicSelectGfxBank1_toDd001_return#0 vicSelectGfxBank1_toDd001_return = (byte) 3^>(word)(const byte*) BITMAP_SCREEN#0/(byte) $40
(byte) main::w
(byte) main::w#1 reg byte x 151.5
(byte) main::w#4 reg byte x 67.33333333333333
(byte) main::w#4 reg byte x 734.6666666666666
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
(label) memset::@1
(label) memset::@2

View File

@ -1312,16 +1312,6 @@ Alias candidate removed (volatile)(byte) irq_sprite_ypos#0 = (byte~) $4 (byte) i
Alias candidate removed (volatile)(byte) irq_sprite_ptr#0 = (byte~) $6 (byte) irq_sprite_ptr#17 (byte) irq_sprite_ptr#14
Alias candidate removed (volatile)(byte) sprites_irq::raster_sprite_gfx_modify#0 = (byte~) sprites_irq::$0
Alias candidate removed (volatile)(byte) sprites_irq::toSpritePtr2_return#0 = (byte~) sprites_irq::toSpritePtr2_$2#0 (byte) sprites_irq::toSpritePtr2_return#2 (byte) sprites_irq::toSpritePtr2_return#1 (byte) sprites_irq::toSpritePtr2_return#3 (byte~) sprites_irq::$5 (byte) irq_sprite_ptr#1
Self Phi Eliminated (byte) sprites_irq::raster_sprite_gfx_modify#1
Self Phi Eliminated (byte) irq_sprite_ptr#10
Self Phi Eliminated (byte) render_screen_showing#1
Self Phi Eliminated (byte) irq_cnt#10
Self Phi Eliminated (byte) irq_raster_next#11
Self Phi Eliminated (byte) irq_sprite_ypos#10
Self Phi Eliminated (byte) sin_idx#12
Self Phi Eliminated (byte) sin_idx#13
Self Phi Eliminated (byte) sin_idx#14
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte) irq_sprite_ypos#22 (byte) irq_sprite_ypos#0
Identical Phi Values (byte) irq_raster_next#23 (byte) irq_raster_next#0
Identical Phi Values (byte) irq_sprite_ypos#19 (byte) irq_sprite_ypos#22

View File

@ -117,8 +117,8 @@ main::@1: scope:[main] from main::@17 main::@25 main::@6
[40] (byte) current_piece_char#10 ← phi( main::@6/(byte) current_piece_char#16 main::@17/(byte) current_piece_char#5 main::@25/(byte) current_piece_char#16 )
[40] (byte*) current_piece#10 ← phi( main::@6/(byte*) current_piece#15 main::@17/(byte*~) current_piece#102 main::@25/(byte*) current_piece#15 )
[40] (byte) current_movedown_slow#14 ← phi( main::@6/(byte) current_movedown_slow#21 main::@17/(byte) current_movedown_slow#1 main::@25/(byte) current_movedown_slow#21 )
[40] (byte) render_screen_render#18 ← phi( main::@17/(byte) $20 main::@25/(byte) render_screen_render#11 )
[40] (byte) render_screen_show#16 ← phi( main::@17/(byte) 0 main::@25/(byte) render_screen_show#13 )
[40] (byte) render_screen_render#18 ← phi( main::@6/(byte) render_screen_render#18 main::@17/(byte) $20 main::@25/(byte) render_screen_render#11 )
[40] (byte) render_screen_show#16 ← phi( main::@6/(byte) render_screen_show#16 main::@17/(byte) 0 main::@25/(byte) render_screen_show#13 )
to:main::@2
main::@2: scope:[main] from main::@1 main::@2
[41] if(*((const byte*) RASTER#0)!=(byte) $ff) goto main::@2

File diff suppressed because it is too large Load Diff

View File

@ -963,7 +963,7 @@
(byte) render_screen_render
(byte) render_screen_render#11 render_screen_render zp ZP_BYTE:3 3.25
(byte) render_screen_render#15 reg byte a 13.0
(byte) render_screen_render#18 render_screen_render zp ZP_BYTE:3 0.923076923076923
(byte) render_screen_render#18 render_screen_render zp ZP_BYTE:3 4.8076923076923075
(byte) render_screen_render#22 reg byte x 8.615384615384615
(byte) render_screen_render#33 render_screen_render#33 zp ZP_BYTE:15 5.333333333333333
(byte~) render_screen_render#64 reg byte x 22.0
@ -971,7 +971,7 @@
(byte~) render_screen_render#66 reg byte a 11.0
(byte) render_screen_show
(byte) render_screen_show#13 render_screen_show zp ZP_BYTE:2 4.333333333333333
(byte) render_screen_show#16 render_screen_show zp ZP_BYTE:2 0.425
(byte) render_screen_show#16 render_screen_show zp ZP_BYTE:2 5.474999999999999
(byte) render_screen_showing
(byte) render_screen_showing#0 render_screen_showing zp ZP_BYTE:4 0.1276595744680851
(byte) render_screen_showing#1 render_screen_showing zp ZP_BYTE:4 3.8000000000000003

View File

@ -167,8 +167,6 @@ Alias (byte) line::x1#1 = (byte) line::x1#4
Alias (byte) line::x#2 = (byte) line::x#3
Alias (byte) line::x1#2 = (byte) line::x1#3
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte) line::x1#2
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte) line::x0#1 (byte) line::x0#0
Identical Phi Values (byte) line::x1#1 (byte) line::x1#0
Identical Phi Values (byte) line::x1#2 (byte) line::x1#1

View File

@ -996,11 +996,6 @@ Successful SSA optimization Pass2AliasElimination
Alias (byte*) print_line_cursor#50 = (byte*) print_line_cursor#54
Alias (byte*) print_line_cursor#52 = (byte*) print_line_cursor#56
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte) memset::c#1
Self Phi Eliminated (byte*) memset::end#1
Self Phi Eliminated (void*) memset::str#4
Self Phi Eliminated (byte*) print_char_cursor#36
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (word) memset::num#1 (word) memset::num#0
Identical Phi Values (void*) memset::str#2 (void*) memset::str#0
Identical Phi Values (byte) memset::c#2 (byte) memset::c#0

View File

@ -1471,22 +1471,6 @@ Alias (signed word) atan2_16::x#11 = (signed word) atan2_16::x#14 (signed word)
Alias (signed word) atan2_16::y#10 = (signed word) atan2_16::y#16 (signed word) atan2_16::y#8
Alias (signed word) atan2_16::y#4 = (signed word) atan2_16::y#5
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte*) init_font_hex::proto_hi#2
Self Phi Eliminated (byte*) init_font_hex::proto_lo#2
Self Phi Eliminated (byte*) init_font_hex::charset#3
Self Phi Eliminated (byte) init_font_hex::c1#2
Self Phi Eliminated (byte) init_font_hex::c#2
Self Phi Eliminated (signed word) atan2_16::yi#10
Self Phi Eliminated (signed word) atan2_16::xi#10
Self Phi Eliminated (byte) atan2_16::i#10
Self Phi Eliminated (word) atan2_16::angle#14
Self Phi Eliminated (signed word) atan2_16::x#11
Self Phi Eliminated (signed word) atan2_16::y#10
Self Phi Eliminated (signed byte) main::y#2
Self Phi Eliminated (byte*) print_char_cursor#25
Self Phi Eliminated (byte*) main::col00#1
Self Phi Eliminated (byte*) print_char_cursor#10
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte*) init_font_hex::charset#6 (byte*) init_font_hex::charset#1
Identical Phi Values (byte*) init_font_hex::proto_hi#2 (byte*) init_font_hex::proto_hi#4
Identical Phi Values (byte*) init_font_hex::proto_lo#2 (byte*) init_font_hex::proto_lo#4
@ -1517,8 +1501,13 @@ Identical Phi Values (byte) diff::bb1#1 (byte) diff::bb1#0
Identical Phi Values (byte) diff::bb2#1 (byte) diff::bb2#0
Identical Phi Values (byte*) print_char_cursor#11 (byte*) print_char_cursor#10
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values (byte*) init_font_hex::proto_hi#4 (byte*) init_font_hex::proto_hi#6
Identical Phi Values (byte) init_font_hex::c#5 (byte) init_font_hex::c#6
Identical Phi Values (signed word) atan2_16::x#17 (signed word) atan2_16::x#0
Identical Phi Values (signed word) atan2_16::y#19 (signed word) atan2_16::y#0
Identical Phi Values (signed word) atan2_16::x#4 (signed word) atan2_16::x#17
Identical Phi Values (signed word) atan2_16::y#4 (signed word) atan2_16::y#19
Identical Phi Values (byte*) print_char_cursor#35 (byte*) print_char_cursor#0
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) init_font_hex::$3 [19] if((byte) init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3
Simple Condition (bool~) init_font_hex::$4 [29] if((byte) init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2
@ -1526,12 +1515,12 @@ Simple Condition (bool~) init_font_hex::$5 [34] if((byte) init_font_hex::c#1!=ra
Simple Condition (bool~) atan2_16::$0 [41] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1
Simple Condition (bool~) atan2_16::$5 [50] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4
Simple Condition (bool~) atan2_16::$18 [64] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@16
Simple Condition (bool~) atan2_16::$11 [73] if((signed word) atan2_16::x#17>=(signed byte) 0) goto atan2_16::@7
Simple Condition (bool~) atan2_16::$11 [73] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7
Simple Condition (bool~) atan2_16::$19 [76] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@19
Simple Condition (bool~) atan2_16::$20 [84] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@25
Simple Condition (bool~) atan2_16::$21 [87] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@26
Simple Condition (bool~) atan2_16::$22 [104] if((byte) atan2_16::i#1!=rangelast(0,atan2_16::$16)) goto atan2_16::@15
Simple Condition (bool~) atan2_16::$14 [108] if((signed word) atan2_16::y#19>=(signed byte) 0) goto atan2_16::@8
Simple Condition (bool~) atan2_16::$14 [108] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8
Simple Condition (bool~) main::$16 [227] if((signed byte) main::x#1!=rangelast(-$13,$14)) goto main::@2
Simple Condition (bool~) main::$17 [231] if((signed byte) main::y#1!=rangelast(-$c,$c)) goto main::@1
Simple Condition (bool~) diff::$0 [249] if((byte) diff::bb1#0<(byte) diff::bb2#0) goto diff::@1
@ -1582,7 +1571,7 @@ Resolved ranged next value [17] init_font_hex::i#1 ← ++ init_font_hex::i#2 to
Resolved ranged comparison value [19] if(init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3 to (number) 5
Resolved ranged next value [27] init_font_hex::c1#1 ← ++ init_font_hex::c1#4 to ++
Resolved ranged comparison value [29] if(init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 to (number) $10
Resolved ranged next value [32] init_font_hex::c#1 ← ++ init_font_hex::c#5 to ++
Resolved ranged next value [32] init_font_hex::c#1 ← ++ init_font_hex::c#6 to ++
Resolved ranged comparison value [34] if(init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 to (number) $10
Resolved ranged next value [225] main::x#1 ← ++ main::x#2 to ++
Resolved ranged comparison value [227] if(main::x#1!=rangelast(-$13,$14)) goto main::@2 to (number) $15
@ -1616,18 +1605,6 @@ Finalized unsigned number type (byte) $10
Finalized signed number type (signed byte) $15
Finalized signed number type (signed byte) $d
Successful SSA optimization PassNFinalizeNumberTypeConversions
Self Phi Eliminated (byte*) init_font_hex::proto_hi#4
Self Phi Eliminated (byte) init_font_hex::c#5
Self Phi Eliminated (signed word) atan2_16::x#17
Self Phi Eliminated (signed word) atan2_16::y#19
Self Phi Eliminated (byte*) print_char_cursor#35
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte*) init_font_hex::proto_hi#4 (byte*) init_font_hex::proto_hi#6
Identical Phi Values (byte) init_font_hex::c#5 (byte) init_font_hex::c#6
Identical Phi Values (signed word) atan2_16::x#17 (signed word) atan2_16::x#0
Identical Phi Values (signed word) atan2_16::y#19 (signed word) atan2_16::y#0
Identical Phi Values (byte*) print_char_cursor#35 (const byte*) print_char_cursor#0
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [3] (byte) init_font_hex::idx#1 ← ++ (const byte) init_font_hex::idx#0
Constant right-side identified [29] (byte~) atan2_16::$16 ← (const byte) CORDIC_ITERATIONS_16#0 - (byte) 1
Constant right-side identified [121] (byte*~) main::$3 ← (const byte*) COLS#0 + (word)(number) $c*(number) $28

View File

@ -1100,20 +1100,6 @@ Alias (signed word) atan2_16::x#11 = (signed word) atan2_16::x#14 (signed word)
Alias (signed word) atan2_16::y#10 = (signed word) atan2_16::y#16 (signed word) atan2_16::y#8
Alias (signed word) atan2_16::y#4 = (signed word) atan2_16::y#5
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte*) init_font_hex::proto_hi#2
Self Phi Eliminated (byte*) init_font_hex::proto_lo#2
Self Phi Eliminated (byte*) init_font_hex::charset#3
Self Phi Eliminated (byte) init_font_hex::c1#2
Self Phi Eliminated (byte) init_font_hex::c#2
Self Phi Eliminated (signed word) atan2_16::yi#10
Self Phi Eliminated (signed word) atan2_16::xi#10
Self Phi Eliminated (byte) atan2_16::i#10
Self Phi Eliminated (word) atan2_16::angle#14
Self Phi Eliminated (signed word) atan2_16::x#11
Self Phi Eliminated (signed word) atan2_16::y#10
Self Phi Eliminated (signed byte) main::y#2
Self Phi Eliminated (byte*) main::col00#1
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte*) init_font_hex::charset#6 (byte*) init_font_hex::charset#1
Identical Phi Values (byte*) init_font_hex::proto_hi#2 (byte*) init_font_hex::proto_hi#4
Identical Phi Values (byte*) init_font_hex::proto_lo#2 (byte*) init_font_hex::proto_lo#4
@ -1131,6 +1117,10 @@ Identical Phi Values (signed word) atan2_16::y#10 (signed word) atan2_16::y#19
Identical Phi Values (signed byte) main::y#2 (signed byte) main::y#4
Identical Phi Values (byte*) main::col00#1 (byte*) main::col00#0
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values (byte*) init_font_hex::proto_hi#4 (byte*) init_font_hex::proto_hi#6
Identical Phi Values (byte) init_font_hex::c#5 (byte) init_font_hex::c#6
Identical Phi Values (signed word) atan2_16::x#17 (signed word) atan2_16::x#0
Identical Phi Values (signed word) atan2_16::y#19 (signed word) atan2_16::y#0
Identical Phi Values (signed word) atan2_16::x#4 (signed word) atan2_16::x#17
Identical Phi Values (signed word) atan2_16::y#4 (signed word) atan2_16::y#19
Successful SSA optimization Pass2IdenticalPhiElimination
@ -1140,12 +1130,12 @@ Simple Condition (bool~) init_font_hex::$5 [34] if((byte) init_font_hex::c#1!=ra
Simple Condition (bool~) atan2_16::$0 [41] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1
Simple Condition (bool~) atan2_16::$5 [50] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4
Simple Condition (bool~) atan2_16::$18 [64] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@16
Simple Condition (bool~) atan2_16::$11 [73] if((signed word) atan2_16::x#17>=(signed byte) 0) goto atan2_16::@7
Simple Condition (bool~) atan2_16::$11 [73] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7
Simple Condition (bool~) atan2_16::$19 [76] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@19
Simple Condition (bool~) atan2_16::$20 [84] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@25
Simple Condition (bool~) atan2_16::$21 [87] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@26
Simple Condition (bool~) atan2_16::$22 [104] if((byte) atan2_16::i#1!=rangelast(0,atan2_16::$16)) goto atan2_16::@15
Simple Condition (bool~) atan2_16::$14 [108] if((signed word) atan2_16::y#19>=(signed byte) 0) goto atan2_16::@8
Simple Condition (bool~) atan2_16::$14 [108] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8
Simple Condition (bool~) main::$13 [173] if((signed byte) main::x#1!=rangelast(-$13,$14)) goto main::@2
Simple Condition (bool~) main::$14 [177] if((signed byte) main::y#1!=rangelast(-$c,$c)) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
@ -1187,7 +1177,7 @@ Resolved ranged next value [17] init_font_hex::i#1 ← ++ init_font_hex::i#2 to
Resolved ranged comparison value [19] if(init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3 to (number) 5
Resolved ranged next value [27] init_font_hex::c1#1 ← ++ init_font_hex::c1#4 to ++
Resolved ranged comparison value [29] if(init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 to (number) $10
Resolved ranged next value [32] init_font_hex::c#1 ← ++ init_font_hex::c#5 to ++
Resolved ranged next value [32] init_font_hex::c#1 ← ++ init_font_hex::c#6 to ++
Resolved ranged comparison value [34] if(init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 to (number) $10
Resolved ranged next value [171] main::x#1 ← ++ main::x#2 to ++
Resolved ranged comparison value [173] if(main::x#1!=rangelast(-$13,$14)) goto main::@2 to (number) $15
@ -1221,16 +1211,6 @@ Finalized unsigned number type (byte) $10
Finalized signed number type (signed byte) $15
Finalized signed number type (signed byte) $d
Successful SSA optimization PassNFinalizeNumberTypeConversions
Self Phi Eliminated (byte*) init_font_hex::proto_hi#4
Self Phi Eliminated (byte) init_font_hex::c#5
Self Phi Eliminated (signed word) atan2_16::x#17
Self Phi Eliminated (signed word) atan2_16::y#19
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte*) init_font_hex::proto_hi#4 (byte*) init_font_hex::proto_hi#6
Identical Phi Values (byte) init_font_hex::c#5 (byte) init_font_hex::c#6
Identical Phi Values (signed word) atan2_16::x#17 (signed word) atan2_16::x#0
Identical Phi Values (signed word) atan2_16::y#19 (signed word) atan2_16::y#0
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [3] (byte) init_font_hex::idx#1 ← ++ (const byte) init_font_hex::idx#0
Constant right-side identified [29] (byte~) atan2_16::$16 ← (const byte) CORDIC_ITERATIONS_16#0 - (byte) 1
Constant right-side identified [94] (byte*~) main::$2 ← (const byte*) COLS#0 + (word)(number) $c*(number) $28

View File

@ -19,7 +19,7 @@ main::@5: scope:[main] from main::toD0181
[8] call init_angle_screen
to:main::@1
main::@1: scope:[main] from main::@3 main::@4 main::@5
[9] (byte*) main::clear_char#5 ← phi( main::@5/(const byte*) CHARSET#0 main::@4/(byte*) main::clear_char#1 )
[9] (byte*) main::clear_char#5 ← phi( main::@5/(const byte*) CHARSET#0 main::@3/(byte*) main::clear_char#5 main::@4/(byte*) main::clear_char#1 )
to:main::@2
main::@2: scope:[main] from main::@1 main::@2
[10] if(*((const byte*) RASTER#0)!=(byte) $ff) goto main::@2

View File

@ -1221,22 +1221,6 @@ Alias (signed word) atan2_16::x#11 = (signed word) atan2_16::x#14 (signed word)
Alias (signed word) atan2_16::y#10 = (signed word) atan2_16::y#16 (signed word) atan2_16::y#8
Alias (signed word) atan2_16::y#4 = (signed word) atan2_16::y#5
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte*) init_font_hex::proto_hi#2
Self Phi Eliminated (byte*) init_font_hex::proto_lo#2
Self Phi Eliminated (byte*) init_font_hex::charset#3
Self Phi Eliminated (byte) init_font_hex::c1#2
Self Phi Eliminated (byte) init_font_hex::c#2
Self Phi Eliminated (signed word) atan2_16::yi#10
Self Phi Eliminated (signed word) atan2_16::xi#10
Self Phi Eliminated (byte) atan2_16::i#10
Self Phi Eliminated (word) atan2_16::angle#14
Self Phi Eliminated (signed word) atan2_16::x#11
Self Phi Eliminated (signed word) atan2_16::y#10
Self Phi Eliminated (byte*) main::clear_char#2
Self Phi Eliminated (byte) init_angle_screen::y#2
Self Phi Eliminated (byte*) init_angle_screen::screen_topline#2
Self Phi Eliminated (byte*) init_angle_screen::screen_bottomline#2
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte*) init_font_hex::charset#6 (byte*) init_font_hex::charset#1
Identical Phi Values (byte*) init_font_hex::proto_hi#2 (byte*) init_font_hex::proto_hi#4
Identical Phi Values (byte*) init_font_hex::proto_lo#2 (byte*) init_font_hex::proto_lo#4
@ -1257,6 +1241,10 @@ Identical Phi Values (byte) init_angle_screen::y#2 (byte) init_angle_screen::y#4
Identical Phi Values (byte*) init_angle_screen::screen_topline#2 (byte*) init_angle_screen::screen_topline#5
Identical Phi Values (byte*) init_angle_screen::screen_bottomline#2 (byte*) init_angle_screen::screen_bottomline#5
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values (byte*) init_font_hex::proto_hi#4 (byte*) init_font_hex::proto_hi#6
Identical Phi Values (byte) init_font_hex::c#5 (byte) init_font_hex::c#6
Identical Phi Values (signed word) atan2_16::x#17 (signed word) atan2_16::x#0
Identical Phi Values (signed word) atan2_16::y#19 (signed word) atan2_16::y#0
Identical Phi Values (signed word) atan2_16::x#4 (signed word) atan2_16::x#17
Identical Phi Values (signed word) atan2_16::y#4 (signed word) atan2_16::y#19
Successful SSA optimization Pass2IdenticalPhiElimination
@ -1266,12 +1254,12 @@ Simple Condition (bool~) init_font_hex::$5 [34] if((byte) init_font_hex::c#1!=ra
Simple Condition (bool~) atan2_16::$0 [41] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1
Simple Condition (bool~) atan2_16::$5 [50] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4
Simple Condition (bool~) atan2_16::$18 [64] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@16
Simple Condition (bool~) atan2_16::$11 [73] if((signed word) atan2_16::x#17>=(signed byte) 0) goto atan2_16::@7
Simple Condition (bool~) atan2_16::$11 [73] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7
Simple Condition (bool~) atan2_16::$19 [76] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@19
Simple Condition (bool~) atan2_16::$20 [84] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@25
Simple Condition (bool~) atan2_16::$21 [87] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@26
Simple Condition (bool~) atan2_16::$22 [104] if((byte) atan2_16::i#1!=rangelast(0,atan2_16::$16)) goto atan2_16::@15
Simple Condition (bool~) atan2_16::$14 [108] if((signed word) atan2_16::y#19>=(signed byte) 0) goto atan2_16::@8
Simple Condition (bool~) atan2_16::$14 [108] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8
Simple Condition (bool~) main::$3 [151] if(*((byte*) RASTER#0)!=(byte) $ff) goto main::@4
Simple Condition (bool~) main::$6 [156] if((byte*) main::clear_char#5>=(byte*~) main::$4) goto main::@1
Simple Condition (bool~) init_angle_screen::$15 [202] if((byte) init_angle_screen::x#1<=(byte) $13) goto init_angle_screen::@2
@ -1317,7 +1305,7 @@ Resolved ranged next value [17] init_font_hex::i#1 ← ++ init_font_hex::i#2 to
Resolved ranged comparison value [19] if(init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3 to (number) 5
Resolved ranged next value [27] init_font_hex::c1#1 ← ++ init_font_hex::c1#4 to ++
Resolved ranged comparison value [29] if(init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 to (number) $10
Resolved ranged next value [32] init_font_hex::c#1 ← ++ init_font_hex::c#5 to ++
Resolved ranged next value [32] init_font_hex::c#1 ← ++ init_font_hex::c#6 to ++
Resolved ranged comparison value [34] if(init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 to (number) $10
Resolved ranged next value [206] init_angle_screen::y#1 ← ++ init_angle_screen::y#4 to ++
Resolved ranged comparison value [208] if(init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 to (number) $d
@ -1350,17 +1338,6 @@ Finalized unsigned number type (byte) $10
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) $d
Successful SSA optimization PassNFinalizeNumberTypeConversions
Self Phi Eliminated (byte*) init_font_hex::proto_hi#4
Self Phi Eliminated (byte) init_font_hex::c#5
Self Phi Eliminated (signed word) atan2_16::x#17
Self Phi Eliminated (signed word) atan2_16::y#19
Self Phi Eliminated (byte*) main::clear_char#5
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte*) init_font_hex::proto_hi#4 (byte*) init_font_hex::proto_hi#6
Identical Phi Values (byte) init_font_hex::c#5 (byte) init_font_hex::c#6
Identical Phi Values (signed word) atan2_16::x#17 (signed word) atan2_16::x#0
Identical Phi Values (signed word) atan2_16::y#19 (signed word) atan2_16::y#0
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [3] (byte) init_font_hex::idx#1 ← ++ (const byte) init_font_hex::idx#0
Constant right-side identified [29] (byte~) atan2_16::$16 ← (const byte) CORDIC_ITERATIONS_16#0 - (byte) 1
Constant right-side identified [76] (byte*~) main::$4 ← (const byte*) CHARSET#0 + (word) $800
@ -1475,6 +1452,7 @@ Added new block during phi lifting atan2_16::@36(between atan2_16::@27 and atan2
Added new block during phi lifting atan2_16::@37(between atan2_16::@20 and atan2_16::@25)
Added new block during phi lifting atan2_16::@38(between atan2_16::@17 and atan2_16::@7)
Added new block during phi lifting atan2_16::@39(between atan2_16::@7 and atan2_16::@8)
Added new block during phi lifting main::@14(between main::@5 and main::@1)
Added new block during phi lifting init_angle_screen::@6(between init_angle_screen::@3 and init_angle_screen::@1)
Added new block during phi lifting init_angle_screen::@7(between init_angle_screen::@5 and init_angle_screen::@2)
Adding NOP phi() at start of @begin
@ -1494,56 +1472,57 @@ Adding NOP phi() at start of init_font_hex
CALL GRAPH
Calls in [] to main:5
Calls in [main] to init_font_hex:9 init_angle_screen:14
Calls in [init_angle_screen] to atan2_16:32
Calls in [init_angle_screen] to atan2_16:33
Created 31 initial phi equivalence classes
Coalesced [21] main::clear_char#6 ← main::clear_char#1
Coalesced [52] init_angle_screen::y#6 ← init_angle_screen::y#1
Coalesced [53] init_angle_screen::screen_topline#6 ← init_angle_screen::screen_topline#1
Coalesced [54] init_angle_screen::screen_bottomline#6 ← init_angle_screen::screen_bottomline#1
Coalesced [55] init_angle_screen::x#4 ← init_angle_screen::x#1
Coalesced [56] init_angle_screen::xb#4 ← init_angle_screen::xb#1
Coalesced [59] atan2_16::yi#17 ← atan2_16::$2
Coalesced [63] atan2_16::xi#14 ← atan2_16::$7
Coalesced [65] atan2_16::yi#19 ← atan2_16::yi#0
Coalesced [66] atan2_16::xi#16 ← atan2_16::xi#0
Coalesced [69] atan2_16::angle#22 ← atan2_16::angle#12
Coalesced [74] atan2_16::angle#27 ← atan2_16::angle#4
Coalesced [78] atan2_16::return#5 ← atan2_16::angle#5
Coalesced [81] atan2_16::return#6 ← atan2_16::angle#11
Coalesced [82] atan2_16::angle#26 ← atan2_16::angle#1
Not coalescing [83] atan2_16::shift#5 ← atan2_16::i#2
Not coalescing [84] atan2_16::xd#10 ← atan2_16::xi#3
Not coalescing [85] atan2_16::yd#10 ← atan2_16::yi#3
Coalesced [91] atan2_16::yd#13 ← atan2_16::yd#2
Coalesced [92] atan2_16::xd#13 ← atan2_16::xd#2
Coalesced [99] atan2_16::yi#21 ← atan2_16::yi#2
Coalesced [100] atan2_16::angle#25 ← atan2_16::angle#3
Coalesced [101] atan2_16::xi#18 ← atan2_16::xi#2
Coalesced [105] atan2_16::yi#18 ← atan2_16::yi#8
Coalesced [106] atan2_16::xi#15 ← atan2_16::xi#8
Coalesced [107] atan2_16::i#12 ← atan2_16::i#1
Coalesced [108] atan2_16::angle#21 ← atan2_16::angle#13
Coalesced (already) [109] atan2_16::angle#23 ← atan2_16::angle#13
Coalesced [114] atan2_16::yi#20 ← atan2_16::yi#1
Coalesced [115] atan2_16::angle#24 ← atan2_16::angle#2
Coalesced [116] atan2_16::xi#17 ← atan2_16::xi#1
Coalesced [117] atan2_16::yd#12 ← atan2_16::yd#3
Coalesced [118] atan2_16::xd#12 ← atan2_16::xd#3
Coalesced [122] atan2_16::shift#6 ← atan2_16::shift#1
Coalesced [123] atan2_16::xd#11 ← atan2_16::xd#1
Coalesced [124] atan2_16::yd#11 ← atan2_16::yd#1
Not coalescing [125] atan2_16::xi#13 ← atan2_16::x#0
Not coalescing [126] atan2_16::yi#16 ← atan2_16::y#0
Coalesced [129] init_font_hex::charset#9 ← init_font_hex::charset#5
Coalesced [151] init_font_hex::charset#8 ← init_font_hex::charset#0
Coalesced [152] init_font_hex::proto_hi#7 ← init_font_hex::proto_hi#1
Coalesced [153] init_font_hex::c#7 ← init_font_hex::c#1
Coalesced (already) [154] init_font_hex::charset#10 ← init_font_hex::charset#0
Coalesced [155] init_font_hex::proto_lo#5 ← init_font_hex::proto_lo#1
Coalesced [156] init_font_hex::c1#5 ← init_font_hex::c1#1
Coalesced [157] init_font_hex::i#3 ← init_font_hex::i#1
Coalesced [158] init_font_hex::idx#7 ← init_font_hex::idx#2
Coalesced [21] main::clear_char#7 ← main::clear_char#1
Coalesced (already) [22] main::clear_char#6 ← main::clear_char#5
Coalesced [53] init_angle_screen::y#6 ← init_angle_screen::y#1
Coalesced [54] init_angle_screen::screen_topline#6 ← init_angle_screen::screen_topline#1
Coalesced [55] init_angle_screen::screen_bottomline#6 ← init_angle_screen::screen_bottomline#1
Coalesced [56] init_angle_screen::x#4 ← init_angle_screen::x#1
Coalesced [57] init_angle_screen::xb#4 ← init_angle_screen::xb#1
Coalesced [60] atan2_16::yi#17 ← atan2_16::$2
Coalesced [64] atan2_16::xi#14 ← atan2_16::$7
Coalesced [66] atan2_16::yi#19 ← atan2_16::yi#0
Coalesced [67] atan2_16::xi#16 ← atan2_16::xi#0
Coalesced [70] atan2_16::angle#22 ← atan2_16::angle#12
Coalesced [75] atan2_16::angle#27 ← atan2_16::angle#4
Coalesced [79] atan2_16::return#5 ← atan2_16::angle#5
Coalesced [82] atan2_16::return#6 ← atan2_16::angle#11
Coalesced [83] atan2_16::angle#26 ← atan2_16::angle#1
Not coalescing [84] atan2_16::shift#5 ← atan2_16::i#2
Not coalescing [85] atan2_16::xd#10 ← atan2_16::xi#3
Not coalescing [86] atan2_16::yd#10 ← atan2_16::yi#3
Coalesced [92] atan2_16::yd#13 ← atan2_16::yd#2
Coalesced [93] atan2_16::xd#13 ← atan2_16::xd#2
Coalesced [100] atan2_16::yi#21 ← atan2_16::yi#2
Coalesced [101] atan2_16::angle#25 ← atan2_16::angle#3
Coalesced [102] atan2_16::xi#18 ← atan2_16::xi#2
Coalesced [106] atan2_16::yi#18 ← atan2_16::yi#8
Coalesced [107] atan2_16::xi#15 ← atan2_16::xi#8
Coalesced [108] atan2_16::i#12 ← atan2_16::i#1
Coalesced [109] atan2_16::angle#21 ← atan2_16::angle#13
Coalesced (already) [110] atan2_16::angle#23 ← atan2_16::angle#13
Coalesced [115] atan2_16::yi#20 ← atan2_16::yi#1
Coalesced [116] atan2_16::angle#24 ← atan2_16::angle#2
Coalesced [117] atan2_16::xi#17 ← atan2_16::xi#1
Coalesced [118] atan2_16::yd#12 ← atan2_16::yd#3
Coalesced [119] atan2_16::xd#12 ← atan2_16::xd#3
Coalesced [123] atan2_16::shift#6 ← atan2_16::shift#1
Coalesced [124] atan2_16::xd#11 ← atan2_16::xd#1
Coalesced [125] atan2_16::yd#11 ← atan2_16::yd#1
Not coalescing [126] atan2_16::xi#13 ← atan2_16::x#0
Not coalescing [127] atan2_16::yi#16 ← atan2_16::y#0
Coalesced [130] init_font_hex::charset#9 ← init_font_hex::charset#5
Coalesced [152] init_font_hex::charset#8 ← init_font_hex::charset#0
Coalesced [153] init_font_hex::proto_hi#7 ← init_font_hex::proto_hi#1
Coalesced [154] init_font_hex::c#7 ← init_font_hex::c#1
Coalesced (already) [155] init_font_hex::charset#10 ← init_font_hex::charset#0
Coalesced [156] init_font_hex::proto_lo#5 ← init_font_hex::proto_lo#1
Coalesced [157] init_font_hex::c1#5 ← init_font_hex::c1#1
Coalesced [158] init_font_hex::i#3 ← init_font_hex::i#1
Coalesced [159] init_font_hex::idx#7 ← init_font_hex::idx#2
Coalesced down to 23 phi equivalence classes
Culled Empty Block (label) @1
Culled Empty Block (label) @3
@ -1552,6 +1531,7 @@ Culled Empty Block (label) @10
Culled Empty Block (label) main::@12
Culled Empty Block (label) main::toD0181_@return
Culled Empty Block (label) main::@13
Culled Empty Block (label) main::@14
Culled Empty Block (label) init_angle_screen::@6
Culled Empty Block (label) init_angle_screen::@7
Culled Empty Block (label) atan2_16::@35
@ -1612,7 +1592,7 @@ main::@5: scope:[main] from main::toD0181
[8] call init_angle_screen
to:main::@1
main::@1: scope:[main] from main::@3 main::@4 main::@5
[9] (byte*) main::clear_char#5 ← phi( main::@5/(const byte*) CHARSET#0 main::@4/(byte*) main::clear_char#1 )
[9] (byte*) main::clear_char#5 ← phi( main::@5/(const byte*) CHARSET#0 main::@3/(byte*) main::clear_char#5 main::@4/(byte*) main::clear_char#1 )
to:main::@2
main::@2: scope:[main] from main::@1 main::@2
[10] if(*((const byte*) RASTER#0)!=(byte) $ff) goto main::@2
@ -1935,7 +1915,7 @@ VARIABLE REGISTER WEIGHTS
(void()) main()
(byte*) main::clear_char
(byte*) main::clear_char#1 22.0
(byte*) main::clear_char#5 33.5
(byte*) main::clear_char#5 84.0
(word~) main::toD0181_$0
(number~) main::toD0181_$1
(number~) main::toD0181_$2
@ -2137,8 +2117,10 @@ main: {
lda #>CHARSET
sta clear_char+1
jmp b1
// [9] phi from main::@3 to main::@1 [phi:main::@3->main::@1]
// [9] phi from main::@3 main::@4 to main::@1 [phi:main::@3/main::@4->main::@1]
b1_from_b3:
b1_from_b4:
// [9] phi (byte*) main::clear_char#5 = (byte*) main::clear_char#5 [phi:main::@3/main::@4->main::@1#0] -- register_copy
jmp b1
// main::@1
b1:
@ -2173,10 +2155,7 @@ main: {
bne !+
inc clear_char+1
!:
// [9] phi from main::@4 to main::@1 [phi:main::@4->main::@1]
b1_from_b4:
// [9] phi (byte*) main::clear_char#5 = (byte*) main::clear_char#1 [phi:main::@4->main::@1#0] -- register_copy
jmp b1
jmp b1_from_b4
}
// init_angle_screen
// Populates 1000 bytes (a screen) with values representing the angle to the center.
@ -3060,39 +3039,39 @@ REGISTER UPLIFT SCOPES
Uplift Scope [atan2_16] 28,670.58: zp ZP_BYTE:20 [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] 20,608: zp ZP_WORD:21 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] 17,338.67: zp ZP_WORD:23 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] 7,533.33: zp ZP_WORD:16 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] 2,698.28: zp ZP_WORD:11 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] 2,283.07: zp ZP_WORD:13 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] 2,002: zp ZP_BYTE:56 [ atan2_16::$24 ] 2,002: zp ZP_BYTE:57 [ atan2_16::$23 ] 1,710.04: zp ZP_BYTE:15 [ atan2_16::i#2 atan2_16::i#1 ] 202: zp ZP_WORD:46 [ atan2_16::return#2 ] 50: zp ZP_WORD:18 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] 2.87: zp ZP_WORD:42 [ atan2_16::x#0 ] 2.72: zp ZP_WORD:44 [ atan2_16::y#0 ]
Uplift Scope [init_font_hex] 2,168.83: zp ZP_BYTE:33 [ init_font_hex::i#2 init_font_hex::i#1 ] 2,002: zp ZP_BYTE:59 [ init_font_hex::$1 ] 2,002: zp ZP_BYTE:60 [ init_font_hex::$2 ] 1,151.6: zp ZP_BYTE:34 [ init_font_hex::idx#5 init_font_hex::idx#2 ] 1,001: zp ZP_BYTE:58 [ init_font_hex::$0 ] 202: zp ZP_BYTE:61 [ init_font_hex::idx#3 ] 165.86: zp ZP_WORD:28 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] 164.97: zp ZP_BYTE:32 [ init_font_hex::c1#4 init_font_hex::c1#1 ] 143.04: zp ZP_WORD:30 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] 64.17: zp ZP_WORD:25 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] 17.66: zp ZP_BYTE:27 [ init_font_hex::c#6 init_font_hex::c#1 ]
Uplift Scope [init_angle_screen] 202: zp ZP_BYTE:35 [ init_angle_screen::$2 ] 202: zp ZP_BYTE:36 [ init_angle_screen::$3 ] 202: zp ZP_BYTE:39 [ init_angle_screen::$6 ] 202: zp ZP_WORD:48 [ init_angle_screen::angle_w#0 ] 202: zp ZP_WORD:50 [ init_angle_screen::$10 ] 202: zp ZP_BYTE:53 [ init_angle_screen::$12 ] 202: zp ZP_BYTE:54 [ init_angle_screen::$13 ] 202: zp ZP_BYTE:55 [ init_angle_screen::$14 ] 126.25: zp ZP_BYTE:9 [ init_angle_screen::x#2 init_angle_screen::x#1 ] 120.24: zp ZP_BYTE:10 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] 72.14: zp ZP_BYTE:52 [ init_angle_screen::ang_w#0 ] 50.5: zp ZP_WORD:40 [ init_angle_screen::yw#0 ] 33.67: zp ZP_WORD:37 [ init_angle_screen::xw#0 ] 21.23: zp ZP_BYTE:4 [ init_angle_screen::y#4 init_angle_screen::y#1 ] 16.29: zp ZP_WORD:7 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#1 ] 14.83: zp ZP_WORD:5 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#1 ]
Uplift Scope [main] 55.5: zp ZP_WORD:2 [ main::clear_char#5 main::clear_char#1 ]
Uplift Scope [main] 106: zp ZP_WORD:2 [ main::clear_char#5 main::clear_char#1 ]
Uplift Scope []
Uplifting [atan2_16] best 1174941 combination reg byte y [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] zp ZP_WORD:21 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] zp ZP_WORD:23 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] zp ZP_WORD:16 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] zp ZP_WORD:11 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] zp ZP_WORD:13 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] reg byte a [ atan2_16::$24 ] reg byte a [ atan2_16::$23 ] reg byte x [ atan2_16::i#2 atan2_16::i#1 ] zp ZP_WORD:46 [ atan2_16::return#2 ] zp ZP_WORD:18 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] zp ZP_WORD:42 [ atan2_16::x#0 ] zp ZP_WORD:44 [ atan2_16::y#0 ]
Uplifting [atan2_16] best 1174671 combination reg byte y [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] zp ZP_WORD:21 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] zp ZP_WORD:23 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] zp ZP_WORD:16 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] zp ZP_WORD:11 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] zp ZP_WORD:13 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] reg byte a [ atan2_16::$24 ] reg byte a [ atan2_16::$23 ] reg byte x [ atan2_16::i#2 atan2_16::i#1 ] zp ZP_WORD:46 [ atan2_16::return#2 ] zp ZP_WORD:18 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] zp ZP_WORD:42 [ atan2_16::x#0 ] zp ZP_WORD:44 [ atan2_16::y#0 ]
Limited combination testing to 100 combinations of 144 possible.
Uplifting [init_font_hex] best 1155941 combination reg byte x [ init_font_hex::i#2 init_font_hex::i#1 ] reg byte a [ init_font_hex::$1 ] reg byte a [ init_font_hex::$2 ] zp ZP_BYTE:34 [ init_font_hex::idx#5 init_font_hex::idx#2 ] zp ZP_BYTE:58 [ init_font_hex::$0 ] zp ZP_BYTE:61 [ init_font_hex::idx#3 ] zp ZP_WORD:28 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] zp ZP_BYTE:32 [ init_font_hex::c1#4 init_font_hex::c1#1 ] zp ZP_WORD:30 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] zp ZP_WORD:25 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] zp ZP_BYTE:27 [ init_font_hex::c#6 init_font_hex::c#1 ]
Uplifting [init_font_hex] best 1155671 combination reg byte x [ init_font_hex::i#2 init_font_hex::i#1 ] reg byte a [ init_font_hex::$1 ] reg byte a [ init_font_hex::$2 ] zp ZP_BYTE:34 [ init_font_hex::idx#5 init_font_hex::idx#2 ] zp ZP_BYTE:58 [ init_font_hex::$0 ] zp ZP_BYTE:61 [ init_font_hex::idx#3 ] zp ZP_WORD:28 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] zp ZP_BYTE:32 [ init_font_hex::c1#4 init_font_hex::c1#1 ] zp ZP_WORD:30 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] zp ZP_WORD:25 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] zp ZP_BYTE:27 [ init_font_hex::c#6 init_font_hex::c#1 ]
Limited combination testing to 100 combinations of 6912 possible.
Uplifting [init_angle_screen] best 1153941 combination reg byte a [ init_angle_screen::$2 ] reg byte a [ init_angle_screen::$3 ] reg byte a [ init_angle_screen::$6 ] zp ZP_WORD:48 [ init_angle_screen::angle_w#0 ] zp ZP_WORD:50 [ init_angle_screen::$10 ] reg byte a [ init_angle_screen::$12 ] zp ZP_BYTE:54 [ init_angle_screen::$13 ] zp ZP_BYTE:55 [ init_angle_screen::$14 ] zp ZP_BYTE:9 [ init_angle_screen::x#2 init_angle_screen::x#1 ] zp ZP_BYTE:10 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] zp ZP_BYTE:52 [ init_angle_screen::ang_w#0 ] zp ZP_WORD:40 [ init_angle_screen::yw#0 ] zp ZP_WORD:37 [ init_angle_screen::xw#0 ] zp ZP_BYTE:4 [ init_angle_screen::y#4 init_angle_screen::y#1 ] zp ZP_WORD:7 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#1 ] zp ZP_WORD:5 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#1 ]
Uplifting [init_angle_screen] best 1153671 combination reg byte a [ init_angle_screen::$2 ] reg byte a [ init_angle_screen::$3 ] reg byte a [ init_angle_screen::$6 ] zp ZP_WORD:48 [ init_angle_screen::angle_w#0 ] zp ZP_WORD:50 [ init_angle_screen::$10 ] reg byte a [ init_angle_screen::$12 ] zp ZP_BYTE:54 [ init_angle_screen::$13 ] zp ZP_BYTE:55 [ init_angle_screen::$14 ] zp ZP_BYTE:9 [ init_angle_screen::x#2 init_angle_screen::x#1 ] zp ZP_BYTE:10 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] zp ZP_BYTE:52 [ init_angle_screen::ang_w#0 ] zp ZP_WORD:40 [ init_angle_screen::yw#0 ] zp ZP_WORD:37 [ init_angle_screen::xw#0 ] zp ZP_BYTE:4 [ init_angle_screen::y#4 init_angle_screen::y#1 ] zp ZP_WORD:7 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#1 ] zp ZP_WORD:5 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#1 ]
Limited combination testing to 100 combinations of 65536 possible.
Uplifting [main] best 1153941 combination zp ZP_WORD:2 [ main::clear_char#5 main::clear_char#1 ]
Uplifting [] best 1153941 combination
Uplifting [main] best 1153671 combination zp ZP_WORD:2 [ main::clear_char#5 main::clear_char#1 ]
Uplifting [] best 1153671 combination
Attempting to uplift remaining variables inzp ZP_BYTE:34 [ init_font_hex::idx#5 init_font_hex::idx#2 ]
Uplifting [init_font_hex] best 1153941 combination zp ZP_BYTE:34 [ init_font_hex::idx#5 init_font_hex::idx#2 ]
Uplifting [init_font_hex] best 1153671 combination zp ZP_BYTE:34 [ init_font_hex::idx#5 init_font_hex::idx#2 ]
Attempting to uplift remaining variables inzp ZP_BYTE:58 [ init_font_hex::$0 ]
Uplifting [init_font_hex] best 1153941 combination zp ZP_BYTE:58 [ init_font_hex::$0 ]
Uplifting [init_font_hex] best 1153671 combination zp ZP_BYTE:58 [ init_font_hex::$0 ]
Attempting to uplift remaining variables inzp ZP_BYTE:54 [ init_angle_screen::$13 ]
Uplifting [init_angle_screen] best 1153341 combination reg byte a [ init_angle_screen::$13 ]
Uplifting [init_angle_screen] best 1153071 combination reg byte a [ init_angle_screen::$13 ]
Attempting to uplift remaining variables inzp ZP_BYTE:55 [ init_angle_screen::$14 ]
Uplifting [init_angle_screen] best 1152741 combination reg byte a [ init_angle_screen::$14 ]
Uplifting [init_angle_screen] best 1152471 combination reg byte a [ init_angle_screen::$14 ]
Attempting to uplift remaining variables inzp ZP_BYTE:61 [ init_font_hex::idx#3 ]
Uplifting [init_font_hex] best 1152141 combination reg byte y [ init_font_hex::idx#3 ]
Uplifting [init_font_hex] best 1151871 combination reg byte y [ init_font_hex::idx#3 ]
Attempting to uplift remaining variables inzp ZP_BYTE:32 [ init_font_hex::c1#4 init_font_hex::c1#1 ]
Uplifting [init_font_hex] best 1152141 combination zp ZP_BYTE:32 [ init_font_hex::c1#4 init_font_hex::c1#1 ]
Uplifting [init_font_hex] best 1151871 combination zp ZP_BYTE:32 [ init_font_hex::c1#4 init_font_hex::c1#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:9 [ init_angle_screen::x#2 init_angle_screen::x#1 ]
Uplifting [init_angle_screen] best 1152141 combination zp ZP_BYTE:9 [ init_angle_screen::x#2 init_angle_screen::x#1 ]
Uplifting [init_angle_screen] best 1151871 combination zp ZP_BYTE:9 [ init_angle_screen::x#2 init_angle_screen::x#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:10 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ]
Uplifting [init_angle_screen] best 1152141 combination zp ZP_BYTE:10 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ]
Uplifting [init_angle_screen] best 1151871 combination zp ZP_BYTE:10 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:52 [ init_angle_screen::ang_w#0 ]
Uplifting [init_angle_screen] best 1152141 combination zp ZP_BYTE:52 [ init_angle_screen::ang_w#0 ]
Uplifting [init_angle_screen] best 1151871 combination zp ZP_BYTE:52 [ init_angle_screen::ang_w#0 ]
Attempting to uplift remaining variables inzp ZP_BYTE:4 [ init_angle_screen::y#4 init_angle_screen::y#1 ]
Uplifting [init_angle_screen] best 1152141 combination zp ZP_BYTE:4 [ init_angle_screen::y#4 init_angle_screen::y#1 ]
Uplifting [init_angle_screen] best 1151871 combination zp ZP_BYTE:4 [ init_angle_screen::y#4 init_angle_screen::y#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:27 [ init_font_hex::c#6 init_font_hex::c#1 ]
Uplifting [init_font_hex] best 1152141 combination zp ZP_BYTE:27 [ init_font_hex::c#6 init_font_hex::c#1 ]
Uplifting [init_font_hex] best 1151871 combination zp ZP_BYTE:27 [ init_font_hex::c#6 init_font_hex::c#1 ]
Coalescing zero page register with common assignment [ zp ZP_WORD:16 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] ] with [ zp ZP_WORD:18 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] ] - score: 1
Coalescing zero page register with common assignment [ zp ZP_WORD:37 [ init_angle_screen::xw#0 ] ] with [ zp ZP_WORD:42 [ atan2_16::x#0 ] ] - score: 1
Coalescing zero page register with common assignment [ zp ZP_WORD:40 [ init_angle_screen::yw#0 ] ] with [ zp ZP_WORD:44 [ atan2_16::y#0 ] ] - score: 1
@ -3175,8 +3154,10 @@ main: {
lda #>CHARSET
sta clear_char+1
jmp b1
// [9] phi from main::@3 to main::@1 [phi:main::@3->main::@1]
// [9] phi from main::@3 main::@4 to main::@1 [phi:main::@3/main::@4->main::@1]
b1_from_b3:
b1_from_b4:
// [9] phi (byte*) main::clear_char#5 = (byte*) main::clear_char#5 [phi:main::@3/main::@4->main::@1#0] -- register_copy
jmp b1
// main::@1
b1:
@ -3211,10 +3192,7 @@ main: {
bne !+
inc clear_char+1
!:
// [9] phi from main::@4 to main::@1 [phi:main::@4->main::@1]
b1_from_b4:
// [9] phi (byte*) main::clear_char#5 = (byte*) main::clear_char#1 [phi:main::@4->main::@1#0] -- register_copy
jmp b1
jmp b1_from_b4
}
// init_angle_screen
// Populates 1000 bytes (a screen) with values representing the angle to the center.
@ -3906,7 +3884,7 @@ Succesful ASM optimization Pass5UnnecesaryLoadElimination
Replacing label b1 with b2
Replacing label b1_from_b3 with b2
Replacing label b1_from_b3 with b2
Replacing label b1 with b2
Replacing label b1_from_b4 with b2
Replacing label b2_from_b4 with b2
Replacing label b1_from_b3 with b1
Replacing label b7_from_b12 with b7
@ -3927,6 +3905,7 @@ Removing instruction bend_from_b1:
Removing instruction toD0181_from_main:
Removing instruction toD0181:
Removing instruction b1_from_b3:
Removing instruction b1_from_b4:
Removing instruction b1:
Removing instruction b1_from_b3:
Removing instruction b2_from_b1:
@ -3961,7 +3940,6 @@ Removing instruction init_angle_screen_from_b5:
Removing instruction b1_from_b5:
Removing instruction b3:
Removing instruction b4:
Removing instruction b1_from_b4:
Removing instruction b1_from_init_angle_screen:
Removing instruction b4:
Removing instruction b3:
@ -4171,7 +4149,7 @@ FINAL SYMBOL TABLE
(label) main::@5
(byte*) main::clear_char
(byte*) main::clear_char#1 clear_char zp ZP_WORD:2 22.0
(byte*) main::clear_char#5 clear_char zp ZP_WORD:2 33.5
(byte*) main::clear_char#5 clear_char zp ZP_WORD:2 84.0
(label) main::toD0181
(word~) main::toD0181_$0
(number~) main::toD0181_$1
@ -4225,7 +4203,7 @@ reg byte y [ init_font_hex::idx#3 ]
FINAL ASSEMBLER
Score: 1056679
Score: 1056409
// File Comments
// Find atan2(x, y) using the CORDIC method
@ -4273,7 +4251,8 @@ main: {
sta clear_char
lda #>CHARSET
sta clear_char+1
// [9] phi from main::@3 to main::@1 [phi:main::@3->main::@1]
// [9] phi from main::@3 main::@4 to main::@1 [phi:main::@3/main::@4->main::@1]
// [9] phi (byte*) main::clear_char#5 = (byte*) main::clear_char#5 [phi:main::@3/main::@4->main::@1#0] -- register_copy
// main::@1
// main::@2
b2:
@ -4305,8 +4284,6 @@ main: {
bne !+
inc clear_char+1
!:
// [9] phi from main::@4 to main::@1 [phi:main::@4->main::@1]
// [9] phi (byte*) main::clear_char#5 = (byte*) main::clear_char#1 [phi:main::@4->main::@1#0] -- register_copy
jmp b2
}
// init_angle_screen

View File

@ -172,7 +172,7 @@
(label) main::@5
(byte*) main::clear_char
(byte*) main::clear_char#1 clear_char zp ZP_WORD:2 22.0
(byte*) main::clear_char#5 clear_char zp ZP_WORD:2 33.5
(byte*) main::clear_char#5 clear_char zp ZP_WORD:2 84.0
(label) main::toD0181
(word~) main::toD0181_$0
(number~) main::toD0181_$1

View File

@ -892,16 +892,6 @@ Successful SSA optimization Pass2AliasElimination
Alias (signed byte) atan2_8::x#11 = (signed byte) atan2_8::x#4
Alias (signed byte) atan2_8::y#10 = (signed byte) atan2_8::y#4
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte*) init_font_hex::proto_hi#2
Self Phi Eliminated (byte*) init_font_hex::proto_lo#2
Self Phi Eliminated (byte*) init_font_hex::charset#3
Self Phi Eliminated (byte) init_font_hex::c1#2
Self Phi Eliminated (byte) init_font_hex::c#2
Self Phi Eliminated (signed byte) atan2_8::x#11
Self Phi Eliminated (signed byte) atan2_8::y#10
Self Phi Eliminated (signed byte) main::y#2
Self Phi Eliminated (byte*) main::col00#1
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte*) init_font_hex::charset#6 (byte*) init_font_hex::charset#1
Identical Phi Values (byte*) init_font_hex::proto_hi#2 (byte*) init_font_hex::proto_hi#4
Identical Phi Values (byte*) init_font_hex::proto_lo#2 (byte*) init_font_hex::proto_lo#4
@ -915,6 +905,9 @@ Identical Phi Values (signed byte) atan2_8::y#10 (signed byte) atan2_8::y#1
Identical Phi Values (signed byte) main::y#2 (signed byte) main::y#4
Identical Phi Values (byte*) main::col00#1 (byte*) main::col00#0
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values (byte*) init_font_hex::proto_hi#4 (byte*) init_font_hex::proto_hi#6
Identical Phi Values (byte) init_font_hex::c#5 (byte) init_font_hex::c#6
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) init_font_hex::$3 [19] if((byte) init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3
Simple Condition (bool~) init_font_hex::$4 [29] if((byte) init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2
Simple Condition (bool~) init_font_hex::$5 [34] if((byte) init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1
@ -965,7 +958,7 @@ Resolved ranged next value [17] init_font_hex::i#1 ← ++ init_font_hex::i#2 to
Resolved ranged comparison value [19] if(init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3 to (number) 5
Resolved ranged next value [27] init_font_hex::c1#1 ← ++ init_font_hex::c1#4 to ++
Resolved ranged comparison value [29] if(init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 to (number) $10
Resolved ranged next value [32] init_font_hex::c#1 ← ++ init_font_hex::c#5 to ++
Resolved ranged next value [32] init_font_hex::c#1 ← ++ init_font_hex::c#6 to ++
Resolved ranged comparison value [34] if(init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 to (number) $10
Resolved ranged next value [143] main::x#1 ← ++ main::x#2 to ++
Resolved ranged comparison value [145] if(main::x#1!=rangelast(-$13,$14)) goto main::@2 to (number) $15
@ -999,12 +992,6 @@ Finalized unsigned number type (byte) $10
Finalized signed number type (signed byte) $15
Finalized signed number type (signed byte) $d
Successful SSA optimization PassNFinalizeNumberTypeConversions
Self Phi Eliminated (byte*) init_font_hex::proto_hi#4
Self Phi Eliminated (byte) init_font_hex::c#5
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte*) init_font_hex::proto_hi#4 (byte*) init_font_hex::proto_hi#6
Identical Phi Values (byte) init_font_hex::c#5 (byte) init_font_hex::c#6
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [3] (byte) init_font_hex::idx#1 ← ++ (const byte) init_font_hex::idx#0
Constant right-side identified [29] (byte~) atan2_8::$17 ← (const byte) CORDIC_ITERATIONS_8#0 - (byte) 1
Constant right-side identified [77] (byte*~) main::$2 ← (const byte*) COLS#0 + (word)(number) $c*(number) $28

View File

@ -217,11 +217,6 @@ Alias (byte*) main::screen#1 = (byte*) main::screen#4
Alias (byte) main::x#2 = (byte) main::x#3
Alias (byte) main::ch#1 = (byte) main::ch#4
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte) memset::c#1
Self Phi Eliminated (byte*) memset::end#1
Self Phi Eliminated (void*) memset::str#4
Self Phi Eliminated (byte) main::x#2
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (word) memset::num#1 (word) memset::num#0
Identical Phi Values (void*) memset::str#2 (void*) memset::str#0
Identical Phi Values (byte) memset::c#2 (byte) memset::c#0

View File

@ -0,0 +1,57 @@
// Demonstrates a problem where wrong alive ranges result in clobbering an alive variable
// The compiler does not realize that A is alive in the statement b=b-a - and thus can clobber it.
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
.label SCREEN = $400
main: {
ldx #2
lda #$80
sta euclid.a
jsr euclid
lda euclid.a
sta SCREEN
ldx #$45
lda #$a9
sta euclid.a
jsr euclid
lda euclid.a
sta SCREEN+1
ldx #$9b
lda #$ff
sta euclid.a
jsr euclid
lda euclid.a
sta SCREEN+2
ldx #3
lda #$63
sta euclid.a
jsr euclid
lda euclid.a
sta SCREEN+3
rts
}
// Calculate least common denominator using euclids subtraction method
// euclid(byte zeropage(2) a, byte register(X) b)
euclid: {
.label a = 2
b1:
cpx a
bne b2
rts
b2:
cpx a
bcc b3
txa
sec
sbc a
tax
jmp b1
b3:
txa
eor #$ff
sec
adc a
sta a
jmp b1
}

View File

@ -0,0 +1,60 @@
@begin: scope:[] from
[0] phi()
to:@1
@1: scope:[] from @begin
[1] phi()
[2] call main
to:@end
@end: scope:[] from @1
[3] phi()
main: scope:[main] from @1
[4] phi()
[5] call euclid
[6] (byte) euclid::return#0 ← (byte) euclid::a#5
to:main::@1
main::@1: scope:[main] from main
[7] (byte~) main::$0 ← (byte) euclid::return#0
[8] *((const byte*) SCREEN#0) ← (byte~) main::$0
[9] call euclid
[10] (byte) euclid::return#1 ← (byte) euclid::a#5
to:main::@2
main::@2: scope:[main] from main::@1
[11] (byte~) main::$1 ← (byte) euclid::return#1
[12] *((const byte*) SCREEN#0+(byte) 1) ← (byte~) main::$1
[13] call euclid
[14] (byte) euclid::return#2 ← (byte) euclid::a#5
to:main::@3
main::@3: scope:[main] from main::@2
[15] (byte~) main::$2 ← (byte) euclid::return#2
[16] *((const byte*) SCREEN#0+(byte) 2) ← (byte~) main::$2
[17] call euclid
[18] (byte) euclid::return#3 ← (byte) euclid::a#5
to:main::@4
main::@4: scope:[main] from main::@3
[19] (byte~) main::$3 ← (byte) euclid::return#3
[20] *((const byte*) SCREEN#0+(byte) 3) ← (byte~) main::$3
to:main::@return
main::@return: scope:[main] from main::@4
[21] return
to:@return
euclid: scope:[euclid] from main main::@1 main::@2 main::@3
[22] (byte) euclid::b#9 ← phi( main/(byte) 2 main::@1/(byte) $45 main::@2/(byte) $9b main::@3/(byte) 3 )
[22] (byte) euclid::a#10 ← phi( main/(byte) $80 main::@1/(byte) $a9 main::@2/(byte) $ff main::@3/(byte) $63 )
to:euclid::@1
euclid::@1: scope:[euclid] from euclid euclid::@3 euclid::@4
[23] (byte) euclid::b#5 ← phi( euclid/(byte) euclid::b#9 euclid::@3/(byte) euclid::b#5 euclid::@4/(byte) euclid::b#4 )
[23] (byte) euclid::a#5 ← phi( euclid/(byte) euclid::a#10 euclid::@3/(byte) euclid::a#4 euclid::@4/(byte) euclid::a#5 )
[24] if((byte) euclid::a#5!=(byte) euclid::b#5) goto euclid::@2
to:euclid::@return
euclid::@return: scope:[euclid] from euclid::@1
[25] return
to:@return
euclid::@2: scope:[euclid] from euclid::@1
[26] if((byte) euclid::a#5>(byte) euclid::b#5) goto euclid::@3
to:euclid::@4
euclid::@4: scope:[euclid] from euclid::@2
[27] (byte) euclid::b#4 ← (byte) euclid::b#5 - (byte) euclid::a#5
to:euclid::@1
euclid::@3: scope:[euclid] from euclid::@2
[28] (byte) euclid::a#4 ← (byte) euclid::a#5 - (byte) euclid::b#5
to:euclid::@1

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,46 @@
(label) @1
(label) @begin
(label) @end
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = (byte*) 1024
(byte()) euclid((byte) euclid::a , (byte) euclid::b)
(label) euclid::@1
(label) euclid::@2
(label) euclid::@3
(label) euclid::@4
(label) euclid::@return
(byte) euclid::a
(byte) euclid::a#10 a zp ZP_BYTE:2 2.0
(byte) euclid::a#4 a zp ZP_BYTE:2 22.0
(byte) euclid::a#5 a zp ZP_BYTE:2 9.666666666666668
(byte) euclid::b
(byte) euclid::b#4 reg byte x 22.0
(byte) euclid::b#5 reg byte x 19.75
(byte) euclid::b#9 reg byte x 2.0
(byte) euclid::return
(byte) euclid::return#0 reg byte a 4.0
(byte) euclid::return#1 reg byte a 4.0
(byte) euclid::return#2 reg byte a 4.0
(byte) euclid::return#3 reg byte a 4.0
(byte) idx
(void()) main()
(byte~) main::$0 reg byte a 4.0
(byte~) main::$1 reg byte a 4.0
(byte~) main::$2 reg byte a 4.0
(byte~) main::$3 reg byte a 4.0
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@4
(label) main::@return
zp ZP_BYTE:2 [ euclid::a#5 euclid::a#10 euclid::a#4 ]
reg byte x [ euclid::b#5 euclid::b#9 euclid::b#4 ]
reg byte a [ euclid::return#0 ]
reg byte a [ main::$0 ]
reg byte a [ euclid::return#1 ]
reg byte a [ main::$1 ]
reg byte a [ euclid::return#2 ]
reg byte a [ main::$2 ]
reg byte a [ euclid::return#3 ]
reg byte a [ main::$3 ]

View File

@ -0,0 +1,33 @@
// Demonstrates a problem where wrong alive ranges result in clobbering an alive variable
// The compiler does not realize that A is alive in the statement b=b-a - and thus can clobber it.
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
.label SCREEN = $400
main: {
.label a = 2
ldx #2
lda #$80
sta a
b1:
cpx a
bne b2
lda a
sta SCREEN
rts
b2:
cpx a
bcc b4
txa
sec
sbc a
tax
jmp b1
b4:
txa
eor #$ff
sec
adc a
sta a
jmp b1
}

View File

@ -0,0 +1,32 @@
@begin: scope:[] from
[0] phi()
to:@1
@1: scope:[] from @begin
[1] phi()
[2] call main
to:@end
@end: scope:[] from @1
[3] phi()
main: scope:[main] from @1
[4] phi()
to:main::@1
main::@1: scope:[main] from main main::@4 main::@5
[5] (byte) main::b#2 ← phi( main/(byte) 2 main::@4/(byte) main::b#2 main::@5/(byte) main::b#1 )
[5] (byte) main::a#2 ← phi( main/(byte) $80 main::@4/(byte) main::a#1 main::@5/(byte) main::a#2 )
[6] if((byte) main::a#2!=(byte) main::b#2) goto main::@2
to:main::@3
main::@3: scope:[main] from main::@1
[7] *((const byte*) SCREEN#0) ← (byte) main::a#2
to:main::@return
main::@return: scope:[main] from main::@3
[8] return
to:@return
main::@2: scope:[main] from main::@1
[9] if((byte) main::a#2>(byte) main::b#2) goto main::@4
to:main::@5
main::@5: scope:[main] from main::@2
[10] (byte) main::b#1 ← (byte) main::b#2 - (byte) main::a#2
to:main::@1
main::@4: scope:[main] from main::@2
[11] (byte) main::a#1 ← (byte) main::a#2 - (byte) main::b#2
to:main::@1

View File

@ -0,0 +1,512 @@
Identified constant variable (byte*) SCREEN
Culled Empty Block (label) main::@6
Culled Empty Block (label) main::@7
Culled Empty Block (label) main::@5
Culled Empty Block (label) main::@9
Culled Empty Block (label) main::@10
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
(byte*) SCREEN#0 ← ((byte*)) (number) $400
to:@1
main: scope:[main] from @1
(byte) main::a#0 ← (number) $80
(byte) main::b#0 ← (number) 2
to:main::@1
main::@1: scope:[main] from main main::@4 main::@8
(byte) main::b#2 ← phi( main/(byte) main::b#0 main::@4/(byte) main::b#4 main::@8/(byte) main::b#1 )
(byte) main::a#2 ← phi( main/(byte) main::a#0 main::@4/(byte) main::a#1 main::@8/(byte) main::a#6 )
(bool~) main::$0 ← (byte) main::a#2 != (byte) main::b#2
if((bool~) main::$0) goto main::@2
to:main::@3
main::@2: scope:[main] from main::@1
(byte) main::b#3 ← phi( main::@1/(byte) main::b#2 )
(byte) main::a#3 ← phi( main::@1/(byte) main::a#2 )
(bool~) main::$1 ← (byte) main::a#3 > (byte) main::b#3
if((bool~) main::$1) goto main::@4
to:main::@8
main::@3: scope:[main] from main::@1
(byte) main::a#4 ← phi( main::@1/(byte) main::a#2 )
*((byte*) SCREEN#0) ← (byte) main::a#4
to:main::@return
main::@4: scope:[main] from main::@2
(byte) main::b#4 ← phi( main::@2/(byte) main::b#3 )
(byte) main::a#5 ← phi( main::@2/(byte) main::a#3 )
(byte~) main::$3 ← (byte) main::a#5 - (byte) main::b#4
(byte) main::a#1 ← (byte~) main::$3
to:main::@1
main::@8: scope:[main] from main::@2
(byte) main::a#6 ← phi( main::@2/(byte) main::a#3 )
(byte) main::b#5 ← phi( main::@2/(byte) main::b#3 )
(byte~) main::$2 ← (byte) main::b#5 - (byte) main::a#6
(byte) main::b#1 ← (byte~) main::$2
to:main::@1
main::@return: scope:[main] from main::@3
return
to:@return
@1: scope:[] from @begin
call main
to:@2
@2: scope:[] from @1
to:@end
@end: scope:[] from @2
SYMBOL TABLE SSA
(label) @1
(label) @2
(label) @begin
(label) @end
(byte*) SCREEN
(byte*) SCREEN#0
(void()) main()
(bool~) main::$0
(bool~) main::$1
(byte~) main::$2
(byte~) main::$3
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@4
(label) main::@8
(label) main::@return
(byte) main::a
(byte) main::a#0
(byte) main::a#1
(byte) main::a#2
(byte) main::a#3
(byte) main::a#4
(byte) main::a#5
(byte) main::a#6
(byte) main::b
(byte) main::b#0
(byte) main::b#1
(byte) main::b#2
(byte) main::b#3
(byte) main::b#4
(byte) main::b#5
Adding number conversion cast (unumber) $80 in (byte) main::a#0 ← (number) $80
Adding number conversion cast (unumber) 2 in (byte) main::b#0 ← (number) 2
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400
Inlining cast (byte) main::a#0 ← (unumber)(number) $80
Inlining cast (byte) main::b#0 ← (unumber)(number) 2
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast $80
Simplifying constant integer cast 2
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) $80
Finalized unsigned number type (byte) 2
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias (byte) main::a#2 = (byte) main::a#3 (byte) main::a#4 (byte) main::a#5 (byte) main::a#6
Alias (byte) main::b#2 = (byte) main::b#3 (byte) main::b#4 (byte) main::b#5
Alias (byte) main::a#1 = (byte~) main::$3
Alias (byte) main::b#1 = (byte~) main::$2
Successful SSA optimization Pass2AliasElimination
Simple Condition (bool~) main::$0 [5] if((byte) main::a#2!=(byte) main::b#2) goto main::@2
Simple Condition (bool~) main::$1 [8] if((byte) main::a#2>(byte) main::b#2) goto main::@4
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant (const byte*) SCREEN#0 = (byte*) 1024
Constant (const byte) main::a#0 = $80
Constant (const byte) main::b#0 = 2
Successful SSA optimization Pass2ConstantIdentification
Inlining constant with var siblings (const byte) main::a#0
Inlining constant with var siblings (const byte) main::b#0
Constant inlined main::a#0 = (byte) $80
Constant inlined main::b#0 = (byte) 2
Successful SSA optimization Pass2ConstantInlining
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @1
Adding NOP phi() at start of @2
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
CALL GRAPH
Calls in [] to main:2
Created 2 initial phi equivalence classes
Coalesced (already) [12] main::a#8 ← main::a#2
Coalesced [13] main::b#7 ← main::b#1
Coalesced [15] main::a#7 ← main::a#1
Coalesced (already) [16] main::b#6 ← main::b#2
Coalesced down to 2 phi equivalence classes
Culled Empty Block (label) @2
Renumbering block main::@8 to main::@5
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @1
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
FINAL CONTROL FLOW GRAPH
@begin: scope:[] from
[0] phi()
to:@1
@1: scope:[] from @begin
[1] phi()
[2] call main
to:@end
@end: scope:[] from @1
[3] phi()
main: scope:[main] from @1
[4] phi()
to:main::@1
main::@1: scope:[main] from main main::@4 main::@5
[5] (byte) main::b#2 ← phi( main/(byte) 2 main::@4/(byte) main::b#2 main::@5/(byte) main::b#1 )
[5] (byte) main::a#2 ← phi( main/(byte) $80 main::@4/(byte) main::a#1 main::@5/(byte) main::a#2 )
[6] if((byte) main::a#2!=(byte) main::b#2) goto main::@2
to:main::@3
main::@3: scope:[main] from main::@1
[7] *((const byte*) SCREEN#0) ← (byte) main::a#2
to:main::@return
main::@return: scope:[main] from main::@3
[8] return
to:@return
main::@2: scope:[main] from main::@1
[9] if((byte) main::a#2>(byte) main::b#2) goto main::@4
to:main::@5
main::@5: scope:[main] from main::@2
[10] (byte) main::b#1 ← (byte) main::b#2 - (byte) main::a#2
to:main::@1
main::@4: scope:[main] from main::@2
[11] (byte) main::a#1 ← (byte) main::a#2 - (byte) main::b#2
to:main::@1
VARIABLE REGISTER WEIGHTS
(byte*) SCREEN
(void()) main()
(byte) main::a
(byte) main::a#1 22.0
(byte) main::a#2 19.75
(byte) main::b
(byte) main::b#1 22.0
(byte) main::b#2 19.25
Initial phi equivalence classes
[ main::a#2 main::a#1 ]
[ main::b#2 main::b#1 ]
Complete equivalence classes
[ main::a#2 main::a#1 ]
[ main::b#2 main::b#1 ]
Allocated zp ZP_BYTE:2 [ main::a#2 main::a#1 ]
Allocated zp ZP_BYTE:3 [ main::b#2 main::b#1 ]
INITIAL ASM
// File Comments
// Demonstrates a problem where wrong alive ranges result in clobbering an alive variable
// The compiler does not realize that A is alive in the statement b=b-a - and thus can clobber it.
// Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
// Global Constants & labels
.label SCREEN = $400
// @begin
bbegin:
// [1] phi from @begin to @1 [phi:@begin->@1]
b1_from_bbegin:
jmp b1
// @1
b1:
// [2] call main
// [4] phi from @1 to main [phi:@1->main]
main_from_b1:
jsr main
// [3] phi from @1 to @end [phi:@1->@end]
bend_from_b1:
jmp bend
// @end
bend:
// main
main: {
.label a = 2
.label b = 3
// [5] phi from main to main::@1 [phi:main->main::@1]
b1_from_main:
// [5] phi (byte) main::b#2 = (byte) 2 [phi:main->main::@1#0] -- vbuz1=vbuc1
lda #2
sta b
// [5] phi (byte) main::a#2 = (byte) $80 [phi:main->main::@1#1] -- vbuz1=vbuc1
lda #$80
sta a
jmp b1
// main::@1
b1:
// [6] if((byte) main::a#2!=(byte) main::b#2) goto main::@2 -- vbuz1_neq_vbuz2_then_la1
lda a
cmp b
bne b2
jmp b3
// main::@3
b3:
// [7] *((const byte*) SCREEN#0) ← (byte) main::a#2 -- _deref_pbuc1=vbuz1
lda a
sta SCREEN
jmp breturn
// main::@return
breturn:
// [8] return
rts
// main::@2
b2:
// [9] if((byte) main::a#2>(byte) main::b#2) goto main::@4 -- vbuz1_gt_vbuz2_then_la1
lda b
cmp a
bcc b4
jmp b5
// main::@5
b5:
// [10] (byte) main::b#1 ← (byte) main::b#2 - (byte) main::a#2 -- vbuz1=vbuz1_minus_vbuz2
lda b
sec
sbc a
sta b
// [5] phi from main::@4 main::@5 to main::@1 [phi:main::@4/main::@5->main::@1]
b1_from_b4:
b1_from_b5:
// [5] phi (byte) main::b#2 = (byte) main::b#2 [phi:main::@4/main::@5->main::@1#0] -- register_copy
// [5] phi (byte) main::a#2 = (byte) main::a#1 [phi:main::@4/main::@5->main::@1#1] -- register_copy
jmp b1
// main::@4
b4:
// [11] (byte) main::a#1 ← (byte) main::a#2 - (byte) main::b#2 -- vbuz1=vbuz1_minus_vbuz2
lda a
sec
sbc b
sta a
jmp b1_from_b4
}
// File Data
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [10] (byte) main::b#1 ← (byte) main::b#2 - (byte) main::a#2 [ main::a#2 main::b#1 ] ( main:2 [ main::a#2 main::b#1 ] ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ main::a#2 main::a#1 ]
Statement [11] (byte) main::a#1 ← (byte) main::a#2 - (byte) main::b#2 [ main::b#2 main::a#1 ] ( main:2 [ main::b#2 main::a#1 ] ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:3 [ main::b#2 main::b#1 ]
Statement [10] (byte) main::b#1 ← (byte) main::b#2 - (byte) main::a#2 [ main::a#2 main::b#1 ] ( main:2 [ main::a#2 main::b#1 ] ) always clobbers reg byte a
Statement [11] (byte) main::a#1 ← (byte) main::a#2 - (byte) main::b#2 [ main::b#2 main::a#1 ] ( main:2 [ main::b#2 main::a#1 ] ) always clobbers reg byte a
Potential registers zp ZP_BYTE:2 [ main::a#2 main::a#1 ] : zp ZP_BYTE:2 , reg byte x , reg byte y ,
Potential registers zp ZP_BYTE:3 [ main::b#2 main::b#1 ] : zp ZP_BYTE:3 , reg byte x , reg byte y ,
REGISTER UPLIFT SCOPES
Uplift Scope [main] 41.75: zp ZP_BYTE:2 [ main::a#2 main::a#1 ] 41.25: zp ZP_BYTE:3 [ main::b#2 main::b#1 ]
Uplift Scope []
Uplifting [main] best 568 combination zp ZP_BYTE:2 [ main::a#2 main::a#1 ] reg byte x [ main::b#2 main::b#1 ]
Uplifting [] best 568 combination
Attempting to uplift remaining variables inzp ZP_BYTE:2 [ main::a#2 main::a#1 ]
Uplifting [main] best 568 combination zp ZP_BYTE:2 [ main::a#2 main::a#1 ]
ASSEMBLER BEFORE OPTIMIZATION
// File Comments
// Demonstrates a problem where wrong alive ranges result in clobbering an alive variable
// The compiler does not realize that A is alive in the statement b=b-a - and thus can clobber it.
// Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
// Global Constants & labels
.label SCREEN = $400
// @begin
bbegin:
// [1] phi from @begin to @1 [phi:@begin->@1]
b1_from_bbegin:
jmp b1
// @1
b1:
// [2] call main
// [4] phi from @1 to main [phi:@1->main]
main_from_b1:
jsr main
// [3] phi from @1 to @end [phi:@1->@end]
bend_from_b1:
jmp bend
// @end
bend:
// main
main: {
.label a = 2
// [5] phi from main to main::@1 [phi:main->main::@1]
b1_from_main:
// [5] phi (byte) main::b#2 = (byte) 2 [phi:main->main::@1#0] -- vbuxx=vbuc1
ldx #2
// [5] phi (byte) main::a#2 = (byte) $80 [phi:main->main::@1#1] -- vbuz1=vbuc1
lda #$80
sta a
jmp b1
// main::@1
b1:
// [6] if((byte) main::a#2!=(byte) main::b#2) goto main::@2 -- vbuz1_neq_vbuxx_then_la1
cpx a
bne b2
jmp b3
// main::@3
b3:
// [7] *((const byte*) SCREEN#0) ← (byte) main::a#2 -- _deref_pbuc1=vbuz1
lda a
sta SCREEN
jmp breturn
// main::@return
breturn:
// [8] return
rts
// main::@2
b2:
// [9] if((byte) main::a#2>(byte) main::b#2) goto main::@4 -- vbuz1_gt_vbuxx_then_la1
cpx a
bcc b4
jmp b5
// main::@5
b5:
// [10] (byte) main::b#1 ← (byte) main::b#2 - (byte) main::a#2 -- vbuxx=vbuxx_minus_vbuz1
txa
sec
sbc a
tax
// [5] phi from main::@4 main::@5 to main::@1 [phi:main::@4/main::@5->main::@1]
b1_from_b4:
b1_from_b5:
// [5] phi (byte) main::b#2 = (byte) main::b#2 [phi:main::@4/main::@5->main::@1#0] -- register_copy
// [5] phi (byte) main::a#2 = (byte) main::a#1 [phi:main::@4/main::@5->main::@1#1] -- register_copy
jmp b1
// main::@4
b4:
// [11] (byte) main::a#1 ← (byte) main::a#2 - (byte) main::b#2 -- vbuz1=vbuz1_minus_vbuxx
txa
eor #$ff
sec
adc a
sta a
jmp b1_from_b4
}
// File Data
ASSEMBLER OPTIMIZATIONS
Removing instruction jmp b1
Removing instruction jmp bend
Removing instruction jmp b1
Removing instruction jmp b3
Removing instruction jmp breturn
Removing instruction jmp b5
Succesful ASM optimization Pass5NextJumpElimination
Replacing label b1_from_b4 with b1_from_b5
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction main_from_b1:
Removing instruction bend_from_b1:
Removing instruction b1_from_b4:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction bend:
Removing instruction b1_from_main:
Removing instruction b3:
Removing instruction breturn:
Removing instruction b5:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Skipping double jump to b1 in jmp b1_from_b5
Succesful ASM optimization Pass5DoubleJumpElimination
Relabelling long label b1_from_b5 to b3
Succesful ASM optimization Pass5RelabelLongLabels
Removing instruction bbegin:
Removing instruction b3:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @1
(label) @begin
(label) @end
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = (byte*) 1024
(void()) main()
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@4
(label) main::@5
(label) main::@return
(byte) main::a
(byte) main::a#1 a zp ZP_BYTE:2 22.0
(byte) main::a#2 a zp ZP_BYTE:2 19.75
(byte) main::b
(byte) main::b#1 reg byte x 22.0
(byte) main::b#2 reg byte x 19.25
zp ZP_BYTE:2 [ main::a#2 main::a#1 ]
reg byte x [ main::b#2 main::b#1 ]
FINAL ASSEMBLER
Score: 463
// File Comments
// Demonstrates a problem where wrong alive ranges result in clobbering an alive variable
// The compiler does not realize that A is alive in the statement b=b-a - and thus can clobber it.
// Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
// Global Constants & labels
.label SCREEN = $400
// @begin
// [1] phi from @begin to @1 [phi:@begin->@1]
// @1
// [2] call main
// [4] phi from @1 to main [phi:@1->main]
// [3] phi from @1 to @end [phi:@1->@end]
// @end
// main
main: {
.label a = 2
// [5] phi from main to main::@1 [phi:main->main::@1]
// [5] phi (byte) main::b#2 = (byte) 2 [phi:main->main::@1#0] -- vbuxx=vbuc1
ldx #2
// [5] phi (byte) main::a#2 = (byte) $80 [phi:main->main::@1#1] -- vbuz1=vbuc1
lda #$80
sta a
// main::@1
b1:
// while (a!=b)
// [6] if((byte) main::a#2!=(byte) main::b#2) goto main::@2 -- vbuz1_neq_vbuxx_then_la1
cpx a
bne b2
// main::@3
// *SCREEN = a
// [7] *((const byte*) SCREEN#0) ← (byte) main::a#2 -- _deref_pbuc1=vbuz1
lda a
sta SCREEN
// main::@return
// }
// [8] return
rts
// main::@2
b2:
// if(a>b)
// [9] if((byte) main::a#2>(byte) main::b#2) goto main::@4 -- vbuz1_gt_vbuxx_then_la1
cpx a
bcc b4
// main::@5
// b = b-a
// [10] (byte) main::b#1 ← (byte) main::b#2 - (byte) main::a#2 -- vbuxx=vbuxx_minus_vbuz1
txa
sec
sbc a
tax
// [5] phi from main::@4 main::@5 to main::@1 [phi:main::@4/main::@5->main::@1]
// [5] phi (byte) main::b#2 = (byte) main::b#2 [phi:main::@4/main::@5->main::@1#0] -- register_copy
// [5] phi (byte) main::a#2 = (byte) main::a#1 [phi:main::@4/main::@5->main::@1#1] -- register_copy
jmp b1
// main::@4
b4:
// a = a-b
// [11] (byte) main::a#1 ← (byte) main::a#2 - (byte) main::b#2 -- vbuz1=vbuz1_minus_vbuxx
txa
eor #$ff
sec
adc a
sta a
jmp b1
}
// File Data

View File

@ -0,0 +1,21 @@
(label) @1
(label) @begin
(label) @end
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = (byte*) 1024
(void()) main()
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@4
(label) main::@5
(label) main::@return
(byte) main::a
(byte) main::a#1 a zp ZP_BYTE:2 22.0
(byte) main::a#2 a zp ZP_BYTE:2 19.75
(byte) main::b
(byte) main::b#1 reg byte x 22.0
(byte) main::b#2 reg byte x 19.25
zp ZP_BYTE:2 [ main::a#2 main::a#1 ]
reg byte x [ main::b#2 main::b#1 ]

View File

@ -2811,36 +2811,6 @@ Alias (signed byte) sy#12 = (signed byte) sy#5
Successful SSA optimization Pass2AliasElimination
Alias (byte*) print_sbyte_at::at#21 = (byte*) print_sbyte_at::at#23
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte) memset::c#1
Self Phi Eliminated (byte*) memset::end#1
Self Phi Eliminated (void*) memset::str#4
Self Phi Eliminated (signed byte) sx#24
Self Phi Eliminated (signed byte) sy#26
Self Phi Eliminated (signed byte*) COSH#5
Self Phi Eliminated (signed byte*) COSQ#5
Self Phi Eliminated (byte*) print_screen#53
Self Phi Eliminated (signed byte) sx#20
Self Phi Eliminated (signed byte) sy#21
Self Phi Eliminated (signed byte*) COSH#4
Self Phi Eliminated (signed byte*) COSQ#4
Self Phi Eliminated (byte*) print_screen#52
Self Phi Eliminated (signed byte) sx#14
Self Phi Eliminated (signed byte) sy#14
Self Phi Eliminated (signed byte*) COSH#15
Self Phi Eliminated (signed byte*) COSQ#15
Self Phi Eliminated (byte*) print_screen#44
Self Phi Eliminated (signed byte) sx#15
Self Phi Eliminated (signed byte) sy#15
Self Phi Eliminated (byte*) print_screen#28
Self Phi Eliminated (signed byte*) COSH#10
Self Phi Eliminated (signed byte*) COSQ#10
Self Phi Eliminated (byte) debug_print_init::i#5
Self Phi Eliminated (byte*) debug_print_init::at_cols#1
Self Phi Eliminated (byte) debug_print_init::c#5
Self Phi Eliminated (byte*) debug_print_init::at_line#4
Self Phi Eliminated (byte*) debug_print::at_line#1
Self Phi Eliminated (byte*) sprites_init::sprites_ptr#1
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (word) memset::num#1 (word) memset::num#0
Identical Phi Values (void*) memset::str#2 (void*) memset::str#0
Identical Phi Values (byte) memset::c#2 (byte) memset::c#0
@ -2904,6 +2874,11 @@ Identical Phi Values (signed byte) sx#12 (signed byte) sx#0
Identical Phi Values (signed byte) sy#12 (signed byte) sy#0
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values (void*) memset::return#0 (void*) memset::str#0
Identical Phi Values (signed byte*) COSH#6 (signed byte*) COSH#0
Identical Phi Values (signed byte*) COSQ#6 (signed byte*) COSQ#0
Identical Phi Values (byte*) print_screen#54 (byte*) print_screen#0
Identical Phi Values (byte*) debug_print_init::at_line#1 (byte*) debug_print_init::at_line#0
Identical Phi Values (byte*) debug_print_init::at_cols#2 (byte*) debug_print_init::at_cols#0
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) memset::$1 [12] if((word) memset::num#0<=(byte) 0) goto memset::@1
Simple Condition (bool~) memset::$4 [24] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@4
@ -3091,13 +3066,13 @@ Converting *(pointer+n) to pointer[n] [296] *((byte*~) debug_print_init::$63)
Converting *(pointer+n) to pointer[n] [300] *((byte*~) debug_print_init::$66) ← (byte) debug_print_init::col#0 -- *(debug_print_init::$65 + debug_print_init::j#2)
Successful SSA optimization Pass2InlineDerefIdx
Simplifying constant evaluating to zero (byte)(number) $28*(number) 0 in [184] (byte*~) debug_print_init::$1 ← (const byte*) SCREEN#0 + (byte)(number) $28*(number) 0
Simplifying constant evaluating to zero (byte)(number) $28*(number) 0 in [243] (byte*~) debug_print_init::$30 ← (byte*) debug_print_init::at_line#1 + (byte)(number) $28*(number) 0
Simplifying constant evaluating to zero (byte)(number) $28*(number) 0 in [265] (byte*~) debug_print_init::$40 ← (byte*) debug_print_init::at_cols#2 + (byte)(number) $28*(number) 0
Simplifying constant evaluating to zero (byte)(number) $28*(number) 0 in [243] (byte*~) debug_print_init::$30 ← (byte*) debug_print_init::at_line#0 + (byte)(number) $28*(number) 0
Simplifying constant evaluating to zero (byte)(number) $28*(number) 0 in [265] (byte*~) debug_print_init::$40 ← (byte*) debug_print_init::at_cols#0 + (byte)(number) $28*(number) 0
Simplifying constant evaluating to zero (byte)(number) $28*(number) 0 in [458] (byte*~) debug_print::$13 ← (byte*) debug_print::at_line#0 + (byte)(number) $28*(number) 0
Successful SSA optimization PassNSimplifyConstantZero
Simplifying expression containing zero SCREEN#0 in [184] (byte*~) debug_print_init::$1 ← (const byte*) SCREEN#0 + (byte) 0
Simplifying expression containing zero debug_print_init::at_line#1 in [243] (byte*~) debug_print_init::$30 ← (byte*) debug_print_init::at_line#1 + (byte) 0
Simplifying expression containing zero debug_print_init::at_cols#2 in [265] (byte*~) debug_print_init::$40 ← (byte*) debug_print_init::at_cols#2 + (byte) 0
Simplifying expression containing zero debug_print_init::at_line#0 in [243] (byte*~) debug_print_init::$30 ← (byte*) debug_print_init::at_line#0 + (byte) 0
Simplifying expression containing zero debug_print_init::at_cols#0 in [265] (byte*~) debug_print_init::$40 ← (byte*) debug_print_init::at_cols#0 + (byte) 0
Simplifying expression containing zero rotation_matrix#0 in [347] (signed byte) debug_print::print_sbyte_pos4_sb#0 ← *((const signed byte[9]) rotation_matrix#0 + (byte) 0)
Simplifying expression containing zero debug_print::at_line#0 in [458] (byte*~) debug_print::$13 ← (byte*) debug_print::at_line#0 + (byte) 0
Simplifying expression containing zero calculate_matrix::sy#0 in [516] (signed byte) calculate_matrix::t1#0 ← (signed byte) calculate_matrix::sy#0 - (const signed byte) calculate_matrix::sz#0
@ -3138,22 +3113,10 @@ Finalized unsigned number type (byte) 8
Finalized unsigned number type (byte) 8
Finalized unsigned number type (byte) 8
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias (byte*) debug_print_init::at_line#1 = (byte*~) debug_print_init::$30
Alias (byte*) debug_print_init::at_cols#2 = (byte*~) debug_print_init::$40
Alias (byte*) debug_print_init::at_line#0 = (byte*~) debug_print_init::$30
Alias (byte*) debug_print_init::at_cols#0 = (byte*~) debug_print_init::$40
Alias (byte*) debug_print::at_line#0 = (byte*~) debug_print::$13
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (signed byte*) COSH#6
Self Phi Eliminated (signed byte*) COSQ#6
Self Phi Eliminated (byte*) print_screen#54
Self Phi Eliminated (byte*) debug_print_init::at_line#1
Self Phi Eliminated (byte*) debug_print_init::at_cols#2
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (signed byte*) COSH#6 (signed byte*) COSH#0
Identical Phi Values (signed byte*) COSQ#6 (signed byte*) COSQ#0
Identical Phi Values (byte*) print_screen#54 (const byte*) print_screen#0
Identical Phi Values (byte*) debug_print_init::at_line#1 (byte*) debug_print_init::at_line#0
Identical Phi Values (byte*) debug_print_init::at_cols#2 (byte*) debug_print_init::at_cols#0
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [90] (byte*~) debug_print_init::$4 ← (const byte*) SCREEN#0 + (byte)(number) $28*(number) 1
Constant right-side identified [93] (byte*~) debug_print_init::$7 ← (const byte*) SCREEN#0 + (byte)(number) $28*(number) 2
Constant right-side identified [96] (byte*) print_str_at::at#4 ← (const byte*) SCREEN#0 + (word)(number) $28*(number) $10

View File

@ -1041,11 +1041,6 @@ Alias (byte) mulf_init::val#0 = (byte~) mulf_init::$0
Alias (byte*) print_line_cursor#10 = (byte*) print_line_cursor#20
Alias (byte*) print_char_cursor#32 = (byte*) print_char_cursor#63
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte) memset::c#1
Self Phi Eliminated (byte*) memset::end#1
Self Phi Eliminated (void*) memset::str#4
Self Phi Eliminated (byte*) print_char_cursor#35
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (word) memset::num#1 (word) memset::num#0
Identical Phi Values (void*) memset::str#2 (void*) memset::str#0
Identical Phi Values (byte) memset::c#2 (byte) memset::c#0

View File

@ -1538,21 +1538,6 @@ Alias (byte) bitmap_line_ydxd::y#3 = (byte) bitmap_line_ydxd::y#6
Alias (byte) bitmap_line_ydxd::xd#3 = (byte) bitmap_line_ydxd::xd#5
Alias (byte) bitmap_line_ydxd::yd#2 = (byte) bitmap_line_ydxd::yd#6
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte*) bitmap_init::bitmap#1
Self Phi Eliminated (byte) bitmap_clear::y#2
Self Phi Eliminated (byte) bitmap_line_xdyi::yd#3
Self Phi Eliminated (byte) bitmap_line_xdyi::xd#2
Self Phi Eliminated (byte) bitmap_line_xdyi::x1#2
Self Phi Eliminated (byte) bitmap_line_xdyd::yd#3
Self Phi Eliminated (byte) bitmap_line_xdyd::xd#2
Self Phi Eliminated (byte) bitmap_line_xdyd::x1#2
Self Phi Eliminated (byte) bitmap_line_ydxi::xd#3
Self Phi Eliminated (byte) bitmap_line_ydxi::yd#2
Self Phi Eliminated (byte) bitmap_line_ydxi::y1#2
Self Phi Eliminated (byte) bitmap_line_ydxd::xd#3
Self Phi Eliminated (byte) bitmap_line_ydxd::yd#2
Self Phi Eliminated (byte) bitmap_line_ydxd::y1#2
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte*) bitmap_init::bitmap#2 (byte*) bitmap_init::bitmap#0
Identical Phi Values (byte*) bitmap_init::bitmap#1 (byte*) bitmap_init::bitmap#2
Identical Phi Values (byte) bitmap_clear::y#2 (byte) bitmap_clear::y#4

View File

@ -1547,11 +1547,6 @@ Alias (byte) plot_chargen::x#2 = (byte) plot_chargen::x#3
Alias (byte) plot_chargen::y#3 = (byte) plot_chargen::y#5
Alias (byte*) plot_chargen::chargen#4 = (byte*) plot_chargen::chargen#8
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte) main::cur_pos#10
Self Phi Eliminated (byte) main::shift#10
Self Phi Eliminated (byte) plot_chargen::y#3
Self Phi Eliminated (byte*) plot_chargen::chargen#4
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (word) mul8u::mb#0 (byte) mul8u::b#0
Identical Phi Values (byte) mul8u::a#5 (byte) mul8u::a#1
Identical Phi Values (byte) keyboard_matrix_read::rowid#1 (byte) keyboard_matrix_read::rowid#0
@ -1561,6 +1556,8 @@ Identical Phi Values (byte) main::shift#10 (byte) main::shift#9
Identical Phi Values (byte) plot_chargen::y#3 (byte) plot_chargen::y#2
Identical Phi Values (byte*) plot_chargen::chargen#4 (byte*) plot_chargen::chargen#3
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values (byte*) plot_chargen::chargen#3 (byte*) plot_chargen::chargen#5
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) mul8u::$0 [9] if((byte) mul8u::a#2!=(byte) 0) goto mul8u::@2
Simple Condition (bool~) mul8u::$3 [14] if((byte~) mul8u::$1==(byte) 0) goto mul8u::@4
Simple Condition (bool~) main::$12 [121] if((byte*) main::sc#1<(byte*~) main::$11) goto main::@1
@ -1704,10 +1701,6 @@ Finalized unsigned number type (byte) $40
Finalized unsigned number type (byte) 8
Finalized unsigned number type (byte) 8
Successful SSA optimization PassNFinalizeNumberTypeConversions
Self Phi Eliminated (byte*) plot_chargen::chargen#3
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte*) plot_chargen::chargen#3 (byte*) plot_chargen::chargen#5
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [9] (byte[]) keyboard_char_keycodes#0 ← { (const byte) KEY_AT#0, (const byte) KEY_A#0, (const byte) KEY_B#0, (const byte) KEY_C#0, (const byte) KEY_D#0, (const byte) KEY_E#0, (const byte) KEY_F#0, (const byte) KEY_G#0, (const byte) KEY_H#0, (const byte) KEY_I#0, (const byte) KEY_J#0, (const byte) KEY_K#0, (const byte) KEY_L#0, (const byte) KEY_M#0, (const byte) KEY_N#0, (const byte) KEY_O#0, (const byte) KEY_P#0, (const byte) KEY_Q#0, (const byte) KEY_R#0, (const byte) KEY_S#0, (const byte) KEY_T#0, (const byte) KEY_U#0, (const byte) KEY_V#0, (const byte) KEY_W#0, (const byte) KEY_X#0, (const byte) KEY_Y#0, (const byte) KEY_Z#0, (byte) $3f, (const byte) KEY_POUND#0, (byte) $3f, (const byte) KEY_ARROW_UP#0, (const byte) KEY_ARROW_LEFT#0, (const byte) KEY_SPACE#0, (byte) $3f, (byte) $3f, (byte) $3f, (byte) $3f, (byte) $3f, (byte) $3f, (byte) $3f, (byte) $3f, (byte) $3f, (const byte) KEY_ASTERISK#0, (const byte) KEY_PLUS#0, (const byte) KEY_COMMA#0, (const byte) KEY_MINUS#0, (const byte) KEY_DOT#0, (const byte) KEY_SLASH#0, (const byte) KEY_0#0, (const byte) KEY_1#0, (const byte) KEY_2#0, (const byte) KEY_3#0, (const byte) KEY_4#0, (const byte) KEY_5#0, (const byte) KEY_6#0, (const byte) KEY_7#0, (const byte) KEY_8#0, (const byte) KEY_9#0, (const byte) KEY_COLON#0, (const byte) KEY_SEMICOLON#0, (byte) $3f, (const byte) KEY_EQUALS#0, (byte) $3f, (byte) $3f }
Constant right-side identified [27] (byte*~) main::$11 ← (const byte*) SCREEN#0 + (word) $3e8
Constant right-side identified [29] (byte*) print_str_at::at#0 ← (const byte*) SCREEN#0 + (byte) 1

View File

@ -709,14 +709,6 @@ Alias (signed byte) fmul8::return#1 = (signed byte) fmul8::return#4 (signed byte
Successful SSA optimization Pass2AliasElimination
Alias (byte*) print_sbyte_at::at#3 = (byte*) print_sbyte_at::at#5
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte) memset::c#1
Self Phi Eliminated (byte*) memset::end#1
Self Phi Eliminated (void*) memset::str#4
Self Phi Eliminated (byte*) main::at_line#3
Self Phi Eliminated (byte) main::i#3
Self Phi Eliminated (byte*) main::at_line#4
Self Phi Eliminated (byte*) init_screen::COLS#2
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (word) memset::num#1 (word) memset::num#0
Identical Phi Values (void*) memset::str#2 (void*) memset::str#0
Identical Phi Values (byte) memset::c#2 (byte) memset::c#0

View File

@ -928,14 +928,6 @@ Alias (byte) makecharset::c#2 = (byte) makecharset::c#3
Alias (byte*) makecharset::charset#11 = (byte*) makecharset::charset#7
Alias (byte) makecharset::i#2 = (byte) makecharset::i#3
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte*) fire::screenbase#3
Self Phi Eliminated (byte*) makecharset::charset#2
Self Phi Eliminated (byte*) makecharset::charset#12
Self Phi Eliminated (byte) makecharset::c#2
Self Phi Eliminated (byte) makecharset::i#2
Self Phi Eliminated (byte*) makecharset::charset#11
Self Phi Eliminated (byte) fillscreen::fill#4
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte*) fire::screenbase#3 (byte*) fire::screen#0
Identical Phi Values (byte*) makecharset::font#0 (byte*) makecharset::charset#0
Identical Phi Values (byte*) makecharset::charset#2 (byte*) makecharset::font#0
@ -945,6 +937,11 @@ Identical Phi Values (byte) makecharset::i#2 (byte) makecharset::i#6
Identical Phi Values (byte*) makecharset::charset#11 (byte*) makecharset::charset#9
Identical Phi Values (byte) fillscreen::fill#4 (byte) fillscreen::fill#5
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values (byte) makecharset::c#5 (byte) makecharset::c#7
Identical Phi Values (byte*) makecharset::charset#9 (byte*) makecharset::charset#10
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values (byte*) makecharset::charset#10 (byte*) makecharset::charset#0
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) fire::$3 [87] if((byte*) fire::buffer#4!=(byte*~) fire::$2) goto fire::@2
Simple Condition (bool~) fire::$9 [96] if((byte) fire::c#0<=(byte) 2) goto fire::@4
Simple Condition (bool~) fire::$14 [122] if((byte*) fire::buffer#3!=(byte*~) fire::$13) goto fire::@9
@ -1028,18 +1025,13 @@ Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 1
Finalized unsigned number type (word) $3e8
Successful SSA optimization PassNFinalizeNumberTypeConversions
Self Phi Eliminated (byte) makecharset::c#5
Self Phi Eliminated (byte*) makecharset::charset#9
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte) makecharset::c#5 (byte) makecharset::c#7
Identical Phi Values (byte*) makecharset::charset#9 (byte*) makecharset::charset#10
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [38] (byte*~) fire::$2 ← (const byte*) BUFFER#0 + (word)(number) $18*(number) $28
Constant right-side identified [46] (byte*) fire::buffer#1 ← (const byte*) BUFFER#0 + (word)(number) $18*(number) $28
Constant right-side identified [63] (byte*~) fire::$13 ← (const byte*) BUFFER#0 + (word)(number) $19*(number) $28
Constant right-side identified [69] (byte*~) makecharset::$0 ← (const byte*) makecharset::charset#0 + (byte)(number) 1*(number) 8
Constant right-side identified [71] (byte*) makecharset::font1#0 ← (const byte*) makecharset::charset#0 + (word)(number) $40*(number) 8
Constant right-side identified [75] (byte*~) makecharset::$3 ← (const byte*) makecharset::charset#0 + (word)(number) $100*(number) 8
Constant right-side identified [90] (byte*~) makecharset::$12 ← (const byte*) makecharset::charset#0 + (byte)(number) 1*(number) 8
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const word) main::toD0181_$0#0 = (word)main::toD0181_screen#0
Constant (const word) main::toD0181_$4#0 = (word)main::toD0181_gfx#0
@ -1051,22 +1043,17 @@ Constant (const byte*) fire::$13 = BUFFER#0+(word)$19*$28
Constant (const byte*) makecharset::$0 = makecharset::charset#0+(byte)1*8
Constant (const byte*) makecharset::font1#0 = makecharset::charset#0+(word)$40*8
Constant (const byte*) makecharset::$3 = makecharset::charset#0+(word)$100*8
Constant (const byte*) makecharset::$12 = makecharset::charset#0+(byte)1*8
Successful SSA optimization Pass2ConstantIdentification
Self Phi Eliminated (byte*) makecharset::charset#10
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte*) makecharset::charset#10 (const byte*) makecharset::charset#0
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [15] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff
Constant right-side identified [18] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0
Constant right-side identified [24] (word~) main::toD0182_$1#0 ← (const word) main::toD0182_$0#0 & (word) $3fff
Constant right-side identified [27] (byte~) main::toD0182_$5#0 ← > (const word) main::toD0182_$4#0
Constant right-side identified [80] (byte*~) makecharset::$12 ← (const byte*) makecharset::charset#0 + (byte)(number) 1*(number) 8
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const word) main::toD0181_$1#0 = main::toD0181_$0#0&$3fff
Constant (const byte) main::toD0181_$5#0 = >main::toD0181_$4#0
Constant (const word) main::toD0182_$1#0 = main::toD0182_$0#0&$3fff
Constant (const byte) main::toD0182_$5#0 = >main::toD0182_$4#0
Constant (const byte*) makecharset::$12 = makecharset::charset#0+(byte)1*8
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [15] (word~) main::toD0181_$2#0 ← (const word) main::toD0181_$1#0 * (byte) 4
Constant right-side identified [17] (byte~) main::toD0181_$6#0 ← (const byte) main::toD0181_$5#0 / (byte) 4

View File

@ -230,8 +230,6 @@ Alias (byte*) print_char_cursor#14 = (byte*) print_char_cursor#6 (byte*) print_c
Alias (byte*) print_char_cursor#16 = (byte*) print_char_cursor#8
Alias (byte*) print_line_cursor#11 = (byte*) print_line_cursor#5
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte*) print_char_cursor#11
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte*) print_str::str#4 (byte*) print_str::str#1
Identical Phi Values (byte*) print_char_cursor#21 (byte*) print_char_cursor#19
Identical Phi Values (byte*) print_line_cursor#12 (byte*) print_line_cursor#13

View File

@ -1434,42 +1434,6 @@ Alias (byte) plex_free_next#13 = (byte) plex_free_next#22 (byte) plex_free_next#
Alias (byte) plex_sprite_idx#15 = (byte) plex_sprite_idx#27
Alias (byte) plex_show_idx#15 = (byte) plex_show_idx#27
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte*) PLEX_SCREEN_PTR#15
Self Phi Eliminated (byte) plexSort::nxt_y#1
Self Phi Eliminated (byte) plexSort::nxt_idx#1
Self Phi Eliminated (byte) plexSort::m#5
Self Phi Eliminated (byte) plex_show_idx#11
Self Phi Eliminated (byte) plex_sprite_idx#11
Self Phi Eliminated (byte) plex_sprite_msb#12
Self Phi Eliminated (byte*) PLEX_SCREEN_PTR#24
Self Phi Eliminated (byte*) PLEX_SCREEN_PTR#13
Self Phi Eliminated (byte) loop::sin_idx#2
Self Phi Eliminated (byte) plex_show_idx#41
Self Phi Eliminated (byte) plex_sprite_idx#41
Self Phi Eliminated (byte) plex_sprite_msb#41
Self Phi Eliminated (byte) plex_free_next#40
Self Phi Eliminated (byte*) PLEX_SCREEN_PTR#40
Self Phi Eliminated (byte) loop::sin_idx#3
Self Phi Eliminated (byte) plex_show_idx#29
Self Phi Eliminated (byte) plex_sprite_idx#29
Self Phi Eliminated (byte) plex_sprite_msb#26
Self Phi Eliminated (byte) plex_free_next#25
Self Phi Eliminated (byte*) PLEX_SCREEN_PTR#37
Self Phi Eliminated (byte) plex_free_next#36
Self Phi Eliminated (byte) plex_sprite_idx#47
Self Phi Eliminated (byte) plex_show_idx#47
Self Phi Eliminated (byte) plex_sprite_msb#47
Self Phi Eliminated (byte*) PLEX_SCREEN_PTR#34
Self Phi Eliminated (byte) loop::sin_idx#15
Self Phi Eliminated (byte) loop::rasterY#1
Self Phi Eliminated (byte) plex_sprite_idx#23
Self Phi Eliminated (byte) plex_show_idx#23
Self Phi Eliminated (byte) plex_free_next#27
Self Phi Eliminated (byte) plex_sprite_msb#27
Self Phi Eliminated (byte) loop::ss#2
Self Phi Eliminated (byte*) PLEX_SCREEN_PTR#26
Self Phi Eliminated (byte) loop::sin_idx#10
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte*) plexInit::plexSetScreen1_screen#0 (byte*) plexInit::screen#0
Identical Phi Values (byte*) PLEX_SCREEN_PTR#15 (byte*) PLEX_SCREEN_PTR#1
Identical Phi Values (byte) plexSort::nxt_y#1 (byte) plexSort::nxt_y#0
@ -1543,6 +1507,10 @@ Identical Phi Values (byte) plex_sprite_msb#11 (byte) plex_sprite_msb#17
Identical Phi Values (byte) plex_free_next#10 (byte) plex_free_next#14
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values (byte) plexSort::m#3 (byte) plexSort::m#2
Identical Phi Values (byte*) PLEX_SCREEN_PTR#30 (byte*) PLEX_SCREEN_PTR#42
Identical Phi Values (byte) loop::sin_idx#11 (byte) loop::sin_idx#1
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values (byte*) PLEX_SCREEN_PTR#42 (byte*) PLEX_SCREEN_PTR#1
Successful SSA optimization Pass2IdenticalPhiElimination
Identified duplicate assignment right side [100] (byte~) plexShowSprite::$11 ← (byte) plexShowSprite::xpos_idx#0 * (const byte) SIZEOF_WORD
Successful SSA optimization Pass2DuplicateRValueIdentification
@ -1645,12 +1613,6 @@ Finalized unsigned number type (byte) 8
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias (byte~) plexShowSprite::$11 = (byte~) plexShowSprite::$10
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte*) PLEX_SCREEN_PTR#30
Self Phi Eliminated (byte) loop::sin_idx#11
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte*) PLEX_SCREEN_PTR#30 (byte*) PLEX_SCREEN_PTR#42
Identical Phi Values (byte) loop::sin_idx#11 (byte) loop::sin_idx#1
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) plexSort::$6 [25] if((byte) plexSort::s#1!=(byte) $ff) goto plexSort::@8
Simple Condition (bool~) plexSort::$7 [109] if((byte) plexSort::nxt_y#0<*((byte[PLEX_COUNT#0]) PLEX_YPOS#0 + *((byte[PLEX_COUNT#0]) PLEX_SORTED_IDX#0 + (byte) plexSort::s#1))) goto plexSort::@3
Successful SSA optimization Pass2ConditionalJumpSimplification
@ -1718,10 +1680,6 @@ Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 1
Successful SSA optimization PassNFinalizeNumberTypeConversions
Self Phi Eliminated (byte*) PLEX_SCREEN_PTR#42
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte*) PLEX_SCREEN_PTR#42 (const byte*) PLEX_SCREEN_PTR#1
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [53] (byte~) init::$1 ← (const byte) init::$0 | (byte) 3
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) init::$1 = init::$0|3

View File

@ -1449,41 +1449,6 @@ Alias (byte) makecharset::s#1 = (byte) makecharset::s#4
Alias (byte*) print_line_cursor#12 = (byte*) print_line_cursor#23 (byte*) print_line_cursor#35
Alias (byte*) print_char_cursor#20 = (byte*) print_char_cursor#40
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte) memset::c#1
Self Phi Eliminated (byte*) memset::end#1
Self Phi Eliminated (void*) memset::str#4
Self Phi Eliminated (byte*) print_line_cursor#14
Self Phi Eliminated (byte*) print_char_cursor#21
Self Phi Eliminated (byte*) print_screen#5
Self Phi Eliminated (byte) c1A#17
Self Phi Eliminated (byte) c1B#17
Self Phi Eliminated (byte) c2A#18
Self Phi Eliminated (byte) c2B#18
Self Phi Eliminated (byte*) print_line_cursor#10
Self Phi Eliminated (byte*) print_char_cursor#15
Self Phi Eliminated (byte) c1A#14
Self Phi Eliminated (byte) c1B#14
Self Phi Eliminated (byte) c2A#14
Self Phi Eliminated (byte) c2B#14
Self Phi Eliminated (byte*) doplasma::screen#6
Self Phi Eliminated (byte) c2A#15
Self Phi Eliminated (byte) c2B#15
Self Phi Eliminated (byte*) doplasma::screen#3
Self Phi Eliminated (byte) c1A#22
Self Phi Eliminated (byte) c1B#22
Self Phi Eliminated (byte*) doplasma::screen#1
Self Phi Eliminated (byte) doplasma::i2#3
Self Phi Eliminated (byte) c1A#10
Self Phi Eliminated (byte) c1B#10
Self Phi Eliminated (byte) c2A#10
Self Phi Eliminated (byte) c2B#10
Self Phi Eliminated (byte) makecharset::s#1
Self Phi Eliminated (word) makecharset::c#10
Self Phi Eliminated (byte) makecharset::i#2
Self Phi Eliminated (byte*) makecharset::charset#1
Self Phi Eliminated (byte*) print_line_cursor#12
Self Phi Eliminated (byte*) print_char_cursor#20
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (word) memset::num#1 (word) memset::num#0
Identical Phi Values (void*) memset::str#2 (void*) memset::str#0
Identical Phi Values (byte) memset::c#2 (byte) memset::c#0
@ -1557,6 +1522,19 @@ Identical Phi Values (byte) c2A#11 (byte) c2A#1
Identical Phi Values (byte) c2B#11 (byte) c2B#1
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values (void*) memset::return#0 (void*) memset::str#0
Identical Phi Values (byte*) doplasma::screen#2 (byte*) doplasma::screen#0
Identical Phi Values (byte) c1A#20 (byte) c1A#3
Identical Phi Values (byte) c1B#20 (byte) c1B#3
Identical Phi Values (byte) c2A#22 (byte) c2A#3
Identical Phi Values (byte) c2B#22 (byte) c2B#3
Identical Phi Values (byte) makecharset::s#3 (byte) makecharset::s#0
Identical Phi Values (word) makecharset::c#12 (word) makecharset::c#2
Identical Phi Values (byte*) makecharset::charset#6 (byte*) makecharset::charset#7
Identical Phi Values (byte*) print_line_cursor#38 (byte*) print_line_cursor#39
Identical Phi Values (byte*) print_char_cursor#43 (byte*) print_char_cursor#44
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values (byte*) makecharset::charset#7 (byte*) makecharset::charset#0
Identical Phi Values (byte*) print_line_cursor#39 (byte*) print_line_cursor#0
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) memset::$1 [9] if((word) memset::num#0<=(byte) 0) goto memset::@1
Simple Condition (bool~) memset::$4 [21] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@4
@ -1565,7 +1543,7 @@ Simple Condition (bool~) doplasma::$2 [138] if((byte) doplasma::i#1<(byte) $19)
Simple Condition (bool~) doplasma::$4 [152] if((byte) doplasma::i1#1<(byte) $28) goto doplasma::@3
Simple Condition (bool~) doplasma::$7 [167] unroll if((byte) doplasma::ii#1<(byte) $19) goto doplasma::@6
Simple Condition (bool~) doplasma::$8 [171] if((byte) doplasma::i2#1<(byte) $28) goto doplasma::@5
Simple Condition (bool~) makecharset::$6 [202] if((byte~) makecharset::$4<=(byte) makecharset::s#3) goto makecharset::@4
Simple Condition (bool~) makecharset::$6 [202] if((byte~) makecharset::$4<=(byte) makecharset::s#0) goto makecharset::@4
Simple Condition (bool~) makecharset::$7 [206] if((byte) makecharset::ii#1<(byte) 8) goto makecharset::@3
Simple Condition (bool~) makecharset::$10 [215] if((byte) makecharset::i#1<(byte) 8) goto makecharset::@2
Simple Condition (bool~) makecharset::$13 [220] if((byte~) makecharset::$11!=(byte) 0) goto makecharset::@9
@ -1624,34 +1602,12 @@ Successful SSA optimization Pass2ConstantValues
if() condition always false - eliminating [9] if((const word) memset::num#0<=(byte) 0) goto memset::@1
if() condition always true - replacing block destination [99] if(true) goto main::@4
Successful SSA optimization Pass2ConstantIfs
De-inlining pointer[w] to *(pointer+w) [212] *((byte*) makecharset::charset#6 + (word~) makecharset::$9) ← (byte) makecharset::b#3
De-inlining pointer[w] to *(pointer+w) [212] *((const byte*) makecharset::charset#0 + (word~) makecharset::$9) ← (byte) makecharset::b#3
Successful SSA optimization Pass2DeInlineWordDerefIdx
Eliminating unused variable (void*) memset::return#2 and assignment [13] (void*) memset::return#2 ← (void*) memset::str#0
Successful SSA optimization PassNEliminateUnusedVars
Removing unused block main::@return
Successful SSA optimization Pass2EliminateUnusedBlocks
Self Phi Eliminated (byte*) doplasma::screen#2
Self Phi Eliminated (byte) c1A#20
Self Phi Eliminated (byte) c1B#20
Self Phi Eliminated (byte) c2A#22
Self Phi Eliminated (byte) c2B#22
Self Phi Eliminated (byte) makecharset::s#3
Self Phi Eliminated (word) makecharset::c#12
Self Phi Eliminated (byte*) makecharset::charset#6
Self Phi Eliminated (byte*) print_line_cursor#38
Self Phi Eliminated (byte*) print_char_cursor#43
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte*) doplasma::screen#2 (const byte*) doplasma::screen#0
Identical Phi Values (byte) c1A#20 (byte) c1A#3
Identical Phi Values (byte) c1B#20 (byte) c1B#3
Identical Phi Values (byte) c2A#22 (byte) c2A#3
Identical Phi Values (byte) c2B#22 (byte) c2B#3
Identical Phi Values (byte) makecharset::s#3 (byte) makecharset::s#0
Identical Phi Values (word) makecharset::c#12 (word) makecharset::c#2
Identical Phi Values (byte*) makecharset::charset#6 (byte*) makecharset::charset#7
Identical Phi Values (byte*) print_line_cursor#38 (byte*) print_line_cursor#39
Identical Phi Values (byte*) print_char_cursor#43 (byte*) print_char_cursor#44
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [22] (byte*~) main::$2 ← (const byte*) COLS#0 + (word) $3e8
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const void*) memset::str#0 = (void*)print_line_cursor#0
@ -1664,8 +1620,6 @@ Constant value identified (byte*)memset::str#0 in [2] (byte*) memset::dst#0 ←
Successful SSA optimization Pass2ConstantValues
Resolved ranged next value [25] main::col#1 ← ++ main::col#2 to ++
Resolved ranged comparison value [26] if(main::col#1!=rangelast(COLS#0,main::$2)) goto main::@1 to (byte*)(const byte*) main::$2+(number) 1
Eliminating unused variable - keeping the phi block (byte*) print_line_cursor#39
Successful SSA optimization PassNEliminateUnusedVars
Adding number conversion cast (unumber) 1 in if((byte*) main::col#1!=(byte*)(const byte*) main::$2+(number) 1) goto main::@1
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant integer cast (const byte*) main::$2+(unumber)(number) 1
@ -1673,10 +1627,6 @@ Simplifying constant integer cast 1
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 1
Successful SSA optimization PassNFinalizeNumberTypeConversions
Self Phi Eliminated (byte*) makecharset::charset#7
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte*) makecharset::charset#7 (const byte*) makecharset::charset#0
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [26] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff
Constant right-side identified [29] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0
Successful SSA optimization Pass2ConstantRValueConsolidation

View File

@ -1583,41 +1583,6 @@ Alias (byte) makecharset::s#1 = (byte) makecharset::s#4
Alias (byte*) print_line_cursor#12 = (byte*) print_line_cursor#22 (byte*) print_line_cursor#34
Alias (byte*) print_char_cursor#20 = (byte*) print_char_cursor#39
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte) memset::c#1
Self Phi Eliminated (byte*) memset::end#1
Self Phi Eliminated (void*) memset::str#4
Self Phi Eliminated (byte*) print_line_cursor#14
Self Phi Eliminated (byte*) print_char_cursor#21
Self Phi Eliminated (byte) c1A#21
Self Phi Eliminated (byte) c1B#21
Self Phi Eliminated (byte) c2A#22
Self Phi Eliminated (byte) c2B#22
Self Phi Eliminated (byte*) print_screen#5
Self Phi Eliminated (byte*) print_line_cursor#10
Self Phi Eliminated (byte*) print_char_cursor#15
Self Phi Eliminated (byte) c1A#11
Self Phi Eliminated (byte) c1B#11
Self Phi Eliminated (byte) c2A#10
Self Phi Eliminated (byte) c2B#10
Self Phi Eliminated (byte*) doplasma::screen#8
Self Phi Eliminated (byte) c2A#11
Self Phi Eliminated (byte) c2B#11
Self Phi Eliminated (byte*) doplasma::screen#6
Self Phi Eliminated (byte) c1A#30
Self Phi Eliminated (byte) c1B#30
Self Phi Eliminated (byte) doplasma::ii#2
Self Phi Eliminated (byte*) doplasma::screen#3
Self Phi Eliminated (byte) c1A#12
Self Phi Eliminated (byte) c1B#12
Self Phi Eliminated (byte) c2A#12
Self Phi Eliminated (byte) c2B#12
Self Phi Eliminated (byte) makecharset::s#1
Self Phi Eliminated (word) makecharset::c#10
Self Phi Eliminated (byte) makecharset::i#2
Self Phi Eliminated (byte*) makecharset::charset#1
Self Phi Eliminated (byte*) print_line_cursor#12
Self Phi Eliminated (byte*) print_char_cursor#20
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (word) memset::num#1 (word) memset::num#0
Identical Phi Values (void*) memset::str#2 (void*) memset::str#0
Identical Phi Values (byte) memset::c#2 (byte) memset::c#0
@ -1690,6 +1655,18 @@ Identical Phi Values (byte) c2A#13 (byte) c2A#14
Identical Phi Values (byte) c2B#13 (byte) c2B#14
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values (void*) memset::return#0 (void*) memset::str#0
Identical Phi Values (byte) c1A#27 (byte) c1A#4
Identical Phi Values (byte) c1B#27 (byte) c1B#4
Identical Phi Values (byte) c2A#29 (byte) c2A#4
Identical Phi Values (byte) c2B#29 (byte) c2B#4
Identical Phi Values (byte) makecharset::s#3 (byte) makecharset::s#0
Identical Phi Values (word) makecharset::c#12 (word) makecharset::c#2
Identical Phi Values (byte*) makecharset::charset#6 (byte*) makecharset::charset#7
Identical Phi Values (byte*) print_line_cursor#39 (byte*) print_line_cursor#41
Identical Phi Values (byte*) print_char_cursor#44 (byte*) print_char_cursor#46
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values (byte*) makecharset::charset#7 (byte*) makecharset::charset#0
Identical Phi Values (byte*) print_line_cursor#41 (byte*) print_line_cursor#0
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) memset::$1 [9] if((word) memset::num#0<=(byte) 0) goto memset::@1
Simple Condition (bool~) memset::$4 [21] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@4
@ -1698,7 +1675,7 @@ Simple Condition (bool~) doplasma::$1 [160] if((byte) doplasma::i#1<(byte) $19)
Simple Condition (bool~) doplasma::$3 [174] if((byte) doplasma::i1#1<(byte) $28) goto doplasma::@3
Simple Condition (bool~) doplasma::$5 [186] if((byte) doplasma::i2#1<(byte) $28) goto doplasma::@6
Simple Condition (bool~) doplasma::$6 [191] if((byte) doplasma::ii#1<(byte) $19) goto doplasma::@5
Simple Condition (bool~) makecharset::$6 [222] if((byte~) makecharset::$4<=(byte) makecharset::s#3) goto makecharset::@4
Simple Condition (bool~) makecharset::$6 [222] if((byte~) makecharset::$4<=(byte) makecharset::s#0) goto makecharset::@4
Simple Condition (bool~) makecharset::$7 [226] if((byte) makecharset::ii#1<(byte) 8) goto makecharset::@3
Simple Condition (bool~) makecharset::$10 [235] if((byte) makecharset::i#1<(byte) 8) goto makecharset::@2
Simple Condition (bool~) makecharset::$13 [240] if((byte~) makecharset::$11!=(byte) 0) goto makecharset::@9
@ -1762,32 +1739,12 @@ Successful SSA optimization Pass2ConstantValues
if() condition always false - eliminating [9] if((const word) memset::num#0<=(byte) 0) goto memset::@1
if() condition always true - replacing block destination [82] if(true) goto main::@4
Successful SSA optimization Pass2ConstantIfs
De-inlining pointer[w] to *(pointer+w) [232] *((byte*) makecharset::charset#6 + (word~) makecharset::$9) ← (byte) makecharset::b#3
De-inlining pointer[w] to *(pointer+w) [232] *((const byte*) makecharset::charset#0 + (word~) makecharset::$9) ← (byte) makecharset::b#3
Successful SSA optimization Pass2DeInlineWordDerefIdx
Eliminating unused variable (void*) memset::return#2 and assignment [13] (void*) memset::return#2 ← (void*) memset::str#0
Successful SSA optimization PassNEliminateUnusedVars
Removing unused block main::@return
Successful SSA optimization Pass2EliminateUnusedBlocks
Self Phi Eliminated (byte) c1A#27
Self Phi Eliminated (byte) c1B#27
Self Phi Eliminated (byte) c2A#29
Self Phi Eliminated (byte) c2B#29
Self Phi Eliminated (byte) makecharset::s#3
Self Phi Eliminated (word) makecharset::c#12
Self Phi Eliminated (byte*) makecharset::charset#6
Self Phi Eliminated (byte*) print_line_cursor#39
Self Phi Eliminated (byte*) print_char_cursor#44
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte) c1A#27 (byte) c1A#4
Identical Phi Values (byte) c1B#27 (byte) c1B#4
Identical Phi Values (byte) c2A#29 (byte) c2A#4
Identical Phi Values (byte) c2B#29 (byte) c2B#4
Identical Phi Values (byte) makecharset::s#3 (byte) makecharset::s#0
Identical Phi Values (word) makecharset::c#12 (word) makecharset::c#2
Identical Phi Values (byte*) makecharset::charset#6 (byte*) makecharset::charset#7
Identical Phi Values (byte*) print_line_cursor#39 (byte*) print_line_cursor#41
Identical Phi Values (byte*) print_char_cursor#44 (byte*) print_char_cursor#46
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [22] (byte*~) main::$1 ← (const byte*) COLS#0 + (word) $3e8
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const void*) memset::str#0 = (void*)print_line_cursor#0
@ -1802,8 +1759,6 @@ Constant value identified (byte*)memset::str#0 in [2] (byte*) memset::dst#0 ←
Successful SSA optimization Pass2ConstantValues
Resolved ranged next value [25] main::col#1 ← ++ main::col#2 to ++
Resolved ranged comparison value [26] if(main::col#1!=rangelast(COLS#0,main::$1)) goto main::@1 to (byte*)(const byte*) main::$1+(number) 1
Eliminating unused variable - keeping the phi block (byte*) print_line_cursor#41
Successful SSA optimization PassNEliminateUnusedVars
Adding number conversion cast (unumber) 1 in if((byte*) main::col#1!=(byte*)(const byte*) main::$1+(number) 1) goto main::@1
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant integer cast (const byte*) main::$1+(unumber)(number) 1
@ -1811,10 +1766,6 @@ Simplifying constant integer cast 1
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 1
Successful SSA optimization PassNFinalizeNumberTypeConversions
Self Phi Eliminated (byte*) makecharset::charset#7
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte*) makecharset::charset#7 (const byte*) makecharset::charset#0
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [28] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff
Constant right-side identified [31] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0
Constant right-side identified [37] (word~) main::toD0182_$1#0 ← (const word) main::toD0182_$0#0 & (word) $3fff

View File

@ -1615,14 +1615,6 @@ Alias (byte) anim::angle#10 = (byte) anim::angle#3
Alias (signed byte) anim::sin_a#1 = (signed byte) anim::sin_a#7
Alias (byte*) COS#10 = (byte*) COS#13
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte*) init::sprites_ptr#1
Self Phi Eliminated (byte*) COS#1
Self Phi Eliminated (byte) anim::angle#2
Self Phi Eliminated (signed byte) anim::cos_a#1
Self Phi Eliminated (signed byte) anim::sin_a#1
Self Phi Eliminated (byte) anim::angle#10
Self Phi Eliminated (byte*) COS#10
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte) mulf8u_prepared::b#1 (byte) mulf8u_prepared::b#0
Identical Phi Values (dword) print_dword_at::dw#1 (dword) print_dword_at::dw#0
Identical Phi Values (byte*) print_dword_at::at#1 (byte*) print_dword_at::at#0
@ -1636,6 +1628,8 @@ Identical Phi Values (signed byte) anim::sin_a#1 (signed byte) anim::sin_a#0
Identical Phi Values (byte) anim::angle#10 (byte) anim::angle#2
Identical Phi Values (byte*) COS#10 (byte*) COS#1
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values (byte*) COS#4 (byte*) COS#0
Successful SSA optimization Pass2IdenticalPhiElimination
Identified duplicate assignment right side [135] (byte~) clock_start::$2 ← (byte) CIA_TIMER_CONTROL_STOP#0 | (byte) CIA_TIMER_CONTROL_CONTINUOUS#0
Identified duplicate assignment right side [142] (byte~) clock_start::$6 ← (byte) CIA_TIMER_CONTROL_START#0 | (byte) CIA_TIMER_CONTROL_CONTINUOUS#0
Successful SSA optimization Pass2DuplicateRValueIdentification
@ -1736,10 +1730,6 @@ Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias (byte~) clock_start::$1 = (byte~) clock_start::$0 (byte~) clock_start::$2
Alias (byte~) clock_start::$6 = (byte~) clock_start::$4 (byte~) clock_start::$7
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte*) COS#4
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte*) COS#4 (byte*) COS#0
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [0] (byte*) mulf_init::sqr1_hi#0 ← (const byte[$200]) mulf_sqr1_hi#0 + (byte) 1
Constant right-side identified [1] (byte*) mulf_init::sqr1_lo#0 ← (const byte[$200]) mulf_sqr1_lo#0 + (byte) 1
Constant right-side identified [14] (byte*~) mulf_init::$13 ← (const byte[$200]) mulf_sqr1_lo#0 + (word) $200

View File

@ -12,8 +12,8 @@ main: scope:[main] from @1
[5] call fillscreen
to:main::@1
main::@1: scope:[main] from main main::@1 main::@4
[6] (byte*) main::nxt#9 ← phi( main/(const byte*) TEXT#0 main::@4/(byte*) main::nxt#10 )
[6] (byte) main::scroll#7 ← phi( main/(byte) 7 main::@4/(byte) main::scroll#4 )
[6] (byte*) main::nxt#9 ← phi( main/(const byte*) TEXT#0 main::@1/(byte*) main::nxt#9 main::@4/(byte*) main::nxt#10 )
[6] (byte) main::scroll#7 ← phi( main/(byte) 7 main::@1/(byte) main::scroll#7 main::@4/(byte) main::scroll#4 )
[7] if(*((const byte*) RASTER#0)!=(byte) $fe) goto main::@1
to:main::@2
main::@2: scope:[main] from main::@1 main::@2

View File

@ -274,15 +274,6 @@ Alias (byte*) fillscreen::cursor#0 = (byte*) fillscreen::screen#1
Successful SSA optimization Pass2AliasElimination
Alias (byte) main::scroll#10 = (byte) main::scroll#6
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte) main::scroll#7
Self Phi Eliminated (byte*) main::nxt#9
Self Phi Eliminated (byte) main::scroll#3
Self Phi Eliminated (byte*) main::nxt#6
Self Phi Eliminated (byte*) main::nxt#3
Self Phi Eliminated (byte) main::scroll#10
Self Phi Eliminated (byte) fillscreen::fill#1
Self Phi Eliminated (byte*) fillscreen::screen#2
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte) main::scroll#3 (byte) main::scroll#7
Identical Phi Values (byte*) main::nxt#6 (byte*) main::nxt#9
Identical Phi Values (byte*) main::nxt#3 (byte*) main::nxt#6
@ -342,9 +333,10 @@ Consolidated array index constant in *(main::line#0+$27)
Successful SSA optimization Pass2ConstantAdditionElimination
Alias (byte) main::i#2 = (byte~) main::$6
Successful SSA optimization Pass2AliasElimination
Added new block during phi lifting main::@14(between main::@5 and main::@7)
Added new block during phi lifting main::@15(between main::@8 and main::@8)
Added new block during phi lifting main::@16(between main::@9 and main::@11)
Added new block during phi lifting main::@14(between main::@2 and main::@2)
Added new block during phi lifting main::@15(between main::@5 and main::@7)
Added new block during phi lifting main::@16(between main::@8 and main::@8)
Added new block during phi lifting main::@17(between main::@9 and main::@11)
Added new block during phi lifting fillscreen::@3(between fillscreen::@1 and fillscreen::@1)
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @2
@ -360,19 +352,22 @@ Calls in [main] to fillscreen:6
Created 8 initial phi equivalence classes
Coalesced [22] main::c#3 ← main::c#1
Coalesced [26] main::nxt#12 ← main::nxt#1
Coalesced [30] main::scroll#11 ← main::scroll#4
Coalesced [31] main::nxt#11 ← main::nxt#10
Coalesced [26] main::nxt#13 ← main::nxt#1
Coalesced [30] main::scroll#12 ← main::scroll#4
Coalesced [31] main::nxt#12 ← main::nxt#10
Coalesced [32] main::c#4 ← main::c#0
Coalesced [33] main::nxt#14 ← main::nxt#9
Coalesced [33] main::nxt#15 ← main::nxt#9
Coalesced [34] main::i#3 ← main::i#1
Coalesced [35] main::scroll#12 ← main::scroll#1
Coalesced (already) [36] main::nxt#13 ← main::nxt#9
Coalesced [43] fillscreen::cursor#3 ← fillscreen::cursor#1
Coalesced [35] main::scroll#13 ← main::scroll#1
Coalesced (already) [36] main::nxt#14 ← main::nxt#9
Coalesced (already) [37] main::scroll#11 ← main::scroll#7
Coalesced (already) [38] main::nxt#11 ← main::nxt#9
Coalesced [45] fillscreen::cursor#3 ← fillscreen::cursor#1
Coalesced down to 5 phi equivalence classes
Culled Empty Block (label) @3
Culled Empty Block (label) main::@13
Culled Empty Block (label) main::@6
Culled Empty Block (label) main::@17
Culled Empty Block (label) main::@16
Culled Empty Block (label) main::@15
Culled Empty Block (label) main::@14
@ -407,8 +402,8 @@ main: scope:[main] from @1
[5] call fillscreen
to:main::@1
main::@1: scope:[main] from main main::@1 main::@4
[6] (byte*) main::nxt#9 ← phi( main/(const byte*) TEXT#0 main::@4/(byte*) main::nxt#10 )
[6] (byte) main::scroll#7 ← phi( main/(byte) 7 main::@4/(byte) main::scroll#4 )
[6] (byte*) main::nxt#9 ← phi( main/(const byte*) TEXT#0 main::@1/(byte*) main::nxt#9 main::@4/(byte*) main::nxt#10 )
[6] (byte) main::scroll#7 ← phi( main/(byte) 7 main::@1/(byte) main::scroll#7 main::@4/(byte) main::scroll#4 )
[7] if(*((const byte*) RASTER#0)!=(byte) $fe) goto main::@1
to:main::@2
main::@2: scope:[main] from main::@1 main::@2
@ -483,11 +478,11 @@ VARIABLE REGISTER WEIGHTS
(byte*) main::nxt#1 22.0
(byte*) main::nxt#10 11.0
(byte*) main::nxt#4 11.0
(byte*) main::nxt#9 3.6666666666666665
(byte*) main::nxt#9 20.500000000000004
(byte) main::scroll
(byte) main::scroll#1 16.5
(byte) main::scroll#4 11.0
(byte) main::scroll#7 5.5
(byte) main::scroll#7 56.0
Initial phi equivalence classes
[ main::scroll#7 main::scroll#4 main::scroll#1 ]
@ -557,8 +552,11 @@ main: {
sta scroll
jmp b1
// Wait for raster
// [6] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
// [6] phi from main::@1 main::@4 to main::@1 [phi:main::@1/main::@4->main::@1]
b1_from_b1:
b1_from_b4:
// [6] phi (byte*) main::nxt#9 = (byte*) main::nxt#9 [phi:main::@1/main::@4->main::@1#0] -- register_copy
// [6] phi (byte) main::scroll#7 = (byte) main::scroll#7 [phi:main::@1/main::@4->main::@1#1] -- register_copy
jmp b1
// main::@1
b1:
@ -668,11 +666,7 @@ main: {
sta SCROLL
// [24] *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0) -- _deref_pbuc1=_dec__deref_pbuc1
dec BGCOL
// [6] phi from main::@4 to main::@1 [phi:main::@4->main::@1]
b1_from_b4:
// [6] phi (byte*) main::nxt#9 = (byte*) main::nxt#10 [phi:main::@4->main::@1#0] -- register_copy
// [6] phi (byte) main::scroll#7 = (byte) main::scroll#4 [phi:main::@4->main::@1#1] -- register_copy
jmp b1
jmp b1_from_b4
}
// fillscreen
fillscreen: {
@ -741,13 +735,13 @@ Potential registers zp ZP_WORD:5 [ main::nxt#4 main::nxt#9 main::nxt#10 main::nx
Potential registers zp ZP_WORD:7 [ fillscreen::cursor#2 fillscreen::cursor#1 ] : zp ZP_WORD:7 ,
REGISTER UPLIFT SCOPES
Uplift Scope [main] 353.5: zp ZP_BYTE:3 [ main::i#2 main::i#1 ] 71.5: zp ZP_BYTE:4 [ main::c#2 main::c#1 main::c#0 ] 47.67: zp ZP_WORD:5 [ main::nxt#4 main::nxt#9 main::nxt#10 main::nxt#1 ] 33: zp ZP_BYTE:2 [ main::scroll#7 main::scroll#4 main::scroll#1 ]
Uplift Scope [main] 353.5: zp ZP_BYTE:3 [ main::i#2 main::i#1 ] 83.5: zp ZP_BYTE:2 [ main::scroll#7 main::scroll#4 main::scroll#1 ] 71.5: zp ZP_BYTE:4 [ main::c#2 main::c#1 main::c#0 ] 64.5: zp ZP_WORD:5 [ main::nxt#4 main::nxt#9 main::nxt#10 main::nxt#1 ]
Uplift Scope [fillscreen] 33: zp ZP_WORD:7 [ fillscreen::cursor#2 fillscreen::cursor#1 ]
Uplift Scope []
Uplifting [main] best 8554 combination reg byte x [ main::i#2 main::i#1 ] reg byte x [ main::c#2 main::c#1 main::c#0 ] zp ZP_WORD:5 [ main::nxt#4 main::nxt#9 main::nxt#10 main::nxt#1 ] reg byte x [ main::scroll#7 main::scroll#4 main::scroll#1 ]
Uplifting [fillscreen] best 8554 combination zp ZP_WORD:7 [ fillscreen::cursor#2 fillscreen::cursor#1 ]
Uplifting [] best 8554 combination
Uplifting [main] best 8284 combination reg byte x [ main::i#2 main::i#1 ] reg byte x [ main::scroll#7 main::scroll#4 main::scroll#1 ] reg byte x [ main::c#2 main::c#1 main::c#0 ] zp ZP_WORD:5 [ main::nxt#4 main::nxt#9 main::nxt#10 main::nxt#1 ]
Uplifting [fillscreen] best 8284 combination zp ZP_WORD:7 [ fillscreen::cursor#2 fillscreen::cursor#1 ]
Uplifting [] best 8284 combination
Allocated (was zp ZP_WORD:5) zp ZP_WORD:2 [ main::nxt#4 main::nxt#9 main::nxt#10 main::nxt#1 ]
Allocated (was zp ZP_WORD:7) zp ZP_WORD:4 [ fillscreen::cursor#2 fillscreen::cursor#1 ]
@ -797,8 +791,11 @@ main: {
ldx #7
jmp b1
// Wait for raster
// [6] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
// [6] phi from main::@1 main::@4 to main::@1 [phi:main::@1/main::@4->main::@1]
b1_from_b1:
b1_from_b4:
// [6] phi (byte*) main::nxt#9 = (byte*) main::nxt#9 [phi:main::@1/main::@4->main::@1#0] -- register_copy
// [6] phi (byte) main::scroll#7 = (byte) main::scroll#7 [phi:main::@1/main::@4->main::@1#1] -- register_copy
jmp b1
// main::@1
b1:
@ -899,11 +896,7 @@ main: {
stx SCROLL
// [24] *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0) -- _deref_pbuc1=_dec__deref_pbuc1
dec BGCOL
// [6] phi from main::@4 to main::@1 [phi:main::@4->main::@1]
b1_from_b4:
// [6] phi (byte*) main::nxt#9 = (byte*) main::nxt#10 [phi:main::@4->main::@1#0] -- register_copy
// [6] phi (byte) main::scroll#7 = (byte) main::scroll#4 [phi:main::@4->main::@1#1] -- register_copy
jmp b1
jmp b1_from_b4
}
// fillscreen
fillscreen: {
@ -968,6 +961,7 @@ Replacing label b1_from_b1 with b1
Replacing label b4_from_b3 with b4
Replacing label b5_from_b5 with b5
Replacing label b8_from_b6 with b8
Replacing label b1_from_b4 with b1
Replacing label b1_from_b1 with b1
Replacing label b1_from_b1 with b1
Removing instruction b1_from_bbegin:
@ -975,6 +969,7 @@ Removing instruction b1:
Removing instruction main_from_b1:
Removing instruction bend_from_b1:
Removing instruction b1_from_b1:
Removing instruction b1_from_b4:
Removing instruction b5_from_b5:
Removing instruction b8_from_b6:
Removing instruction b4_from_b3:
@ -989,7 +984,6 @@ Removing instruction b6:
Removing instruction b7:
Removing instruction b8_from_b7:
Removing instruction b4_from_b8:
Removing instruction b1_from_b4:
Removing instruction b1_from_fillscreen:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
@ -1050,11 +1044,11 @@ FINAL SYMBOL TABLE
(byte*) main::nxt#1 nxt zp ZP_WORD:2 22.0
(byte*) main::nxt#10 nxt zp ZP_WORD:2 11.0
(byte*) main::nxt#4 nxt zp ZP_WORD:2 11.0
(byte*) main::nxt#9 nxt zp ZP_WORD:2 3.6666666666666665
(byte*) main::nxt#9 nxt zp ZP_WORD:2 20.500000000000004
(byte) main::scroll
(byte) main::scroll#1 reg byte x 16.5
(byte) main::scroll#4 reg byte x 11.0
(byte) main::scroll#7 reg byte x 5.5
(byte) main::scroll#7 reg byte x 56.0
reg byte x [ main::scroll#7 main::scroll#4 main::scroll#1 ]
reg byte x [ main::i#2 main::i#1 ]
@ -1064,7 +1058,7 @@ zp ZP_WORD:4 [ fillscreen::cursor#2 fillscreen::cursor#1 ]
FINAL ASSEMBLER
Score: 6202
Score: 5932
// File Comments
// Basic Upstart
@ -1100,7 +1094,9 @@ main: {
// [6] phi (byte) main::scroll#7 = (byte) 7 [phi:main->main::@1#1] -- vbuxx=vbuc1
ldx #7
// Wait for raster
// [6] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
// [6] phi from main::@1 main::@4 to main::@1 [phi:main::@1/main::@4->main::@1]
// [6] phi (byte*) main::nxt#9 = (byte*) main::nxt#9 [phi:main::@1/main::@4->main::@1#0] -- register_copy
// [6] phi (byte) main::scroll#7 = (byte) main::scroll#7 [phi:main::@1/main::@4->main::@1#1] -- register_copy
// main::@1
b1:
// while(*RASTER!=$fe)
@ -1194,9 +1190,6 @@ main: {
// --*BGCOL;
// [24] *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0) -- _deref_pbuc1=_dec__deref_pbuc1
dec BGCOL
// [6] phi from main::@4 to main::@1 [phi:main::@4->main::@1]
// [6] phi (byte*) main::nxt#9 = (byte*) main::nxt#10 [phi:main::@4->main::@1#0] -- register_copy
// [6] phi (byte) main::scroll#7 = (byte) main::scroll#4 [phi:main::@4->main::@1#1] -- register_copy
jmp b1
}
// fillscreen

View File

@ -42,11 +42,11 @@
(byte*) main::nxt#1 nxt zp ZP_WORD:2 22.0
(byte*) main::nxt#10 nxt zp ZP_WORD:2 11.0
(byte*) main::nxt#4 nxt zp ZP_WORD:2 11.0
(byte*) main::nxt#9 nxt zp ZP_WORD:2 3.6666666666666665
(byte*) main::nxt#9 nxt zp ZP_WORD:2 20.500000000000004
(byte) main::scroll
(byte) main::scroll#1 reg byte x 16.5
(byte) main::scroll#4 reg byte x 11.0
(byte) main::scroll#7 reg byte x 5.5
(byte) main::scroll#7 reg byte x 56.0
reg byte x [ main::scroll#7 main::scroll#4 main::scroll#1 ]
reg byte x [ main::i#2 main::i#1 ]

View File

@ -12,10 +12,10 @@ main: scope:[main] from @1
[5] call fillscreen
to:main::@1
main::@1: scope:[main] from main main::@1 main::@4
[6] (byte*) current_chargen#27 ← phi( main/(const byte*) CHARGEN#0 main::@4/(byte*) current_chargen#11 )
[6] (byte*) nxt#31 ← phi( main/(const byte*) TEXT#0 main::@4/(byte*) nxt#14 )
[6] (byte) current_bit#29 ← phi( main/(byte) 1 main::@4/(byte) current_bit#12 )
[6] (byte) scroll#18 ← phi( main/(byte) 7 main::@4/(byte) scroll#10 )
[6] (byte*) current_chargen#27 ← phi( main::@1/(byte*) current_chargen#27 main/(const byte*) CHARGEN#0 main::@4/(byte*) current_chargen#11 )
[6] (byte*) nxt#31 ← phi( main::@1/(byte*) nxt#31 main/(const byte*) TEXT#0 main::@4/(byte*) nxt#14 )
[6] (byte) current_bit#29 ← phi( main::@1/(byte) current_bit#29 main/(byte) 1 main::@4/(byte) current_bit#12 )
[6] (byte) scroll#18 ← phi( main::@1/(byte) scroll#18 main/(byte) 7 main::@4/(byte) scroll#10 )
[7] if(*((const byte*) RASTER#0)!=(byte) $fe) goto main::@1
to:main::@2
main::@2: scope:[main] from main::@1 main::@2

View File

@ -833,20 +833,6 @@ Alias (byte*) current_chargen#12 = (byte*) current_chargen#13
Alias (byte) current_bit#14 = (byte) current_bit#15
Alias (byte*) nxt#16 = (byte*) nxt#32
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte) scroll#18
Self Phi Eliminated (byte) current_bit#29
Self Phi Eliminated (byte*) nxt#31
Self Phi Eliminated (byte*) current_chargen#27
Self Phi Eliminated (byte) scroll#13
Self Phi Eliminated (byte) current_bit#17
Self Phi Eliminated (byte*) nxt#21
Self Phi Eliminated (byte*) current_chargen#15
Self Phi Eliminated (byte*) current_chargen#12
Self Phi Eliminated (byte) current_bit#14
Self Phi Eliminated (byte*) nxt#16
Self Phi Eliminated (byte) fillscreen::fill#1
Self Phi Eliminated (byte*) fillscreen::screen#2
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte) scroll#20 (byte) scroll#15
Identical Phi Values (byte) current_bit#30 (byte) current_bit#23
Identical Phi Values (byte*) nxt#34 (byte*) TEXT#0
@ -1026,6 +1012,7 @@ Consolidated array index constant in assignment *(SCREEN#0+(word)$28*7+1 + scrol
Successful SSA optimization Pass2ConstantAdditionElimination
Alias (byte) scroll_hard::i#2 = (byte~) scroll_hard::$2 (byte~) scroll_hard::$5 (byte~) scroll_hard::$8 (byte~) scroll_hard::$11 (byte~) scroll_hard::$14 (byte~) scroll_hard::$17 (byte~) scroll_hard::$20 (byte~) scroll_hard::$23
Successful SSA optimization Pass2AliasElimination
Added new block during phi lifting main::@9(between main::@2 and main::@2)
Added new block during phi lifting scroll_soft::@4(between scroll_soft and scroll_soft::@1)
Added new block during phi lifting scroll_bit::@9(between scroll_bit and scroll_bit::@1)
Added new block during phi lifting scroll_bit::@10(between scroll_bit::@4 and scroll_bit::@3)
@ -1049,39 +1036,44 @@ Adding NOP phi() at start of fillscreen
CALL GRAPH
Calls in [] to main:5
Calls in [main] to fillscreen:9 scroll_soft:15
Calls in [scroll_soft] to scroll_bit:24
Calls in [scroll_bit] to next_char:38 scroll_hard:46
Calls in [scroll_soft] to scroll_bit:28
Calls in [scroll_bit] to next_char:42 scroll_hard:50
Created 18 initial phi equivalence classes
Coalesced [17] scroll#22 ← scroll#10
Coalesced [18] current_bit#32 ← current_bit#12
Coalesced [19] nxt#38 ← nxt#14
Coalesced [20] current_chargen#31 ← current_chargen#11
Coalesced [25] current_bit#34 ← current_bit#21
Coalesced [26] nxt#40 ← nxt#35
Coalesced [27] current_chargen#33 ← current_chargen#19
Coalesced [31] scroll#23 ← scroll#3
Coalesced (already) [32] current_bit#33 ← current_bit#29
Coalesced (already) [33] nxt#39 ← nxt#31
Coalesced (already) [34] current_chargen#32 ← current_chargen#27
Coalesced [43] current_chargen#35 ← current_chargen#5
Coalesced [44] nxt#42 ← nxt#19
Coalesced [62] scroll_bit::r#5 ← scroll_bit::r#1
Coalesced [63] scroll_bit::sc#5 ← scroll_bit::sc#1
Coalesced (already) [64] current_chargen#34 ← current_chargen#27
Coalesced [65] current_bit#35 ← current_bit#5
Coalesced (already) [66] nxt#41 ← nxt#31
Coalesced [80] scroll_hard::i#3 ← scroll_hard::i#1
Coalesced [84] next_char::return#6 ← next_char::c#1
Coalesced [88] nxt#43 ← nxt#31
Coalesced [89] next_char::return#5 ← next_char::c#0
Coalesced [96] fillscreen::cursor#3 ← fillscreen::cursor#1
Coalesced [17] scroll#23 ← scroll#10
Coalesced [18] current_bit#33 ← current_bit#12
Coalesced [19] nxt#39 ← nxt#14
Coalesced [20] current_chargen#32 ← current_chargen#11
Coalesced (already) [21] scroll#22 ← scroll#18
Coalesced (already) [22] current_bit#32 ← current_bit#29
Coalesced (already) [23] nxt#38 ← nxt#31
Coalesced (already) [24] current_chargen#31 ← current_chargen#27
Coalesced [29] current_bit#35 ← current_bit#21
Coalesced [30] nxt#41 ← nxt#35
Coalesced [31] current_chargen#34 ← current_chargen#19
Coalesced [35] scroll#24 ← scroll#3
Coalesced (already) [36] current_bit#34 ← current_bit#29
Coalesced (already) [37] nxt#40 ← nxt#31
Coalesced (already) [38] current_chargen#33 ← current_chargen#27
Coalesced [47] current_chargen#36 ← current_chargen#5
Coalesced [48] nxt#43 ← nxt#19
Coalesced [66] scroll_bit::r#5 ← scroll_bit::r#1
Coalesced [67] scroll_bit::sc#5 ← scroll_bit::sc#1
Coalesced (already) [68] current_chargen#35 ← current_chargen#27
Coalesced [69] current_bit#36 ← current_bit#5
Coalesced (already) [70] nxt#42 ← nxt#31
Coalesced [84] scroll_hard::i#3 ← scroll_hard::i#1
Coalesced [88] next_char::return#6 ← next_char::c#1
Coalesced [92] nxt#44 ← nxt#31
Coalesced [93] next_char::return#5 ← next_char::c#0
Coalesced [100] fillscreen::cursor#3 ← fillscreen::cursor#1
Coalesced down to 10 phi equivalence classes
Culled Empty Block (label) @1
Culled Empty Block (label) @2
Culled Empty Block (label) @3
Culled Empty Block (label) @7
Culled Empty Block (label) main::@7
Culled Empty Block (label) main::@9
Culled Empty Block (label) scroll_soft::@3
Culled Empty Block (label) scroll_soft::@4
Culled Empty Block (label) scroll_bit::@10
@ -1119,10 +1111,10 @@ main: scope:[main] from @1
[5] call fillscreen
to:main::@1
main::@1: scope:[main] from main main::@1 main::@4
[6] (byte*) current_chargen#27 ← phi( main/(const byte*) CHARGEN#0 main::@4/(byte*) current_chargen#11 )
[6] (byte*) nxt#31 ← phi( main/(const byte*) TEXT#0 main::@4/(byte*) nxt#14 )
[6] (byte) current_bit#29 ← phi( main/(byte) 1 main::@4/(byte) current_bit#12 )
[6] (byte) scroll#18 ← phi( main/(byte) 7 main::@4/(byte) scroll#10 )
[6] (byte*) current_chargen#27 ← phi( main::@1/(byte*) current_chargen#27 main/(const byte*) CHARGEN#0 main::@4/(byte*) current_chargen#11 )
[6] (byte*) nxt#31 ← phi( main::@1/(byte*) nxt#31 main/(const byte*) TEXT#0 main::@4/(byte*) nxt#14 )
[6] (byte) current_bit#29 ← phi( main::@1/(byte) current_bit#29 main/(byte) 1 main::@4/(byte) current_bit#12 )
[6] (byte) scroll#18 ← phi( main::@1/(byte) scroll#18 main/(byte) 7 main::@4/(byte) scroll#10 )
[7] if(*((const byte*) RASTER#0)!=(byte) $fe) goto main::@1
to:main::@2
main::@2: scope:[main] from main::@1 main::@2
@ -1260,12 +1252,12 @@ VARIABLE REGISTER WEIGHTS
(byte) current_bit
(byte) current_bit#12 3.0
(byte) current_bit#21 5.833333333333333
(byte) current_bit#29 2.142857142857143
(byte) current_bit#29 31.0
(byte) current_bit#5 3.0
(byte*) current_chargen
(byte*) current_chargen#11 3.0
(byte*) current_chargen#19 5.944444444444444
(byte*) current_chargen#27 1.666666666666667
(byte*) current_chargen#27 24.111111111111107
(byte*) current_chargen#5 4.0
(void()) fillscreen((byte*) fillscreen::screen , (byte) fillscreen::fill)
(byte*) fillscreen::cursor
@ -1285,11 +1277,11 @@ VARIABLE REGISTER WEIGHTS
(byte*) nxt#14 3.0
(byte*) nxt#18 4.0
(byte*) nxt#19 0.5714285714285714
(byte*) nxt#31 1.5833333333333335
(byte*) nxt#31 18.41666666666667
(byte*) nxt#35 0.3333333333333333
(byte) scroll
(byte) scroll#10 3.0
(byte) scroll#18 3.25
(byte) scroll#18 53.75
(byte) scroll#3 3.0
(void()) scroll_bit()
(word~) scroll_bit::$7 4.0
@ -1420,8 +1412,13 @@ main: {
sta scroll
jmp b1
// Wait for raster
// [6] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
// [6] phi from main::@1 main::@4 to main::@1 [phi:main::@1/main::@4->main::@1]
b1_from_b1:
b1_from_b4:
// [6] phi (byte*) current_chargen#27 = (byte*) current_chargen#27 [phi:main::@1/main::@4->main::@1#0] -- register_copy
// [6] phi (byte*) nxt#31 = (byte*) nxt#31 [phi:main::@1/main::@4->main::@1#1] -- register_copy
// [6] phi (byte) current_bit#29 = (byte) current_bit#29 [phi:main::@1/main::@4->main::@1#2] -- register_copy
// [6] phi (byte) scroll#18 = (byte) scroll#18 [phi:main::@1/main::@4->main::@1#3] -- register_copy
jmp b1
// main::@1
b1:
@ -1448,13 +1445,7 @@ main: {
b4:
// [11] *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0) -- _deref_pbuc1=_dec__deref_pbuc1
dec BGCOL
// [6] phi from main::@4 to main::@1 [phi:main::@4->main::@1]
b1_from_b4:
// [6] phi (byte*) current_chargen#27 = (byte*) current_chargen#11 [phi:main::@4->main::@1#0] -- register_copy
// [6] phi (byte*) nxt#31 = (byte*) nxt#14 [phi:main::@4->main::@1#1] -- register_copy
// [6] phi (byte) current_bit#29 = (byte) current_bit#12 [phi:main::@4->main::@1#2] -- register_copy
// [6] phi (byte) scroll#18 = (byte) scroll#10 [phi:main::@4->main::@1#3] -- register_copy
jmp b1
jmp b1_from_b4
}
// scroll_soft
scroll_soft: {
@ -1880,22 +1871,22 @@ Potential registers zp ZP_BYTE:22 [ scroll_bit::$9 ] : zp ZP_BYTE:22 , reg byte
REGISTER UPLIFT SCOPES
Uplift Scope [scroll_bit] 202: zp ZP_BYTE:21 [ scroll_bit::bits#0 ] 202: zp ZP_BYTE:22 [ scroll_bit::$9 ] 189.38: zp ZP_BYTE:6 [ scroll_bit::r#2 scroll_bit::r#1 ] 110.62: zp ZP_WORD:7 [ scroll_bit::sc#2 scroll_bit::sc#1 ] 101: zp ZP_BYTE:9 [ scroll_bit::b#2 ] 4: zp ZP_WORD:17 [ scroll_bit::c#0 ] 4: zp ZP_WORD:19 [ scroll_bit::$7 ]
Uplift Scope [scroll_hard] 353.5: zp ZP_BYTE:10 [ scroll_hard::i#2 scroll_hard::i#1 ]
Uplift Scope [] 14.61: zp ZP_WORD:4 [ current_chargen#27 current_chargen#11 current_chargen#19 current_chargen#5 ] 13.98: zp ZP_BYTE:3 [ current_bit#29 current_bit#12 current_bit#21 current_bit#5 ] 9.49: zp ZP_WORD:11 [ nxt#18 nxt#31 nxt#14 nxt#35 nxt#19 ] 9.25: zp ZP_BYTE:2 [ scroll#18 scroll#10 scroll#3 ]
Uplift Scope [] 59.75: zp ZP_BYTE:2 [ scroll#18 scroll#10 scroll#3 ] 42.83: zp ZP_BYTE:3 [ current_bit#29 current_bit#12 current_bit#21 current_bit#5 ] 37.06: zp ZP_WORD:4 [ current_chargen#27 current_chargen#11 current_chargen#19 current_chargen#5 ] 26.32: zp ZP_WORD:11 [ nxt#18 nxt#31 nxt#14 nxt#35 nxt#19 ]
Uplift Scope [fillscreen] 33: zp ZP_WORD:14 [ fillscreen::cursor#2 fillscreen::cursor#1 ]
Uplift Scope [next_char] 8.5: zp ZP_BYTE:13 [ next_char::return#1 next_char::c#0 next_char::c#1 ] 4: zp ZP_BYTE:16 [ next_char::return#0 ]
Uplift Scope [main]
Uplift Scope [scroll_soft]
Uplifting [scroll_bit] best 28232 combination reg byte a [ scroll_bit::bits#0 ] reg byte a [ scroll_bit::$9 ] reg byte x [ scroll_bit::r#2 scroll_bit::r#1 ] zp ZP_WORD:7 [ scroll_bit::sc#2 scroll_bit::sc#1 ] reg byte a [ scroll_bit::b#2 ] zp ZP_WORD:17 [ scroll_bit::c#0 ] zp ZP_WORD:19 [ scroll_bit::$7 ]
Uplifting [scroll_bit] best 27962 combination reg byte a [ scroll_bit::bits#0 ] reg byte a [ scroll_bit::$9 ] reg byte x [ scroll_bit::r#2 scroll_bit::r#1 ] zp ZP_WORD:7 [ scroll_bit::sc#2 scroll_bit::sc#1 ] reg byte a [ scroll_bit::b#2 ] zp ZP_WORD:17 [ scroll_bit::c#0 ] zp ZP_WORD:19 [ scroll_bit::$7 ]
Limited combination testing to 100 combinations of 128 possible.
Uplifting [scroll_hard] best 24932 combination reg byte x [ scroll_hard::i#2 scroll_hard::i#1 ]
Uplifting [] best 24620 combination zp ZP_WORD:4 [ current_chargen#27 current_chargen#11 current_chargen#19 current_chargen#5 ] zp ZP_BYTE:3 [ current_bit#29 current_bit#12 current_bit#21 current_bit#5 ] zp ZP_WORD:11 [ nxt#18 nxt#31 nxt#14 nxt#35 nxt#19 ] reg byte x [ scroll#18 scroll#10 scroll#3 ]
Uplifting [fillscreen] best 24620 combination zp ZP_WORD:14 [ fillscreen::cursor#2 fillscreen::cursor#1 ]
Uplifting [next_char] best 24606 combination reg byte x [ next_char::return#1 next_char::c#0 next_char::c#1 ] reg byte a [ next_char::return#0 ]
Uplifting [main] best 24606 combination
Uplifting [scroll_soft] best 24606 combination
Uplifting [scroll_hard] best 24662 combination reg byte x [ scroll_hard::i#2 scroll_hard::i#1 ]
Uplifting [] best 24350 combination reg byte x [ scroll#18 scroll#10 scroll#3 ] zp ZP_BYTE:3 [ current_bit#29 current_bit#12 current_bit#21 current_bit#5 ] zp ZP_WORD:4 [ current_chargen#27 current_chargen#11 current_chargen#19 current_chargen#5 ] zp ZP_WORD:11 [ nxt#18 nxt#31 nxt#14 nxt#35 nxt#19 ]
Uplifting [fillscreen] best 24350 combination zp ZP_WORD:14 [ fillscreen::cursor#2 fillscreen::cursor#1 ]
Uplifting [next_char] best 24336 combination reg byte x [ next_char::return#1 next_char::c#0 next_char::c#1 ] reg byte a [ next_char::return#0 ]
Uplifting [main] best 24336 combination
Uplifting [scroll_soft] best 24336 combination
Attempting to uplift remaining variables inzp ZP_BYTE:3 [ current_bit#29 current_bit#12 current_bit#21 current_bit#5 ]
Uplifting [] best 24606 combination zp ZP_BYTE:3 [ current_bit#29 current_bit#12 current_bit#21 current_bit#5 ]
Uplifting [] best 24336 combination zp ZP_BYTE:3 [ current_bit#29 current_bit#12 current_bit#21 current_bit#5 ]
Coalescing zero page register with common assignment [ zp ZP_WORD:4 [ current_chargen#27 current_chargen#11 current_chargen#19 current_chargen#5 ] ] with [ zp ZP_WORD:19 [ scroll_bit::$7 ] ] - score: 1
Coalescing zero page register with common assignment [ zp ZP_WORD:4 [ current_chargen#27 current_chargen#11 current_chargen#19 current_chargen#5 scroll_bit::$7 ] ] with [ zp ZP_WORD:17 [ scroll_bit::c#0 ] ] - score: 1
Allocated (was zp ZP_BYTE:3) zp ZP_BYTE:2 [ current_bit#29 current_bit#12 current_bit#21 current_bit#5 ]
@ -1962,8 +1953,13 @@ main: {
ldx #7
jmp b1
// Wait for raster
// [6] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
// [6] phi from main::@1 main::@4 to main::@1 [phi:main::@1/main::@4->main::@1]
b1_from_b1:
b1_from_b4:
// [6] phi (byte*) current_chargen#27 = (byte*) current_chargen#27 [phi:main::@1/main::@4->main::@1#0] -- register_copy
// [6] phi (byte*) nxt#31 = (byte*) nxt#31 [phi:main::@1/main::@4->main::@1#1] -- register_copy
// [6] phi (byte) current_bit#29 = (byte) current_bit#29 [phi:main::@1/main::@4->main::@1#2] -- register_copy
// [6] phi (byte) scroll#18 = (byte) scroll#18 [phi:main::@1/main::@4->main::@1#3] -- register_copy
jmp b1
// main::@1
b1:
@ -1990,13 +1986,7 @@ main: {
b4:
// [11] *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0) -- _deref_pbuc1=_dec__deref_pbuc1
dec BGCOL
// [6] phi from main::@4 to main::@1 [phi:main::@4->main::@1]
b1_from_b4:
// [6] phi (byte*) current_chargen#27 = (byte*) current_chargen#11 [phi:main::@4->main::@1#0] -- register_copy
// [6] phi (byte*) nxt#31 = (byte*) nxt#14 [phi:main::@4->main::@1#1] -- register_copy
// [6] phi (byte) current_bit#29 = (byte) current_bit#12 [phi:main::@4->main::@1#2] -- register_copy
// [6] phi (byte) scroll#18 = (byte) scroll#10 [phi:main::@4->main::@1#3] -- register_copy
jmp b1
jmp b1_from_b4
}
// scroll_soft
scroll_soft: {
@ -2345,6 +2335,7 @@ Removing instruction jmp b1
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Replacing label b1_from_b1 with b1
Replacing label b1_from_b4 with b1
Replacing label b1_from_scroll_soft with b1
Replacing label b1_from_scroll_bit with b1
Replacing label b3_from_b4 with b3
@ -2357,6 +2348,7 @@ Removing instruction b1:
Removing instruction main_from_b1:
Removing instruction bend_from_b1:
Removing instruction b1_from_b1:
Removing instruction b1_from_b4:
Removing instruction b2_from_scroll_soft:
Removing instruction b1_from_scroll_soft:
Removing instruction b2_from_scroll_bit:
@ -2374,7 +2366,6 @@ Removing instruction fillscreen_from_main:
Removing instruction b1_from_main:
Removing instruction b3:
Removing instruction b4:
Removing instruction b1_from_b4:
Removing instruction b2:
Removing instruction b1_from_b2:
Removing instruction breturn:
@ -2431,12 +2422,12 @@ FINAL SYMBOL TABLE
(byte) current_bit
(byte) current_bit#12 current_bit zp ZP_BYTE:2 3.0
(byte) current_bit#21 current_bit zp ZP_BYTE:2 5.833333333333333
(byte) current_bit#29 current_bit zp ZP_BYTE:2 2.142857142857143
(byte) current_bit#29 current_bit zp ZP_BYTE:2 31.0
(byte) current_bit#5 current_bit zp ZP_BYTE:2 3.0
(byte*) current_chargen
(byte*) current_chargen#11 current_chargen zp ZP_WORD:3 3.0
(byte*) current_chargen#19 current_chargen zp ZP_WORD:3 5.944444444444444
(byte*) current_chargen#27 current_chargen zp ZP_WORD:3 1.666666666666667
(byte*) current_chargen#27 current_chargen zp ZP_WORD:3 24.111111111111107
(byte*) current_chargen#5 current_chargen zp ZP_WORD:3 4.0
(void()) fillscreen((byte*) fillscreen::screen , (byte) fillscreen::fill)
(label) fillscreen::@1
@ -2466,11 +2457,11 @@ FINAL SYMBOL TABLE
(byte*) nxt#14 nxt zp ZP_WORD:7 3.0
(byte*) nxt#18 nxt zp ZP_WORD:7 4.0
(byte*) nxt#19 nxt zp ZP_WORD:7 0.5714285714285714
(byte*) nxt#31 nxt zp ZP_WORD:7 1.5833333333333335
(byte*) nxt#31 nxt zp ZP_WORD:7 18.41666666666667
(byte*) nxt#35 nxt zp ZP_WORD:7 0.3333333333333333
(byte) scroll
(byte) scroll#10 reg byte x 3.0
(byte) scroll#18 reg byte x 3.25
(byte) scroll#18 reg byte x 53.75
(byte) scroll#3 reg byte x 3.0
(void()) scroll_bit()
(word~) scroll_bit::$7 $7 zp ZP_WORD:3 4.0
@ -2523,7 +2514,7 @@ reg byte a [ scroll_bit::$9 ]
FINAL ASSEMBLER
Score: 20826
Score: 20556
// File Comments
// An 8x8 char letter scroller
@ -2571,7 +2562,11 @@ main: {
// [6] phi (byte) scroll#18 = (byte) 7 [phi:main->main::@1#3] -- vbuxx=vbuc1
ldx #7
// Wait for raster
// [6] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
// [6] phi from main::@1 main::@4 to main::@1 [phi:main::@1/main::@4->main::@1]
// [6] phi (byte*) current_chargen#27 = (byte*) current_chargen#27 [phi:main::@1/main::@4->main::@1#0] -- register_copy
// [6] phi (byte*) nxt#31 = (byte*) nxt#31 [phi:main::@1/main::@4->main::@1#1] -- register_copy
// [6] phi (byte) current_bit#29 = (byte) current_bit#29 [phi:main::@1/main::@4->main::@1#2] -- register_copy
// [6] phi (byte) scroll#18 = (byte) scroll#18 [phi:main::@1/main::@4->main::@1#3] -- register_copy
// main::@1
b1:
// while(*RASTER!=$fe)
@ -2597,11 +2592,6 @@ main: {
// --*BGCOL;
// [11] *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0) -- _deref_pbuc1=_dec__deref_pbuc1
dec BGCOL
// [6] phi from main::@4 to main::@1 [phi:main::@4->main::@1]
// [6] phi (byte*) current_chargen#27 = (byte*) current_chargen#11 [phi:main::@4->main::@1#0] -- register_copy
// [6] phi (byte*) nxt#31 = (byte*) nxt#14 [phi:main::@4->main::@1#1] -- register_copy
// [6] phi (byte) current_bit#29 = (byte) current_bit#12 [phi:main::@4->main::@1#2] -- register_copy
// [6] phi (byte) scroll#18 = (byte) scroll#10 [phi:main::@4->main::@1#3] -- register_copy
jmp b1
}
// scroll_soft

View File

@ -18,12 +18,12 @@
(byte) current_bit
(byte) current_bit#12 current_bit zp ZP_BYTE:2 3.0
(byte) current_bit#21 current_bit zp ZP_BYTE:2 5.833333333333333
(byte) current_bit#29 current_bit zp ZP_BYTE:2 2.142857142857143
(byte) current_bit#29 current_bit zp ZP_BYTE:2 31.0
(byte) current_bit#5 current_bit zp ZP_BYTE:2 3.0
(byte*) current_chargen
(byte*) current_chargen#11 current_chargen zp ZP_WORD:3 3.0
(byte*) current_chargen#19 current_chargen zp ZP_WORD:3 5.944444444444444
(byte*) current_chargen#27 current_chargen zp ZP_WORD:3 1.666666666666667
(byte*) current_chargen#27 current_chargen zp ZP_WORD:3 24.111111111111107
(byte*) current_chargen#5 current_chargen zp ZP_WORD:3 4.0
(void()) fillscreen((byte*) fillscreen::screen , (byte) fillscreen::fill)
(label) fillscreen::@1
@ -53,11 +53,11 @@
(byte*) nxt#14 nxt zp ZP_WORD:7 3.0
(byte*) nxt#18 nxt zp ZP_WORD:7 4.0
(byte*) nxt#19 nxt zp ZP_WORD:7 0.5714285714285714
(byte*) nxt#31 nxt zp ZP_WORD:7 1.5833333333333335
(byte*) nxt#31 nxt zp ZP_WORD:7 18.41666666666667
(byte*) nxt#35 nxt zp ZP_WORD:7 0.3333333333333333
(byte) scroll
(byte) scroll#10 reg byte x 3.0
(byte) scroll#18 reg byte x 3.25
(byte) scroll#18 reg byte x 53.75
(byte) scroll#3 reg byte x 3.0
(void()) scroll_bit()
(word~) scroll_bit::$7 $7 zp ZP_WORD:3 4.0

View File

@ -2130,26 +2130,6 @@ Alias (signed word) mul16s::b#1 = (signed word) mul16s::b#2
Alias (signed word) mul16s::a#1 = (signed word) mul16s::a#3
Alias (byte) sin16s::isUpper#2 = (byte) sin16s::isUpper#8
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (word) divr16u::divisor#2
Self Phi Eliminated (signed word) sin16s_gen2::ampl#1
Self Phi Eliminated (signed word) sin16s_gen2::offs#1
Self Phi Eliminated (dword) sin16s_gen2::step#1
Self Phi Eliminated (word) sin16s_gen2::wavelength#2
Self Phi Eliminated (word) rem16u#16
Self Phi Eliminated (byte) memset::c#2
Self Phi Eliminated (byte*) memset::end#1
Self Phi Eliminated (void*) memset::str#5
Self Phi Eliminated (word) rem16u#23
Self Phi Eliminated (word) xsin_idx#13
Self Phi Eliminated (word) xsin_idx#10
Self Phi Eliminated (byte) render_logo::screen_idx#8
Self Phi Eliminated (byte) render_logo::logo_start#2
Self Phi Eliminated (byte) render_logo::logo_idx#5
Self Phi Eliminated (byte) render_logo::screen_idx#11
Self Phi Eliminated (byte) render_logo::logo_idx#8
Self Phi Eliminated (byte) render_logo::screen_idx#13
Self Phi Eliminated (byte) render_logo::screen_idx#16
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (word) divr16u::divisor#2 (word) divr16u::divisor#6
Identical Phi Values (dword) div32u16u::dividend#1 (dword) div32u16u::dividend#0
Identical Phi Values (word) div32u16u::divisor#1 (word) div32u16u::divisor#0
@ -2193,6 +2173,7 @@ Identical Phi Values (word) rem16u#10 (word) rem16u#17
Identical Phi Values (word) xsin_idx#12 (word) xsin_idx#0
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values (void*) memset::return#0 (void*) memset::str#3
Identical Phi Values (byte) render_logo::logo_start#1 (byte) render_logo::logo_start#0
Successful SSA optimization Pass2IdenticalPhiElimination
Identified duplicate assignment right side [431] (byte~) render_logo::$14 ← (byte) $28 * (byte) render_logo::line#10
Identified duplicate assignment right side [448] (byte~) render_logo::$22 ← (byte) $28 * (byte) render_logo::line#11
@ -2214,7 +2195,7 @@ Simple Condition (bool~) main::$6 [343] if((byte) main::ch#1!=rangelast(0,$ef))
Simple Condition (bool~) loop::$0 [366] if(*((byte*) RASTER#0)!=(byte) $ff) goto loop::@4
Simple Condition (bool~) loop::$4 [378] if((word) xsin_idx#3!=(word) XSIN_SIZE#0) goto loop::@11
Simple Condition (bool~) render_logo::$5 [397] if((signed word) render_logo::xpos#0<(signed byte) 0) goto render_logo::@1
Simple Condition (bool~) render_logo::$7 [409] if((byte) render_logo::screen_idx#18!=(byte) render_logo::logo_start#1) goto render_logo::@5
Simple Condition (bool~) render_logo::$7 [409] if((byte) render_logo::screen_idx#18!=(byte) render_logo::logo_start#0) goto render_logo::@5
Simple Condition (bool~) render_logo::$10 [420] unroll if((byte) render_logo::line#2!=rangelast(0,5)) goto render_logo::@7
Simple Condition (bool~) render_logo::$11 [425] if((byte) render_logo::screen_idx#10!=(byte) $28) goto render_logo::@13
Simple Condition (bool~) render_logo::$16 [436] unroll if((byte) render_logo::line#4!=rangelast(0,5)) goto render_logo::@15
@ -2340,10 +2321,6 @@ Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias (byte~) render_logo::$14 = (byte~) render_logo::$12
Alias (byte~) render_logo::$22 = (byte~) render_logo::$20
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte) render_logo::logo_start#1
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte) render_logo::logo_start#1 (byte) render_logo::logo_start#0
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [18] (word) divr16u::dividend#1 ← > (const dword) div32u16u::dividend#0
Constant right-side identified [22] (word) divr16u::dividend#2 ← < (const dword) div32u16u::dividend#0
Constant right-side identified [58] (signed word) sin16s_gen2::ampl#0 ← (const signed word) sin16s_gen2::max#0 - (const signed word) sin16s_gen2::min#0

View File

@ -375,10 +375,6 @@ Alias (byte*) main::toD0181_gfx#0 = (byte*) main::toD0181_gfx#1
Alias (byte) main::toD0181_return#0 = (byte~) main::toD0181_$8#0 (byte) main::toD0181_return#2 (byte) main::toD0181_return#1 (byte) main::toD0181_return#3 (byte~) main::$0
Alias (byte) memset::c#1 = (byte~) main::$3
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte) memset::c#2
Self Phi Eliminated (byte*) memset::end#1
Self Phi Eliminated (void*) memset::str#5
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte) memset::c#2 (byte) memset::c#3
Identical Phi Values (byte*) memset::end#1 (byte*) memset::end#0
Identical Phi Values (void*) memset::str#5 (void*) memset::str#3

View File

@ -2359,24 +2359,6 @@ Alias (byte*) bitmap_gfx#11 = (byte*) bitmap_gfx#16
Alias (byte*) bitmap_screen#11 = (byte*) bitmap_screen#15
Alias (word) render_sine::sin_idx#2 = (word) render_sine::sin_idx#4
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (word) divr16u::divisor#2
Self Phi Eliminated (signed word) sin16s_gen2::ampl#1
Self Phi Eliminated (signed word) sin16s_gen2::offs#1
Self Phi Eliminated (dword) sin16s_gen2::step#1
Self Phi Eliminated (word) sin16s_gen2::wavelength#2
Self Phi Eliminated (word) rem16u#16
Self Phi Eliminated (byte) memset::c#2
Self Phi Eliminated (byte*) memset::end#1
Self Phi Eliminated (void*) memset::str#5
Self Phi Eliminated (byte*) bitmap_init::gfx#2
Self Phi Eliminated (byte*) bitmap_gfx#22
Self Phi Eliminated (byte*) bitmap_screen#21
Self Phi Eliminated (byte*) bitmap_gfx#11
Self Phi Eliminated (byte*) bitmap_screen#11
Self Phi Eliminated (byte*) bitmap_gfx#14
Self Phi Eliminated (byte*) bitmap_screen#13
Self Phi Eliminated (word) rem16u#18
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (word) divr16u::divisor#2 (word) divr16u::divisor#6
Identical Phi Values (dword) div32u16u::dividend#1 (dword) div32u16u::dividend#0
Identical Phi Values (word) div32u16u::divisor#1 (word) div32u16u::divisor#0

View File

@ -12,8 +12,8 @@ main: scope:[main] from @1
[5] call init
to:main::@1
main::@1: scope:[main] from main main::@1 main::@2
[6] (byte) sin_idx_y#13 ← phi( main/(byte) 0 main::@2/(byte) sin_idx_y#11 )
[6] (byte) sin_idx_x#13 ← phi( main/(byte) 0 main::@2/(byte) sin_idx_x#11 )
[6] (byte) sin_idx_y#13 ← phi( main::@1/(byte) sin_idx_y#13 main/(byte) 0 main::@2/(byte) sin_idx_y#11 )
[6] (byte) sin_idx_x#13 ← phi( main::@1/(byte) sin_idx_x#13 main/(byte) 0 main::@2/(byte) sin_idx_x#11 )
[7] if(*((const byte*) RASTER#0)!=(byte) $ff) goto main::@1
to:main::@2
main::@2: scope:[main] from main::@1

View File

@ -2146,25 +2146,6 @@ Alias (byte) gen_chargen_sprite::x#2 = (byte) gen_chargen_sprite::x#4
Alias (byte) gen_chargen_sprite::y#3 = (byte) gen_chargen_sprite::y#6
Alias (byte*) gen_chargen_sprite::chargen#2 = (byte*) gen_chargen_sprite::chargen#5
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte) sin_idx_x#13
Self Phi Eliminated (byte) sin_idx_y#13
Self Phi Eliminated (byte*) progress_cursor#1
Self Phi Eliminated (byte*) progress_cursor#1
Self Phi Eliminated (byte) progress_idx#1
Self Phi Eliminated (byte) progress_idx#1
Self Phi Eliminated (byte*) progress_cursor#31
Self Phi Eliminated (byte) progress_idx#32
Self Phi Eliminated (byte) sin_idx_x#10
Self Phi Eliminated (byte) sin_idx_y#10
Self Phi Eliminated (byte*) place_sprites::sprites_ptr#1
Self Phi Eliminated (byte) gen_chargen_sprite::c#2
Self Phi Eliminated (byte) gen_chargen_sprite::bits#3
Self Phi Eliminated (byte) gen_chargen_sprite::x#2
Self Phi Eliminated (byte) gen_chargen_sprite::y#3
Self Phi Eliminated (byte*) gen_chargen_sprite::chargen#2
Self Phi Eliminated (byte) gen_sintab::length#11
Self Phi Eliminated (byte*) gen_sintab::sintab#10
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte*) progress_cursor#29 (byte*) SCREEN#0
Identical Phi Values (byte) progress_idx#30 (byte) progress_idx#35
Identical Phi Values (byte) sin_idx_x#22 (byte) sin_idx_x#16
@ -2210,9 +2191,13 @@ Identical Phi Values (byte) progress_idx#15 (byte) progress_idx#1
Identical Phi Values (byte) sin_idx_x#12 (byte) sin_idx_x#0
Identical Phi Values (byte) sin_idx_y#12 (byte) sin_idx_y#0
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values (byte) gen_chargen_sprite::y#10 (byte) gen_chargen_sprite::y#2
Identical Phi Values (byte*) gen_chargen_sprite::chargen#7 (byte*) gen_chargen_sprite::chargen#1
Identical Phi Values (byte) progress_idx#53 (byte) progress_idx#23
Identical Phi Values (byte*) progress_cursor#53 (byte*) progress_cursor#22
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values (byte*) gen_chargen_sprite::chargen#1 (byte*) gen_chargen_sprite::chargen#0
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) main::$1 [72] if(*((byte*) RASTER#0)!=(byte) $ff) goto main::@2
Simple Condition (bool~) init::$10 [95] if((byte) init::i#1!=rangelast(0,$27)) goto init::@1
Simple Condition (bool~) clear_screen::$1 [140] if((byte*) clear_screen::sc#1<(byte*~) clear_screen::$0) goto clear_screen::@1
@ -2332,7 +2317,7 @@ Resolved ranged next value [307] gen_chargen_sprite::b#1 ← ++ gen_chargen_spri
Resolved ranged comparison value [309] if(gen_chargen_sprite::b#1!=rangelast(0,2)) goto gen_chargen_sprite::@4 to (number) 3
Resolved ranged next value [320] gen_chargen_sprite::x#1 ← ++ gen_chargen_sprite::x#6 to ++
Resolved ranged comparison value [322] if(gen_chargen_sprite::x#1!=rangelast(0,7)) goto gen_chargen_sprite::@2 to (number) 8
Resolved ranged next value [326] gen_chargen_sprite::y#1 ← ++ gen_chargen_sprite::y#10 to ++
Resolved ranged next value [326] gen_chargen_sprite::y#1 ← ++ gen_chargen_sprite::y#2 to ++
Resolved ranged comparison value [328] if(gen_chargen_sprite::y#1!=rangelast(0,7)) goto gen_chargen_sprite::@1 to (number) 8
Simplifying expression containing zero gen_chargen_sprite::sprite#3 in [311] *((byte*) gen_chargen_sprite::sprite#3 + (byte) 0) ← (byte) gen_chargen_sprite::s_gen#1
Successful SSA optimization PassNSimplifyExpressionWithZero
@ -2364,12 +2349,6 @@ Finalized unsigned number type (byte) 3
Finalized unsigned number type (byte) 8
Finalized unsigned number type (byte) 8
Successful SSA optimization PassNFinalizeNumberTypeConversions
Self Phi Eliminated (byte) gen_chargen_sprite::y#10
Self Phi Eliminated (byte*) gen_chargen_sprite::chargen#7
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte) gen_chargen_sprite::y#10 (byte) gen_chargen_sprite::y#2
Identical Phi Values (byte*) gen_chargen_sprite::chargen#7 (byte*) gen_chargen_sprite::chargen#1
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [55] (byte*) progress_init::line#1 ← (const byte*) SCREEN#0 + (byte) $28
Constant right-side identified [63] (byte*~) clear_screen::$0 ← (const byte*) SCREEN#0 + (word) $3e8
Constant right-side identified [110] (byte*) place_sprites::sprites_ptr#0 ← (const byte*) SCREEN#0 + (word) $3f8
@ -2379,10 +2358,6 @@ Constant (const byte*) clear_screen::$0 = SCREEN#0+$3e8
Constant (const byte*) place_sprites::sprites_ptr#0 = SCREEN#0+$3f8
Constant (const word) place_sprites::$1 = (word)sprites#0
Successful SSA optimization Pass2ConstantIdentification
Self Phi Eliminated (byte*) gen_chargen_sprite::chargen#1
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte*) gen_chargen_sprite::chargen#1 (byte*) gen_chargen_sprite::chargen#0
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [108] (word~) place_sprites::$2 ← (const word) place_sprites::$1 / (byte) $40
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const word) place_sprites::$2 = place_sprites::$1/$40
@ -2514,6 +2489,7 @@ Successful SSA optimization Pass2ConstantIdentification
Inlining constant with var siblings (const byte*) prepareMEM::mem#2
Constant inlined prepareMEM::mem#2 = (const byte[]) gen_sintab::f_min#0
Successful SSA optimization Pass2ConstantInlining
Added new block during phi lifting main::@7(between main::@2 and main::@2)
Added new block during phi lifting init::@11(between init::@1 and init::@1)
Added new block during phi lifting clear_screen::@3(between clear_screen::@1 and clear_screen::@1)
Added new block during phi lifting progress_inc::@3(between progress_inc and progress_inc::@1)
@ -2575,77 +2551,79 @@ Adding NOP phi() at start of gen_chargen_sprite::@10
CALL GRAPH
Calls in [] to main:6
Calls in [main] to init:10 anim:15
Calls in [init] to clear_screen:65 place_sprites:73 gen_sprites:75 progress_init:77 gen_sintab:79 progress_init:81 gen_sintab:83 clear_screen:85
Calls in [gen_sintab] to setFAC:99 setARGtoFAC:101 setFAC:104 setMEMtoFAC:106 subFACfromARG:108 setMEMtoFAC:110 setFAC:112 divMEMbyFAC:114 setMEMtoFAC:116 addMEMtoFAC:118 setMEMtoFAC:120 setFAC:125 mulFACbyMEM:127 setMEMtoFAC:129 setFAC:132 divMEMbyFAC:134 sinFAC:136 mulFACbyMEM:138 addMEMtoFAC:140 getFAC:142 progress_inc:147
Calls in [addMEMtoFAC] to prepareMEM:168
Calls in [mulFACbyMEM] to prepareMEM:180
Calls in [divMEMbyFAC] to prepareMEM:188
Calls in [setFAC] to prepareMEM:194
Calls in [setMEMtoFAC] to prepareMEM:200
Calls in [gen_sprites] to gen_chargen_sprite:214
Calls in [init] to clear_screen:67 place_sprites:75 gen_sprites:77 progress_init:79 gen_sintab:81 progress_init:83 gen_sintab:85 clear_screen:87
Calls in [gen_sintab] to setFAC:101 setARGtoFAC:103 setFAC:106 setMEMtoFAC:108 subFACfromARG:110 setMEMtoFAC:112 setFAC:114 divMEMbyFAC:116 setMEMtoFAC:118 addMEMtoFAC:120 setMEMtoFAC:122 setFAC:127 mulFACbyMEM:129 setMEMtoFAC:131 setFAC:134 divMEMbyFAC:136 sinFAC:138 mulFACbyMEM:140 addMEMtoFAC:142 getFAC:144 progress_inc:149
Calls in [addMEMtoFAC] to prepareMEM:170
Calls in [mulFACbyMEM] to prepareMEM:182
Calls in [divMEMbyFAC] to prepareMEM:190
Calls in [setFAC] to prepareMEM:196
Calls in [setMEMtoFAC] to prepareMEM:202
Calls in [gen_sprites] to gen_chargen_sprite:216
Created 50 initial phi equivalence classes
Coalesced [16] sin_idx_x#26 ← sin_idx_x#11
Coalesced [17] sin_idx_y#26 ← sin_idx_y#11
Coalesced [21] anim::xidx#8 ← anim::xidx#0
Coalesced [22] anim::yidx#8 ← anim::yidx#0
Coalesced [34] anim::xidx#11 ← anim::xidx#2
Coalesced [39] anim::yidx#11 ← anim::yidx#2
Coalesced [55] sin_idx_y#27 ← sin_idx_y#3
Coalesced [56] sin_idx_x#27 ← sin_idx_x#3
Coalesced [57] anim::xidx#9 ← anim::xidx#5
Coalesced [58] anim::x_msb#8 ← anim::x_msb#1
Coalesced [59] anim::j2#7 ← anim::j2#1
Coalesced [60] anim::yidx#9 ← anim::yidx#6
Coalesced [61] anim::j#7 ← anim::j#1
Coalesced [62] anim::yidx#10 ← anim::yidx#1
Coalesced [63] anim::xidx#10 ← anim::xidx#1
Coalesced [88] init::i#3 ← init::i#1
Coalesced [95] clear_screen::sc#3 ← clear_screen::sc#1
Coalesced [98] setFAC::w#6 ← setFAC::w#0
Coalesced [103] setFAC::w#9 ← setFAC::w#1
Coalesced [121] progress_cursor#67 ← progress_cursor#22
Coalesced [124] setFAC::w#7 ← setFAC::w#3
Coalesced [131] setFAC::w#8 ← setFAC::w#4
Coalesced [151] gen_sintab::i#13 ← gen_sintab::i#1
Coalesced [152] progress_idx#66 ← progress_idx#12
Coalesced [153] progress_cursor#68 ← progress_cursor#11
Coalesced [158] progress_cursor#66 ← progress_cursor#10
Coalesced [162] progress_idx#65 ← progress_idx#10
Coalesced (already) [163] progress_cursor#65 ← progress_cursor#34
Coalesced [179] prepareMEM::mem#7 ← prepareMEM::mem#4
Coalesced [187] prepareMEM::mem#6 ← prepareMEM::mem#3
Coalesced [193] prepareMEM::mem#8 ← prepareMEM::mem#0
Coalesced [199] prepareMEM::mem#9 ← prepareMEM::mem#1
Coalesced [208] progress_cursor#22 ← progress_init::line#2
Coalesced [219] gen_sprites::i#4 ← gen_sprites::i#1
Coalesced [220] gen_sprites::spr#4 ← gen_sprites::spr#1
Coalesced [226] gen_chargen_sprite::sprite#13 ← gen_chargen_sprite::sprite#0
Coalesced [229] gen_chargen_sprite::bits#9 ← gen_chargen_sprite::bits#0
Coalesced [230] gen_chargen_sprite::sprite#15 ← gen_chargen_sprite::sprite#11
Coalesced [236] gen_chargen_sprite::s_gen#11 ← gen_chargen_sprite::s_gen#5
Coalesced [237] gen_chargen_sprite::s_gen_cnt#10 ← gen_chargen_sprite::s_gen_cnt#4
Coalesced [238] gen_chargen_sprite::sprite#17 ← gen_chargen_sprite::sprite#10
Coalesced [248] gen_chargen_sprite::sprite#20 ← gen_chargen_sprite::sprite#1
Coalesced [261] gen_chargen_sprite::y#11 ← gen_chargen_sprite::y#1
Coalesced [262] gen_chargen_sprite::sprite#14 ← gen_chargen_sprite::sprite#2
Coalesced [263] gen_chargen_sprite::bits#10 ← gen_chargen_sprite::bits#1
Coalesced [264] gen_chargen_sprite::s_gen#10 ← gen_chargen_sprite::s_gen#6
Coalesced [265] gen_chargen_sprite::s_gen_cnt#9 ← gen_chargen_sprite::s_gen_cnt#5
Coalesced [266] gen_chargen_sprite::sprite#16 ← gen_chargen_sprite::sprite#4
Coalesced [267] gen_chargen_sprite::x#9 ← gen_chargen_sprite::x#1
Coalesced (already) [268] gen_chargen_sprite::s_gen#12 ← gen_chargen_sprite::s_gen#6
Coalesced (already) [269] gen_chargen_sprite::s_gen_cnt#11 ← gen_chargen_sprite::s_gen_cnt#5
Coalesced [270] gen_chargen_sprite::b#5 ← gen_chargen_sprite::b#1
Coalesced (already) [271] gen_chargen_sprite::sprite#18 ← gen_chargen_sprite::sprite#4
Coalesced [272] gen_chargen_sprite::s_gen#13 ← gen_chargen_sprite::s_gen#1
Coalesced [273] gen_chargen_sprite::s_gen_cnt#12 ← gen_chargen_sprite::s_gen_cnt#1
Coalesced (already) [274] gen_chargen_sprite::sprite#19 ← gen_chargen_sprite::sprite#3
Coalesced [291] place_sprites::spr_id#3 ← place_sprites::spr_id#1
Coalesced [292] place_sprites::j#3 ← place_sprites::j#1
Coalesced [293] place_sprites::spr_x#3 ← place_sprites::spr_x#1
Coalesced [294] place_sprites::j2#4 ← place_sprites::j2#2
Coalesced [295] place_sprites::col#3 ← place_sprites::col#1
Coalesced [16] sin_idx_x#27 ← sin_idx_x#11
Coalesced [17] sin_idx_y#27 ← sin_idx_y#11
Coalesced (already) [18] sin_idx_x#26 ← sin_idx_x#13
Coalesced (already) [19] sin_idx_y#26 ← sin_idx_y#13
Coalesced [23] anim::xidx#8 ← anim::xidx#0
Coalesced [24] anim::yidx#8 ← anim::yidx#0
Coalesced [36] anim::xidx#11 ← anim::xidx#2
Coalesced [41] anim::yidx#11 ← anim::yidx#2
Coalesced [57] sin_idx_y#28 ← sin_idx_y#3
Coalesced [58] sin_idx_x#28 ← sin_idx_x#3
Coalesced [59] anim::xidx#9 ← anim::xidx#5
Coalesced [60] anim::x_msb#8 ← anim::x_msb#1
Coalesced [61] anim::j2#7 ← anim::j2#1
Coalesced [62] anim::yidx#9 ← anim::yidx#6
Coalesced [63] anim::j#7 ← anim::j#1
Coalesced [64] anim::yidx#10 ← anim::yidx#1
Coalesced [65] anim::xidx#10 ← anim::xidx#1
Coalesced [90] init::i#3 ← init::i#1
Coalesced [97] clear_screen::sc#3 ← clear_screen::sc#1
Coalesced [100] setFAC::w#6 ← setFAC::w#0
Coalesced [105] setFAC::w#9 ← setFAC::w#1
Coalesced [123] progress_cursor#67 ← progress_cursor#22
Coalesced [126] setFAC::w#7 ← setFAC::w#3
Coalesced [133] setFAC::w#8 ← setFAC::w#4
Coalesced [153] gen_sintab::i#13 ← gen_sintab::i#1
Coalesced [154] progress_idx#66 ← progress_idx#12
Coalesced [155] progress_cursor#68 ← progress_cursor#11
Coalesced [160] progress_cursor#66 ← progress_cursor#10
Coalesced [164] progress_idx#65 ← progress_idx#10
Coalesced (already) [165] progress_cursor#65 ← progress_cursor#34
Coalesced [181] prepareMEM::mem#7 ← prepareMEM::mem#4
Coalesced [189] prepareMEM::mem#6 ← prepareMEM::mem#3
Coalesced [195] prepareMEM::mem#8 ← prepareMEM::mem#0
Coalesced [201] prepareMEM::mem#9 ← prepareMEM::mem#1
Coalesced [210] progress_cursor#22 ← progress_init::line#2
Coalesced [221] gen_sprites::i#4 ← gen_sprites::i#1
Coalesced [222] gen_sprites::spr#4 ← gen_sprites::spr#1
Coalesced [228] gen_chargen_sprite::sprite#13 ← gen_chargen_sprite::sprite#0
Coalesced [231] gen_chargen_sprite::bits#9 ← gen_chargen_sprite::bits#0
Coalesced [232] gen_chargen_sprite::sprite#15 ← gen_chargen_sprite::sprite#11
Coalesced [238] gen_chargen_sprite::s_gen#11 ← gen_chargen_sprite::s_gen#5
Coalesced [239] gen_chargen_sprite::s_gen_cnt#10 ← gen_chargen_sprite::s_gen_cnt#4
Coalesced [240] gen_chargen_sprite::sprite#17 ← gen_chargen_sprite::sprite#10
Coalesced [250] gen_chargen_sprite::sprite#20 ← gen_chargen_sprite::sprite#1
Coalesced [263] gen_chargen_sprite::y#11 ← gen_chargen_sprite::y#1
Coalesced [264] gen_chargen_sprite::sprite#14 ← gen_chargen_sprite::sprite#2
Coalesced [265] gen_chargen_sprite::bits#10 ← gen_chargen_sprite::bits#1
Coalesced [266] gen_chargen_sprite::s_gen#10 ← gen_chargen_sprite::s_gen#6
Coalesced [267] gen_chargen_sprite::s_gen_cnt#9 ← gen_chargen_sprite::s_gen_cnt#5
Coalesced [268] gen_chargen_sprite::sprite#16 ← gen_chargen_sprite::sprite#4
Coalesced [269] gen_chargen_sprite::x#9 ← gen_chargen_sprite::x#1
Coalesced (already) [270] gen_chargen_sprite::s_gen#12 ← gen_chargen_sprite::s_gen#6
Coalesced (already) [271] gen_chargen_sprite::s_gen_cnt#11 ← gen_chargen_sprite::s_gen_cnt#5
Coalesced [272] gen_chargen_sprite::b#5 ← gen_chargen_sprite::b#1
Coalesced (already) [273] gen_chargen_sprite::sprite#18 ← gen_chargen_sprite::sprite#4
Coalesced [274] gen_chargen_sprite::s_gen#13 ← gen_chargen_sprite::s_gen#1
Coalesced [275] gen_chargen_sprite::s_gen_cnt#12 ← gen_chargen_sprite::s_gen_cnt#1
Coalesced (already) [276] gen_chargen_sprite::sprite#19 ← gen_chargen_sprite::sprite#3
Coalesced [293] place_sprites::spr_id#3 ← place_sprites::spr_id#1
Coalesced [294] place_sprites::j#3 ← place_sprites::j#1
Coalesced [295] place_sprites::spr_x#3 ← place_sprites::spr_x#1
Coalesced [296] place_sprites::j2#4 ← place_sprites::j2#2
Coalesced [297] place_sprites::col#3 ← place_sprites::col#1
Coalesced down to 36 phi equivalence classes
Culled Empty Block (label) @4
Culled Empty Block (label) @66
@ -2654,6 +2632,7 @@ Culled Empty Block (label) @71
Culled Empty Block (label) @77
Culled Empty Block (label) main::@5
Culled Empty Block (label) main::@6
Culled Empty Block (label) main::@7
Culled Empty Block (label) anim::@10
Culled Empty Block (label) anim::@3
Culled Empty Block (label) anim::@11
@ -2761,8 +2740,8 @@ main: scope:[main] from @1
[5] call init
to:main::@1
main::@1: scope:[main] from main main::@1 main::@2
[6] (byte) sin_idx_y#13 ← phi( main/(byte) 0 main::@2/(byte) sin_idx_y#11 )
[6] (byte) sin_idx_x#13 ← phi( main/(byte) 0 main::@2/(byte) sin_idx_x#11 )
[6] (byte) sin_idx_y#13 ← phi( main::@1/(byte) sin_idx_y#13 main/(byte) 0 main::@2/(byte) sin_idx_y#11 )
[6] (byte) sin_idx_x#13 ← phi( main::@1/(byte) sin_idx_x#13 main/(byte) 0 main::@2/(byte) sin_idx_x#11 )
[7] if(*((const byte*) RASTER#0)!=(byte) $ff) goto main::@1
to:main::@2
main::@2: scope:[main] from main::@1
@ -3396,11 +3375,11 @@ VARIABLE REGISTER WEIGHTS
(void()) sinFAC()
(byte) sin_idx_x
(byte) sin_idx_x#11 1.625
(byte) sin_idx_x#13 0.5769230769230769
(byte) sin_idx_x#13 8.346153846153845
(byte) sin_idx_x#3 2.0
(byte) sin_idx_y
(byte) sin_idx_y#11 3.25
(byte) sin_idx_y#13 0.49999999999999994
(byte) sin_idx_y#13 7.2333333333333325
(byte) sin_idx_y#3 2.0
(byte) sinlen_x
(byte) sinlen_y
@ -3635,8 +3614,11 @@ main: {
lda #0
sta sin_idx_x
jmp b1
// [6] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
// [6] phi from main::@1 main::@2 to main::@1 [phi:main::@1/main::@2->main::@1]
b1_from_b1:
b1_from_b2:
// [6] phi (byte) sin_idx_y#13 = (byte) sin_idx_y#13 [phi:main::@1/main::@2->main::@1#0] -- register_copy
// [6] phi (byte) sin_idx_x#13 = (byte) sin_idx_x#13 [phi:main::@1/main::@2->main::@1#1] -- register_copy
jmp b1
// main::@1
b1:
@ -3651,11 +3633,7 @@ main: {
b2:
// [9] call anim
jsr anim
// [6] phi from main::@2 to main::@1 [phi:main::@2->main::@1]
b1_from_b2:
// [6] phi (byte) sin_idx_y#13 = (byte) sin_idx_y#11 [phi:main::@2->main::@1#0] -- register_copy
// [6] phi (byte) sin_idx_x#13 = (byte) sin_idx_x#11 [phi:main::@2->main::@1#1] -- register_copy
jmp b1
jmp b1_from_b2
}
// anim
anim: {
@ -5304,11 +5282,11 @@ Uplift Scope [place_sprites] 22: zp ZP_BYTE:71 [ place_sprites::j2#1 ] 20.9: zp
Uplift Scope [setFAC] 78: zp ZP_WORD:27 [ setFAC::w#5 setFAC::w#0 setFAC::w#3 setFAC::w#4 setFAC::w#1 ]
Uplift Scope [gen_sintab] 22: zp ZP_BYTE:57 [ gen_sintab::$24 ] 17.88: zp ZP_BYTE:17 [ gen_sintab::i#10 gen_sintab::i#1 ] 11: zp ZP_WORD:55 [ gen_sintab::$23 ] 0.22: zp ZP_BYTE:14 [ gen_sintab::length#10 ] 0.22: zp ZP_WORD:15 [ gen_sintab::sintab#12 ] 0: zp ZP_BYTE:12 [ gen_sintab::max#2 ] 0: zp ZP_BYTE:13 [ gen_sintab::min#2 ]
Uplift Scope [gen_sprites] 23.1: zp ZP_BYTE:31 [ gen_sprites::i#2 gen_sprites::i#1 ] 15.58: zp ZP_WORD:32 [ gen_sprites::spr#2 gen_sprites::spr#1 ]
Uplift Scope [] 12.48: zp ZP_BYTE:3 [ sin_idx_y#13 sin_idx_y#11 sin_idx_y#3 ] 11.97: zp ZP_BYTE:2 [ sin_idx_x#13 sin_idx_x#11 sin_idx_x#3 ] 7.63: zp ZP_WORD:19 [ progress_cursor#34 progress_init::line#2 progress_cursor#11 progress_cursor#10 ] 6.07: zp ZP_BYTE:18 [ progress_idx#34 progress_idx#12 progress_idx#10 ]
Uplift Scope [clear_screen] 33: zp ZP_WORD:10 [ clear_screen::sc#2 clear_screen::sc#1 ]
Uplift Scope [init] 31.17: zp ZP_BYTE:9 [ init::i#2 init::i#1 ]
Uplift Scope [prepareMEM] 20: zp ZP_WORD:21 [ prepareMEM::mem#5 prepareMEM::mem#3 prepareMEM::mem#4 prepareMEM::mem#0 prepareMEM::mem#1 ] 4: zp ZP_BYTE:60 [ prepareMEM::$0 ] 4: zp ZP_BYTE:61 [ prepareMEM::$1 ]
Uplift Scope [getFAC] 22: zp ZP_WORD:53 [ getFAC::return#2 ] 4.33: zp ZP_WORD:58 [ getFAC::return#0 ]
Uplift Scope [] 7.63: zp ZP_WORD:19 [ progress_cursor#34 progress_init::line#2 progress_cursor#11 progress_cursor#10 ] 6.07: zp ZP_BYTE:18 [ progress_idx#34 progress_idx#12 progress_idx#10 ] 5.75: zp ZP_BYTE:3 [ sin_idx_y#13 sin_idx_y#11 sin_idx_y#3 ] 4.2: zp ZP_BYTE:2 [ sin_idx_x#13 sin_idx_x#11 sin_idx_x#3 ]
Uplift Scope [setMEMtoFAC] 2: zp ZP_WORD:29 [ setMEMtoFAC::mem#5 ]
Uplift Scope [divMEMbyFAC] 2: zp ZP_WORD:25 [ divMEMbyFAC::mem#2 ]
Uplift Scope [mulFACbyMEM] 2: zp ZP_WORD:23 [ mulFACbyMEM::mem#2 ]
@ -5321,79 +5299,79 @@ Uplift Scope [main]
Uplift Scope [progress_init]
Uplift Scope [progress_inc]
Uplifting [gen_chargen_sprite] best 1064286 combination zp ZP_BYTE:38 [ gen_chargen_sprite::s_gen#3 gen_chargen_sprite::s_gen#5 gen_chargen_sprite::s_gen#6 gen_chargen_sprite::s_gen#1 ] zp ZP_WORD:41 [ gen_chargen_sprite::sprite#3 gen_chargen_sprite::sprite#10 gen_chargen_sprite::sprite#11 gen_chargen_sprite::sprite#0 gen_chargen_sprite::sprite#2 gen_chargen_sprite::sprite#4 gen_chargen_sprite::sprite#1 ] reg byte y [ gen_chargen_sprite::s_gen_cnt#3 gen_chargen_sprite::s_gen_cnt#4 gen_chargen_sprite::s_gen_cnt#5 gen_chargen_sprite::s_gen_cnt#1 ] reg byte a [ gen_chargen_sprite::$6 ] reg byte x [ gen_chargen_sprite::b#2 gen_chargen_sprite::b#1 ] reg byte a [ gen_chargen_sprite::$3 ] zp ZP_BYTE:36 [ gen_chargen_sprite::x#6 gen_chargen_sprite::x#1 ] zp ZP_BYTE:35 [ gen_chargen_sprite::bits#2 gen_chargen_sprite::bits#0 gen_chargen_sprite::bits#1 ] zp ZP_BYTE:37 [ gen_chargen_sprite::c#3 ] zp ZP_BYTE:34 [ gen_chargen_sprite::y#2 gen_chargen_sprite::y#1 ] zp ZP_BYTE:62 [ gen_chargen_sprite::ch#0 ] zp ZP_WORD:63 [ gen_chargen_sprite::$0 ] zp ZP_WORD:65 [ gen_chargen_sprite::$1 ] zp ZP_WORD:67 [ gen_chargen_sprite::chargen#0 ]
Uplifting [gen_chargen_sprite] best 1064016 combination zp ZP_BYTE:38 [ gen_chargen_sprite::s_gen#3 gen_chargen_sprite::s_gen#5 gen_chargen_sprite::s_gen#6 gen_chargen_sprite::s_gen#1 ] zp ZP_WORD:41 [ gen_chargen_sprite::sprite#3 gen_chargen_sprite::sprite#10 gen_chargen_sprite::sprite#11 gen_chargen_sprite::sprite#0 gen_chargen_sprite::sprite#2 gen_chargen_sprite::sprite#4 gen_chargen_sprite::sprite#1 ] reg byte y [ gen_chargen_sprite::s_gen_cnt#3 gen_chargen_sprite::s_gen_cnt#4 gen_chargen_sprite::s_gen_cnt#5 gen_chargen_sprite::s_gen_cnt#1 ] reg byte a [ gen_chargen_sprite::$6 ] reg byte x [ gen_chargen_sprite::b#2 gen_chargen_sprite::b#1 ] reg byte a [ gen_chargen_sprite::$3 ] zp ZP_BYTE:36 [ gen_chargen_sprite::x#6 gen_chargen_sprite::x#1 ] zp ZP_BYTE:35 [ gen_chargen_sprite::bits#2 gen_chargen_sprite::bits#0 gen_chargen_sprite::bits#1 ] zp ZP_BYTE:37 [ gen_chargen_sprite::c#3 ] zp ZP_BYTE:34 [ gen_chargen_sprite::y#2 gen_chargen_sprite::y#1 ] zp ZP_BYTE:62 [ gen_chargen_sprite::ch#0 ] zp ZP_WORD:63 [ gen_chargen_sprite::$0 ] zp ZP_WORD:65 [ gen_chargen_sprite::$1 ] zp ZP_WORD:67 [ gen_chargen_sprite::chargen#0 ]
Limited combination testing to 100 combinations of 9216 possible.
Uplifting [anim] best 1063086 combination zp ZP_BYTE:7 [ anim::yidx#3 anim::yidx#0 anim::yidx#6 anim::yidx#1 anim::yidx#2 ] zp ZP_BYTE:4 [ anim::xidx#3 anim::xidx#0 anim::xidx#5 anim::xidx#1 anim::xidx#2 ] reg byte a [ anim::$7 ] reg byte a [ anim::$9 ] zp ZP_BYTE:8 [ anim::j#2 anim::j#1 ] zp ZP_BYTE:5 [ anim::x_msb#2 anim::x_msb#1 ] zp ZP_BYTE:50 [ anim::$6 ] zp ZP_BYTE:6 [ anim::j2#2 anim::j2#1 ] zp ZP_WORD:48 [ anim::x#0 ]
Uplifting [anim] best 1062816 combination zp ZP_BYTE:7 [ anim::yidx#3 anim::yidx#0 anim::yidx#6 anim::yidx#1 anim::yidx#2 ] zp ZP_BYTE:4 [ anim::xidx#3 anim::xidx#0 anim::xidx#5 anim::xidx#1 anim::xidx#2 ] reg byte a [ anim::$7 ] reg byte a [ anim::$9 ] zp ZP_BYTE:8 [ anim::j#2 anim::j#1 ] zp ZP_BYTE:5 [ anim::x_msb#2 anim::x_msb#1 ] zp ZP_BYTE:50 [ anim::$6 ] zp ZP_BYTE:6 [ anim::j2#2 anim::j2#1 ] zp ZP_WORD:48 [ anim::x#0 ]
Limited combination testing to 100 combinations of 19440 possible.
Uplifting [place_sprites] best 1063026 combination reg byte x [ place_sprites::j2#1 ] zp ZP_BYTE:44 [ place_sprites::j#2 place_sprites::j#1 ] zp ZP_BYTE:43 [ place_sprites::spr_id#2 place_sprites::spr_id#1 ] zp ZP_BYTE:46 [ place_sprites::j2#3 place_sprites::j2#2 ] zp ZP_BYTE:45 [ place_sprites::spr_x#2 place_sprites::spr_x#1 ] zp ZP_BYTE:47 [ place_sprites::col#2 place_sprites::col#1 ]
Uplifting [place_sprites] best 1062756 combination reg byte x [ place_sprites::j2#1 ] zp ZP_BYTE:44 [ place_sprites::j#2 place_sprites::j#1 ] zp ZP_BYTE:43 [ place_sprites::spr_id#2 place_sprites::spr_id#1 ] zp ZP_BYTE:46 [ place_sprites::j2#3 place_sprites::j2#2 ] zp ZP_BYTE:45 [ place_sprites::spr_x#2 place_sprites::spr_x#1 ] zp ZP_BYTE:47 [ place_sprites::col#2 place_sprites::col#1 ]
Limited combination testing to 100 combinations of 972 possible.
Uplifting [setFAC] best 1063026 combination zp ZP_WORD:27 [ setFAC::w#5 setFAC::w#0 setFAC::w#3 setFAC::w#4 setFAC::w#1 ]
Uplifting [gen_sintab] best 1062959 combination reg byte a [ gen_sintab::$24 ] zp ZP_BYTE:17 [ gen_sintab::i#10 gen_sintab::i#1 ] zp ZP_WORD:55 [ gen_sintab::$23 ] zp ZP_BYTE:14 [ gen_sintab::length#10 ] zp ZP_WORD:15 [ gen_sintab::sintab#12 ] reg byte x [ gen_sintab::max#2 ] zp ZP_BYTE:13 [ gen_sintab::min#2 ]
Uplifting [gen_sprites] best 1062959 combination zp ZP_BYTE:31 [ gen_sprites::i#2 gen_sprites::i#1 ] zp ZP_WORD:32 [ gen_sprites::spr#2 gen_sprites::spr#1 ]
Uplifting [clear_screen] best 1062959 combination zp ZP_WORD:10 [ clear_screen::sc#2 clear_screen::sc#1 ]
Uplifting [init] best 1062809 combination reg byte x [ init::i#2 init::i#1 ]
Uplifting [prepareMEM] best 1062797 combination zp ZP_WORD:21 [ prepareMEM::mem#5 prepareMEM::mem#3 prepareMEM::mem#4 prepareMEM::mem#0 prepareMEM::mem#1 ] reg byte a [ prepareMEM::$0 ] reg byte a [ prepareMEM::$1 ]
Uplifting [getFAC] best 1062797 combination zp ZP_WORD:53 [ getFAC::return#2 ] zp ZP_WORD:58 [ getFAC::return#0 ]
Uplifting [] best 1062797 combination zp ZP_WORD:19 [ progress_cursor#34 progress_init::line#2 progress_cursor#11 progress_cursor#10 ] zp ZP_BYTE:18 [ progress_idx#34 progress_idx#12 progress_idx#10 ] zp ZP_BYTE:3 [ sin_idx_y#13 sin_idx_y#11 sin_idx_y#3 ] zp ZP_BYTE:2 [ sin_idx_x#13 sin_idx_x#11 sin_idx_x#3 ]
Uplifting [setMEMtoFAC] best 1062797 combination zp ZP_WORD:29 [ setMEMtoFAC::mem#5 ]
Uplifting [divMEMbyFAC] best 1062797 combination zp ZP_WORD:25 [ divMEMbyFAC::mem#2 ]
Uplifting [mulFACbyMEM] best 1062797 combination zp ZP_WORD:23 [ mulFACbyMEM::mem#2 ]
Uplifting [setARGtoFAC] best 1062797 combination
Uplifting [addMEMtoFAC] best 1062797 combination
Uplifting [subFACfromARG] best 1062797 combination
Uplifting [sinFAC] best 1062797 combination
Uplifting [RADIX] best 1062797 combination
Uplifting [main] best 1062797 combination
Uplifting [progress_init] best 1062797 combination
Uplifting [progress_inc] best 1062797 combination
Uplifting [setFAC] best 1062756 combination zp ZP_WORD:27 [ setFAC::w#5 setFAC::w#0 setFAC::w#3 setFAC::w#4 setFAC::w#1 ]
Uplifting [gen_sintab] best 1062689 combination reg byte a [ gen_sintab::$24 ] zp ZP_BYTE:17 [ gen_sintab::i#10 gen_sintab::i#1 ] zp ZP_WORD:55 [ gen_sintab::$23 ] zp ZP_BYTE:14 [ gen_sintab::length#10 ] zp ZP_WORD:15 [ gen_sintab::sintab#12 ] reg byte x [ gen_sintab::max#2 ] zp ZP_BYTE:13 [ gen_sintab::min#2 ]
Uplifting [gen_sprites] best 1062689 combination zp ZP_BYTE:31 [ gen_sprites::i#2 gen_sprites::i#1 ] zp ZP_WORD:32 [ gen_sprites::spr#2 gen_sprites::spr#1 ]
Uplifting [] best 1062689 combination zp ZP_BYTE:3 [ sin_idx_y#13 sin_idx_y#11 sin_idx_y#3 ] zp ZP_BYTE:2 [ sin_idx_x#13 sin_idx_x#11 sin_idx_x#3 ] zp ZP_WORD:19 [ progress_cursor#34 progress_init::line#2 progress_cursor#11 progress_cursor#10 ] zp ZP_BYTE:18 [ progress_idx#34 progress_idx#12 progress_idx#10 ]
Uplifting [clear_screen] best 1062689 combination zp ZP_WORD:10 [ clear_screen::sc#2 clear_screen::sc#1 ]
Uplifting [init] best 1062539 combination reg byte x [ init::i#2 init::i#1 ]
Uplifting [prepareMEM] best 1062527 combination zp ZP_WORD:21 [ prepareMEM::mem#5 prepareMEM::mem#3 prepareMEM::mem#4 prepareMEM::mem#0 prepareMEM::mem#1 ] reg byte a [ prepareMEM::$0 ] reg byte a [ prepareMEM::$1 ]
Uplifting [getFAC] best 1062527 combination zp ZP_WORD:53 [ getFAC::return#2 ] zp ZP_WORD:58 [ getFAC::return#0 ]
Uplifting [setMEMtoFAC] best 1062527 combination zp ZP_WORD:29 [ setMEMtoFAC::mem#5 ]
Uplifting [divMEMbyFAC] best 1062527 combination zp ZP_WORD:25 [ divMEMbyFAC::mem#2 ]
Uplifting [mulFACbyMEM] best 1062527 combination zp ZP_WORD:23 [ mulFACbyMEM::mem#2 ]
Uplifting [setARGtoFAC] best 1062527 combination
Uplifting [addMEMtoFAC] best 1062527 combination
Uplifting [subFACfromARG] best 1062527 combination
Uplifting [sinFAC] best 1062527 combination
Uplifting [RADIX] best 1062527 combination
Uplifting [main] best 1062527 combination
Uplifting [progress_init] best 1062527 combination
Uplifting [progress_inc] best 1062527 combination
Attempting to uplift remaining variables inzp ZP_BYTE:38 [ gen_chargen_sprite::s_gen#3 gen_chargen_sprite::s_gen#5 gen_chargen_sprite::s_gen#6 gen_chargen_sprite::s_gen#1 ]
Uplifting [gen_chargen_sprite] best 1062797 combination zp ZP_BYTE:38 [ gen_chargen_sprite::s_gen#3 gen_chargen_sprite::s_gen#5 gen_chargen_sprite::s_gen#6 gen_chargen_sprite::s_gen#1 ]
Uplifting [gen_chargen_sprite] best 1062527 combination zp ZP_BYTE:38 [ gen_chargen_sprite::s_gen#3 gen_chargen_sprite::s_gen#5 gen_chargen_sprite::s_gen#6 gen_chargen_sprite::s_gen#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:36 [ gen_chargen_sprite::x#6 gen_chargen_sprite::x#1 ]
Uplifting [gen_chargen_sprite] best 1062797 combination zp ZP_BYTE:36 [ gen_chargen_sprite::x#6 gen_chargen_sprite::x#1 ]
Uplifting [gen_chargen_sprite] best 1062527 combination zp ZP_BYTE:36 [ gen_chargen_sprite::x#6 gen_chargen_sprite::x#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:35 [ gen_chargen_sprite::bits#2 gen_chargen_sprite::bits#0 gen_chargen_sprite::bits#1 ]
Uplifting [gen_chargen_sprite] best 1062797 combination zp ZP_BYTE:35 [ gen_chargen_sprite::bits#2 gen_chargen_sprite::bits#0 gen_chargen_sprite::bits#1 ]
Uplifting [gen_chargen_sprite] best 1062527 combination zp ZP_BYTE:35 [ gen_chargen_sprite::bits#2 gen_chargen_sprite::bits#0 gen_chargen_sprite::bits#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:37 [ gen_chargen_sprite::c#3 ]
Uplifting [gen_chargen_sprite] best 1062797 combination zp ZP_BYTE:37 [ gen_chargen_sprite::c#3 ]
Uplifting [gen_chargen_sprite] best 1062527 combination zp ZP_BYTE:37 [ gen_chargen_sprite::c#3 ]
Attempting to uplift remaining variables inzp ZP_BYTE:7 [ anim::yidx#3 anim::yidx#0 anim::yidx#6 anim::yidx#1 anim::yidx#2 ]
Uplifting [anim] best 1062797 combination zp ZP_BYTE:7 [ anim::yidx#3 anim::yidx#0 anim::yidx#6 anim::yidx#1 anim::yidx#2 ]
Uplifting [anim] best 1062527 combination zp ZP_BYTE:7 [ anim::yidx#3 anim::yidx#0 anim::yidx#6 anim::yidx#1 anim::yidx#2 ]
Attempting to uplift remaining variables inzp ZP_BYTE:4 [ anim::xidx#3 anim::xidx#0 anim::xidx#5 anim::xidx#1 anim::xidx#2 ]
Uplifting [anim] best 1062797 combination zp ZP_BYTE:4 [ anim::xidx#3 anim::xidx#0 anim::xidx#5 anim::xidx#1 anim::xidx#2 ]
Uplifting [anim] best 1062527 combination zp ZP_BYTE:4 [ anim::xidx#3 anim::xidx#0 anim::xidx#5 anim::xidx#1 anim::xidx#2 ]
Attempting to uplift remaining variables inzp ZP_BYTE:34 [ gen_chargen_sprite::y#2 gen_chargen_sprite::y#1 ]
Uplifting [gen_chargen_sprite] best 1062797 combination zp ZP_BYTE:34 [ gen_chargen_sprite::y#2 gen_chargen_sprite::y#1 ]
Uplifting [gen_chargen_sprite] best 1062527 combination zp ZP_BYTE:34 [ gen_chargen_sprite::y#2 gen_chargen_sprite::y#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:8 [ anim::j#2 anim::j#1 ]
Uplifting [anim] best 1062797 combination zp ZP_BYTE:8 [ anim::j#2 anim::j#1 ]
Uplifting [anim] best 1062527 combination zp ZP_BYTE:8 [ anim::j#2 anim::j#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:5 [ anim::x_msb#2 anim::x_msb#1 ]
Uplifting [anim] best 1062797 combination zp ZP_BYTE:5 [ anim::x_msb#2 anim::x_msb#1 ]
Uplifting [anim] best 1062527 combination zp ZP_BYTE:5 [ anim::x_msb#2 anim::x_msb#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:50 [ anim::$6 ]
Uplifting [anim] best 1062797 combination zp ZP_BYTE:50 [ anim::$6 ]
Uplifting [anim] best 1062527 combination zp ZP_BYTE:50 [ anim::$6 ]
Attempting to uplift remaining variables inzp ZP_BYTE:6 [ anim::j2#2 anim::j2#1 ]
Uplifting [anim] best 1062797 combination zp ZP_BYTE:6 [ anim::j2#2 anim::j2#1 ]
Uplifting [anim] best 1062527 combination zp ZP_BYTE:6 [ anim::j2#2 anim::j2#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:31 [ gen_sprites::i#2 gen_sprites::i#1 ]
Uplifting [gen_sprites] best 1062797 combination zp ZP_BYTE:31 [ gen_sprites::i#2 gen_sprites::i#1 ]
Uplifting [gen_sprites] best 1062527 combination zp ZP_BYTE:31 [ gen_sprites::i#2 gen_sprites::i#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:44 [ place_sprites::j#2 place_sprites::j#1 ]
Uplifting [place_sprites] best 1062797 combination zp ZP_BYTE:44 [ place_sprites::j#2 place_sprites::j#1 ]
Uplifting [place_sprites] best 1062527 combination zp ZP_BYTE:44 [ place_sprites::j#2 place_sprites::j#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:43 [ place_sprites::spr_id#2 place_sprites::spr_id#1 ]
Uplifting [place_sprites] best 1062797 combination zp ZP_BYTE:43 [ place_sprites::spr_id#2 place_sprites::spr_id#1 ]
Uplifting [place_sprites] best 1062527 combination zp ZP_BYTE:43 [ place_sprites::spr_id#2 place_sprites::spr_id#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:17 [ gen_sintab::i#10 gen_sintab::i#1 ]
Uplifting [gen_sintab] best 1062797 combination zp ZP_BYTE:17 [ gen_sintab::i#10 gen_sintab::i#1 ]
Uplifting [gen_sintab] best 1062527 combination zp ZP_BYTE:17 [ gen_sintab::i#10 gen_sintab::i#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:46 [ place_sprites::j2#3 place_sprites::j2#2 ]
Uplifting [place_sprites] best 1062797 combination zp ZP_BYTE:46 [ place_sprites::j2#3 place_sprites::j2#2 ]
Attempting to uplift remaining variables inzp ZP_BYTE:45 [ place_sprites::spr_x#2 place_sprites::spr_x#1 ]
Uplifting [place_sprites] best 1062797 combination zp ZP_BYTE:45 [ place_sprites::spr_x#2 place_sprites::spr_x#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:47 [ place_sprites::col#2 place_sprites::col#1 ]
Uplifting [place_sprites] best 1062797 combination zp ZP_BYTE:47 [ place_sprites::col#2 place_sprites::col#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:18 [ progress_idx#34 progress_idx#12 progress_idx#10 ]
Uplifting [] best 1062797 combination zp ZP_BYTE:18 [ progress_idx#34 progress_idx#12 progress_idx#10 ]
Uplifting [place_sprites] best 1062527 combination zp ZP_BYTE:46 [ place_sprites::j2#3 place_sprites::j2#2 ]
Attempting to uplift remaining variables inzp ZP_BYTE:3 [ sin_idx_y#13 sin_idx_y#11 sin_idx_y#3 ]
Uplifting [] best 1062797 combination zp ZP_BYTE:3 [ sin_idx_y#13 sin_idx_y#11 sin_idx_y#3 ]
Attempting to uplift remaining variables inzp ZP_BYTE:62 [ gen_chargen_sprite::ch#0 ]
Uplifting [gen_chargen_sprite] best 1062766 combination reg byte x [ gen_chargen_sprite::ch#0 ]
Uplifting [] best 1062527 combination zp ZP_BYTE:3 [ sin_idx_y#13 sin_idx_y#11 sin_idx_y#3 ]
Attempting to uplift remaining variables inzp ZP_BYTE:2 [ sin_idx_x#13 sin_idx_x#11 sin_idx_x#3 ]
Uplifting [] best 1062766 combination zp ZP_BYTE:2 [ sin_idx_x#13 sin_idx_x#11 sin_idx_x#3 ]
Uplifting [] best 1062527 combination zp ZP_BYTE:2 [ sin_idx_x#13 sin_idx_x#11 sin_idx_x#3 ]
Attempting to uplift remaining variables inzp ZP_BYTE:45 [ place_sprites::spr_x#2 place_sprites::spr_x#1 ]
Uplifting [place_sprites] best 1062527 combination zp ZP_BYTE:45 [ place_sprites::spr_x#2 place_sprites::spr_x#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:47 [ place_sprites::col#2 place_sprites::col#1 ]
Uplifting [place_sprites] best 1062527 combination zp ZP_BYTE:47 [ place_sprites::col#2 place_sprites::col#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:18 [ progress_idx#34 progress_idx#12 progress_idx#10 ]
Uplifting [] best 1062527 combination zp ZP_BYTE:18 [ progress_idx#34 progress_idx#12 progress_idx#10 ]
Attempting to uplift remaining variables inzp ZP_BYTE:62 [ gen_chargen_sprite::ch#0 ]
Uplifting [gen_chargen_sprite] best 1062496 combination reg byte x [ gen_chargen_sprite::ch#0 ]
Attempting to uplift remaining variables inzp ZP_BYTE:14 [ gen_sintab::length#10 ]
Uplifting [gen_sintab] best 1062766 combination zp ZP_BYTE:14 [ gen_sintab::length#10 ]
Uplifting [gen_sintab] best 1062496 combination zp ZP_BYTE:14 [ gen_sintab::length#10 ]
Attempting to uplift remaining variables inzp ZP_BYTE:13 [ gen_sintab::min#2 ]
Uplifting [gen_sintab] best 1062766 combination zp ZP_BYTE:13 [ gen_sintab::min#2 ]
Uplifting [gen_sintab] best 1062496 combination zp ZP_BYTE:13 [ gen_sintab::min#2 ]
Coalescing zero page register with common assignment [ zp ZP_BYTE:5 [ anim::x_msb#2 anim::x_msb#1 ] ] with [ zp ZP_BYTE:50 [ anim::$6 ] ] - score: 2
Coalescing zero page register with common assignment [ zp ZP_WORD:21 [ prepareMEM::mem#5 prepareMEM::mem#3 prepareMEM::mem#4 prepareMEM::mem#0 prepareMEM::mem#1 ] ] with [ zp ZP_WORD:23 [ mulFACbyMEM::mem#2 ] ] - score: 1
Coalescing zero page register with common assignment [ zp ZP_WORD:21 [ prepareMEM::mem#5 prepareMEM::mem#3 prepareMEM::mem#4 prepareMEM::mem#0 prepareMEM::mem#1 mulFACbyMEM::mem#2 ] ] with [ zp ZP_WORD:25 [ divMEMbyFAC::mem#2 ] ] - score: 1
@ -5492,8 +5470,11 @@ main: {
lda #0
sta sin_idx_x
jmp b1
// [6] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
// [6] phi from main::@1 main::@2 to main::@1 [phi:main::@1/main::@2->main::@1]
b1_from_b1:
b1_from_b2:
// [6] phi (byte) sin_idx_y#13 = (byte) sin_idx_y#13 [phi:main::@1/main::@2->main::@1#0] -- register_copy
// [6] phi (byte) sin_idx_x#13 = (byte) sin_idx_x#13 [phi:main::@1/main::@2->main::@1#1] -- register_copy
jmp b1
// main::@1
b1:
@ -5508,11 +5489,7 @@ main: {
b2:
// [9] call anim
jsr anim
// [6] phi from main::@2 to main::@1 [phi:main::@2->main::@1]
b1_from_b2:
// [6] phi (byte) sin_idx_y#13 = (byte) sin_idx_y#11 [phi:main::@2->main::@1#0] -- register_copy
// [6] phi (byte) sin_idx_x#13 = (byte) sin_idx_x#11 [phi:main::@2->main::@1#1] -- register_copy
jmp b1
jmp b1_from_b2
}
// anim
anim: {
@ -6904,6 +6881,7 @@ Removing instruction lda #$7f
Removing instruction ldy j2
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Replacing label b1_from_b1 with b1
Replacing label b1_from_b2 with b1
Replacing label b4_from_b3 with b4
Replacing label b5_from_b4 with b5
Replacing label b3_from_b5 with b3
@ -6925,6 +6903,7 @@ Removing instruction b1:
Removing instruction main_from_b1:
Removing instruction bend_from_b1:
Removing instruction b1_from_b1:
Removing instruction b1_from_b2:
Removing instruction b2_from_b1:
Removing instruction b3_from_b5:
Removing instruction b4_from_b3:
@ -6996,7 +6975,6 @@ Removing instruction bend:
Removing instruction init_from_main:
Removing instruction b1_from_main:
Removing instruction b2:
Removing instruction b1_from_b2:
Removing instruction b3_from_anim:
Removing instruction b6:
Removing instruction b7:
@ -7402,11 +7380,11 @@ FINAL SYMBOL TABLE
(label) sinFAC::@return
(byte) sin_idx_x
(byte) sin_idx_x#11 sin_idx_x zp ZP_BYTE:2 1.625
(byte) sin_idx_x#13 sin_idx_x zp ZP_BYTE:2 0.5769230769230769
(byte) sin_idx_x#13 sin_idx_x zp ZP_BYTE:2 8.346153846153845
(byte) sin_idx_x#3 sin_idx_x zp ZP_BYTE:2 2.0
(byte) sin_idx_y
(byte) sin_idx_y#11 sin_idx_y zp ZP_BYTE:3 3.25
(byte) sin_idx_y#13 sin_idx_y zp ZP_BYTE:3 0.49999999999999994
(byte) sin_idx_y#13 sin_idx_y zp ZP_BYTE:3 7.2333333333333325
(byte) sin_idx_y#3 sin_idx_y zp ZP_BYTE:3 2.0
(byte) sinlen_x
(const byte) sinlen_x#0 sinlen_x = (byte) $dd
@ -7468,7 +7446,7 @@ reg byte x [ place_sprites::j2#1 ]
FINAL ASSEMBLER
Score: 769888
Score: 769618
// File Comments
// Basic Upstart
@ -7521,7 +7499,9 @@ main: {
sta sin_idx_y
// [6] phi (byte) sin_idx_x#13 = (byte) 0 [phi:main->main::@1#1] -- vbuz1=vbuc1
sta sin_idx_x
// [6] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
// [6] phi from main::@1 main::@2 to main::@1 [phi:main::@1/main::@2->main::@1]
// [6] phi (byte) sin_idx_y#13 = (byte) sin_idx_y#13 [phi:main::@1/main::@2->main::@1#0] -- register_copy
// [6] phi (byte) sin_idx_x#13 = (byte) sin_idx_x#13 [phi:main::@1/main::@2->main::@1#1] -- register_copy
// main::@1
b1:
// while (*RASTER!=$ff)
@ -7534,9 +7514,6 @@ main: {
// anim()
// [9] call anim
jsr anim
// [6] phi from main::@2 to main::@1 [phi:main::@2->main::@1]
// [6] phi (byte) sin_idx_y#13 = (byte) sin_idx_y#11 [phi:main::@2->main::@1#0] -- register_copy
// [6] phi (byte) sin_idx_x#13 = (byte) sin_idx_x#11 [phi:main::@2->main::@1#1] -- register_copy
jmp b1
}
// anim

View File

@ -293,11 +293,11 @@
(label) sinFAC::@return
(byte) sin_idx_x
(byte) sin_idx_x#11 sin_idx_x zp ZP_BYTE:2 1.625
(byte) sin_idx_x#13 sin_idx_x zp ZP_BYTE:2 0.5769230769230769
(byte) sin_idx_x#13 sin_idx_x zp ZP_BYTE:2 8.346153846153845
(byte) sin_idx_x#3 sin_idx_x zp ZP_BYTE:2 2.0
(byte) sin_idx_y
(byte) sin_idx_y#11 sin_idx_y zp ZP_BYTE:3 3.25
(byte) sin_idx_y#13 sin_idx_y zp ZP_BYTE:3 0.49999999999999994
(byte) sin_idx_y#13 sin_idx_y zp ZP_BYTE:3 7.2333333333333325
(byte) sin_idx_y#3 sin_idx_y zp ZP_BYTE:3 2.0
(byte) sinlen_x
(const byte) sinlen_x#0 sinlen_x = (byte) $dd

View File

@ -0,0 +1,432 @@
// An implementation of seriously fast multiply for integer values in the interval [-1;1] with the best possible precision
// NOTE: So far unsuccessful - since the handling of sign and values where a+b>sqrt2) makes the code slower than regular fast multiply
// In this model 255 binary represents 1.0 - meaning that 255*255 = 255
// Uses principles from C=Hacking #16 https://codebase64.org/doku.php?id=magazines:chacking16
// Utilizes the fact that a*b = ((a+b)/2)^2 - ((a-b)/2)^2
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
.label print_char_cursor = 7
.label print_line_cursor = 3
main: {
jsr print_cls
lda #<$400
sta print_char_cursor
lda #>$400
sta print_char_cursor+1
lda #<str
sta print_str.str
lda #>str
sta print_str.str+1
jsr print_str
lda #<$400
sta print_line_cursor
lda #>$400
sta print_line_cursor+1
jsr print_ln
lda #0
sta print_mulf8u127.b
tay
jsr print_mulf8u127
lda #$7f
sta print_mulf8u127.b
tay
jsr print_mulf8u127
lda #$40
sta print_mulf8u127.b
tay
jsr print_mulf8u127
lda #$7f
sta print_mulf8u127.b
ldy #$40
jsr print_mulf8u127
lda #$c0
sta print_mulf8u127.b
ldy #$40
jsr print_mulf8u127
lda #$7f
sta print_mulf8u127.b
ldy #$ff
jsr print_mulf8u127
lda #$c0
sta print_mulf8u127.b
tay
jsr print_mulf8u127
lda #$ff
sta print_mulf8u127.b
tay
jsr print_mulf8u127
lda print_line_cursor
sta print_char_cursor
lda print_line_cursor+1
sta print_char_cursor+1
lda #<str1
sta print_str.str
lda #>str1
sta print_str.str+1
jsr print_str
jsr print_ln
lda #0
sta print_mulf8s127.b
tay
jsr print_mulf8s127
lda #$40
sta print_mulf8s127.b
tay
jsr print_mulf8s127
lda #$7f
sta print_mulf8s127.b
ldy #$40
jsr print_mulf8s127
lda #$40
sta print_mulf8s127.b
ldy #-$40
jsr print_mulf8s127
lda #-$40
sta print_mulf8s127.b
ldy #$40
jsr print_mulf8s127
lda #-$40
sta print_mulf8s127.b
tay
jsr print_mulf8s127
lda #$7f
sta print_mulf8s127.b
tay
jsr print_mulf8s127
lda #$7f
sta print_mulf8s127.b
ldy #-$7f
jsr print_mulf8s127
lda #-$7f
sta print_mulf8s127.b
ldy #$7f
jsr print_mulf8s127
lda #-$7f
sta print_mulf8s127.b
tay
jsr print_mulf8s127
rts
str: .text "unsigned@"
str1: .text "signed@"
}
// print_mulf8s127(signed byte register(Y) a, signed byte zeropage(2) b)
print_mulf8s127: {
.label c = 5
.label b = 2
jsr mulf8s127
tya
tax
lda print_line_cursor
sta print_char_cursor
lda print_line_cursor+1
sta print_char_cursor+1
jsr print_sbyte
lda #'*'
jsr print_char
ldx b
jsr print_sbyte
lda #'='
jsr print_char
jsr print_sword
jsr print_ln
rts
}
// Print a newline
print_ln: {
b1:
lda #$28
clc
adc print_line_cursor
sta print_line_cursor
bcc !+
inc print_line_cursor+1
!:
lda print_line_cursor+1
cmp print_char_cursor+1
bcc b1
bne !+
lda print_line_cursor
cmp print_char_cursor
bcc b1
!:
rts
}
// Print a signed word as HEX
// print_sword(signed word zeropage(5) w)
print_sword: {
.label w = 5
lda w+1
bmi b1
lda #' '
jsr print_char
b2:
jsr print_word
rts
b1:
lda #'-'
jsr print_char
sec
lda #0
sbc w
sta w
lda #0
sbc w+1
sta w+1
jmp b2
}
// Print a single char
// print_char(byte register(A) ch)
print_char: {
ldy #0
sta (print_char_cursor),y
inc print_char_cursor
bne !+
inc print_char_cursor+1
!:
rts
}
// Print a word as HEX
// print_word(word zeropage(5) w)
print_word: {
.label w = 5
lda w+1
tax
jsr print_byte
lda w
tax
jsr print_byte
rts
}
// Print a byte as HEX
// print_byte(byte register(X) b)
print_byte: {
txa
lsr
lsr
lsr
lsr
tay
lda print_hextab,y
jsr print_char
lda #$f
axs #0
lda print_hextab,x
jsr print_char
rts
}
// Print a signed byte as HEX
// print_sbyte(signed byte register(X) b)
print_sbyte: {
cpx #0
bmi b1
lda #' '
jsr print_char
b2:
jsr print_byte
rts
b1:
lda #'-'
jsr print_char
txa
eor #$ff
clc
adc #1
tax
jmp b2
}
// mulf8s127(signed byte register(Y) a, signed byte zeropage(2) b)
mulf8s127: {
.label _12 = $e
.label _13 = $e
.label _14 = $10
.label _15 = $10
.label b = 2
.label return = 5
.label c = 5
tya
ldx b
jsr mulf8u127
cpy #0
bpl b1
lda b
sta _12
ora #$7f
bmi !+
lda #0
!:
sta _12+1
asl _13
rol _13+1
lda c
sec
sbc _13
sta c
lda c+1
sbc _13+1
sta c+1
b1:
lda b
cmp #0
bpl b2
tya
sta _14
ora #$7f
bmi !+
lda #0
!:
sta _14+1
asl _15
rol _15+1
lda c
sec
sbc _15
sta c
lda c+1
sbc _15+1
sta c+1
b2:
cpy #0
bpl b3
lda b
cmp #0
bpl b3
lda c
sec
sbc #<$200
sta c
lda c+1
sbc #>$200
sta c+1
rts
b3:
rts
}
// mulf8u127(byte register(A) a, byte register(X) b)
mulf8u127: {
.label memA = $fc
.label memB = $fd
.label res = $fe
.label resL = $fe
.label resH = $ff
.label return = 5
sta memA
stx memB
sta sm1+1
sta sm3+1
eor #$ff
sta sm2+1
sta sm4+1
sec
sm1:
lda mulf127_sqr1_lo,x
sm2:
sbc mulf127_sqr2_lo,x
sta resL
sm3:
lda mulf127_sqr1_hi,x
sm4:
sbc mulf127_sqr2_hi,x
sta resH
lda res
sta return
lda res+1
sta return+1
rts
}
// Print a zero-terminated string
// print_str(byte* zeropage(9) str)
print_str: {
.label str = 9
b1:
ldy #0
lda (str),y
cmp #'@'
bne b2
rts
b2:
ldy #0
lda (str),y
sta (print_char_cursor),y
inc print_char_cursor
bne !+
inc print_char_cursor+1
!:
inc str
bne !+
inc str+1
!:
jmp b1
}
// print_mulf8u127(byte register(Y) a, byte zeropage($b) b)
print_mulf8u127: {
.label c = 5
.label b = $b
tya
ldx b
jsr mulf8u127
tya
tax
lda print_line_cursor
sta print_char_cursor
lda print_line_cursor+1
sta print_char_cursor+1
jsr print_byte
lda #'*'
jsr print_char
ldx b
jsr print_byte
lda #'='
jsr print_char
jsr print_word
jsr print_ln
rts
}
// Clear the screen. Also resets current line/char cursor.
print_cls: {
jsr memset
rts
}
// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str.
memset: {
.const c = ' '
.const num = $3e8
.label str = $400
.label end = str+num
.label dst = $c
lda #<str
sta dst
lda #>str
sta dst+1
b1:
lda #c
ldy #0
sta (dst),y
inc dst
bne !+
inc dst+1
!:
lda dst+1
cmp #>end
bne b1
lda dst
cmp #<end
bne b1
rts
}
print_hextab: .text "0123456789abcdef"
// mulf_sqr tables will contain f(x)=int(x*x/4) and g(x) = f(x-255).
// f(x) = ( x * x )/4
.align $100
mulf127_sqr1_lo:
.fill 512, <round((i/127*i/127)*127/4)
.align $100
mulf127_sqr1_hi:
.fill 512, >round((i/127*i/127)*127/4)
// g(x) = <((( x - 255) * ( x - 255 ))/4)
.align $100
mulf127_sqr2_lo:
.fill 512, <round(((i-255)/127*(i-255)/127)*127/4)
.align $100
mulf127_sqr2_hi:
.fill 512, >round(((i-255)/127*(i-255)/127)*127/4)

View File

@ -0,0 +1,362 @@
@begin: scope:[] from
[0] phi()
to:@1
@1: scope:[] from @begin
[1] phi()
[2] call main
to:@end
@end: scope:[] from @1
[3] phi()
main: scope:[main] from @1
[4] phi()
[5] call print_cls
to:main::@1
main::@1: scope:[main] from main
[6] phi()
[7] call print_str
to:main::@2
main::@2: scope:[main] from main::@1
[8] phi()
[9] call print_ln
to:main::@3
main::@3: scope:[main] from main::@2
[10] phi()
[11] call print_mulf8u127
to:main::@4
main::@4: scope:[main] from main::@3
[12] phi()
[13] call print_mulf8u127
to:main::@5
main::@5: scope:[main] from main::@4
[14] phi()
[15] call print_mulf8u127
to:main::@6
main::@6: scope:[main] from main::@5
[16] phi()
[17] call print_mulf8u127
to:main::@7
main::@7: scope:[main] from main::@6
[18] phi()
[19] call print_mulf8u127
to:main::@8
main::@8: scope:[main] from main::@7
[20] phi()
[21] call print_mulf8u127
to:main::@9
main::@9: scope:[main] from main::@8
[22] phi()
[23] call print_mulf8u127
to:main::@10
main::@10: scope:[main] from main::@9
[24] phi()
[25] call print_mulf8u127
to:main::@11
main::@11: scope:[main] from main::@10
[26] (byte*~) print_char_cursor#143 ← (byte*) print_line_cursor#1
[27] call print_str
to:main::@12
main::@12: scope:[main] from main::@11
[28] phi()
[29] call print_ln
to:main::@13
main::@13: scope:[main] from main::@12
[30] phi()
[31] call print_mulf8s127
to:main::@14
main::@14: scope:[main] from main::@13
[32] phi()
[33] call print_mulf8s127
to:main::@15
main::@15: scope:[main] from main::@14
[34] phi()
[35] call print_mulf8s127
to:main::@16
main::@16: scope:[main] from main::@15
[36] phi()
[37] call print_mulf8s127
to:main::@17
main::@17: scope:[main] from main::@16
[38] phi()
[39] call print_mulf8s127
to:main::@18
main::@18: scope:[main] from main::@17
[40] phi()
[41] call print_mulf8s127
to:main::@19
main::@19: scope:[main] from main::@18
[42] phi()
[43] call print_mulf8s127
to:main::@20
main::@20: scope:[main] from main::@19
[44] phi()
[45] call print_mulf8s127
to:main::@21
main::@21: scope:[main] from main::@20
[46] phi()
[47] call print_mulf8s127
to:main::@22
main::@22: scope:[main] from main::@21
[48] phi()
[49] call print_mulf8s127
to:main::@return
main::@return: scope:[main] from main::@22
[50] return
to:@return
print_mulf8s127: scope:[print_mulf8s127] from main::@13 main::@14 main::@15 main::@16 main::@17 main::@18 main::@19 main::@20 main::@21 main::@22
[51] (signed byte) print_mulf8s127::b#10 ← phi( main::@13/(signed byte) 0 main::@14/(signed byte) $40 main::@15/(signed byte) $7f main::@16/(signed byte) $40 main::@17/(signed byte) -$40 main::@18/(signed byte) -$40 main::@19/(signed byte) $7f main::@20/(signed byte) $7f main::@21/(signed byte) -$7f main::@22/(signed byte) -$7f )
[51] (signed byte) print_mulf8s127::a#10 ← phi( main::@13/(signed byte) 0 main::@14/(signed byte) $40 main::@15/(signed byte) $40 main::@16/(signed byte) -$40 main::@17/(signed byte) $40 main::@18/(signed byte) -$40 main::@19/(signed byte) $7f main::@20/(signed byte) -$7f main::@21/(signed byte) $7f main::@22/(signed byte) -$7f )
[52] (signed byte) mulf8s127::a#0 ← (signed byte) print_mulf8s127::a#10
[53] (signed byte) mulf8s127::b#0 ← (signed byte) print_mulf8s127::b#10
[54] call mulf8s127
[55] (signed word) mulf8s127::return#0 ← (signed word) mulf8s127::return#1
to:print_mulf8s127::@1
print_mulf8s127::@1: scope:[print_mulf8s127] from print_mulf8s127
[56] (signed word) print_mulf8s127::c#0 ← (signed word) mulf8s127::return#0
[57] (signed byte) print_sbyte::b#1 ← (signed byte) print_mulf8s127::a#10
[58] (byte*~) print_char_cursor#150 ← (byte*) print_line_cursor#1
[59] call print_sbyte
to:print_mulf8s127::@2
print_mulf8s127::@2: scope:[print_mulf8s127] from print_mulf8s127::@1
[60] phi()
[61] call print_char
to:print_mulf8s127::@3
print_mulf8s127::@3: scope:[print_mulf8s127] from print_mulf8s127::@2
[62] (signed byte) print_sbyte::b#2 ← (signed byte) print_mulf8s127::b#10
[63] call print_sbyte
to:print_mulf8s127::@4
print_mulf8s127::@4: scope:[print_mulf8s127] from print_mulf8s127::@3
[64] phi()
[65] call print_char
to:print_mulf8s127::@5
print_mulf8s127::@5: scope:[print_mulf8s127] from print_mulf8s127::@4
[66] (signed word) print_sword::w#1 ← (signed word) print_mulf8s127::c#0
[67] call print_sword
to:print_mulf8s127::@6
print_mulf8s127::@6: scope:[print_mulf8s127] from print_mulf8s127::@5
[68] phi()
[69] call print_ln
to:print_mulf8s127::@return
print_mulf8s127::@return: scope:[print_mulf8s127] from print_mulf8s127::@6
[70] return
to:@return
print_ln: scope:[print_ln] from main::@12 main::@2 print_mulf8s127::@6 print_mulf8u127::@6
[71] (byte*) print_char_cursor#123 ← phi( main::@12/(byte*) print_char_cursor#122 main::@2/(byte*) print_char_cursor#122 print_mulf8s127::@6/(byte*) print_char_cursor#19 print_mulf8u127::@6/(byte*) print_char_cursor#19 )
[71] (byte*) print_line_cursor#63 ← phi( main::@12/(byte*) print_line_cursor#1 main::@2/(byte*) 1024 print_mulf8s127::@6/(byte*) print_line_cursor#1 print_mulf8u127::@6/(byte*) print_line_cursor#1 )
to:print_ln::@1
print_ln::@1: scope:[print_ln] from print_ln print_ln::@1
[72] (byte*) print_line_cursor#32 ← phi( print_ln/(byte*) print_line_cursor#63 print_ln::@1/(byte*) print_line_cursor#1 )
[73] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#32 + (byte) $28
[74] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#123) goto print_ln::@1
to:print_ln::@return
print_ln::@return: scope:[print_ln] from print_ln::@1
[75] return
to:@return
print_sword: scope:[print_sword] from print_mulf8s127::@5
[76] if((signed word) print_sword::w#1<(signed byte) 0) goto print_sword::@1
to:print_sword::@3
print_sword::@3: scope:[print_sword] from print_sword
[77] phi()
[78] call print_char
to:print_sword::@2
print_sword::@2: scope:[print_sword] from print_sword::@3 print_sword::@4
[79] (signed word) print_sword::w#4 ← phi( print_sword::@4/(signed word) print_sword::w#0 print_sword::@3/(signed word) print_sword::w#1 )
[80] (word) print_word::w#0 ← (word)(signed word) print_sword::w#4
[81] call print_word
to:print_sword::@return
print_sword::@return: scope:[print_sword] from print_sword::@2
[82] return
to:@return
print_sword::@1: scope:[print_sword] from print_sword
[83] phi()
[84] call print_char
to:print_sword::@4
print_sword::@4: scope:[print_sword] from print_sword::@1
[85] (signed word) print_sword::w#0 ← - (signed word) print_sword::w#1
to:print_sword::@2
print_char: scope:[print_char] from print_byte print_byte::@1 print_mulf8s127::@2 print_mulf8s127::@4 print_mulf8u127::@2 print_mulf8u127::@4 print_sbyte::@1 print_sbyte::@3 print_sword::@1 print_sword::@3
[86] (byte*) print_char_cursor#80 ← phi( print_byte/(byte*) print_char_cursor#131 print_byte::@1/(byte*) print_char_cursor#19 print_mulf8s127::@2/(byte*) print_char_cursor#19 print_mulf8s127::@4/(byte*) print_char_cursor#19 print_mulf8u127::@2/(byte*) print_char_cursor#19 print_mulf8u127::@4/(byte*) print_char_cursor#19 print_sbyte::@1/(byte*) print_char_cursor#127 print_sbyte::@3/(byte*) print_char_cursor#127 print_sword::@1/(byte*) print_char_cursor#19 print_sword::@3/(byte*) print_char_cursor#19 )
[86] (byte) print_char::ch#10 ← phi( print_byte/(byte) print_char::ch#4 print_byte::@1/(byte) print_char::ch#5 print_mulf8s127::@2/(byte) '*' print_mulf8s127::@4/(byte) '=' print_mulf8u127::@2/(byte) '*' print_mulf8u127::@4/(byte) '=' print_sbyte::@1/(byte) '-' print_sbyte::@3/(byte) ' ' print_sword::@1/(byte) '-' print_sword::@3/(byte) ' ' )
[87] *((byte*) print_char_cursor#80) ← (byte) print_char::ch#10
[88] (byte*) print_char_cursor#19 ← ++ (byte*) print_char_cursor#80
to:print_char::@return
print_char::@return: scope:[print_char] from print_char
[89] return
to:@return
print_word: scope:[print_word] from print_mulf8u127::@5 print_sword::@2
[90] (word) print_word::w#2 ← phi( print_mulf8u127::@5/(word) print_word::w#1 print_sword::@2/(word) print_word::w#0 )
[91] (byte) print_byte::b#1 ← > (word) print_word::w#2
[92] call print_byte
to:print_word::@1
print_word::@1: scope:[print_word] from print_word
[93] (byte) print_byte::b#2 ← < (word) print_word::w#2
[94] call print_byte
to:print_word::@return
print_word::@return: scope:[print_word] from print_word::@1
[95] return
to:@return
print_byte: scope:[print_byte] from print_mulf8u127::@1 print_mulf8u127::@3 print_sbyte::@2 print_word print_word::@1
[96] (byte*) print_char_cursor#131 ← phi( print_mulf8u127::@1/(byte*~) print_char_cursor#152 print_mulf8u127::@3/(byte*) print_char_cursor#19 print_sbyte::@2/(byte*) print_char_cursor#19 print_word/(byte*) print_char_cursor#19 print_word::@1/(byte*) print_char_cursor#19 )
[96] (byte) print_byte::b#5 ← phi( print_mulf8u127::@1/(byte) print_byte::b#3 print_mulf8u127::@3/(byte) print_byte::b#4 print_sbyte::@2/(byte) print_byte::b#0 print_word/(byte) print_byte::b#1 print_word::@1/(byte) print_byte::b#2 )
[97] (byte~) print_byte::$0 ← (byte) print_byte::b#5 >> (byte) 4
[98] (byte) print_char::ch#4 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$0)
[99] call print_char
to:print_byte::@1
print_byte::@1: scope:[print_byte] from print_byte
[100] (byte~) print_byte::$2 ← (byte) print_byte::b#5 & (byte) $f
[101] (byte) print_char::ch#5 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$2)
[102] call print_char
to:print_byte::@return
print_byte::@return: scope:[print_byte] from print_byte::@1
[103] return
to:@return
print_sbyte: scope:[print_sbyte] from print_mulf8s127::@1 print_mulf8s127::@3
[104] (byte*) print_char_cursor#127 ← phi( print_mulf8s127::@1/(byte*~) print_char_cursor#150 print_mulf8s127::@3/(byte*) print_char_cursor#19 )
[104] (signed byte) print_sbyte::b#3 ← phi( print_mulf8s127::@1/(signed byte) print_sbyte::b#1 print_mulf8s127::@3/(signed byte) print_sbyte::b#2 )
[105] if((signed byte) print_sbyte::b#3<(signed byte) 0) goto print_sbyte::@1
to:print_sbyte::@3
print_sbyte::@3: scope:[print_sbyte] from print_sbyte
[106] phi()
[107] call print_char
to:print_sbyte::@2
print_sbyte::@2: scope:[print_sbyte] from print_sbyte::@3 print_sbyte::@4
[108] (signed byte) print_sbyte::b#5 ← phi( print_sbyte::@4/(signed byte) print_sbyte::b#0 print_sbyte::@3/(signed byte) print_sbyte::b#3 )
[109] (byte) print_byte::b#0 ← (byte)(signed byte) print_sbyte::b#5
[110] call print_byte
to:print_sbyte::@return
print_sbyte::@return: scope:[print_sbyte] from print_sbyte::@2
[111] return
to:@return
print_sbyte::@1: scope:[print_sbyte] from print_sbyte
[112] phi()
[113] call print_char
to:print_sbyte::@4
print_sbyte::@4: scope:[print_sbyte] from print_sbyte::@1
[114] (signed byte) print_sbyte::b#0 ← - (signed byte) print_sbyte::b#3
to:print_sbyte::@2
mulf8s127: scope:[mulf8s127] from print_mulf8s127
[115] (byte) mulf8u127::a#1 ← (byte)(signed byte) mulf8s127::a#0
[116] (byte) mulf8u127::b#1 ← (byte)(signed byte) mulf8s127::b#0
[117] call mulf8u127
[118] (word) mulf8u127::return#3 ← (word) mulf8u127::return#1
to:mulf8s127::@7
mulf8s127::@7: scope:[mulf8s127] from mulf8s127
[119] (word) mulf8s127::c#0 ← (word) mulf8u127::return#3
[120] if((signed byte) mulf8s127::a#0>=(signed byte) 0) goto mulf8s127::@9
to:mulf8s127::@4
mulf8s127::@4: scope:[mulf8s127] from mulf8s127::@7
[121] (signed word~) mulf8s127::$12 ← (signed word)(signed byte) mulf8s127::b#0
[122] (signed word~) mulf8s127::$13 ← (signed word~) mulf8s127::$12 << (byte) 1
[123] (signed word) mulf8s127::c#1 ← (signed word)(word) mulf8s127::c#0 - (signed word~) mulf8s127::$13
to:mulf8s127::@1
mulf8s127::@1: scope:[mulf8s127] from mulf8s127::@4 mulf8s127::@9
[124] (signed word) mulf8s127::c#5 ← phi( mulf8s127::@4/(signed word) mulf8s127::c#1 mulf8s127::@9/(signed word~) mulf8s127::c#11 )
[125] if((signed byte) mulf8s127::b#0>=(signed byte) 0) goto mulf8s127::@2
to:mulf8s127::@5
mulf8s127::@5: scope:[mulf8s127] from mulf8s127::@1
[126] (signed word~) mulf8s127::$14 ← (signed word)(signed byte) mulf8s127::a#0
[127] (signed word~) mulf8s127::$15 ← (signed word~) mulf8s127::$14 << (byte) 1
[128] (signed word) mulf8s127::c#2 ← (signed word) mulf8s127::c#5 - (signed word~) mulf8s127::$15
to:mulf8s127::@2
mulf8s127::@2: scope:[mulf8s127] from mulf8s127::@1 mulf8s127::@5
[129] (signed word) mulf8s127::c#7 ← phi( mulf8s127::@1/(signed word) mulf8s127::c#5 mulf8s127::@5/(signed word) mulf8s127::c#2 )
[130] if((signed byte) mulf8s127::a#0>=(signed byte) 0) goto mulf8s127::@3
to:mulf8s127::@8
mulf8s127::@8: scope:[mulf8s127] from mulf8s127::@2
[131] if((signed byte) mulf8s127::b#0>=(signed byte) 0) goto mulf8s127::@3
to:mulf8s127::@6
mulf8s127::@6: scope:[mulf8s127] from mulf8s127::@8
[132] (signed word) mulf8s127::c#3 ← (signed word) mulf8s127::c#7 - (signed word) $200
to:mulf8s127::@3
mulf8s127::@3: scope:[mulf8s127] from mulf8s127::@2 mulf8s127::@6 mulf8s127::@8
[133] (signed word) mulf8s127::return#1 ← phi( mulf8s127::@2/(signed word) mulf8s127::c#7 mulf8s127::@6/(signed word) mulf8s127::c#3 )
to:mulf8s127::@return
mulf8s127::@return: scope:[mulf8s127] from mulf8s127::@3
[134] return
to:@return
mulf8s127::@9: scope:[mulf8s127] from mulf8s127::@7
[135] (signed word~) mulf8s127::c#11 ← (signed word)(word) mulf8s127::c#0
to:mulf8s127::@1
mulf8u127: scope:[mulf8u127] from mulf8s127 print_mulf8u127
[136] (byte) mulf8u127::b#2 ← phi( mulf8s127/(byte) mulf8u127::b#1 print_mulf8u127/(byte) mulf8u127::b#0 )
[136] (byte) mulf8u127::a#2 ← phi( mulf8s127/(byte) mulf8u127::a#1 print_mulf8u127/(byte) mulf8u127::a#0 )
[137] *((const byte*) mulf8u127::memA#0) ← (byte) mulf8u127::a#2
[138] *((const byte*) mulf8u127::memB#0) ← (byte) mulf8u127::b#2
asm { ldamemA stasm1+1 stasm3+1 eor#$ff stasm2+1 stasm4+1 ldxmemB sec sm1: ldamulf127_sqr1_lo,x sm2: sbcmulf127_sqr2_lo,x staresL sm3: ldamulf127_sqr1_hi,x sm4: sbcmulf127_sqr2_hi,x staresH }
[140] (word) mulf8u127::return#1 ← *((const word*) mulf8u127::res#0)
to:mulf8u127::@return
mulf8u127::@return: scope:[mulf8u127] from mulf8u127
[141] return
to:@return
print_str: scope:[print_str] from main::@1 main::@11
[142] (byte*) print_char_cursor#136 ← phi( main::@1/(byte*) 1024 main::@11/(byte*~) print_char_cursor#143 )
[142] (byte*) print_str::str#5 ← phi( main::@1/(const string) main::str main::@11/(const string) main::str1 )
to:print_str::@1
print_str::@1: scope:[print_str] from print_str print_str::@2
[143] (byte*) print_char_cursor#122 ← phi( print_str/(byte*) print_char_cursor#136 print_str::@2/(byte*) print_char_cursor#1 )
[143] (byte*) print_str::str#3 ← phi( print_str/(byte*) print_str::str#5 print_str::@2/(byte*) print_str::str#0 )
[144] if(*((byte*) print_str::str#3)!=(byte) '@') goto print_str::@2
to:print_str::@return
print_str::@return: scope:[print_str] from print_str::@1
[145] return
to:@return
print_str::@2: scope:[print_str] from print_str::@1
[146] *((byte*) print_char_cursor#122) ← *((byte*) print_str::str#3)
[147] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#122
[148] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#3
to:print_str::@1
print_mulf8u127: scope:[print_mulf8u127] from main::@10 main::@3 main::@4 main::@5 main::@6 main::@7 main::@8 main::@9
[149] (byte) print_mulf8u127::b#10 ← phi( main::@10/(byte) $ff main::@3/(byte) 0 main::@4/(byte) $7f main::@5/(byte) $40 main::@6/(byte) $7f main::@7/(byte) $c0 main::@8/(byte) $7f main::@9/(byte) $c0 )
[149] (byte) print_mulf8u127::a#8 ← phi( main::@10/(byte) $ff main::@3/(byte) 0 main::@4/(byte) $7f main::@5/(byte) $40 main::@6/(byte) $40 main::@7/(byte) $40 main::@8/(byte) $ff main::@9/(byte) $c0 )
[150] (byte) mulf8u127::a#0 ← (byte) print_mulf8u127::a#8
[151] (byte) mulf8u127::b#0 ← (byte) print_mulf8u127::b#10
[152] call mulf8u127
[153] (word) mulf8u127::return#0 ← (word) mulf8u127::return#1
to:print_mulf8u127::@1
print_mulf8u127::@1: scope:[print_mulf8u127] from print_mulf8u127
[154] (word) print_mulf8u127::c#0 ← (word) mulf8u127::return#0
[155] (byte) print_byte::b#3 ← (byte) print_mulf8u127::a#8
[156] (byte*~) print_char_cursor#152 ← (byte*) print_line_cursor#1
[157] call print_byte
to:print_mulf8u127::@2
print_mulf8u127::@2: scope:[print_mulf8u127] from print_mulf8u127::@1
[158] phi()
[159] call print_char
to:print_mulf8u127::@3
print_mulf8u127::@3: scope:[print_mulf8u127] from print_mulf8u127::@2
[160] (byte) print_byte::b#4 ← (byte) print_mulf8u127::b#10
[161] call print_byte
to:print_mulf8u127::@4
print_mulf8u127::@4: scope:[print_mulf8u127] from print_mulf8u127::@3
[162] phi()
[163] call print_char
to:print_mulf8u127::@5
print_mulf8u127::@5: scope:[print_mulf8u127] from print_mulf8u127::@4
[164] (word) print_word::w#1 ← (word) print_mulf8u127::c#0
[165] call print_word
to:print_mulf8u127::@6
print_mulf8u127::@6: scope:[print_mulf8u127] from print_mulf8u127::@5
[166] phi()
[167] call print_ln
to:print_mulf8u127::@return
print_mulf8u127::@return: scope:[print_mulf8u127] from print_mulf8u127::@6
[168] return
to:@return
print_cls: scope:[print_cls] from main
[169] phi()
[170] call memset
to:print_cls::@return
print_cls::@return: scope:[print_cls] from print_cls
[171] return
to:@return
memset: scope:[memset] from print_cls
[172] phi()
to:memset::@1
memset::@1: scope:[memset] from memset memset::@1
[173] (byte*) memset::dst#2 ← phi( memset/(byte*)(const void*) memset::str#0 memset::@1/(byte*) memset::dst#1 )
[174] *((byte*) memset::dst#2) ← (const byte) memset::c#0
[175] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
[176] if((byte*) memset::dst#1!=(const byte*) memset::end#0) goto memset::@1
to:memset::@return
memset::@return: scope:[memset] from memset::@1
[177] return
to:@return

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,237 @@
(label) @1
(label) @begin
(label) @end
(const byte) RADIX::BINARY BINARY = (number) 2
(const byte) RADIX::DECIMAL DECIMAL = (number) $a
(const byte) RADIX::HEXADECIMAL HEXADECIMAL = (number) $10
(const byte) RADIX::OCTAL OCTAL = (number) 8
(void()) main()
(label) main::@1
(label) main::@10
(label) main::@11
(label) main::@12
(label) main::@13
(label) main::@14
(label) main::@15
(label) main::@16
(label) main::@17
(label) main::@18
(label) main::@19
(label) main::@2
(label) main::@20
(label) main::@21
(label) main::@22
(label) main::@3
(label) main::@4
(label) main::@5
(label) main::@6
(label) main::@7
(label) main::@8
(label) main::@9
(label) main::@return
(const string) main::str str = (string) "unsigned@"
(const string) main::str1 str1 = (string) "signed@"
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
(label) memset::@1
(label) memset::@return
(byte) memset::c
(const byte) memset::c#0 c = (byte) ' '
(byte*) memset::dst
(byte*) memset::dst#1 dst zp ZP_WORD:12 16.5
(byte*) memset::dst#2 dst zp ZP_WORD:12 16.5
(byte*) memset::end
(const byte*) memset::end#0 end = (byte*)(const void*) memset::str#0+(const word) memset::num#0
(word) memset::num
(const word) memset::num#0 num = (word) $3e8
(void*) memset::return
(void*) memset::str
(const void*) memset::str#0 str = (void*)(byte*) 1024
(byte[$200]) mulf127_sqr1_hi
(const byte[$200]) mulf127_sqr1_hi#0 mulf127_sqr1_hi = kickasm {{ .fill 512, >round((i/127*i/127)*127/4) }}
(byte[$200]) mulf127_sqr1_lo
(const byte[$200]) mulf127_sqr1_lo#0 mulf127_sqr1_lo = kickasm {{ .fill 512, <round((i/127*i/127)*127/4) }}
(byte[$200]) mulf127_sqr2_hi
(const byte[$200]) mulf127_sqr2_hi#0 mulf127_sqr2_hi = kickasm {{ .fill 512, >round(((i-255)/127*(i-255)/127)*127/4) }}
(byte[$200]) mulf127_sqr2_lo
(const byte[$200]) mulf127_sqr2_lo#0 mulf127_sqr2_lo = kickasm {{ .fill 512, <round(((i-255)/127*(i-255)/127)*127/4) }}
(signed word()) mulf8s127((signed byte) mulf8s127::a , (signed byte) mulf8s127::b)
(signed word~) mulf8s127::$12 $12 zp ZP_WORD:14 4.0
(signed word~) mulf8s127::$13 $13 zp ZP_WORD:14 4.0
(signed word~) mulf8s127::$14 $14 zp ZP_WORD:16 4.0
(signed word~) mulf8s127::$15 $15 zp ZP_WORD:16 4.0
(label) mulf8s127::@1
(label) mulf8s127::@2
(label) mulf8s127::@3
(label) mulf8s127::@4
(label) mulf8s127::@5
(label) mulf8s127::@6
(label) mulf8s127::@7
(label) mulf8s127::@8
(label) mulf8s127::@9
(label) mulf8s127::@return
(signed byte) mulf8s127::a
(signed byte) mulf8s127::a#0 reg byte y 0.3333333333333333
(signed byte) mulf8s127::b
(signed byte) mulf8s127::b#0 b zp ZP_BYTE:2 0.3333333333333333
(signed word) mulf8s127::c
(word) mulf8s127::c#0 c zp ZP_WORD:5 0.5
(signed word) mulf8s127::c#1 c zp ZP_WORD:5 4.0
(signed word~) mulf8s127::c#11 c zp ZP_WORD:5 4.0
(signed word) mulf8s127::c#2 c zp ZP_WORD:5 4.0
(signed word) mulf8s127::c#3 c zp ZP_WORD:5 4.0
(signed word) mulf8s127::c#5 c zp ZP_WORD:5 2.0
(signed word) mulf8s127::c#7 c zp ZP_WORD:5 2.6666666666666665
(signed word) mulf8s127::return
(signed word) mulf8s127::return#0 return zp ZP_WORD:5 4.0
(signed word) mulf8s127::return#1 return zp ZP_WORD:5 2.0
(word()) mulf8u127((byte) mulf8u127::a , (byte) mulf8u127::b)
(label) mulf8u127::@return
(byte) mulf8u127::a
(byte) mulf8u127::a#0 reg byte a 2.0
(byte) mulf8u127::a#1 reg byte a 2.0
(byte) mulf8u127::a#2 reg byte a 6.0
(byte) mulf8u127::b
(byte) mulf8u127::b#0 reg byte x 4.0
(byte) mulf8u127::b#1 reg byte x 4.0
(byte) mulf8u127::b#2 reg byte x 3.0
(byte*) mulf8u127::memA
(const byte*) mulf8u127::memA#0 memA = (byte*) 252
(byte*) mulf8u127::memB
(const byte*) mulf8u127::memB#0 memB = (byte*) 253
(word*) mulf8u127::res
(const word*) mulf8u127::res#0 res = (word*) 254
(byte*) mulf8u127::resH
(const byte*) mulf8u127::resH#0 resH = (byte*) 255
(byte*) mulf8u127::resL
(const byte*) mulf8u127::resL#0 resL = (byte*) 254
(word) mulf8u127::return
(word) mulf8u127::return#0 return zp ZP_WORD:5 4.0
(word) mulf8u127::return#1 return zp ZP_WORD:5 1.5
(word) mulf8u127::return#3 return zp ZP_WORD:5 4.0
(void()) print_byte((byte) print_byte::b)
(byte~) print_byte::$0 reg byte a 4.0
(byte~) print_byte::$2 reg byte x 4.0
(label) print_byte::@1
(label) print_byte::@return
(byte) print_byte::b
(byte) print_byte::b#0 reg byte x 4.0
(byte) print_byte::b#1 reg byte x 4.0
(byte) print_byte::b#2 reg byte x 4.0
(byte) print_byte::b#3 reg byte x 2.0
(byte) print_byte::b#4 reg byte x 4.0
(byte) print_byte::b#5 reg byte x 3.5
(void()) print_char((byte) print_char::ch)
(label) print_char::@return
(byte) print_char::ch
(byte) print_char::ch#10 reg byte a 6.0
(byte) print_char::ch#4 reg byte a 4.0
(byte) print_char::ch#5 reg byte a 4.0
(byte*) print_char_cursor
(byte*) print_char_cursor#1 print_char_cursor zp ZP_WORD:7 11.0
(byte*) print_char_cursor#122 print_char_cursor zp ZP_WORD:7 4.875
(byte*) print_char_cursor#123 print_char_cursor zp ZP_WORD:7 4.75
(byte*) print_char_cursor#127 print_char_cursor zp ZP_WORD:7 2.0
(byte*) print_char_cursor#131 print_char_cursor zp ZP_WORD:7 3.9999999999999996
(byte*) print_char_cursor#136 print_char_cursor zp ZP_WORD:7 4.0
(byte*~) print_char_cursor#143 print_char_cursor zp ZP_WORD:7 4.0
(byte*~) print_char_cursor#150 print_char_cursor zp ZP_WORD:7 4.0
(byte*~) print_char_cursor#152 print_char_cursor zp ZP_WORD:7 4.0
(byte*) print_char_cursor#19 print_char_cursor zp ZP_WORD:7 0.6
(byte*) print_char_cursor#80 print_char_cursor zp ZP_WORD:7 12.0
(void()) print_cls()
(label) print_cls::@return
(byte[]) print_hextab
(const byte[]) print_hextab#0 print_hextab = (string) "0123456789abcdef"
(byte*) print_line_cursor
(byte*) print_line_cursor#1 print_line_cursor zp ZP_WORD:3 0.5421686746987951
(byte*) print_line_cursor#32 print_line_cursor zp ZP_WORD:3 24.0
(byte*) print_line_cursor#63 print_line_cursor zp ZP_WORD:3 8.0
(void()) print_ln()
(label) print_ln::@1
(label) print_ln::@return
(void()) print_mulf8s127((signed byte) print_mulf8s127::a , (signed byte) print_mulf8s127::b)
(label) print_mulf8s127::@1
(label) print_mulf8s127::@2
(label) print_mulf8s127::@3
(label) print_mulf8s127::@4
(label) print_mulf8s127::@5
(label) print_mulf8s127::@6
(label) print_mulf8s127::@return
(signed byte) print_mulf8s127::a
(signed byte) print_mulf8s127::a#10 reg byte y 0.6666666666666666
(signed byte) print_mulf8s127::b
(signed byte) print_mulf8s127::b#10 b zp ZP_BYTE:2 0.36363636363636365
(signed word) print_mulf8s127::c
(signed word) print_mulf8s127::c#0 c zp ZP_WORD:5 0.4
(void()) print_mulf8u127((byte) print_mulf8u127::a , (byte) print_mulf8u127::b)
(label) print_mulf8u127::@1
(label) print_mulf8u127::@2
(label) print_mulf8u127::@3
(label) print_mulf8u127::@4
(label) print_mulf8u127::@5
(label) print_mulf8u127::@6
(label) print_mulf8u127::@return
(byte) print_mulf8u127::a
(byte) print_mulf8u127::a#8 reg byte y 0.6666666666666666
(byte) print_mulf8u127::b
(byte) print_mulf8u127::b#10 b zp ZP_BYTE:11 0.36363636363636365
(word) print_mulf8u127::c
(word) print_mulf8u127::c#0 c zp ZP_WORD:5 0.4
(void()) print_sbyte((signed byte) print_sbyte::b)
(label) print_sbyte::@1
(label) print_sbyte::@2
(label) print_sbyte::@3
(label) print_sbyte::@4
(label) print_sbyte::@return
(signed byte) print_sbyte::b
(signed byte) print_sbyte::b#0 reg byte x 4.0
(signed byte) print_sbyte::b#1 reg byte x 2.0
(signed byte) print_sbyte::b#2 reg byte x 4.0
(signed byte) print_sbyte::b#3 reg byte x 1.6666666666666665
(signed byte) print_sbyte::b#5 reg byte x 4.0
(byte*) print_screen
(void()) print_str((byte*) print_str::str)
(label) print_str::@1
(label) print_str::@2
(label) print_str::@return
(byte*) print_str::str
(byte*) print_str::str#0 str zp ZP_WORD:9 22.0
(byte*) print_str::str#3 str zp ZP_WORD:9 11.5
(byte*) print_str::str#5 str zp ZP_WORD:9 2.0
(void()) print_sword((signed word) print_sword::w)
(label) print_sword::@1
(label) print_sword::@2
(label) print_sword::@3
(label) print_sword::@4
(label) print_sword::@return
(signed word) print_sword::w
(signed word) print_sword::w#0 w zp ZP_WORD:5 4.0
(signed word) print_sword::w#1 w zp ZP_WORD:5 1.3333333333333333
(signed word) print_sword::w#4 w zp ZP_WORD:5 4.0
(void()) print_word((word) print_word::w)
(label) print_word::@1
(label) print_word::@return
(word) print_word::w
(word) print_word::w#0 w zp ZP_WORD:5 4.0
(word) print_word::w#1 w zp ZP_WORD:5 4.0
(word) print_word::w#2 w zp ZP_WORD:5 2.6666666666666665
reg byte y [ print_mulf8s127::a#10 ]
zp ZP_BYTE:2 [ print_mulf8s127::b#10 mulf8s127::b#0 ]
zp ZP_WORD:3 [ print_line_cursor#32 print_line_cursor#63 print_line_cursor#1 ]
zp ZP_WORD:5 [ print_sword::w#4 print_sword::w#0 print_sword::w#1 print_word::w#2 print_word::w#1 print_word::w#0 print_mulf8s127::c#0 mulf8s127::return#1 mulf8s127::c#7 mulf8s127::c#5 mulf8s127::c#1 mulf8s127::c#11 mulf8s127::c#2 mulf8s127::c#3 mulf8s127::c#0 mulf8s127::return#0 mulf8u127::return#0 print_mulf8u127::c#0 mulf8u127::return#3 mulf8u127::return#1 ]
reg byte a [ print_char::ch#10 print_char::ch#4 print_char::ch#5 ]
zp ZP_WORD:7 [ print_char_cursor#80 print_char_cursor#131 print_char_cursor#123 print_char_cursor#122 print_char_cursor#19 print_char_cursor#127 print_char_cursor#152 print_char_cursor#150 print_char_cursor#136 print_char_cursor#143 print_char_cursor#1 ]
reg byte x [ print_byte::b#5 print_byte::b#3 print_byte::b#4 print_byte::b#0 print_byte::b#1 print_byte::b#2 ]
reg byte x [ print_sbyte::b#5 print_sbyte::b#0 print_sbyte::b#3 print_sbyte::b#1 print_sbyte::b#2 ]
reg byte a [ mulf8u127::a#2 mulf8u127::a#1 mulf8u127::a#0 ]
reg byte x [ mulf8u127::b#2 mulf8u127::b#1 mulf8u127::b#0 ]
zp ZP_WORD:9 [ print_str::str#3 print_str::str#5 print_str::str#0 ]
reg byte y [ print_mulf8u127::a#8 ]
zp ZP_BYTE:11 [ print_mulf8u127::b#10 ]
zp ZP_WORD:12 [ memset::dst#2 memset::dst#1 ]
reg byte y [ mulf8s127::a#0 ]
reg byte a [ print_byte::$0 ]
reg byte x [ print_byte::$2 ]
zp ZP_WORD:14 [ mulf8s127::$12 mulf8s127::$13 ]
zp ZP_WORD:16 [ mulf8s127::$14 mulf8s127::$15 ]

View File

@ -89,9 +89,6 @@ Inferred type updated to word in (unumber~) main::$1 ← (word~) main::$0 * (byt
Alias (byte*) main::line#0 = (byte*~) main::$2
Alias (byte) main::y#3 = (byte) main::y#4
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte) main::y#3
Self Phi Eliminated (byte*) main::line#1
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte) main::y#3 (byte) main::y#2
Identical Phi Values (byte*) main::line#1 (byte*) main::line#0
Successful SSA optimization Pass2IdenticalPhiElimination

View File

@ -100,8 +100,6 @@ Alias (byte*) fillscreen::SCREEN2#0 = (byte*~) fillscreen::$0
Alias (byte*) fillscreen::SCREEN3#0 = (byte*~) fillscreen::$1
Alias (byte*) fillscreen::SCREEN4#0 = (byte*~) fillscreen::$2
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte) fillscreen::c#1
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte) fillscreen::c#2 (byte) fillscreen::c#0
Identical Phi Values (byte) fillscreen::c#1 (byte) fillscreen::c#2
Successful SSA optimization Pass2IdenticalPhiElimination

View File

@ -12,7 +12,7 @@ main: scope:[main] from @1
[5] call prepare
to:main::@1
main::@1: scope:[main] from main main::@1 main::@3 main::@5
[6] (byte) main::c#4 ← phi( main/(byte) $19 main::@3/(byte) main::c#1 main::@5/(byte) $19 )
[6] (byte) main::c#4 ← phi( main/(byte) $19 main::@1/(byte) main::c#4 main::@3/(byte) main::c#1 main::@5/(byte) $19 )
[7] if(*((const byte*) RASTER#0)!=(byte) $fe) goto main::@1
to:main::@2
main::@2: scope:[main] from main::@1 main::@2

View File

@ -322,12 +322,6 @@ Alias (byte) plot::y#2 = (byte) plot::y#3
Alias (byte) plot::i#1 = (byte) plot::i#4
Alias (byte*) plot::line#1 = (byte*~) plot::$3
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte) main::c#4
Self Phi Eliminated (byte) main::c#2
Self Phi Eliminated (byte) flip::r#2
Self Phi Eliminated (byte*) plot::line#2
Self Phi Eliminated (byte) plot::y#2
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte) main::c#2 (byte) main::c#4
Identical Phi Values (byte) flip::r#2 (byte) flip::r#4
Identical Phi Values (byte*) plot::line#2 (byte*) plot::line#4
@ -430,7 +424,8 @@ Constant inlined flip::c#0 = (byte) $10
Constant inlined flip::dstIdx#0 = (byte) $f
Constant inlined flip::r#0 = (byte) $10
Successful SSA optimization Pass2ConstantInlining
Added new block during phi lifting main::@12(between main::@6 and main::@3)
Added new block during phi lifting main::@12(between main::@3 and main::@3)
Added new block during phi lifting main::@13(between main::@6 and main::@3)
Added new block during phi lifting prepare::@3(between prepare::@1 and prepare::@1)
Added new block during phi lifting flip::@7(between flip::@3 and flip::@1)
Added new block during phi lifting flip::@8(between flip::@2 and flip::@2)
@ -456,28 +451,30 @@ Calls in [] to main:2
Calls in [main] to prepare:6 flip:15 plot:17
Created 14 initial phi equivalence classes
Coalesced [19] main::c#5 ← main::c#1
Coalesced [22] plot::i#6 ← plot::i#3
Coalesced [32] plot::i#5 ← plot::i#1
Coalesced [33] plot::line#5 ← plot::line#1
Coalesced [34] plot::y#5 ← plot::y#1
Coalesced (already) [35] plot::i#7 ← plot::i#1
Coalesced [36] plot::x#3 ← plot::x#1
Coalesced [39] flip::srcIdx#6 ← flip::srcIdx#3
Coalesced [40] flip::dstIdx#7 ← flip::dstIdx#5
Coalesced [56] flip::i#3 ← flip::i#1
Coalesced [57] flip::srcIdx#5 ← flip::srcIdx#1
Coalesced [58] flip::dstIdx#6 ← flip::dstIdx#2
Coalesced [59] flip::r#5 ← flip::r#1
Coalesced (already) [60] flip::srcIdx#7 ← flip::srcIdx#1
Coalesced [61] flip::dstIdx#8 ← flip::dstIdx#1
Coalesced [62] flip::c#3 ← flip::c#1
Coalesced [69] prepare::i#3 ← prepare::i#1
Coalesced [19] main::c#6 ← main::c#1
Coalesced (already) [20] main::c#5 ← main::c#4
Coalesced [23] plot::i#6 ← plot::i#3
Coalesced [33] plot::i#5 ← plot::i#1
Coalesced [34] plot::line#5 ← plot::line#1
Coalesced [35] plot::y#5 ← plot::y#1
Coalesced (already) [36] plot::i#7 ← plot::i#1
Coalesced [37] plot::x#3 ← plot::x#1
Coalesced [40] flip::srcIdx#6 ← flip::srcIdx#3
Coalesced [41] flip::dstIdx#7 ← flip::dstIdx#5
Coalesced [57] flip::i#3 ← flip::i#1
Coalesced [58] flip::srcIdx#5 ← flip::srcIdx#1
Coalesced [59] flip::dstIdx#6 ← flip::dstIdx#2
Coalesced [60] flip::r#5 ← flip::r#1
Coalesced (already) [61] flip::srcIdx#7 ← flip::srcIdx#1
Coalesced [62] flip::dstIdx#8 ← flip::dstIdx#1
Coalesced [63] flip::c#3 ← flip::c#1
Coalesced [70] prepare::i#3 ← prepare::i#1
Coalesced down to 11 phi equivalence classes
Culled Empty Block (label) @5
Culled Empty Block (label) main::@9
Culled Empty Block (label) main::@1
Culled Empty Block (label) main::@11
Culled Empty Block (label) main::@13
Culled Empty Block (label) main::@12
Culled Empty Block (label) plot::@5
Culled Empty Block (label) plot::@6
@ -518,7 +515,7 @@ main: scope:[main] from @1
[5] call prepare
to:main::@1
main::@1: scope:[main] from main main::@1 main::@3 main::@5
[6] (byte) main::c#4 ← phi( main/(byte) $19 main::@3/(byte) main::c#1 main::@5/(byte) $19 )
[6] (byte) main::c#4 ← phi( main/(byte) $19 main::@1/(byte) main::c#4 main::@3/(byte) main::c#1 main::@5/(byte) $19 )
[7] if(*((const byte*) RASTER#0)!=(byte) $fe) goto main::@1
to:main::@2
main::@2: scope:[main] from main::@1 main::@2
@ -633,7 +630,7 @@ VARIABLE REGISTER WEIGHTS
(void()) main()
(byte) main::c
(byte) main::c#1 151.5
(byte) main::c#4 67.33333333333333
(byte) main::c#4 734.6666666666666
(void()) plot()
(byte) plot::i
(byte) plot::i#1 350.5
@ -728,12 +725,10 @@ main: {
lda #$19
sta c
jmp b1
// [6] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
// [6] phi from main::@1 main::@3 to main::@1 [phi:main::@1/main::@3->main::@1]
b1_from_b1:
jmp b1
// [6] phi from main::@3 to main::@1 [phi:main::@3->main::@1]
b1_from_b3:
// [6] phi (byte) main::c#4 = (byte) main::c#1 [phi:main::@3->main::@1#0] -- register_copy
// [6] phi (byte) main::c#4 = (byte) main::c#4 [phi:main::@1/main::@3->main::@1#0] -- register_copy
jmp b1
// main::@1
b1:
@ -1031,22 +1026,22 @@ Potential registers zp ZP_BYTE:13 [ prepare::i#2 prepare::i#1 ] : zp ZP_BYTE:13
REGISTER UPLIFT SCOPES
Uplift Scope [flip] 2,054.43: zp ZP_BYTE:9 [ flip::srcIdx#2 flip::srcIdx#3 flip::srcIdx#1 ] 2,005: zp ZP_BYTE:10 [ flip::dstIdx#3 flip::dstIdx#5 flip::dstIdx#2 flip::dstIdx#1 ] 2,002: zp ZP_BYTE:11 [ flip::c#2 flip::c#1 ] 353.5: zp ZP_BYTE:12 [ flip::i#2 flip::i#1 ] 176.75: zp ZP_BYTE:8 [ flip::r#4 flip::r#1 ]
Uplift Scope [plot] 2,502.5: zp ZP_BYTE:7 [ plot::x#2 plot::x#1 ] 2,104.5: zp ZP_BYTE:6 [ plot::i#2 plot::i#3 plot::i#1 ] 267.83: zp ZP_WORD:3 [ plot::line#4 plot::line#1 ] 180.36: zp ZP_BYTE:5 [ plot::y#4 plot::y#1 ]
Uplift Scope [main] 218.83: zp ZP_BYTE:2 [ main::c#4 main::c#1 ]
Uplift Scope [main] 886.17: zp ZP_BYTE:2 [ main::c#4 main::c#1 ]
Uplift Scope [prepare] 38.5: zp ZP_BYTE:13 [ prepare::i#2 prepare::i#1 ]
Uplift Scope []
Uplifting [flip] best 140276 combination reg byte y [ flip::srcIdx#2 flip::srcIdx#3 flip::srcIdx#1 ] reg byte x [ flip::dstIdx#3 flip::dstIdx#5 flip::dstIdx#2 flip::dstIdx#1 ] zp ZP_BYTE:11 [ flip::c#2 flip::c#1 ] reg byte x [ flip::i#2 flip::i#1 ] zp ZP_BYTE:8 [ flip::r#4 flip::r#1 ]
Uplifting [flip] best 137276 combination reg byte y [ flip::srcIdx#2 flip::srcIdx#3 flip::srcIdx#1 ] reg byte x [ flip::dstIdx#3 flip::dstIdx#5 flip::dstIdx#2 flip::dstIdx#1 ] zp ZP_BYTE:11 [ flip::c#2 flip::c#1 ] reg byte x [ flip::i#2 flip::i#1 ] zp ZP_BYTE:8 [ flip::r#4 flip::r#1 ]
Limited combination testing to 100 combinations of 243 possible.
Uplifting [plot] best 121976 combination reg byte y [ plot::x#2 plot::x#1 ] reg byte x [ plot::i#2 plot::i#3 plot::i#1 ] zp ZP_WORD:3 [ plot::line#4 plot::line#1 ] zp ZP_BYTE:5 [ plot::y#4 plot::y#1 ]
Uplifting [main] best 118376 combination reg byte x [ main::c#4 main::c#1 ]
Uplifting [prepare] best 118256 combination reg byte x [ prepare::i#2 prepare::i#1 ]
Uplifting [] best 118256 combination
Uplifting [plot] best 118976 combination reg byte y [ plot::x#2 plot::x#1 ] reg byte x [ plot::i#2 plot::i#3 plot::i#1 ] zp ZP_WORD:3 [ plot::line#4 plot::line#1 ] zp ZP_BYTE:5 [ plot::y#4 plot::y#1 ]
Uplifting [main] best 115376 combination reg byte x [ main::c#4 main::c#1 ]
Uplifting [prepare] best 115256 combination reg byte x [ prepare::i#2 prepare::i#1 ]
Uplifting [] best 115256 combination
Attempting to uplift remaining variables inzp ZP_BYTE:11 [ flip::c#2 flip::c#1 ]
Uplifting [flip] best 118256 combination zp ZP_BYTE:11 [ flip::c#2 flip::c#1 ]
Uplifting [flip] best 115256 combination zp ZP_BYTE:11 [ flip::c#2 flip::c#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:5 [ plot::y#4 plot::y#1 ]
Uplifting [plot] best 118256 combination zp ZP_BYTE:5 [ plot::y#4 plot::y#1 ]
Uplifting [plot] best 115256 combination zp ZP_BYTE:5 [ plot::y#4 plot::y#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:8 [ flip::r#4 flip::r#1 ]
Uplifting [flip] best 118256 combination zp ZP_BYTE:8 [ flip::r#4 flip::r#1 ]
Uplifting [flip] best 115256 combination zp ZP_BYTE:8 [ flip::r#4 flip::r#1 ]
Allocated (was zp ZP_WORD:3) zp ZP_WORD:2 [ plot::line#4 plot::line#1 ]
Allocated (was zp ZP_BYTE:5) zp ZP_BYTE:4 [ plot::y#4 plot::y#1 ]
Allocated (was zp ZP_BYTE:8) zp ZP_BYTE:5 [ flip::r#4 flip::r#1 ]
@ -1089,12 +1084,10 @@ main: {
// [6] phi (byte) main::c#4 = (byte) $19 [phi:main/main::@5->main::@1#0] -- vbuxx=vbuc1
ldx #$19
jmp b1
// [6] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
// [6] phi from main::@1 main::@3 to main::@1 [phi:main::@1/main::@3->main::@1]
b1_from_b1:
jmp b1
// [6] phi from main::@3 to main::@1 [phi:main::@3->main::@1]
b1_from_b3:
// [6] phi (byte) main::c#4 = (byte) main::c#1 [phi:main::@3->main::@1#0] -- register_copy
// [6] phi (byte) main::c#4 = (byte) main::c#4 [phi:main::@1/main::@3->main::@1#0] -- register_copy
jmp b1
// main::@1
b1:
@ -1350,6 +1343,7 @@ Removing instruction jmp breturn
Removing instruction jmp b1
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Replacing label b1_from_b1 with b1
Replacing label b1_from_b3 with b1
Replacing label b2_from_b2 with b2
Replacing label b1_from_b3 with b1
@ -1362,6 +1356,7 @@ Removing instruction b1:
Removing instruction main_from_b1:
Removing instruction bend_from_b1:
Removing instruction b1_from_main:
Removing instruction b1_from_b1:
Removing instruction b1_from_b3:
Removing instruction b4_from_b3:
Removing instruction flip_from_b4:
@ -1394,10 +1389,7 @@ Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Skipping double jump to b1 in bne b1_from_b1
Succesful ASM optimization Pass5DoubleJumpElimination
Relabelling long label b1_from_b5 to b3
Relabelling long label b1_from_b1 to b4
Succesful ASM optimization Pass5RelabelLongLabels
Removing instruction jmp b1
Removing instruction jmp b1
@ -1407,12 +1399,8 @@ Removing instruction jmp b2
Removing instruction jmp b4
Removing instruction jmp b1
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction b4:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
Removing instruction jmp b1
Succesful ASM optimization Pass5NextJumpElimination
FINAL SYMBOL TABLE
(label) @1
@ -1458,7 +1446,7 @@ FINAL SYMBOL TABLE
(label) main::@5
(byte) main::c
(byte) main::c#1 reg byte x 151.5
(byte) main::c#4 reg byte x 67.33333333333333
(byte) main::c#4 reg byte x 734.6666666666666
(void()) plot()
(label) plot::@1
(label) plot::@2
@ -1525,9 +1513,8 @@ main: {
b3:
// [6] phi (byte) main::c#4 = (byte) $19 [phi:main/main::@5->main::@1#0] -- vbuxx=vbuc1
ldx #$19
// [6] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
// [6] phi from main::@3 to main::@1 [phi:main::@3->main::@1]
// [6] phi (byte) main::c#4 = (byte) main::c#1 [phi:main::@3->main::@1#0] -- register_copy
// [6] phi from main::@1 main::@3 to main::@1 [phi:main::@1/main::@3->main::@1]
// [6] phi (byte) main::c#4 = (byte) main::c#4 [phi:main::@1/main::@3->main::@1#0] -- register_copy
// main::@1
b1:
// while(*RASTER!=254)

View File

@ -41,7 +41,7 @@
(label) main::@5
(byte) main::c
(byte) main::c#1 reg byte x 151.5
(byte) main::c#4 reg byte x 67.33333333333333
(byte) main::c#4 reg byte x 734.6666666666666
(void()) plot()
(label) plot::@1
(label) plot::@2

View File

@ -423,12 +423,6 @@ Alias (byte*) main::toD0181_screen#0 = (byte*) main::toD0181_screen#1
Alias (byte*) main::toD0181_gfx#0 = (byte*) main::toD0181_gfx#1
Alias (byte) main::toD0181_return#0 = (byte~) main::toD0181_$8#0 (byte) main::toD0181_return#2 (byte) main::toD0181_return#1 (byte) main::toD0181_return#3 (byte~) main::$0
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte*) init_font_hex::proto_hi#2
Self Phi Eliminated (byte*) init_font_hex::proto_lo#2
Self Phi Eliminated (byte*) init_font_hex::charset#3
Self Phi Eliminated (byte) init_font_hex::c1#2
Self Phi Eliminated (byte) init_font_hex::c#2
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte*) init_font_hex::charset#6 (byte*) init_font_hex::charset#1
Identical Phi Values (byte*) init_font_hex::proto_hi#2 (byte*) init_font_hex::proto_hi#4
Identical Phi Values (byte*) init_font_hex::proto_lo#2 (byte*) init_font_hex::proto_lo#4
@ -436,6 +430,9 @@ Identical Phi Values (byte*) init_font_hex::charset#3 (byte*) init_font_hex::cha
Identical Phi Values (byte) init_font_hex::c1#2 (byte) init_font_hex::c1#4
Identical Phi Values (byte) init_font_hex::c#2 (byte) init_font_hex::c#5
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values (byte*) init_font_hex::proto_hi#4 (byte*) init_font_hex::proto_hi#6
Identical Phi Values (byte) init_font_hex::c#5 (byte) init_font_hex::c#6
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) init_font_hex::$3 [20] if((byte) init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3
Simple Condition (bool~) init_font_hex::$4 [30] if((byte) init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2
Simple Condition (bool~) init_font_hex::$5 [35] if((byte) init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1
@ -466,7 +463,7 @@ Resolved ranged next value [18] init_font_hex::i#1 ← ++ init_font_hex::i#2 to
Resolved ranged comparison value [20] if(init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3 to (number) 5
Resolved ranged next value [28] init_font_hex::c1#1 ← ++ init_font_hex::c1#4 to ++
Resolved ranged comparison value [30] if(init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 to (number) $10
Resolved ranged next value [33] init_font_hex::c#1 ← ++ init_font_hex::c#5 to ++
Resolved ranged next value [33] init_font_hex::c#1 ← ++ init_font_hex::c#6 to ++
Resolved ranged comparison value [35] if(init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 to (number) $10
Resolved ranged next value [63] main::c#1 ← ++ main::c#2 to ++
Resolved ranged comparison value [65] if(main::c#1!=rangelast(0,$ff)) goto main::@1 to (number) 0
@ -489,12 +486,6 @@ Finalized unsigned number type (byte) $10
Finalized unsigned number type (byte) $10
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Self Phi Eliminated (byte*) init_font_hex::proto_hi#4
Self Phi Eliminated (byte) init_font_hex::c#5
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte*) init_font_hex::proto_hi#4 (byte*) init_font_hex::proto_hi#6
Identical Phi Values (byte) init_font_hex::c#5 (byte) init_font_hex::c#6
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [3] (byte) init_font_hex::idx#1 ← ++ (const byte) init_font_hex::idx#0
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) init_font_hex::idx#1 = ++init_font_hex::idx#0

View File

@ -63,8 +63,6 @@ Finalized unsigned number type (byte) $64
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias (byte*) SCREEN#0 = (byte*~) $0 (byte*) SCREEN#3
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte*) SCREEN#1
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte*) SCREEN#2 (byte*) SCREEN#0
Identical Phi Values (byte*) SCREEN#1 (byte*) SCREEN#2
Successful SSA optimization Pass2IdenticalPhiElimination

View File

@ -187,9 +187,6 @@ Alias (byte) idx#10 = (byte) idx#2 (byte) idx#9 (byte) idx#3
Alias (byte) idx#12 = (byte) idx#5 (byte) idx#6
Alias (byte) idx#16 = (byte) idx#4
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (void()*) do10::fn#2
Self Phi Eliminated (byte*) print::msg#2
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (void()*) do10::fn#2 (void()*) do10::fn#3
Identical Phi Values (byte) idx#13 (byte) idx#16
Identical Phi Values (byte) idx#0 (byte) idx#12

View File

@ -80,8 +80,6 @@ Simplifying constant pointer cast (byte*) 1024
Successful SSA optimization PassNCastSimplification
Alias (void()*) main::cls#0 = (void()*~) main::$0
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (void()*) main::cls#1
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (void()*) main::cls#1 (void()*) main::cls#0
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) main::$2 [8] if((byte*) main::cols#1<(word)(number) $d800+(number) $3e8) goto main::@1

View File

@ -127,8 +127,6 @@ Alias (void()*) main::f#0 = (void()*~) main::$0
Alias (byte) idx#1 = (byte) idx#4 (byte) idx#2
Alias (byte) idx#0 = (byte) idx#6
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (void()*) do10::fn#1
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (void()*) do10::fn#2 (void()*) do10::fn#0
Identical Phi Values (void()*) do10::fn#1 (void()*) do10::fn#2
Identical Phi Values (byte) idx#5 (byte) idx#0

View File

@ -169,9 +169,6 @@ Alias (byte*) msg#10 = (byte*) msg#3
Alias (byte) idx#0 = (byte) idx#6
Alias (byte*) msg#4 = (byte*) msg#7
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (void()*) do10::fn#2
Self Phi Eliminated (byte*) msg#6
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (void()*) do10::fn#2 (void()*) do10::fn#3
Identical Phi Values (byte*) msg#9 (byte*) msg#10
Identical Phi Values (byte) idx#5 (byte) idx#0

View File

@ -157,11 +157,6 @@ Alias (byte*) main::hello#0 = (byte*) main::print21_msg#0 (byte*) main::print21_
Alias (byte*) main::print21_at#0 = (byte*) main::print21_at#2
Alias (byte*) main::print22_at#0 = (byte*~) main::$1 (byte*) main::print22_at#2
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte*) main::print21_msg#1
Self Phi Eliminated (byte*) main::print21_at#1
Self Phi Eliminated (byte*) main::print22_msg#1
Self Phi Eliminated (byte*) main::print22_at#1
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte*) main::print21_msg#1 (byte*) main::hello#0
Identical Phi Values (byte*) main::print21_at#1 (byte*) main::print21_at#0
Identical Phi Values (byte*) main::print22_msg#1 (byte*) main::hello#0

View File

@ -111,9 +111,6 @@ Finalized unsigned number type (byte) 2
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias (byte*) print2::at#1 = (byte*~) main::$1
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte*) print2::msg#2
Self Phi Eliminated (byte*) print2::at#2
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte*) print2::msg#2 (byte*) print2::msg#3
Identical Phi Values (byte*) print2::at#2 (byte*) print2::at#3
Successful SSA optimization Pass2IdenticalPhiElimination

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