mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-09-08 17:54:40 +00:00
Fixed loop problem.
This commit is contained in:
parent
53d021bae3
commit
d5fd4a41c3
@ -1,3 +0,0 @@
|
||||
ldy #0
|
||||
lda {z2}
|
||||
sta ({z1}),y
|
@ -56,10 +56,15 @@ public class Pass3LoopDepthAnalysis extends Pass2Base {
|
||||
ControlFlowBlock callingControlBlock = getProgram().getStatementInfos().getBlock(callStatementIdx);
|
||||
Collection<NaturalLoop> callingLoops = loopSet.getLoopsContainingBlock(callingControlBlock.getLabel());
|
||||
for(NaturalLoop callingLoop : callingLoops) {
|
||||
int potentialDepth = callingLoop.getDepth() + 1;
|
||||
Integer depth = callingLoop.getDepth();
|
||||
if(depth!=null) {
|
||||
int potentialDepth = depth + 1;
|
||||
if(potentialDepth > callingDepth) {
|
||||
callingDepth = potentialDepth;
|
||||
}
|
||||
} else {
|
||||
getLog().append("null depth in calling loop "+callingLoop.toString()+" in scope "+currentScope);
|
||||
}
|
||||
}
|
||||
// Also look through all callers
|
||||
int superCallingDepth = getCallingDepth(callingScope);
|
||||
|
@ -42,13 +42,13 @@ public class TestPrograms {
|
||||
public static void tearDown() throws Exception {
|
||||
CompileLog log = new CompileLog();
|
||||
log.setSysOut(true);
|
||||
AsmFragmentTemplateUsages.logUsages(log, false, false, false, false, false, false);
|
||||
AsmFragmentTemplateUsages.logUsages(log, true, false, false, false, false, false);
|
||||
}
|
||||
|
||||
//@Test
|
||||
//public void testLoopProblem() throws IOException, URISyntaxException {
|
||||
// compileAndCompare("loop-problem");
|
||||
//}
|
||||
@Test
|
||||
public void testLoopProblem() throws IOException, URISyntaxException {
|
||||
compileAndCompare("loop-problem");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testLoHiConst() throws IOException, URISyntaxException {
|
||||
|
@ -1,97 +1,19 @@
|
||||
// Results in NullPointerException during loop analysis
|
||||
// Problem is related to the print_str() in main.
|
||||
// A simple loop results in NullPointerException during loop analysis
|
||||
|
||||
import "division.kc"
|
||||
import "multiply.kc"
|
||||
import "print.kc"
|
||||
byte* SCREEN = $400;
|
||||
|
||||
void main() {
|
||||
print_cls();
|
||||
print_str("x x' x1 x2 x3 /6 x4 x5 /80 ux sin@");
|
||||
word wavelength = 20;
|
||||
signed byte[20] sintab2;
|
||||
sin8s_gen(sintab2, wavelength);
|
||||
*SCREEN = '0';
|
||||
d();
|
||||
b();
|
||||
}
|
||||
|
||||
// PI*2 in u[4.12] format
|
||||
const word PI2_u4f12 = $6488;
|
||||
// PI in u[4.12] format
|
||||
const word PI_u4f12 = $3244;
|
||||
// PI/2 in u[4.12] format
|
||||
const word PI_HALF_u4f12 = $1922;
|
||||
|
||||
// Generate signed byte sinus table - on the full -$7f - $7f range
|
||||
// sintab - the table to generate into
|
||||
// wavelength - the number of sinus points in a total sinus wavelength (the size of the table)
|
||||
void sin8s_gen(signed byte* sintab, word wavelength) {
|
||||
// u[4.28] step = PI*2/wavelength
|
||||
word step = div16u(PI2_u4f12, wavelength); // u[4.12]
|
||||
// Iterate over the table
|
||||
word x = 0; // u[4.12]
|
||||
for( word i=0; i<wavelength; i++) {
|
||||
*sintab++ = sin8s(x);
|
||||
x = x + step;
|
||||
void b() {
|
||||
for( byte i: 0..3) {
|
||||
d();
|
||||
}
|
||||
}
|
||||
|
||||
// Calculate signed byte sinus sin(x)
|
||||
// x: unsigned word input u[4.12] in the interval $0000 - PI2_u4f12
|
||||
// result: signed byte sin(x) s[0.7] - using the full range -$7f - $7f
|
||||
signed byte sin8s(word x) {
|
||||
print_word(x);
|
||||
print_str(" @");
|
||||
// Move x1 into the range 0-PI/2 using sinus mirror symmetries
|
||||
byte isUpper = 0;
|
||||
if(x >= PI_u4f12 ) {
|
||||
x = x - PI_u4f12;
|
||||
isUpper = 1;
|
||||
void d() {
|
||||
(*SCREEN)++;
|
||||
}
|
||||
if(x >= PI_HALF_u4f12 ) {
|
||||
x = PI_u4f12 - x;
|
||||
}
|
||||
print_word(x);
|
||||
print_str(" @");
|
||||
// sinx = x - x^3/6 + x5/128;
|
||||
byte x1 = >x<<3; // u[1.7]
|
||||
print_byte(x1);
|
||||
print_str(" @");
|
||||
byte x2 = mulu8_sel(x1, x1, 0); // u[2.6] x^2
|
||||
print_byte(x2);
|
||||
print_str(" @");
|
||||
byte x3 = mulu8_sel(x2, x1, 1); // u[2.6] x^3
|
||||
print_byte(x3);
|
||||
print_str(" @");
|
||||
byte x3_6 = mulu8_sel(x3, $100/6, 1); // u[1.7] x^3/6;
|
||||
print_byte(x3_6);
|
||||
print_str(" @");
|
||||
byte usinx = x1 - x3_6; // u[1.7] x - x^3/6
|
||||
byte x4 = mulu8_sel(x3, x1, 0); // u[3.5] x^4
|
||||
print_byte(x4);
|
||||
print_str(" @");
|
||||
byte x5 = mulu8_sel(x4, x1, 0); // u[4.4] x^5
|
||||
print_byte(x5);
|
||||
print_str(" @");
|
||||
byte x5_128 = x5>>4; // // u[1.7] x^5/128 -- much more efficient than mul_u16_sel(x5, $10000/128, 3);
|
||||
print_byte(x5_128);
|
||||
print_str(" @");
|
||||
usinx = usinx + x5_128; // u[1.7] (first bit is always zero)
|
||||
print_byte(usinx);
|
||||
print_str(" @");
|
||||
signed byte sinx = (signed byte)usinx; // s[0.7]
|
||||
if(isUpper!=0) {
|
||||
sinx = -(signed byte)usinx; // s[0.7];
|
||||
}
|
||||
if(sinx>=0) {
|
||||
print_str(" @");
|
||||
}
|
||||
print_sbyte(sinx);
|
||||
print_ln();
|
||||
return sinx;
|
||||
}
|
||||
|
||||
// Calculate val*val for two unsigned byte values - the result is 8 selected bits of the 16-bit result.
|
||||
// The select parameter indicates how many of the highest bits of the 16-bit result to skip
|
||||
byte mulu8_sel(byte v1, byte v2, byte select) {
|
||||
return >mul8u(v1, v2)<<select;
|
||||
}
|
||||
|
||||
|
@ -112,47 +112,6 @@ signed byte sin8s(word x) {
|
||||
return sinx;
|
||||
}
|
||||
|
||||
|
||||
// Generate (small) signed word sinus table - in the limited -$fff - $fff range
|
||||
// sintab - the table to generate into
|
||||
// wavelength - the number of sinus points in a total sinus wavelength (the size of the table)
|
||||
void sin16ss_gen(signed word* sintab, word wavelength) {
|
||||
// u[4.12] step = PI*2/wavelength
|
||||
dword step = div32u16u(PI2_u4f28, wavelength); // u[4.28]
|
||||
// Iterate over the table
|
||||
dword x = 0; // u[4.28]
|
||||
for( word i=0; i<wavelength; i++) {
|
||||
// Move x1 into the range 0-PI/2 using sinus mirror symmetries
|
||||
word x1 = >x; // u[4.12]
|
||||
byte isUpper = 0;
|
||||
if(x1 >= PI_u4f12 ) {
|
||||
x1 = x1 - PI_u4f12;
|
||||
isUpper = 1;
|
||||
}
|
||||
if(x1 >= PI_HALF_u4f12 ) {
|
||||
x1 = PI_u4f12 - x1;
|
||||
}
|
||||
// s[4.12] sinx = x - x^3/6 + x5/128;
|
||||
word x2 = mulu16_sel(x1, x1, 4); // u[4.12]
|
||||
word x3 = mulu16_sel(x2, x1, 4); // u[4.12]
|
||||
word x3_6 = mulu16_sel(x3, $10000/6, 0); // u[4.12] - u[0.16] div6 = 1/6;
|
||||
word usinx = x1 - x3_6; // u[4.12]
|
||||
word x4 = mulu16_sel(x3, x1, 4); // u[4.12]
|
||||
word x5 = mulu16_sel(x4, x1, 4); // u[4.12]
|
||||
word x5_128 = mulu16_sel(x5, $10000/128, 0); // u[4.12] - u[0.16] div128 = 1/128;
|
||||
usinx = usinx + x5_128;
|
||||
signed word sinx;
|
||||
if(isUpper!=0) {
|
||||
sinx = -(signed word)usinx; // s[4.12];
|
||||
} else {
|
||||
sinx = (signed word)usinx; // s[4.12]
|
||||
}
|
||||
*sintab = sinx;
|
||||
sintab = sintab + 2;
|
||||
x = x + step;
|
||||
}
|
||||
}
|
||||
|
||||
// Calculate val*val for two unsigned word values - the result is 16 selected bits of the 32-bit result.
|
||||
// The select parameter indicates how many of the highest bits of the 32-bit result to skip
|
||||
word mulu16_sel(word v1, word v2, byte select) {
|
||||
|
25
src/test/java/dk/camelot64/kickc/test/ref/loop-problem.asm
Normal file
25
src/test/java/dk/camelot64/kickc/test/ref/loop-problem.asm
Normal file
@ -0,0 +1,25 @@
|
||||
.pc = $801 "Basic"
|
||||
:BasicUpstart(main)
|
||||
.pc = $80d "Program"
|
||||
.label SCREEN = $400
|
||||
jsr main
|
||||
main: {
|
||||
lda #'0'
|
||||
sta SCREEN
|
||||
jsr d
|
||||
jsr b
|
||||
rts
|
||||
}
|
||||
b: {
|
||||
ldx #0
|
||||
b1:
|
||||
jsr d
|
||||
inx
|
||||
cpx #4
|
||||
bne b1
|
||||
rts
|
||||
}
|
||||
d: {
|
||||
inc SCREEN
|
||||
rts
|
||||
}
|
40
src/test/java/dk/camelot64/kickc/test/ref/loop-problem.cfg
Normal file
40
src/test/java/dk/camelot64/kickc/test/ref/loop-problem.cfg
Normal file
@ -0,0 +1,40 @@
|
||||
@begin: scope:[] from
|
||||
[0] phi() [ ] ( )
|
||||
to:@3
|
||||
@3: scope:[] from @begin
|
||||
[1] phi() [ ] ( )
|
||||
[2] call main param-assignment [ ] ( )
|
||||
to:@end
|
||||
@end: scope:[] from @3
|
||||
[3] phi() [ ] ( )
|
||||
main: scope:[main] from @3
|
||||
[4] *((const byte*) SCREEN#0) ← (byte) '0' [ ] ( main:2 [ ] )
|
||||
[5] call d param-assignment [ ] ( main:2 [ ] )
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main
|
||||
[6] phi() [ ] ( main:2 [ ] )
|
||||
[7] call b param-assignment [ ] ( main:2 [ ] )
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@1
|
||||
[8] return [ ] ( main:2 [ ] )
|
||||
to:@return
|
||||
b: scope:[b] from main::@1
|
||||
[9] phi() [ ] ( main:2::b:7 [ ] )
|
||||
to:b::@1
|
||||
b::@1: scope:[b] from b b::@3
|
||||
[10] (byte) b::i#2 ← phi( b/(byte/signed byte/word/signed word/dword/signed dword) 0 b::@3/(byte) b::i#1 ) [ b::i#2 ] ( main:2::b:7 [ b::i#2 ] )
|
||||
[11] call d param-assignment [ b::i#2 ] ( main:2::b:7 [ b::i#2 ] )
|
||||
to:b::@3
|
||||
b::@3: scope:[b] from b::@1
|
||||
[12] (byte) b::i#1 ← ++ (byte) b::i#2 [ b::i#1 ] ( main:2::b:7 [ b::i#1 ] )
|
||||
[13] if((byte) b::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 4) goto b::@1 [ b::i#1 ] ( main:2::b:7 [ b::i#1 ] )
|
||||
to:b::@return
|
||||
b::@return: scope:[b] from b::@3
|
||||
[14] return [ ] ( main:2::b:7 [ ] )
|
||||
to:@return
|
||||
d: scope:[d] from b::@1 main
|
||||
[15] *((const byte*) SCREEN#0) ← ++ *((const byte*) SCREEN#0) [ ] ( main:2::d:5 [ ] main:2::b:7::d:11 [ b::i#2 ] )
|
||||
to:d::@return
|
||||
d::@return: scope:[d] from d
|
||||
[16] return [ ] ( main:2::d:5 [ ] main:2::b:7::d:11 [ b::i#2 ] )
|
||||
to:@return
|
648
src/test/java/dk/camelot64/kickc/test/ref/loop-problem.log
Normal file
648
src/test/java/dk/camelot64/kickc/test/ref/loop-problem.log
Normal file
@ -0,0 +1,648 @@
|
||||
PARSING src/test/java/dk/camelot64/kickc/test/kc/loop-problem.kc
|
||||
// A simple loop results in NullPointerException during loop analysis
|
||||
|
||||
byte* SCREEN = $400;
|
||||
|
||||
void main() {
|
||||
*SCREEN = '0';
|
||||
d();
|
||||
b();
|
||||
}
|
||||
|
||||
void b() {
|
||||
for( byte i: 0..3) {
|
||||
d();
|
||||
}
|
||||
}
|
||||
|
||||
void d() {
|
||||
(*SCREEN)++;
|
||||
}
|
||||
Adding pre/post-modifier *((byte*) SCREEN) ← ++ *((byte*) SCREEN)
|
||||
|
||||
STATEMENTS
|
||||
(byte*) SCREEN ← (word/signed word/dword/signed dword) 1024
|
||||
proc (void()) main()
|
||||
*((byte*) SCREEN) ← (byte) '0'
|
||||
(void~) main::$0 ← call d
|
||||
(void~) main::$1 ← call b
|
||||
main::@return:
|
||||
return
|
||||
endproc // main()
|
||||
proc (void()) b()
|
||||
(byte) b::i ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
b::@1:
|
||||
(void~) b::$0 ← call d
|
||||
(byte) b::i ← ++ (byte) b::i
|
||||
(boolean~) b::$1 ← (byte) b::i != (byte/signed byte/word/signed word/dword/signed dword) 4
|
||||
if((boolean~) b::$1) goto b::@1
|
||||
b::@return:
|
||||
return
|
||||
endproc // b()
|
||||
proc (void()) d()
|
||||
*((byte*) SCREEN) ← ++ *((byte*) SCREEN)
|
||||
d::@return:
|
||||
return
|
||||
endproc // d()
|
||||
call main
|
||||
|
||||
SYMBOLS
|
||||
(byte*) SCREEN
|
||||
(void()) b()
|
||||
(void~) b::$0
|
||||
(boolean~) b::$1
|
||||
(label) b::@1
|
||||
(label) b::@return
|
||||
(byte) b::i
|
||||
(void()) d()
|
||||
(label) d::@return
|
||||
(void()) main()
|
||||
(void~) main::$0
|
||||
(void~) main::$1
|
||||
(label) main::@return
|
||||
|
||||
Promoting word/signed word/dword/signed dword to byte* in SCREEN ← ((byte*)) 1024
|
||||
INITIAL CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
(byte*) SCREEN ← ((byte*)) (word/signed word/dword/signed dword) 1024
|
||||
to:@1
|
||||
main: scope:[main] from
|
||||
*((byte*) SCREEN) ← (byte) '0'
|
||||
(void~) main::$0 ← call d
|
||||
(void~) main::$1 ← call b
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main
|
||||
return
|
||||
to:@return
|
||||
@1: scope:[] from @begin
|
||||
to:@2
|
||||
b: scope:[b] from
|
||||
(byte) b::i ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
to:b::@1
|
||||
b::@1: scope:[b] from b b::@1
|
||||
(void~) b::$0 ← call d
|
||||
(byte) b::i ← ++ (byte) b::i
|
||||
(boolean~) b::$1 ← (byte) b::i != (byte/signed byte/word/signed word/dword/signed dword) 4
|
||||
if((boolean~) b::$1) goto b::@1
|
||||
to:b::@2
|
||||
b::@2: scope:[b] from b::@1
|
||||
to:b::@return
|
||||
b::@return: scope:[b] from b::@2
|
||||
return
|
||||
to:@return
|
||||
@2: scope:[] from @1
|
||||
to:@3
|
||||
d: scope:[d] from
|
||||
*((byte*) SCREEN) ← ++ *((byte*) SCREEN)
|
||||
to:d::@return
|
||||
d::@return: scope:[d] from d
|
||||
return
|
||||
to:@return
|
||||
@3: scope:[] from @2
|
||||
call main
|
||||
to:@end
|
||||
@end: scope:[] from @3
|
||||
|
||||
Eliminating unused variable - keeping the call (void~) main::$0
|
||||
Eliminating unused variable - keeping the call (void~) main::$1
|
||||
Eliminating unused variable - keeping the call (void~) b::$0
|
||||
Removing empty block @1
|
||||
Removing empty block b::@2
|
||||
Removing empty block @2
|
||||
PROCEDURE MODIFY VARIABLE ANALYSIS
|
||||
|
||||
Completing Phi functions...
|
||||
Completing Phi functions...
|
||||
Completing Phi functions...
|
||||
Completing Phi functions...
|
||||
|
||||
CONTROL FLOW GRAPH SSA WITH ASSIGNMENT CALL & RETURN
|
||||
@begin: scope:[] from
|
||||
(byte*) SCREEN#0 ← ((byte*)) (word/signed word/dword/signed dword) 1024
|
||||
to:@3
|
||||
main: scope:[main] from @3
|
||||
(byte*) SCREEN#1 ← phi( @3/(byte*) SCREEN#3 )
|
||||
*((byte*) SCREEN#1) ← (byte) '0'
|
||||
call d param-assignment
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main
|
||||
(byte*) SCREEN#7 ← phi( main/(byte*) SCREEN#1 )
|
||||
call b param-assignment
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@1
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@2
|
||||
return
|
||||
to:@return
|
||||
b: scope:[b] from main::@1
|
||||
(byte*) SCREEN#5 ← phi( main::@1/(byte*) SCREEN#7 )
|
||||
(byte) b::i#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
to:b::@1
|
||||
b::@1: scope:[b] from b b::@3
|
||||
(byte*) SCREEN#4 ← phi( b/(byte*) SCREEN#5 b::@3/(byte*) SCREEN#6 )
|
||||
(byte) b::i#3 ← phi( b/(byte) b::i#0 b::@3/(byte) b::i#1 )
|
||||
call d param-assignment
|
||||
to:b::@3
|
||||
b::@3: scope:[b] from b::@1
|
||||
(byte*) SCREEN#6 ← phi( b::@1/(byte*) SCREEN#4 )
|
||||
(byte) b::i#2 ← phi( b::@1/(byte) b::i#3 )
|
||||
(byte) b::i#1 ← ++ (byte) b::i#2
|
||||
(boolean~) b::$1 ← (byte) b::i#1 != (byte/signed byte/word/signed word/dword/signed dword) 4
|
||||
if((boolean~) b::$1) goto b::@1
|
||||
to:b::@return
|
||||
b::@return: scope:[b] from b::@3
|
||||
return
|
||||
to:@return
|
||||
d: scope:[d] from b::@1 main
|
||||
(byte*) SCREEN#2 ← phi( b::@1/(byte*) SCREEN#4 main/(byte*) SCREEN#1 )
|
||||
*((byte*) SCREEN#2) ← ++ *((byte*) SCREEN#2)
|
||||
to:d::@return
|
||||
d::@return: scope:[d] from d
|
||||
return
|
||||
to:@return
|
||||
@3: scope:[] from @begin
|
||||
(byte*) SCREEN#3 ← phi( @begin/(byte*) SCREEN#0 )
|
||||
call main param-assignment
|
||||
to:@4
|
||||
@4: scope:[] from @3
|
||||
to:@end
|
||||
@end: scope:[] from @4
|
||||
|
||||
SYMBOL TABLE SSA
|
||||
(label) @3
|
||||
(label) @4
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) SCREEN
|
||||
(byte*) SCREEN#0
|
||||
(byte*) SCREEN#1
|
||||
(byte*) SCREEN#2
|
||||
(byte*) SCREEN#3
|
||||
(byte*) SCREEN#4
|
||||
(byte*) SCREEN#5
|
||||
(byte*) SCREEN#6
|
||||
(byte*) SCREEN#7
|
||||
(void()) b()
|
||||
(boolean~) b::$1
|
||||
(label) b::@1
|
||||
(label) b::@3
|
||||
(label) b::@return
|
||||
(byte) b::i
|
||||
(byte) b::i#0
|
||||
(byte) b::i#1
|
||||
(byte) b::i#2
|
||||
(byte) b::i#3
|
||||
(void()) d()
|
||||
(label) d::@return
|
||||
(void()) main()
|
||||
(label) main::@1
|
||||
(label) main::@2
|
||||
(label) main::@return
|
||||
|
||||
OPTIMIZING CONTROL FLOW GRAPH
|
||||
Culled Empty Block (label) main::@2
|
||||
Culled Empty Block (label) @4
|
||||
Succesful SSA optimization Pass2CullEmptyBlocks
|
||||
Not aliassing across scopes: SCREEN#1 SCREEN#3
|
||||
Not aliassing across scopes: SCREEN#5 SCREEN#7
|
||||
Not aliassing across scopes: SCREEN#2 SCREEN#4
|
||||
Alias (byte*) SCREEN#1 = (byte*) SCREEN#7
|
||||
Alias (byte) b::i#2 = (byte) b::i#3
|
||||
Alias (byte*) SCREEN#4 = (byte*) SCREEN#6
|
||||
Alias (byte*) SCREEN#0 = (byte*) SCREEN#3
|
||||
Succesful SSA optimization Pass2AliasElimination
|
||||
Not aliassing across scopes: SCREEN#1 SCREEN#0
|
||||
Not aliassing across scopes: SCREEN#5 SCREEN#1
|
||||
Not aliassing across scopes: SCREEN#2 SCREEN#4
|
||||
Self Phi Eliminated (byte*) SCREEN#4
|
||||
Succesful SSA optimization Pass2SelfPhiElimination
|
||||
Redundant Phi (byte*) SCREEN#1 (byte*) SCREEN#0
|
||||
Redundant Phi (byte*) SCREEN#5 (byte*) SCREEN#1
|
||||
Redundant Phi (byte*) SCREEN#4 (byte*) SCREEN#5
|
||||
Succesful SSA optimization Pass2RedundantPhiElimination
|
||||
Redundant Phi (byte*) SCREEN#2 (byte*) SCREEN#0
|
||||
Succesful SSA optimization Pass2RedundantPhiElimination
|
||||
Simple Condition (boolean~) b::$1 if((byte) b::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 4) goto b::@1
|
||||
Succesful SSA optimization Pass2ConditionalJumpSimplification
|
||||
Constant (const byte*) SCREEN#0 = ((byte*))1024
|
||||
Constant (const byte) b::i#0 = 0
|
||||
Succesful SSA optimization Pass2ConstantIdentification
|
||||
OPTIMIZING CONTROL FLOW GRAPH
|
||||
Inlining constant with var siblings (const byte) b::i#0
|
||||
Inlining constant with var siblings (const byte) b::i#0
|
||||
Constant inlined b::i#0 = (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
Succesful SSA optimization Pass2ConstantInlining
|
||||
Block Sequence Planned @begin @3 @end main main::@1 main::@return b b::@1 b::@3 b::@return d d::@return
|
||||
Added new block during phi lifting b::@4(between b::@3 and b::@1)
|
||||
Block Sequence Planned @begin @3 @end main main::@1 main::@return b b::@1 b::@3 b::@return b::@4 d d::@return
|
||||
Adding NOP phi() at start of @begin
|
||||
Adding NOP phi() at start of @3
|
||||
Adding NOP phi() at start of @end
|
||||
Adding NOP phi() at start of main::@1
|
||||
Adding NOP phi() at start of b
|
||||
CALL GRAPH
|
||||
Calls in [] to main:2
|
||||
Calls in [main] to d:5 b:7
|
||||
Calls in [b] to d:11
|
||||
|
||||
Propagating live ranges...
|
||||
Propagating live ranges...
|
||||
Propagating live ranges...
|
||||
Created 1 initial phi equivalence classes
|
||||
Coalesced [15] b::i#4 ← b::i#1
|
||||
Coalesced down to 1 phi equivalence classes
|
||||
Culled Empty Block (label) b::@4
|
||||
Block Sequence Planned @begin @3 @end main main::@1 main::@return b b::@1 b::@3 b::@return d d::@return
|
||||
Adding NOP phi() at start of @begin
|
||||
Adding NOP phi() at start of @3
|
||||
Adding NOP phi() at start of @end
|
||||
Adding NOP phi() at start of main::@1
|
||||
Adding NOP phi() at start of b
|
||||
Propagating live ranges...
|
||||
Propagating live ranges...
|
||||
Propagating live ranges...
|
||||
|
||||
FINAL CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
[0] phi() [ ] ( )
|
||||
to:@3
|
||||
@3: scope:[] from @begin
|
||||
[1] phi() [ ] ( )
|
||||
[2] call main param-assignment [ ] ( )
|
||||
to:@end
|
||||
@end: scope:[] from @3
|
||||
[3] phi() [ ] ( )
|
||||
main: scope:[main] from @3
|
||||
[4] *((const byte*) SCREEN#0) ← (byte) '0' [ ] ( main:2 [ ] )
|
||||
[5] call d param-assignment [ ] ( main:2 [ ] )
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main
|
||||
[6] phi() [ ] ( main:2 [ ] )
|
||||
[7] call b param-assignment [ ] ( main:2 [ ] )
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@1
|
||||
[8] return [ ] ( main:2 [ ] )
|
||||
to:@return
|
||||
b: scope:[b] from main::@1
|
||||
[9] phi() [ ] ( main:2::b:7 [ ] )
|
||||
to:b::@1
|
||||
b::@1: scope:[b] from b b::@3
|
||||
[10] (byte) b::i#2 ← phi( b/(byte/signed byte/word/signed word/dword/signed dword) 0 b::@3/(byte) b::i#1 ) [ b::i#2 ] ( main:2::b:7 [ b::i#2 ] )
|
||||
[11] call d param-assignment [ b::i#2 ] ( main:2::b:7 [ b::i#2 ] )
|
||||
to:b::@3
|
||||
b::@3: scope:[b] from b::@1
|
||||
[12] (byte) b::i#1 ← ++ (byte) b::i#2 [ b::i#1 ] ( main:2::b:7 [ b::i#1 ] )
|
||||
[13] if((byte) b::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 4) goto b::@1 [ b::i#1 ] ( main:2::b:7 [ b::i#1 ] )
|
||||
to:b::@return
|
||||
b::@return: scope:[b] from b::@3
|
||||
[14] return [ ] ( main:2::b:7 [ ] )
|
||||
to:@return
|
||||
d: scope:[d] from b::@1 main
|
||||
[15] *((const byte*) SCREEN#0) ← ++ *((const byte*) SCREEN#0) [ ] ( main:2::d:5 [ ] main:2::b:7::d:11 [ b::i#2 ] )
|
||||
to:d::@return
|
||||
d::@return: scope:[d] from d
|
||||
[16] return [ ] ( main:2::d:5 [ ] main:2::b:7::d:11 [ b::i#2 ] )
|
||||
to:@return
|
||||
|
||||
DOMINATORS
|
||||
@begin dominated by @begin
|
||||
@3 dominated by @begin @3
|
||||
@end dominated by @begin @3 @end
|
||||
main dominated by @begin @3 main
|
||||
main::@1 dominated by @begin @3 main::@1 main
|
||||
main::@return dominated by main::@return @begin @3 main::@1 main
|
||||
b dominated by b @begin @3 main::@1 main
|
||||
b::@1 dominated by b @begin @3 b::@1 main::@1 main
|
||||
b::@3 dominated by b @begin @3 b::@1 b::@3 main::@1 main
|
||||
b::@return dominated by b::@return b @begin @3 b::@1 b::@3 main::@1 main
|
||||
d dominated by @begin @3 d main
|
||||
d::@return dominated by @begin @3 d main d::@return
|
||||
|
||||
NATURAL LOOPS
|
||||
Found back edge: Loop head: b::@1 tails: b::@3 blocks: null
|
||||
Populated: Loop head: b::@1 tails: b::@3 blocks: b::@3 b::@1
|
||||
Loop head: b::@1 tails: b::@3 blocks: b::@3 b::@1
|
||||
|
||||
NATURAL LOOPS WITH DEPTH
|
||||
Found 0 loops in scope []
|
||||
Found 0 loops in scope [main]
|
||||
null depth in calling loop Loop head: b::@1 tails: b::@3 blocks: b::@3 b::@1 in scope d
|
||||
Found 0 loops in scope [d]
|
||||
Found 1 loops in scope [b]
|
||||
Loop head: b::@1 tails: b::@3 blocks: b::@3 b::@1
|
||||
Loop head: b::@1 tails: b::@3 blocks: b::@3 b::@1 depth: 1
|
||||
|
||||
|
||||
VARIABLE REGISTER WEIGHTS
|
||||
(byte*) SCREEN
|
||||
(void()) b()
|
||||
(byte) b::i
|
||||
(byte) b::i#1 16.5
|
||||
(byte) b::i#2 11.0
|
||||
(void()) d()
|
||||
(void()) main()
|
||||
|
||||
Initial phi equivalence classes
|
||||
[ b::i#2 b::i#1 ]
|
||||
Complete equivalence classes
|
||||
[ b::i#2 b::i#1 ]
|
||||
Allocated zp ZP_BYTE:2 [ b::i#2 b::i#1 ]
|
||||
|
||||
INITIAL ASM
|
||||
//SEG0 Basic Upstart
|
||||
.pc = $801 "Basic"
|
||||
:BasicUpstart(main)
|
||||
.pc = $80d "Program"
|
||||
//SEG1 Global Constants & labels
|
||||
.label SCREEN = $400
|
||||
//SEG2 @begin
|
||||
bbegin:
|
||||
//SEG3 [1] phi from @begin to @3 [phi:@begin->@3]
|
||||
b3_from_bbegin:
|
||||
jmp b3
|
||||
//SEG4 @3
|
||||
b3:
|
||||
//SEG5 [2] call main param-assignment [ ] ( )
|
||||
jsr main
|
||||
//SEG6 [3] phi from @3 to @end [phi:@3->@end]
|
||||
bend_from_b3:
|
||||
jmp bend
|
||||
//SEG7 @end
|
||||
bend:
|
||||
//SEG8 main
|
||||
main: {
|
||||
//SEG9 [4] *((const byte*) SCREEN#0) ← (byte) '0' [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2
|
||||
lda #'0'
|
||||
sta SCREEN
|
||||
//SEG10 [5] call d param-assignment [ ] ( main:2 [ ] )
|
||||
jsr d
|
||||
//SEG11 [6] phi from main to main::@1 [phi:main->main::@1]
|
||||
b1_from_main:
|
||||
jmp b1
|
||||
//SEG12 main::@1
|
||||
b1:
|
||||
//SEG13 [7] call b param-assignment [ ] ( main:2 [ ] )
|
||||
//SEG14 [9] phi from main::@1 to b [phi:main::@1->b]
|
||||
b_from_b1:
|
||||
jsr b
|
||||
jmp breturn
|
||||
//SEG15 main::@return
|
||||
breturn:
|
||||
//SEG16 [8] return [ ] ( main:2 [ ] )
|
||||
rts
|
||||
}
|
||||
//SEG17 b
|
||||
b: {
|
||||
.label i = 2
|
||||
//SEG18 [10] phi from b to b::@1 [phi:b->b::@1]
|
||||
b1_from_b:
|
||||
//SEG19 [10] phi (byte) b::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:b->b::@1#0] -- vbuz1=vbuc1
|
||||
lda #0
|
||||
sta i
|
||||
jmp b1
|
||||
//SEG20 [10] phi from b::@3 to b::@1 [phi:b::@3->b::@1]
|
||||
b1_from_b3:
|
||||
//SEG21 [10] phi (byte) b::i#2 = (byte) b::i#1 [phi:b::@3->b::@1#0] -- register_copy
|
||||
jmp b1
|
||||
//SEG22 b::@1
|
||||
b1:
|
||||
//SEG23 [11] call d param-assignment [ b::i#2 ] ( main:2::b:7 [ b::i#2 ] )
|
||||
jsr d
|
||||
jmp b3
|
||||
//SEG24 b::@3
|
||||
b3:
|
||||
//SEG25 [12] (byte) b::i#1 ← ++ (byte) b::i#2 [ b::i#1 ] ( main:2::b:7 [ b::i#1 ] ) -- vbuz1=_inc_vbuz1
|
||||
inc i
|
||||
//SEG26 [13] if((byte) b::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 4) goto b::@1 [ b::i#1 ] ( main:2::b:7 [ b::i#1 ] ) -- vbuz1_neq_vbuc1_then_la1
|
||||
lda i
|
||||
cmp #4
|
||||
bne b1_from_b3
|
||||
jmp breturn
|
||||
//SEG27 b::@return
|
||||
breturn:
|
||||
//SEG28 [14] return [ ] ( main:2::b:7 [ ] )
|
||||
rts
|
||||
}
|
||||
//SEG29 d
|
||||
d: {
|
||||
//SEG30 [15] *((const byte*) SCREEN#0) ← ++ *((const byte*) SCREEN#0) [ ] ( main:2::d:5 [ ] main:2::b:7::d:11 [ b::i#2 ] ) -- _deref_pbuc1=_inc__deref_pbuc1
|
||||
inc SCREEN
|
||||
jmp breturn
|
||||
//SEG31 d::@return
|
||||
breturn:
|
||||
//SEG32 [16] return [ ] ( main:2::d:5 [ ] main:2::b:7::d:11 [ b::i#2 ] )
|
||||
rts
|
||||
}
|
||||
|
||||
REGISTER UPLIFT POTENTIAL REGISTERS
|
||||
Statement [4] *((const byte*) SCREEN#0) ← (byte) '0' [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
Potential registers zp ZP_BYTE:2 [ b::i#2 b::i#1 ] : zp ZP_BYTE:2 , reg byte a , reg byte x , reg byte y ,
|
||||
|
||||
REGISTER UPLIFT SCOPES
|
||||
Uplift Scope [b] 27.5: zp ZP_BYTE:2 [ b::i#2 b::i#1 ]
|
||||
Uplift Scope [main]
|
||||
Uplift Scope [d]
|
||||
Uplift Scope []
|
||||
|
||||
Uplifting [b] best 328 combination reg byte x [ b::i#2 b::i#1 ]
|
||||
Uplifting [main] best 328 combination
|
||||
Uplifting [d] best 328 combination
|
||||
Uplifting [] best 328 combination
|
||||
|
||||
ASSEMBLER BEFORE OPTIMIZATION
|
||||
//SEG0 Basic Upstart
|
||||
.pc = $801 "Basic"
|
||||
:BasicUpstart(main)
|
||||
.pc = $80d "Program"
|
||||
//SEG1 Global Constants & labels
|
||||
.label SCREEN = $400
|
||||
//SEG2 @begin
|
||||
bbegin:
|
||||
//SEG3 [1] phi from @begin to @3 [phi:@begin->@3]
|
||||
b3_from_bbegin:
|
||||
jmp b3
|
||||
//SEG4 @3
|
||||
b3:
|
||||
//SEG5 [2] call main param-assignment [ ] ( )
|
||||
jsr main
|
||||
//SEG6 [3] phi from @3 to @end [phi:@3->@end]
|
||||
bend_from_b3:
|
||||
jmp bend
|
||||
//SEG7 @end
|
||||
bend:
|
||||
//SEG8 main
|
||||
main: {
|
||||
//SEG9 [4] *((const byte*) SCREEN#0) ← (byte) '0' [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2
|
||||
lda #'0'
|
||||
sta SCREEN
|
||||
//SEG10 [5] call d param-assignment [ ] ( main:2 [ ] )
|
||||
jsr d
|
||||
//SEG11 [6] phi from main to main::@1 [phi:main->main::@1]
|
||||
b1_from_main:
|
||||
jmp b1
|
||||
//SEG12 main::@1
|
||||
b1:
|
||||
//SEG13 [7] call b param-assignment [ ] ( main:2 [ ] )
|
||||
//SEG14 [9] phi from main::@1 to b [phi:main::@1->b]
|
||||
b_from_b1:
|
||||
jsr b
|
||||
jmp breturn
|
||||
//SEG15 main::@return
|
||||
breturn:
|
||||
//SEG16 [8] return [ ] ( main:2 [ ] )
|
||||
rts
|
||||
}
|
||||
//SEG17 b
|
||||
b: {
|
||||
//SEG18 [10] phi from b to b::@1 [phi:b->b::@1]
|
||||
b1_from_b:
|
||||
//SEG19 [10] phi (byte) b::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:b->b::@1#0] -- vbuxx=vbuc1
|
||||
ldx #0
|
||||
jmp b1
|
||||
//SEG20 [10] phi from b::@3 to b::@1 [phi:b::@3->b::@1]
|
||||
b1_from_b3:
|
||||
//SEG21 [10] phi (byte) b::i#2 = (byte) b::i#1 [phi:b::@3->b::@1#0] -- register_copy
|
||||
jmp b1
|
||||
//SEG22 b::@1
|
||||
b1:
|
||||
//SEG23 [11] call d param-assignment [ b::i#2 ] ( main:2::b:7 [ b::i#2 ] )
|
||||
jsr d
|
||||
jmp b3
|
||||
//SEG24 b::@3
|
||||
b3:
|
||||
//SEG25 [12] (byte) b::i#1 ← ++ (byte) b::i#2 [ b::i#1 ] ( main:2::b:7 [ b::i#1 ] ) -- vbuxx=_inc_vbuxx
|
||||
inx
|
||||
//SEG26 [13] if((byte) b::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 4) goto b::@1 [ b::i#1 ] ( main:2::b:7 [ b::i#1 ] ) -- vbuxx_neq_vbuc1_then_la1
|
||||
cpx #4
|
||||
bne b1_from_b3
|
||||
jmp breturn
|
||||
//SEG27 b::@return
|
||||
breturn:
|
||||
//SEG28 [14] return [ ] ( main:2::b:7 [ ] )
|
||||
rts
|
||||
}
|
||||
//SEG29 d
|
||||
d: {
|
||||
//SEG30 [15] *((const byte*) SCREEN#0) ← ++ *((const byte*) SCREEN#0) [ ] ( main:2::d:5 [ ] main:2::b:7::d:11 [ b::i#2 ] ) -- _deref_pbuc1=_inc__deref_pbuc1
|
||||
inc SCREEN
|
||||
jmp breturn
|
||||
//SEG31 d::@return
|
||||
breturn:
|
||||
//SEG32 [16] return [ ] ( main:2::d:5 [ ] main:2::b:7::d:11 [ b::i#2 ] )
|
||||
rts
|
||||
}
|
||||
|
||||
ASSEMBLER OPTIMIZATIONS
|
||||
Removing instruction jmp b3
|
||||
Removing instruction jmp bend
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp breturn
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp b3
|
||||
Removing instruction jmp breturn
|
||||
Removing instruction jmp breturn
|
||||
Succesful ASM optimization Pass5NextJumpElimination
|
||||
Replacing label b1_from_b3 with b1
|
||||
Removing instruction bbegin:
|
||||
Removing instruction b3_from_bbegin:
|
||||
Removing instruction bend_from_b3:
|
||||
Removing instruction b1_from_main:
|
||||
Removing instruction b_from_b1:
|
||||
Removing instruction b1_from_b3:
|
||||
Succesful ASM optimization Pass5RedundantLabelElimination
|
||||
Removing instruction b3:
|
||||
Removing instruction bend:
|
||||
Removing instruction b1:
|
||||
Removing instruction breturn:
|
||||
Removing instruction b1_from_b:
|
||||
Removing instruction b3:
|
||||
Removing instruction breturn:
|
||||
Removing instruction breturn:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Removing instruction jmp b1
|
||||
Succesful ASM optimization Pass5NextJumpElimination
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
(label) @3
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) SCREEN
|
||||
(const byte*) SCREEN#0 SCREEN = ((byte*))(word/signed word/dword/signed dword) 1024
|
||||
(void()) b()
|
||||
(label) b::@1
|
||||
(label) b::@3
|
||||
(label) b::@return
|
||||
(byte) b::i
|
||||
(byte) b::i#1 reg byte x 16.5
|
||||
(byte) b::i#2 reg byte x 11.0
|
||||
(void()) d()
|
||||
(label) d::@return
|
||||
(void()) main()
|
||||
(label) main::@1
|
||||
(label) main::@return
|
||||
|
||||
reg byte x [ b::i#2 b::i#1 ]
|
||||
|
||||
|
||||
FINAL ASSEMBLER
|
||||
Score: 193
|
||||
|
||||
//SEG0 Basic Upstart
|
||||
.pc = $801 "Basic"
|
||||
:BasicUpstart(main)
|
||||
.pc = $80d "Program"
|
||||
//SEG1 Global Constants & labels
|
||||
.label SCREEN = $400
|
||||
//SEG2 @begin
|
||||
//SEG3 [1] phi from @begin to @3 [phi:@begin->@3]
|
||||
//SEG4 @3
|
||||
//SEG5 [2] call main param-assignment [ ] ( )
|
||||
jsr main
|
||||
//SEG6 [3] phi from @3 to @end [phi:@3->@end]
|
||||
//SEG7 @end
|
||||
//SEG8 main
|
||||
main: {
|
||||
//SEG9 [4] *((const byte*) SCREEN#0) ← (byte) '0' [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2
|
||||
lda #'0'
|
||||
sta SCREEN
|
||||
//SEG10 [5] call d param-assignment [ ] ( main:2 [ ] )
|
||||
jsr d
|
||||
//SEG11 [6] phi from main to main::@1 [phi:main->main::@1]
|
||||
//SEG12 main::@1
|
||||
//SEG13 [7] call b param-assignment [ ] ( main:2 [ ] )
|
||||
//SEG14 [9] phi from main::@1 to b [phi:main::@1->b]
|
||||
jsr b
|
||||
//SEG15 main::@return
|
||||
//SEG16 [8] return [ ] ( main:2 [ ] )
|
||||
rts
|
||||
}
|
||||
//SEG17 b
|
||||
b: {
|
||||
//SEG18 [10] phi from b to b::@1 [phi:b->b::@1]
|
||||
//SEG19 [10] phi (byte) b::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:b->b::@1#0] -- vbuxx=vbuc1
|
||||
ldx #0
|
||||
//SEG20 [10] phi from b::@3 to b::@1 [phi:b::@3->b::@1]
|
||||
//SEG21 [10] phi (byte) b::i#2 = (byte) b::i#1 [phi:b::@3->b::@1#0] -- register_copy
|
||||
//SEG22 b::@1
|
||||
b1:
|
||||
//SEG23 [11] call d param-assignment [ b::i#2 ] ( main:2::b:7 [ b::i#2 ] )
|
||||
jsr d
|
||||
//SEG24 b::@3
|
||||
//SEG25 [12] (byte) b::i#1 ← ++ (byte) b::i#2 [ b::i#1 ] ( main:2::b:7 [ b::i#1 ] ) -- vbuxx=_inc_vbuxx
|
||||
inx
|
||||
//SEG26 [13] if((byte) b::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 4) goto b::@1 [ b::i#1 ] ( main:2::b:7 [ b::i#1 ] ) -- vbuxx_neq_vbuc1_then_la1
|
||||
cpx #4
|
||||
bne b1
|
||||
//SEG27 b::@return
|
||||
//SEG28 [14] return [ ] ( main:2::b:7 [ ] )
|
||||
rts
|
||||
}
|
||||
//SEG29 d
|
||||
d: {
|
||||
//SEG30 [15] *((const byte*) SCREEN#0) ← ++ *((const byte*) SCREEN#0) [ ] ( main:2::d:5 [ ] main:2::b:7::d:11 [ b::i#2 ] ) -- _deref_pbuc1=_inc__deref_pbuc1
|
||||
inc SCREEN
|
||||
//SEG31 d::@return
|
||||
//SEG32 [16] return [ ] ( main:2::d:5 [ ] main:2::b:7::d:11 [ b::i#2 ] )
|
||||
rts
|
||||
}
|
||||
|
19
src/test/java/dk/camelot64/kickc/test/ref/loop-problem.sym
Normal file
19
src/test/java/dk/camelot64/kickc/test/ref/loop-problem.sym
Normal file
@ -0,0 +1,19 @@
|
||||
(label) @3
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) SCREEN
|
||||
(const byte*) SCREEN#0 SCREEN = ((byte*))(word/signed word/dword/signed dword) 1024
|
||||
(void()) b()
|
||||
(label) b::@1
|
||||
(label) b::@3
|
||||
(label) b::@return
|
||||
(byte) b::i
|
||||
(byte) b::i#1 reg byte x 16.5
|
||||
(byte) b::i#2 reg byte x 11.0
|
||||
(void()) d()
|
||||
(label) d::@return
|
||||
(void()) main()
|
||||
(label) main::@1
|
||||
(label) main::@return
|
||||
|
||||
reg byte x [ b::i#2 b::i#1 ]
|
@ -1,13 +1,13 @@
|
||||
@begin: scope:[] from
|
||||
[0] phi() [ ] ( )
|
||||
to:@29
|
||||
@29: scope:[] from @begin
|
||||
to:@28
|
||||
@28: scope:[] from @begin
|
||||
[1] phi() [ ] ( )
|
||||
[2] call main param-assignment [ ] ( )
|
||||
to:@end
|
||||
@end: scope:[] from @29
|
||||
@end: scope:[] from @28
|
||||
[3] phi() [ ] ( )
|
||||
main: scope:[main] from @29
|
||||
main: scope:[main] from @28
|
||||
[4] phi() [ ] ( main:2 [ ] )
|
||||
[5] call sin16s_gen param-assignment [ ] ( main:2 [ ] )
|
||||
to:main::@5
|
||||
|
@ -134,47 +134,6 @@ signed byte sin8s(word x) {
|
||||
return sinx;
|
||||
}
|
||||
|
||||
|
||||
// Generate (small) signed word sinus table - in the limited -$fff - $fff range
|
||||
// sintab - the table to generate into
|
||||
// wavelength - the number of sinus points in a total sinus wavelength (the size of the table)
|
||||
void sin16ss_gen(signed word* sintab, word wavelength) {
|
||||
// u[4.12] step = PI*2/wavelength
|
||||
dword step = div32u16u(PI2_u4f28, wavelength); // u[4.28]
|
||||
// Iterate over the table
|
||||
dword x = 0; // u[4.28]
|
||||
for( word i=0; i<wavelength; i++) {
|
||||
// Move x1 into the range 0-PI/2 using sinus mirror symmetries
|
||||
word x1 = >x; // u[4.12]
|
||||
byte isUpper = 0;
|
||||
if(x1 >= PI_u4f12 ) {
|
||||
x1 = x1 - PI_u4f12;
|
||||
isUpper = 1;
|
||||
}
|
||||
if(x1 >= PI_HALF_u4f12 ) {
|
||||
x1 = PI_u4f12 - x1;
|
||||
}
|
||||
// s[4.12] sinx = x - x^3/6 + x5/128;
|
||||
word x2 = mulu16_sel(x1, x1, 4); // u[4.12]
|
||||
word x3 = mulu16_sel(x2, x1, 4); // u[4.12]
|
||||
word x3_6 = mulu16_sel(x3, $10000/6, 0); // u[4.12] - u[0.16] div6 = 1/6;
|
||||
word usinx = x1 - x3_6; // u[4.12]
|
||||
word x4 = mulu16_sel(x3, x1, 4); // u[4.12]
|
||||
word x5 = mulu16_sel(x4, x1, 4); // u[4.12]
|
||||
word x5_128 = mulu16_sel(x5, $10000/128, 0); // u[4.12] - u[0.16] div128 = 1/128;
|
||||
usinx = usinx + x5_128;
|
||||
signed word sinx;
|
||||
if(isUpper!=0) {
|
||||
sinx = -(signed word)usinx; // s[4.12];
|
||||
} else {
|
||||
sinx = (signed word)usinx; // s[4.12]
|
||||
}
|
||||
*sintab = sinx;
|
||||
sintab = sintab + 2;
|
||||
x = x + step;
|
||||
}
|
||||
}
|
||||
|
||||
// Calculate val*val for two unsigned word values - the result is 16 selected bits of the 32-bit result.
|
||||
// The select parameter indicates how many of the highest bits of the 32-bit result to skip
|
||||
word mulu16_sel(word v1, word v2, byte select) {
|
||||
@ -402,7 +361,6 @@ Adding pre/post-modifier (word) sin16s_gen::i ← ++ (word) sin16s_gen::i
|
||||
Adding pre/post-modifier (signed byte*) sin8s_gen::sintab ← ++ (signed byte*) sin8s_gen::sintab
|
||||
Adding pre/post-modifier (word) sin8s_gen::i ← ++ (word) sin8s_gen::i
|
||||
Adding pre/post-modifier (byte) sin8s::usinx ← -- (byte) sin8s::usinx
|
||||
Adding pre/post-modifier (word) sin16ss_gen::i ← ++ (word) sin16ss_gen::i
|
||||
Importing print.kc
|
||||
PARSING src/test/java/dk/camelot64/kickc/test/kc/print.kc
|
||||
|
||||
@ -964,68 +922,6 @@ sin8s::@return:
|
||||
(signed byte) sin8s::return ← (signed byte) sin8s::return
|
||||
return (signed byte) sin8s::return
|
||||
endproc // sin8s()
|
||||
proc (void()) sin16ss_gen((signed word*) sin16ss_gen::sintab , (word) sin16ss_gen::wavelength)
|
||||
(dword~) sin16ss_gen::$0 ← call div32u16u (dword) PI2_u4f28 (word) sin16ss_gen::wavelength
|
||||
(dword) sin16ss_gen::step ← (dword~) sin16ss_gen::$0
|
||||
(dword) sin16ss_gen::x ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
(word) sin16ss_gen::i ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
sin16ss_gen::@1:
|
||||
(word~) sin16ss_gen::$1 ← > (dword) sin16ss_gen::x
|
||||
(word) sin16ss_gen::x1 ← (word~) sin16ss_gen::$1
|
||||
(byte) sin16ss_gen::isUpper ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
(boolean~) sin16ss_gen::$2 ← (word) sin16ss_gen::x1 >= (word) PI_u4f12
|
||||
(boolean~) sin16ss_gen::$3 ← ! (boolean~) sin16ss_gen::$2
|
||||
if((boolean~) sin16ss_gen::$3) goto sin16ss_gen::@2
|
||||
(word~) sin16ss_gen::$4 ← (word) sin16ss_gen::x1 - (word) PI_u4f12
|
||||
(word) sin16ss_gen::x1 ← (word~) sin16ss_gen::$4
|
||||
(byte) sin16ss_gen::isUpper ← (byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
sin16ss_gen::@2:
|
||||
(boolean~) sin16ss_gen::$5 ← (word) sin16ss_gen::x1 >= (word) PI_HALF_u4f12
|
||||
(boolean~) sin16ss_gen::$6 ← ! (boolean~) sin16ss_gen::$5
|
||||
if((boolean~) sin16ss_gen::$6) goto sin16ss_gen::@3
|
||||
(word~) sin16ss_gen::$7 ← (word) PI_u4f12 - (word) sin16ss_gen::x1
|
||||
(word) sin16ss_gen::x1 ← (word~) sin16ss_gen::$7
|
||||
sin16ss_gen::@3:
|
||||
(word~) sin16ss_gen::$8 ← call mulu16_sel (word) sin16ss_gen::x1 (word) sin16ss_gen::x1 (byte/signed byte/word/signed word/dword/signed dword) 4
|
||||
(word) sin16ss_gen::x2 ← (word~) sin16ss_gen::$8
|
||||
(word~) sin16ss_gen::$9 ← call mulu16_sel (word) sin16ss_gen::x2 (word) sin16ss_gen::x1 (byte/signed byte/word/signed word/dword/signed dword) 4
|
||||
(word) sin16ss_gen::x3 ← (word~) sin16ss_gen::$9
|
||||
(word/signed word/dword/signed dword~) sin16ss_gen::$10 ← (dword/signed dword) 65536 / (byte/signed byte/word/signed word/dword/signed dword) 6
|
||||
(word~) sin16ss_gen::$11 ← call mulu16_sel (word) sin16ss_gen::x3 (word/signed word/dword/signed dword~) sin16ss_gen::$10 (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
(word) sin16ss_gen::x3_6 ← (word~) sin16ss_gen::$11
|
||||
(word~) sin16ss_gen::$12 ← (word) sin16ss_gen::x1 - (word) sin16ss_gen::x3_6
|
||||
(word) sin16ss_gen::usinx ← (word~) sin16ss_gen::$12
|
||||
(word~) sin16ss_gen::$13 ← call mulu16_sel (word) sin16ss_gen::x3 (word) sin16ss_gen::x1 (byte/signed byte/word/signed word/dword/signed dword) 4
|
||||
(word) sin16ss_gen::x4 ← (word~) sin16ss_gen::$13
|
||||
(word~) sin16ss_gen::$14 ← call mulu16_sel (word) sin16ss_gen::x4 (word) sin16ss_gen::x1 (byte/signed byte/word/signed word/dword/signed dword) 4
|
||||
(word) sin16ss_gen::x5 ← (word~) sin16ss_gen::$14
|
||||
(word/signed word/dword/signed dword~) sin16ss_gen::$15 ← (dword/signed dword) 65536 / (byte/word/signed word/dword/signed dword) 128
|
||||
(word~) sin16ss_gen::$16 ← call mulu16_sel (word) sin16ss_gen::x5 (word/signed word/dword/signed dword~) sin16ss_gen::$15 (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
(word) sin16ss_gen::x5_128 ← (word~) sin16ss_gen::$16
|
||||
(word~) sin16ss_gen::$17 ← (word) sin16ss_gen::usinx + (word) sin16ss_gen::x5_128
|
||||
(word) sin16ss_gen::usinx ← (word~) sin16ss_gen::$17
|
||||
(boolean~) sin16ss_gen::$18 ← (byte) sin16ss_gen::isUpper != (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
(boolean~) sin16ss_gen::$19 ← ! (boolean~) sin16ss_gen::$18
|
||||
if((boolean~) sin16ss_gen::$19) goto sin16ss_gen::@4
|
||||
(signed word~) sin16ss_gen::$20 ← ((signed word)) (word) sin16ss_gen::usinx
|
||||
(signed word~) sin16ss_gen::$21 ← - (signed word~) sin16ss_gen::$20
|
||||
(signed word) sin16ss_gen::sinx ← (signed word~) sin16ss_gen::$21
|
||||
goto sin16ss_gen::@5
|
||||
sin16ss_gen::@4:
|
||||
(signed word~) sin16ss_gen::$22 ← ((signed word)) (word) sin16ss_gen::usinx
|
||||
(signed word) sin16ss_gen::sinx ← (signed word~) sin16ss_gen::$22
|
||||
sin16ss_gen::@5:
|
||||
*((signed word*) sin16ss_gen::sintab) ← (signed word) sin16ss_gen::sinx
|
||||
(signed word*~) sin16ss_gen::$23 ← (signed word*) sin16ss_gen::sintab + (byte/signed byte/word/signed word/dword/signed dword) 2
|
||||
(signed word*) sin16ss_gen::sintab ← (signed word*~) sin16ss_gen::$23
|
||||
(dword~) sin16ss_gen::$24 ← (dword) sin16ss_gen::x + (dword) sin16ss_gen::step
|
||||
(dword) sin16ss_gen::x ← (dword~) sin16ss_gen::$24
|
||||
(word) sin16ss_gen::i ← ++ (word) sin16ss_gen::i
|
||||
(boolean~) sin16ss_gen::$25 ← (word) sin16ss_gen::i < (word) sin16ss_gen::wavelength
|
||||
if((boolean~) sin16ss_gen::$25) goto sin16ss_gen::@1
|
||||
sin16ss_gen::@return:
|
||||
return
|
||||
endproc // sin16ss_gen()
|
||||
proc (word()) mulu16_sel((word) mulu16_sel::v1 , (word) mulu16_sel::v2 , (byte) mulu16_sel::select)
|
||||
(dword~) mulu16_sel::$0 ← call mul16u (word) mulu16_sel::v1 (word) mulu16_sel::v2
|
||||
(dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select
|
||||
@ -1581,54 +1477,6 @@ SYMBOLS
|
||||
(dword) sin16s_gen::step
|
||||
(word) sin16s_gen::wavelength
|
||||
(dword) sin16s_gen::x
|
||||
(void()) sin16ss_gen((signed word*) sin16ss_gen::sintab , (word) sin16ss_gen::wavelength)
|
||||
(dword~) sin16ss_gen::$0
|
||||
(word~) sin16ss_gen::$1
|
||||
(word/signed word/dword/signed dword~) sin16ss_gen::$10
|
||||
(word~) sin16ss_gen::$11
|
||||
(word~) sin16ss_gen::$12
|
||||
(word~) sin16ss_gen::$13
|
||||
(word~) sin16ss_gen::$14
|
||||
(word/signed word/dword/signed dword~) sin16ss_gen::$15
|
||||
(word~) sin16ss_gen::$16
|
||||
(word~) sin16ss_gen::$17
|
||||
(boolean~) sin16ss_gen::$18
|
||||
(boolean~) sin16ss_gen::$19
|
||||
(boolean~) sin16ss_gen::$2
|
||||
(signed word~) sin16ss_gen::$20
|
||||
(signed word~) sin16ss_gen::$21
|
||||
(signed word~) sin16ss_gen::$22
|
||||
(signed word*~) sin16ss_gen::$23
|
||||
(dword~) sin16ss_gen::$24
|
||||
(boolean~) sin16ss_gen::$25
|
||||
(boolean~) sin16ss_gen::$3
|
||||
(word~) sin16ss_gen::$4
|
||||
(boolean~) sin16ss_gen::$5
|
||||
(boolean~) sin16ss_gen::$6
|
||||
(word~) sin16ss_gen::$7
|
||||
(word~) sin16ss_gen::$8
|
||||
(word~) sin16ss_gen::$9
|
||||
(label) sin16ss_gen::@1
|
||||
(label) sin16ss_gen::@2
|
||||
(label) sin16ss_gen::@3
|
||||
(label) sin16ss_gen::@4
|
||||
(label) sin16ss_gen::@5
|
||||
(label) sin16ss_gen::@return
|
||||
(word) sin16ss_gen::i
|
||||
(byte) sin16ss_gen::isUpper
|
||||
(signed word*) sin16ss_gen::sintab
|
||||
(signed word) sin16ss_gen::sinx
|
||||
(dword) sin16ss_gen::step
|
||||
(word) sin16ss_gen::usinx
|
||||
(word) sin16ss_gen::wavelength
|
||||
(dword) sin16ss_gen::x
|
||||
(word) sin16ss_gen::x1
|
||||
(word) sin16ss_gen::x2
|
||||
(word) sin16ss_gen::x3
|
||||
(word) sin16ss_gen::x3_6
|
||||
(word) sin16ss_gen::x4
|
||||
(word) sin16ss_gen::x5
|
||||
(word) sin16ss_gen::x5_128
|
||||
(signed byte()) sin8s((word) sin8s::x)
|
||||
(boolean~) sin8s::$0
|
||||
(boolean~) sin8s::$1
|
||||
@ -2334,85 +2182,6 @@ sin8s::@9: scope:[sin8s] from
|
||||
to:sin8s::@return
|
||||
@15: scope:[] from @14
|
||||
to:@16
|
||||
sin16ss_gen: scope:[sin16ss_gen] from
|
||||
(dword~) sin16ss_gen::$0 ← call div32u16u (dword) PI2_u4f28 (word) sin16ss_gen::wavelength
|
||||
(dword) sin16ss_gen::step ← (dword~) sin16ss_gen::$0
|
||||
(dword) sin16ss_gen::x ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
(word) sin16ss_gen::i ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
to:sin16ss_gen::@1
|
||||
sin16ss_gen::@1: scope:[sin16ss_gen] from sin16ss_gen sin16ss_gen::@5
|
||||
(word~) sin16ss_gen::$1 ← > (dword) sin16ss_gen::x
|
||||
(word) sin16ss_gen::x1 ← (word~) sin16ss_gen::$1
|
||||
(byte) sin16ss_gen::isUpper ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
(boolean~) sin16ss_gen::$2 ← (word) sin16ss_gen::x1 >= (word) PI_u4f12
|
||||
(boolean~) sin16ss_gen::$3 ← ! (boolean~) sin16ss_gen::$2
|
||||
if((boolean~) sin16ss_gen::$3) goto sin16ss_gen::@2
|
||||
to:sin16ss_gen::@6
|
||||
sin16ss_gen::@2: scope:[sin16ss_gen] from sin16ss_gen::@1 sin16ss_gen::@6
|
||||
(boolean~) sin16ss_gen::$5 ← (word) sin16ss_gen::x1 >= (word) PI_HALF_u4f12
|
||||
(boolean~) sin16ss_gen::$6 ← ! (boolean~) sin16ss_gen::$5
|
||||
if((boolean~) sin16ss_gen::$6) goto sin16ss_gen::@3
|
||||
to:sin16ss_gen::@7
|
||||
sin16ss_gen::@6: scope:[sin16ss_gen] from sin16ss_gen::@1
|
||||
(word~) sin16ss_gen::$4 ← (word) sin16ss_gen::x1 - (word) PI_u4f12
|
||||
(word) sin16ss_gen::x1 ← (word~) sin16ss_gen::$4
|
||||
(byte) sin16ss_gen::isUpper ← (byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
to:sin16ss_gen::@2
|
||||
sin16ss_gen::@3: scope:[sin16ss_gen] from sin16ss_gen::@2 sin16ss_gen::@7
|
||||
(word~) sin16ss_gen::$8 ← call mulu16_sel (word) sin16ss_gen::x1 (word) sin16ss_gen::x1 (byte/signed byte/word/signed word/dword/signed dword) 4
|
||||
(word) sin16ss_gen::x2 ← (word~) sin16ss_gen::$8
|
||||
(word~) sin16ss_gen::$9 ← call mulu16_sel (word) sin16ss_gen::x2 (word) sin16ss_gen::x1 (byte/signed byte/word/signed word/dword/signed dword) 4
|
||||
(word) sin16ss_gen::x3 ← (word~) sin16ss_gen::$9
|
||||
(word/signed word/dword/signed dword~) sin16ss_gen::$10 ← (dword/signed dword) 65536 / (byte/signed byte/word/signed word/dword/signed dword) 6
|
||||
(word~) sin16ss_gen::$11 ← call mulu16_sel (word) sin16ss_gen::x3 (word/signed word/dword/signed dword~) sin16ss_gen::$10 (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
(word) sin16ss_gen::x3_6 ← (word~) sin16ss_gen::$11
|
||||
(word~) sin16ss_gen::$12 ← (word) sin16ss_gen::x1 - (word) sin16ss_gen::x3_6
|
||||
(word) sin16ss_gen::usinx ← (word~) sin16ss_gen::$12
|
||||
(word~) sin16ss_gen::$13 ← call mulu16_sel (word) sin16ss_gen::x3 (word) sin16ss_gen::x1 (byte/signed byte/word/signed word/dword/signed dword) 4
|
||||
(word) sin16ss_gen::x4 ← (word~) sin16ss_gen::$13
|
||||
(word~) sin16ss_gen::$14 ← call mulu16_sel (word) sin16ss_gen::x4 (word) sin16ss_gen::x1 (byte/signed byte/word/signed word/dword/signed dword) 4
|
||||
(word) sin16ss_gen::x5 ← (word~) sin16ss_gen::$14
|
||||
(word/signed word/dword/signed dword~) sin16ss_gen::$15 ← (dword/signed dword) 65536 / (byte/word/signed word/dword/signed dword) 128
|
||||
(word~) sin16ss_gen::$16 ← call mulu16_sel (word) sin16ss_gen::x5 (word/signed word/dword/signed dword~) sin16ss_gen::$15 (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
(word) sin16ss_gen::x5_128 ← (word~) sin16ss_gen::$16
|
||||
(word~) sin16ss_gen::$17 ← (word) sin16ss_gen::usinx + (word) sin16ss_gen::x5_128
|
||||
(word) sin16ss_gen::usinx ← (word~) sin16ss_gen::$17
|
||||
(boolean~) sin16ss_gen::$18 ← (byte) sin16ss_gen::isUpper != (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
(boolean~) sin16ss_gen::$19 ← ! (boolean~) sin16ss_gen::$18
|
||||
if((boolean~) sin16ss_gen::$19) goto sin16ss_gen::@4
|
||||
to:sin16ss_gen::@8
|
||||
sin16ss_gen::@7: scope:[sin16ss_gen] from sin16ss_gen::@2
|
||||
(word~) sin16ss_gen::$7 ← (word) PI_u4f12 - (word) sin16ss_gen::x1
|
||||
(word) sin16ss_gen::x1 ← (word~) sin16ss_gen::$7
|
||||
to:sin16ss_gen::@3
|
||||
sin16ss_gen::@4: scope:[sin16ss_gen] from sin16ss_gen::@3 sin16ss_gen::@9
|
||||
(signed word~) sin16ss_gen::$22 ← ((signed word)) (word) sin16ss_gen::usinx
|
||||
(signed word) sin16ss_gen::sinx ← (signed word~) sin16ss_gen::$22
|
||||
to:sin16ss_gen::@5
|
||||
sin16ss_gen::@8: scope:[sin16ss_gen] from sin16ss_gen::@3
|
||||
(signed word~) sin16ss_gen::$20 ← ((signed word)) (word) sin16ss_gen::usinx
|
||||
(signed word~) sin16ss_gen::$21 ← - (signed word~) sin16ss_gen::$20
|
||||
(signed word) sin16ss_gen::sinx ← (signed word~) sin16ss_gen::$21
|
||||
to:sin16ss_gen::@5
|
||||
sin16ss_gen::@5: scope:[sin16ss_gen] from sin16ss_gen::@4 sin16ss_gen::@8
|
||||
*((signed word*) sin16ss_gen::sintab) ← (signed word) sin16ss_gen::sinx
|
||||
(signed word*~) sin16ss_gen::$23 ← (signed word*) sin16ss_gen::sintab + (byte/signed byte/word/signed word/dword/signed dword) 2
|
||||
(signed word*) sin16ss_gen::sintab ← (signed word*~) sin16ss_gen::$23
|
||||
(dword~) sin16ss_gen::$24 ← (dword) sin16ss_gen::x + (dword) sin16ss_gen::step
|
||||
(dword) sin16ss_gen::x ← (dword~) sin16ss_gen::$24
|
||||
(word) sin16ss_gen::i ← ++ (word) sin16ss_gen::i
|
||||
(boolean~) sin16ss_gen::$25 ← (word) sin16ss_gen::i < (word) sin16ss_gen::wavelength
|
||||
if((boolean~) sin16ss_gen::$25) goto sin16ss_gen::@1
|
||||
to:sin16ss_gen::@10
|
||||
sin16ss_gen::@9: scope:[sin16ss_gen] from
|
||||
to:sin16ss_gen::@4
|
||||
sin16ss_gen::@10: scope:[sin16ss_gen] from sin16ss_gen::@5
|
||||
to:sin16ss_gen::@return
|
||||
sin16ss_gen::@return: scope:[sin16ss_gen] from sin16ss_gen::@10
|
||||
return
|
||||
to:@return
|
||||
@16: scope:[] from @15
|
||||
to:@17
|
||||
mulu16_sel: scope:[mulu16_sel] from
|
||||
(dword~) mulu16_sel::$0 ← call mul16u (word) mulu16_sel::v1 (word) mulu16_sel::v2
|
||||
(dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select
|
||||
@ -2425,8 +2194,8 @@ mulu16_sel::@return: scope:[mulu16_sel] from mulu16_sel mulu16_sel::@1
|
||||
to:@return
|
||||
mulu16_sel::@1: scope:[mulu16_sel] from
|
||||
to:mulu16_sel::@return
|
||||
@17: scope:[] from @16
|
||||
to:@18
|
||||
@16: scope:[] from @15
|
||||
to:@17
|
||||
mulu8_sel: scope:[mulu8_sel] from
|
||||
(word~) mulu8_sel::$0 ← call mul8u (byte) mulu8_sel::v1 (byte) mulu8_sel::v2
|
||||
(word~) mulu8_sel::$1 ← (word~) mulu8_sel::$0 << (byte) mulu8_sel::select
|
||||
@ -2439,11 +2208,11 @@ mulu8_sel::@return: scope:[mulu8_sel] from mulu8_sel mulu8_sel::@1
|
||||
to:@return
|
||||
mulu8_sel::@1: scope:[mulu8_sel] from
|
||||
to:mulu8_sel::@return
|
||||
@18: scope:[] from @17
|
||||
@17: scope:[] from @16
|
||||
(byte*) SCREEN ← ((byte*)) (word/signed word/dword/signed dword) 1024
|
||||
(byte*) line_cursor ← (byte*) SCREEN
|
||||
(byte*) char_cursor ← (byte*) line_cursor
|
||||
to:@19
|
||||
to:@18
|
||||
print_str: scope:[print_str] from
|
||||
to:print_str::@1
|
||||
print_str::@1: scope:[print_str] from print_str print_str::@2
|
||||
@ -2466,8 +2235,8 @@ print_str::@6: scope:[print_str] from
|
||||
print_str::@return: scope:[print_str] from print_str::@3
|
||||
return
|
||||
to:@return
|
||||
@19: scope:[] from @18
|
||||
to:@20
|
||||
@18: scope:[] from @17
|
||||
to:@19
|
||||
print_ln: scope:[print_ln] from
|
||||
to:print_ln::@1
|
||||
print_ln::@1: scope:[print_ln] from print_ln print_ln::@1
|
||||
@ -2482,8 +2251,8 @@ print_ln::@2: scope:[print_ln] from print_ln::@1
|
||||
print_ln::@return: scope:[print_ln] from print_ln::@2
|
||||
return
|
||||
to:@return
|
||||
@20: scope:[] from @19
|
||||
to:@21
|
||||
@19: scope:[] from @18
|
||||
to:@20
|
||||
print_sword: scope:[print_sword] from
|
||||
(boolean~) print_sword::$0 ← (signed word) print_sword::w < (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
(boolean~) print_sword::$1 ← ! (boolean~) print_sword::$0
|
||||
@ -2501,8 +2270,8 @@ print_sword::@2: scope:[print_sword] from print_sword
|
||||
print_sword::@return: scope:[print_sword] from print_sword::@1
|
||||
return
|
||||
to:@return
|
||||
@21: scope:[] from @20
|
||||
to:@22
|
||||
@20: scope:[] from @19
|
||||
to:@21
|
||||
print_sbyte: scope:[print_sbyte] from
|
||||
(boolean~) print_sbyte::$0 ← (signed byte) print_sbyte::b < (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
(boolean~) print_sbyte::$1 ← ! (boolean~) print_sbyte::$0
|
||||
@ -2520,8 +2289,8 @@ print_sbyte::@2: scope:[print_sbyte] from print_sbyte
|
||||
print_sbyte::@return: scope:[print_sbyte] from print_sbyte::@1
|
||||
return
|
||||
to:@return
|
||||
@22: scope:[] from @21
|
||||
to:@23
|
||||
@21: scope:[] from @20
|
||||
to:@22
|
||||
print_word: scope:[print_word] from
|
||||
(byte~) print_word::$0 ← > (word) print_word::w
|
||||
(void~) print_word::$1 ← call print_byte (byte~) print_word::$0
|
||||
@ -2531,8 +2300,8 @@ print_word: scope:[print_word] from
|
||||
print_word::@return: scope:[print_word] from print_word
|
||||
return
|
||||
to:@return
|
||||
@23: scope:[] from @22
|
||||
to:@24
|
||||
@22: scope:[] from @21
|
||||
to:@23
|
||||
print_dword: scope:[print_dword] from
|
||||
(word~) print_dword::$0 ← > (dword) print_dword::dw
|
||||
(void~) print_dword::$1 ← call print_word (word~) print_dword::$0
|
||||
@ -2542,8 +2311,8 @@ print_dword: scope:[print_dword] from
|
||||
print_dword::@return: scope:[print_dword] from print_dword
|
||||
return
|
||||
to:@return
|
||||
@24: scope:[] from @23
|
||||
to:@25
|
||||
@23: scope:[] from @22
|
||||
to:@24
|
||||
print_sdword: scope:[print_sdword] from
|
||||
(boolean~) print_sdword::$0 ← (signed dword) print_sdword::dw < (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
(boolean~) print_sdword::$1 ← ! (boolean~) print_sdword::$0
|
||||
@ -2561,8 +2330,8 @@ print_sdword::@2: scope:[print_sdword] from print_sdword
|
||||
print_sdword::@return: scope:[print_sdword] from print_sdword::@1
|
||||
return
|
||||
to:@return
|
||||
@25: scope:[] from @24
|
||||
to:@26
|
||||
@24: scope:[] from @23
|
||||
to:@25
|
||||
print_byte: scope:[print_byte] from
|
||||
(byte[]) print_byte::hextab ← (string) "0123456789abcdef"
|
||||
(byte~) print_byte::$0 ← (byte) print_byte::b >> (byte/signed byte/word/signed word/dword/signed dword) 4
|
||||
@ -2573,8 +2342,8 @@ print_byte: scope:[print_byte] from
|
||||
print_byte::@return: scope:[print_byte] from print_byte
|
||||
return
|
||||
to:@return
|
||||
@26: scope:[] from @25
|
||||
to:@27
|
||||
@25: scope:[] from @24
|
||||
to:@26
|
||||
print_char: scope:[print_char] from
|
||||
*((byte*) char_cursor) ← (byte) print_char::ch
|
||||
(byte*) char_cursor ← ++ (byte*) char_cursor
|
||||
@ -2582,8 +2351,8 @@ print_char: scope:[print_char] from
|
||||
print_char::@return: scope:[print_char] from print_char
|
||||
return
|
||||
to:@return
|
||||
@27: scope:[] from @26
|
||||
to:@28
|
||||
@26: scope:[] from @25
|
||||
to:@27
|
||||
print_cls: scope:[print_cls] from
|
||||
(byte*) print_cls::sc ← (byte*) SCREEN
|
||||
to:print_cls::@1
|
||||
@ -2601,8 +2370,8 @@ print_cls::@2: scope:[print_cls] from print_cls::@1
|
||||
print_cls::@return: scope:[print_cls] from print_cls::@2
|
||||
return
|
||||
to:@return
|
||||
@28: scope:[] from @27
|
||||
to:@29
|
||||
@27: scope:[] from @26
|
||||
to:@28
|
||||
main: scope:[main] from
|
||||
(word) main::wavelength ← (byte/signed byte/word/signed word/dword/signed dword) 120
|
||||
(signed word[120]) main::sintab1 ← { fill( 120, 0) }
|
||||
@ -2634,17 +2403,16 @@ main::@4: scope:[main] from main::@2
|
||||
main::@return: scope:[main] from main::@4
|
||||
return
|
||||
to:@return
|
||||
@29: scope:[] from @28
|
||||
@28: scope:[] from @27
|
||||
call main
|
||||
to:@end
|
||||
@end: scope:[] from @29
|
||||
@end: scope:[] from @28
|
||||
|
||||
Removing unused procedure div8s
|
||||
Removing unused procedure div16s
|
||||
Removing unused procedure mul8s
|
||||
Removing unused procedure mul16s
|
||||
Removing unused procedure sin8s_gen
|
||||
Removing unused procedure sin16ss_gen
|
||||
Removing unused procedure print_ln
|
||||
Removing unused procedure print_sbyte
|
||||
Removing unused procedure print_sdword
|
||||
@ -2696,13 +2464,13 @@ Removing empty block @13
|
||||
Removing empty block sin16s::@7
|
||||
Removing empty block @14
|
||||
Removing empty block @15
|
||||
Removing empty block @16
|
||||
Removing empty block mulu16_sel::@1
|
||||
Removing empty block @17
|
||||
Removing empty block @16
|
||||
Removing empty block print_str::@4
|
||||
Removing empty block print_str::@3
|
||||
Removing empty block print_str::@5
|
||||
Removing empty block print_str::@6
|
||||
Removing empty block @18
|
||||
Removing empty block @19
|
||||
Removing empty block @20
|
||||
Removing empty block @21
|
||||
@ -2712,7 +2480,6 @@ Removing empty block @24
|
||||
Removing empty block @25
|
||||
Removing empty block @26
|
||||
Removing empty block @27
|
||||
Removing empty block @28
|
||||
Removing empty block main::@4
|
||||
PROCEDURE MODIFY VARIABLE ANALYSIS
|
||||
divr16u modifies rem16u
|
||||
@ -2915,7 +2682,7 @@ mul16u::@return: scope:[mul16u] from mul16u::@3
|
||||
(dword) PI2_u4f28#0 ← (dword/signed dword) 1686629713
|
||||
(dword) PI_u4f28#0 ← (dword/signed dword) 843314857
|
||||
(dword) PI_HALF_u4f28#0 ← (dword/signed dword) 421657428
|
||||
to:@18
|
||||
to:@17
|
||||
sin16s_gen: scope:[sin16s_gen] from main
|
||||
(signed word*) sin16s_gen::sintab#5 ← phi( main/(signed word*) sin16s_gen::sintab#1 )
|
||||
(word) rem16u#21 ← phi( main/(word) rem16u#23 )
|
||||
@ -3114,12 +2881,12 @@ mulu16_sel::@return: scope:[mulu16_sel] from mulu16_sel::@2
|
||||
(word) mulu16_sel::return#6 ← (word) mulu16_sel::return#12
|
||||
return
|
||||
to:@return
|
||||
@18: scope:[] from @11
|
||||
@17: scope:[] from @11
|
||||
(word) rem16u#28 ← phi( @11/(word) rem16u#29 )
|
||||
(byte*) SCREEN#0 ← ((byte*)) (word/signed word/dword/signed dword) 1024
|
||||
(byte*) line_cursor#0 ← (byte*) SCREEN#0
|
||||
(byte*) char_cursor#0 ← (byte*) line_cursor#0
|
||||
to:@29
|
||||
to:@28
|
||||
print_str: scope:[print_str] from main::@3 main::@7
|
||||
(byte*) char_cursor#51 ← phi( main::@3/(byte*) char_cursor#49 main::@7/(byte*) char_cursor#17 )
|
||||
(byte*) print_str::str#5 ← phi( main::@3/(byte*) print_str::str#2 main::@7/(byte*) print_str::str#1 )
|
||||
@ -3260,10 +3027,10 @@ print_cls::@return: scope:[print_cls] from print_cls::@2
|
||||
(byte*) char_cursor#15 ← (byte*) char_cursor#35
|
||||
return
|
||||
to:@return
|
||||
main: scope:[main] from @29
|
||||
(byte*) char_cursor#53 ← phi( @29/(byte*) char_cursor#50 )
|
||||
(byte*) line_cursor#13 ← phi( @29/(byte*) line_cursor#12 )
|
||||
(word) rem16u#23 ← phi( @29/(word) rem16u#25 )
|
||||
main: scope:[main] from @28
|
||||
(byte*) char_cursor#53 ← phi( @28/(byte*) char_cursor#50 )
|
||||
(byte*) line_cursor#13 ← phi( @28/(byte*) line_cursor#12 )
|
||||
(word) rem16u#23 ← phi( @28/(word) rem16u#25 )
|
||||
(word) main::wavelength#0 ← (byte/signed byte/word/signed word/dword/signed dword) 120
|
||||
(signed word[120]) main::sintab1#0 ← { fill( 120, 0) }
|
||||
(signed word*) sin16s_gen::sintab#1 ← (signed word[120]) main::sintab1#0
|
||||
@ -3360,28 +3127,28 @@ main::@return: scope:[main] from main::@8
|
||||
(byte*) char_cursor#20 ← (byte*) char_cursor#40
|
||||
return
|
||||
to:@return
|
||||
@29: scope:[] from @18
|
||||
(byte*) char_cursor#50 ← phi( @18/(byte*) char_cursor#0 )
|
||||
(byte*) line_cursor#12 ← phi( @18/(byte*) line_cursor#0 )
|
||||
(word) rem16u#25 ← phi( @18/(word) rem16u#28 )
|
||||
@28: scope:[] from @17
|
||||
(byte*) char_cursor#50 ← phi( @17/(byte*) char_cursor#0 )
|
||||
(byte*) line_cursor#12 ← phi( @17/(byte*) line_cursor#0 )
|
||||
(word) rem16u#25 ← phi( @17/(word) rem16u#28 )
|
||||
call main param-assignment
|
||||
to:@30
|
||||
@30: scope:[] from @29
|
||||
(byte*) char_cursor#41 ← phi( @29/(byte*) char_cursor#20 )
|
||||
(byte*) line_cursor#9 ← phi( @29/(byte*) line_cursor#4 )
|
||||
(word) rem16u#19 ← phi( @29/(word) rem16u#9 )
|
||||
to:@29
|
||||
@29: scope:[] from @28
|
||||
(byte*) char_cursor#41 ← phi( @28/(byte*) char_cursor#20 )
|
||||
(byte*) line_cursor#9 ← phi( @28/(byte*) line_cursor#4 )
|
||||
(word) rem16u#19 ← phi( @28/(word) rem16u#9 )
|
||||
(word) rem16u#10 ← (word) rem16u#19
|
||||
(byte*) line_cursor#5 ← (byte*) line_cursor#9
|
||||
(byte*) char_cursor#21 ← (byte*) char_cursor#41
|
||||
to:@end
|
||||
@end: scope:[] from @30
|
||||
@end: scope:[] from @29
|
||||
|
||||
SYMBOL TABLE SSA
|
||||
(label) @11
|
||||
(label) @18
|
||||
(label) @17
|
||||
(label) @2
|
||||
(label) @28
|
||||
(label) @29
|
||||
(label) @30
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(dword) PI2_u4f28
|
||||
@ -4469,14 +4236,14 @@ Succesful SSA optimization Pass2NopCastElimination
|
||||
Culled Empty Block (label) @2
|
||||
Culled Empty Block (label) mul16u::@3
|
||||
Culled Empty Block (label) @11
|
||||
Culled Empty Block (label) @18
|
||||
Culled Empty Block (label) @17
|
||||
Culled Empty Block (label) print_sword::@3
|
||||
Culled Empty Block (label) print_word::@2
|
||||
Culled Empty Block (label) print_byte::@2
|
||||
Culled Empty Block (label) print_cls::@2
|
||||
Culled Empty Block (label) main::@6
|
||||
Culled Empty Block (label) main::@9
|
||||
Culled Empty Block (label) @30
|
||||
Culled Empty Block (label) @29
|
||||
Succesful SSA optimization Pass2CullEmptyBlocks
|
||||
Not aliassing across scopes: rem16u#1 divr16u::rem#11
|
||||
Not aliassing across scopes: divr16u::return#2 divr16u::return#0
|
||||
@ -4722,7 +4489,7 @@ Constant inlined print_byte::$4 = (const string) print_byte::hextab#0
|
||||
Constant inlined main::$9 = (const signed word[120]) main::sintab1#0+(const word) main::wavelength#0*(byte/signed byte/word/signed word/dword/signed dword) 2
|
||||
Constant inlined main::$8 = (const word) main::wavelength#0*(byte/signed byte/word/signed word/dword/signed dword) 2
|
||||
Succesful SSA optimization Pass2ConstantInlining
|
||||
Block Sequence Planned @begin @29 @end main main::@5 main::@1 main::@3 main::@2 main::@7 main::@8 main::@return print_str print_str::@1 print_str::@return print_str::@2 print_sword print_sword::@2 print_sword::@4 print_sword::@1 print_sword::@return print_word print_word::@1 print_word::@return print_byte print_byte::@1 print_byte::@return print_char print_char::@return print_cls print_cls::@1 print_cls::@return sin16s_gen sin16s_gen::@3 sin16s_gen::@1 sin16s_gen::@4 sin16s_gen::@return sin16s sin16s::@4 sin16s::@1 sin16s::@5 sin16s::@2 sin16s::@8 sin16s::@9 sin16s::@10 sin16s::@11 sin16s::@12 sin16s::@6 sin16s::@3 sin16s::@return mulu16_sel mulu16_sel::@2 mulu16_sel::@return mul16u mul16u::@1 mul16u::@return mul16u::@2 mul16u::@7 mul16u::@4 div32u16u div32u16u::@2 div32u16u::@3 div32u16u::@return divr16u divr16u::@1 divr16u::@4 divr16u::@2 divr16u::@5 divr16u::@3 divr16u::@6 divr16u::@return
|
||||
Block Sequence Planned @begin @28 @end main main::@5 main::@1 main::@3 main::@2 main::@7 main::@8 main::@return print_str print_str::@1 print_str::@return print_str::@2 print_sword print_sword::@2 print_sword::@4 print_sword::@1 print_sword::@return print_word print_word::@1 print_word::@return print_byte print_byte::@1 print_byte::@return print_char print_char::@return print_cls print_cls::@1 print_cls::@return sin16s_gen sin16s_gen::@3 sin16s_gen::@1 sin16s_gen::@4 sin16s_gen::@return sin16s sin16s::@4 sin16s::@1 sin16s::@5 sin16s::@2 sin16s::@8 sin16s::@9 sin16s::@10 sin16s::@11 sin16s::@12 sin16s::@6 sin16s::@3 sin16s::@return mulu16_sel mulu16_sel::@2 mulu16_sel::@return mul16u mul16u::@1 mul16u::@return mul16u::@2 mul16u::@7 mul16u::@4 div32u16u div32u16u::@2 div32u16u::@3 div32u16u::@return divr16u divr16u::@1 divr16u::@4 divr16u::@2 divr16u::@5 divr16u::@3 divr16u::@6 divr16u::@return
|
||||
Added new block during phi lifting main::@10(between main::@8 and main::@1)
|
||||
Added new block during phi lifting main::@11(between main::@1 and main::@2)
|
||||
Added new block during phi lifting print_sword::@5(between print_sword and print_sword::@1)
|
||||
@ -4736,9 +4503,9 @@ Added new block during phi lifting mul16u::@10(between mul16u::@2 and mul16u::@4
|
||||
Added new block during phi lifting divr16u::@8(between divr16u::@3 and divr16u::@1)
|
||||
Added new block during phi lifting divr16u::@9(between divr16u::@1 and divr16u::@2)
|
||||
Added new block during phi lifting divr16u::@10(between divr16u::@2 and divr16u::@3)
|
||||
Block Sequence Planned @begin @29 @end main main::@5 main::@1 main::@3 main::@2 main::@7 main::@8 main::@return main::@10 main::@11 print_str print_str::@1 print_str::@return print_str::@2 print_sword print_sword::@2 print_sword::@4 print_sword::@1 print_sword::@return print_sword::@5 print_word print_word::@1 print_word::@return print_byte print_byte::@1 print_byte::@return print_char print_char::@return print_cls print_cls::@1 print_cls::@return print_cls::@3 sin16s_gen sin16s_gen::@3 sin16s_gen::@1 sin16s_gen::@4 sin16s_gen::@return sin16s_gen::@5 sin16s sin16s::@4 sin16s::@1 sin16s::@5 sin16s::@2 sin16s::@8 sin16s::@9 sin16s::@10 sin16s::@11 sin16s::@12 sin16s::@6 sin16s::@3 sin16s::@return sin16s::@15 sin16s::@14 sin16s::@13 mulu16_sel mulu16_sel::@2 mulu16_sel::@return mul16u mul16u::@1 mul16u::@return mul16u::@2 mul16u::@7 mul16u::@4 mul16u::@10 div32u16u div32u16u::@2 div32u16u::@3 div32u16u::@return divr16u divr16u::@1 divr16u::@4 divr16u::@2 divr16u::@5 divr16u::@3 divr16u::@6 divr16u::@return divr16u::@8 divr16u::@10 divr16u::@9
|
||||
Block Sequence Planned @begin @28 @end main main::@5 main::@1 main::@3 main::@2 main::@7 main::@8 main::@return main::@10 main::@11 print_str print_str::@1 print_str::@return print_str::@2 print_sword print_sword::@2 print_sword::@4 print_sword::@1 print_sword::@return print_sword::@5 print_word print_word::@1 print_word::@return print_byte print_byte::@1 print_byte::@return print_char print_char::@return print_cls print_cls::@1 print_cls::@return print_cls::@3 sin16s_gen sin16s_gen::@3 sin16s_gen::@1 sin16s_gen::@4 sin16s_gen::@return sin16s_gen::@5 sin16s sin16s::@4 sin16s::@1 sin16s::@5 sin16s::@2 sin16s::@8 sin16s::@9 sin16s::@10 sin16s::@11 sin16s::@12 sin16s::@6 sin16s::@3 sin16s::@return sin16s::@15 sin16s::@14 sin16s::@13 mulu16_sel mulu16_sel::@2 mulu16_sel::@return mul16u mul16u::@1 mul16u::@return mul16u::@2 mul16u::@7 mul16u::@4 mul16u::@10 div32u16u div32u16u::@2 div32u16u::@3 div32u16u::@return divr16u divr16u::@1 divr16u::@4 divr16u::@2 divr16u::@5 divr16u::@3 divr16u::@6 divr16u::@return divr16u::@8 divr16u::@10 divr16u::@9
|
||||
Adding NOP phi() at start of @begin
|
||||
Adding NOP phi() at start of @29
|
||||
Adding NOP phi() at start of @28
|
||||
Adding NOP phi() at start of @end
|
||||
Adding NOP phi() at start of main
|
||||
Adding NOP phi() at start of main::@5
|
||||
@ -4872,9 +4639,9 @@ Culled Empty Block (label) mul16u::@10
|
||||
Culled Empty Block (label) divr16u::@8
|
||||
Culled Empty Block (label) divr16u::@10
|
||||
Culled Empty Block (label) divr16u::@9
|
||||
Block Sequence Planned @begin @29 @end main main::@5 main::@1 main::@3 main::@2 main::@7 main::@8 main::@return print_str print_str::@1 print_str::@return print_str::@2 print_sword print_sword::@2 print_sword::@4 print_sword::@1 print_sword::@return print_word print_word::@1 print_word::@return print_byte print_byte::@1 print_byte::@return print_char print_char::@return print_cls print_cls::@1 print_cls::@return sin16s_gen sin16s_gen::@3 sin16s_gen::@1 sin16s_gen::@4 sin16s_gen::@return sin16s sin16s::@4 sin16s::@1 sin16s::@5 sin16s::@2 sin16s::@8 sin16s::@9 sin16s::@10 sin16s::@11 sin16s::@12 sin16s::@6 sin16s::@3 sin16s::@return sin16s::@15 mulu16_sel mulu16_sel::@2 mulu16_sel::@return mul16u mul16u::@1 mul16u::@return mul16u::@2 mul16u::@7 mul16u::@4 div32u16u div32u16u::@2 div32u16u::@3 div32u16u::@return divr16u divr16u::@1 divr16u::@4 divr16u::@2 divr16u::@5 divr16u::@3 divr16u::@6 divr16u::@return
|
||||
Block Sequence Planned @begin @28 @end main main::@5 main::@1 main::@3 main::@2 main::@7 main::@8 main::@return print_str print_str::@1 print_str::@return print_str::@2 print_sword print_sword::@2 print_sword::@4 print_sword::@1 print_sword::@return print_word print_word::@1 print_word::@return print_byte print_byte::@1 print_byte::@return print_char print_char::@return print_cls print_cls::@1 print_cls::@return sin16s_gen sin16s_gen::@3 sin16s_gen::@1 sin16s_gen::@4 sin16s_gen::@return sin16s sin16s::@4 sin16s::@1 sin16s::@5 sin16s::@2 sin16s::@8 sin16s::@9 sin16s::@10 sin16s::@11 sin16s::@12 sin16s::@6 sin16s::@3 sin16s::@return sin16s::@15 mulu16_sel mulu16_sel::@2 mulu16_sel::@return mul16u mul16u::@1 mul16u::@return mul16u::@2 mul16u::@7 mul16u::@4 div32u16u div32u16u::@2 div32u16u::@3 div32u16u::@return divr16u divr16u::@1 divr16u::@4 divr16u::@2 divr16u::@5 divr16u::@3 divr16u::@6 divr16u::@return
|
||||
Adding NOP phi() at start of @begin
|
||||
Adding NOP phi() at start of @29
|
||||
Adding NOP phi() at start of @28
|
||||
Adding NOP phi() at start of @end
|
||||
Adding NOP phi() at start of main
|
||||
Adding NOP phi() at start of main::@5
|
||||
@ -4921,14 +4688,14 @@ Propagating live ranges...
|
||||
FINAL CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
[0] phi() [ ] ( )
|
||||
to:@29
|
||||
@29: scope:[] from @begin
|
||||
to:@28
|
||||
@28: scope:[] from @begin
|
||||
[1] phi() [ ] ( )
|
||||
[2] call main param-assignment [ ] ( )
|
||||
to:@end
|
||||
@end: scope:[] from @29
|
||||
@end: scope:[] from @28
|
||||
[3] phi() [ ] ( )
|
||||
main: scope:[main] from @29
|
||||
main: scope:[main] from @28
|
||||
[4] phi() [ ] ( main:2 [ ] )
|
||||
[5] call sin16s_gen param-assignment [ ] ( main:2 [ ] )
|
||||
to:main::@5
|
||||
@ -5242,76 +5009,76 @@ divr16u::@return: scope:[divr16u] from divr16u::@6
|
||||
|
||||
DOMINATORS
|
||||
@begin dominated by @begin
|
||||
@29 dominated by @29 @begin
|
||||
@end dominated by @end @29 @begin
|
||||
main dominated by @29 main @begin
|
||||
main::@5 dominated by @29 main main::@5 @begin
|
||||
main::@1 dominated by @29 main main::@1 main::@5 @begin
|
||||
main::@3 dominated by @29 main main::@1 main::@5 main::@3 @begin
|
||||
main::@2 dominated by @29 main main::@1 main::@2 main::@5 @begin
|
||||
main::@7 dominated by main::@7 @29 main main::@1 main::@2 main::@5 @begin
|
||||
main::@8 dominated by main::@7 main::@8 @29 main main::@1 main::@2 main::@5 @begin
|
||||
main::@return dominated by main::@7 main::@8 @29 main main::@1 main::@2 main::@5 @begin main::@return
|
||||
print_str dominated by @29 main main::@1 main::@5 @begin print_str
|
||||
print_str::@1 dominated by @29 main main::@1 main::@5 @begin print_str::@1 print_str
|
||||
print_str::@return dominated by @29 main main::@1 main::@5 @begin print_str::@return print_str::@1 print_str
|
||||
print_str::@2 dominated by @29 main main::@1 main::@5 @begin print_str::@1 print_str::@2 print_str
|
||||
print_sword dominated by @29 main main::@1 main::@2 main::@5 @begin print_sword
|
||||
print_sword::@2 dominated by print_sword::@2 @29 main main::@1 main::@2 main::@5 @begin print_sword
|
||||
print_sword::@4 dominated by print_sword::@2 print_sword::@4 @29 main main::@1 main::@2 main::@5 @begin print_sword
|
||||
print_sword::@1 dominated by print_sword::@1 @29 main main::@1 main::@2 main::@5 @begin print_sword
|
||||
print_sword::@return dominated by print_sword::@1 @29 main main::@1 main::@2 main::@5 @begin print_sword::@return print_sword
|
||||
print_word dominated by print_sword::@1 @29 main print_word main::@1 main::@2 main::@5 @begin print_sword
|
||||
print_word::@1 dominated by print_sword::@1 @29 main print_word main::@1 main::@2 main::@5 @begin print_word::@1 print_sword
|
||||
print_word::@return dominated by print_sword::@1 @29 main print_word main::@1 main::@2 main::@5 @begin print_word::@return print_word::@1 print_sword
|
||||
print_byte dominated by print_sword::@1 @29 main print_word main::@1 main::@2 main::@5 @begin print_byte print_sword
|
||||
print_byte::@1 dominated by print_sword::@1 @29 main print_word main::@1 main::@2 main::@5 @begin print_byte::@1 print_byte print_sword
|
||||
print_byte::@return dominated by print_sword::@1 @29 main print_word main::@1 main::@2 main::@5 @begin print_byte::@return print_byte::@1 print_byte print_sword
|
||||
print_char dominated by @29 main print_char main::@1 main::@2 main::@5 @begin print_sword
|
||||
print_char::@return dominated by @29 main print_char main::@1 main::@2 main::@5 print_char::@return @begin print_sword
|
||||
print_cls dominated by @29 main main::@5 @begin print_cls
|
||||
print_cls::@1 dominated by @29 main main::@5 @begin print_cls::@1 print_cls
|
||||
print_cls::@return dominated by @29 main main::@5 @begin print_cls::@return print_cls::@1 print_cls
|
||||
sin16s_gen dominated by @29 main @begin sin16s_gen
|
||||
sin16s_gen::@3 dominated by @29 main @begin sin16s_gen sin16s_gen::@3
|
||||
sin16s_gen::@1 dominated by @29 main @begin sin16s_gen sin16s_gen::@3 sin16s_gen::@1
|
||||
sin16s_gen::@4 dominated by @29 main @begin sin16s_gen sin16s_gen::@3 sin16s_gen::@4 sin16s_gen::@1
|
||||
sin16s_gen::@return dominated by @29 main sin16s_gen::@return @begin sin16s_gen sin16s_gen::@3 sin16s_gen::@4 sin16s_gen::@1
|
||||
sin16s dominated by @29 main sin16s @begin sin16s_gen sin16s_gen::@3 sin16s_gen::@1
|
||||
sin16s::@4 dominated by @29 main sin16s @begin sin16s_gen sin16s_gen::@3 sin16s_gen::@1 sin16s::@4
|
||||
sin16s::@1 dominated by @29 main sin16s @begin sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1
|
||||
sin16s::@5 dominated by @29 main sin16s @begin sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 sin16s::@5
|
||||
sin16s::@2 dominated by @29 main sin16s @begin sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 sin16s::@2
|
||||
sin16s::@8 dominated by @29 main sin16s @begin sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 sin16s::@8 sin16s::@2
|
||||
sin16s::@9 dominated by @29 main sin16s @begin sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 sin16s::@9 sin16s::@8 sin16s::@2
|
||||
sin16s::@10 dominated by @29 main sin16s @begin sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 sin16s::@9 sin16s::@8 sin16s::@10 sin16s::@2
|
||||
sin16s::@11 dominated by @29 main sin16s @begin sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 sin16s::@9 sin16s::@8 sin16s::@11 sin16s::@10 sin16s::@2
|
||||
sin16s::@12 dominated by @29 main sin16s @begin sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 sin16s::@9 sin16s::@8 sin16s::@12 sin16s::@11 sin16s::@10 sin16s::@2
|
||||
sin16s::@6 dominated by @29 main sin16s @begin sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 sin16s::@9 sin16s::@8 sin16s::@6 sin16s::@12 sin16s::@11 sin16s::@10 sin16s::@2
|
||||
sin16s::@3 dominated by @29 main sin16s @begin sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 sin16s::@9 sin16s::@8 sin16s::@12 sin16s::@11 sin16s::@10 sin16s::@3 sin16s::@2
|
||||
sin16s::@return dominated by @29 main sin16s @begin sin16s::@return sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 sin16s::@9 sin16s::@8 sin16s::@12 sin16s::@11 sin16s::@10 sin16s::@3 sin16s::@2
|
||||
sin16s::@15 dominated by @29 main sin16s @begin sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 sin16s::@9 sin16s::@8 sin16s::@15 sin16s::@12 sin16s::@11 sin16s::@10 sin16s::@2
|
||||
mulu16_sel dominated by @29 main sin16s @begin sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 mulu16_sel sin16s::@2
|
||||
mulu16_sel::@2 dominated by @29 main sin16s @begin sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 mulu16_sel sin16s::@2 mulu16_sel::@2
|
||||
mulu16_sel::@return dominated by @29 main sin16s @begin sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 mulu16_sel sin16s::@2 mulu16_sel::@return mulu16_sel::@2
|
||||
mul16u dominated by @29 main mul16u sin16s @begin sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 mulu16_sel sin16s::@2
|
||||
mul16u::@1 dominated by @29 main mul16u mul16u::@1 sin16s @begin sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 mulu16_sel sin16s::@2
|
||||
mul16u::@return dominated by @29 main mul16u mul16u::@1 sin16s @begin sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 mulu16_sel sin16s::@2 mul16u::@return
|
||||
mul16u::@2 dominated by @29 main mul16u mul16u::@1 mul16u::@2 sin16s @begin sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 mulu16_sel sin16s::@2
|
||||
mul16u::@7 dominated by @29 main mul16u mul16u::@1 mul16u::@2 sin16s @begin mul16u::@7 sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 mulu16_sel sin16s::@2
|
||||
mul16u::@4 dominated by @29 main mul16u mul16u::@1 mul16u::@2 sin16s @begin mul16u::@4 sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 mulu16_sel sin16s::@2
|
||||
div32u16u dominated by @29 main @begin sin16s_gen div32u16u
|
||||
div32u16u::@2 dominated by @29 main div32u16u::@2 @begin sin16s_gen div32u16u
|
||||
div32u16u::@3 dominated by @29 main div32u16u::@2 div32u16u::@3 @begin sin16s_gen div32u16u
|
||||
div32u16u::@return dominated by @29 main div32u16u::@2 div32u16u::@3 @begin sin16s_gen div32u16u div32u16u::@return
|
||||
divr16u dominated by divr16u @29 main @begin sin16s_gen div32u16u
|
||||
divr16u::@1 dominated by divr16u @29 divr16u::@1 main @begin sin16s_gen div32u16u
|
||||
divr16u::@4 dominated by divr16u @29 divr16u::@1 main divr16u::@4 @begin sin16s_gen div32u16u
|
||||
divr16u::@2 dominated by divr16u @29 divr16u::@2 divr16u::@1 main @begin sin16s_gen div32u16u
|
||||
divr16u::@5 dominated by divr16u @29 divr16u::@2 divr16u::@1 main divr16u::@5 @begin sin16s_gen div32u16u
|
||||
divr16u::@3 dominated by divr16u @29 divr16u::@2 divr16u::@1 main divr16u::@3 @begin sin16s_gen div32u16u
|
||||
divr16u::@6 dominated by divr16u @29 divr16u::@2 divr16u::@1 main divr16u::@3 divr16u::@6 @begin sin16s_gen div32u16u
|
||||
divr16u::@return dominated by divr16u @29 divr16u::@2 divr16u::@1 main divr16u::@3 divr16u::@6 @begin sin16s_gen div32u16u divr16u::@return
|
||||
@28 dominated by @28 @begin
|
||||
@end dominated by @end @28 @begin
|
||||
main dominated by @28 main @begin
|
||||
main::@5 dominated by @28 main main::@5 @begin
|
||||
main::@1 dominated by @28 main main::@1 main::@5 @begin
|
||||
main::@3 dominated by @28 main main::@1 main::@5 main::@3 @begin
|
||||
main::@2 dominated by @28 main main::@1 main::@2 main::@5 @begin
|
||||
main::@7 dominated by main::@7 @28 main main::@1 main::@2 main::@5 @begin
|
||||
main::@8 dominated by main::@7 main::@8 @28 main main::@1 main::@2 main::@5 @begin
|
||||
main::@return dominated by main::@7 main::@8 @28 main main::@1 main::@2 main::@5 @begin main::@return
|
||||
print_str dominated by @28 main main::@1 main::@5 @begin print_str
|
||||
print_str::@1 dominated by @28 main main::@1 main::@5 @begin print_str::@1 print_str
|
||||
print_str::@return dominated by @28 main main::@1 main::@5 @begin print_str::@return print_str::@1 print_str
|
||||
print_str::@2 dominated by @28 main main::@1 main::@5 @begin print_str::@1 print_str::@2 print_str
|
||||
print_sword dominated by @28 main main::@1 main::@2 main::@5 @begin print_sword
|
||||
print_sword::@2 dominated by print_sword::@2 @28 main main::@1 main::@2 main::@5 @begin print_sword
|
||||
print_sword::@4 dominated by print_sword::@2 @28 print_sword::@4 main main::@1 main::@2 main::@5 @begin print_sword
|
||||
print_sword::@1 dominated by print_sword::@1 @28 main main::@1 main::@2 main::@5 @begin print_sword
|
||||
print_sword::@return dominated by print_sword::@1 @28 main main::@1 main::@2 main::@5 @begin print_sword::@return print_sword
|
||||
print_word dominated by print_sword::@1 @28 main print_word main::@1 main::@2 main::@5 @begin print_sword
|
||||
print_word::@1 dominated by print_sword::@1 @28 main print_word main::@1 main::@2 main::@5 @begin print_word::@1 print_sword
|
||||
print_word::@return dominated by print_sword::@1 @28 main print_word main::@1 main::@2 main::@5 @begin print_word::@return print_word::@1 print_sword
|
||||
print_byte dominated by print_sword::@1 @28 main print_word main::@1 main::@2 main::@5 @begin print_byte print_sword
|
||||
print_byte::@1 dominated by print_sword::@1 @28 main print_word main::@1 main::@2 main::@5 @begin print_byte::@1 print_byte print_sword
|
||||
print_byte::@return dominated by print_sword::@1 @28 main print_word main::@1 main::@2 main::@5 @begin print_byte::@return print_byte::@1 print_byte print_sword
|
||||
print_char dominated by @28 main print_char main::@1 main::@2 main::@5 @begin print_sword
|
||||
print_char::@return dominated by @28 main print_char main::@1 main::@2 main::@5 print_char::@return @begin print_sword
|
||||
print_cls dominated by @28 main main::@5 @begin print_cls
|
||||
print_cls::@1 dominated by @28 main main::@5 @begin print_cls::@1 print_cls
|
||||
print_cls::@return dominated by @28 main main::@5 @begin print_cls::@return print_cls::@1 print_cls
|
||||
sin16s_gen dominated by @28 main @begin sin16s_gen
|
||||
sin16s_gen::@3 dominated by @28 main @begin sin16s_gen sin16s_gen::@3
|
||||
sin16s_gen::@1 dominated by @28 main @begin sin16s_gen sin16s_gen::@3 sin16s_gen::@1
|
||||
sin16s_gen::@4 dominated by @28 main @begin sin16s_gen sin16s_gen::@3 sin16s_gen::@4 sin16s_gen::@1
|
||||
sin16s_gen::@return dominated by @28 main sin16s_gen::@return @begin sin16s_gen sin16s_gen::@3 sin16s_gen::@4 sin16s_gen::@1
|
||||
sin16s dominated by @28 main sin16s @begin sin16s_gen sin16s_gen::@3 sin16s_gen::@1
|
||||
sin16s::@4 dominated by @28 main sin16s @begin sin16s_gen sin16s_gen::@3 sin16s_gen::@1 sin16s::@4
|
||||
sin16s::@1 dominated by @28 main sin16s @begin sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1
|
||||
sin16s::@5 dominated by @28 main sin16s @begin sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 sin16s::@5
|
||||
sin16s::@2 dominated by @28 main sin16s @begin sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 sin16s::@2
|
||||
sin16s::@8 dominated by @28 main sin16s @begin sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 sin16s::@8 sin16s::@2
|
||||
sin16s::@9 dominated by @28 main sin16s @begin sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 sin16s::@9 sin16s::@8 sin16s::@2
|
||||
sin16s::@10 dominated by @28 main sin16s @begin sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 sin16s::@9 sin16s::@8 sin16s::@10 sin16s::@2
|
||||
sin16s::@11 dominated by @28 main sin16s @begin sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 sin16s::@9 sin16s::@8 sin16s::@11 sin16s::@10 sin16s::@2
|
||||
sin16s::@12 dominated by @28 main sin16s @begin sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 sin16s::@9 sin16s::@8 sin16s::@12 sin16s::@11 sin16s::@10 sin16s::@2
|
||||
sin16s::@6 dominated by @28 main sin16s @begin sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 sin16s::@9 sin16s::@8 sin16s::@6 sin16s::@12 sin16s::@11 sin16s::@10 sin16s::@2
|
||||
sin16s::@3 dominated by @28 main sin16s @begin sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 sin16s::@9 sin16s::@8 sin16s::@12 sin16s::@11 sin16s::@10 sin16s::@3 sin16s::@2
|
||||
sin16s::@return dominated by @28 main sin16s @begin sin16s::@return sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 sin16s::@9 sin16s::@8 sin16s::@12 sin16s::@11 sin16s::@10 sin16s::@3 sin16s::@2
|
||||
sin16s::@15 dominated by @28 main sin16s @begin sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 sin16s::@9 sin16s::@8 sin16s::@15 sin16s::@12 sin16s::@11 sin16s::@10 sin16s::@2
|
||||
mulu16_sel dominated by @28 main sin16s @begin sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 mulu16_sel sin16s::@2
|
||||
mulu16_sel::@2 dominated by @28 main sin16s @begin sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 mulu16_sel sin16s::@2 mulu16_sel::@2
|
||||
mulu16_sel::@return dominated by @28 main sin16s @begin sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 mulu16_sel sin16s::@2 mulu16_sel::@return mulu16_sel::@2
|
||||
mul16u dominated by @28 main mul16u sin16s @begin sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 mulu16_sel sin16s::@2
|
||||
mul16u::@1 dominated by @28 main mul16u mul16u::@1 sin16s @begin sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 mulu16_sel sin16s::@2
|
||||
mul16u::@return dominated by @28 main mul16u mul16u::@1 sin16s @begin sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 mulu16_sel sin16s::@2 mul16u::@return
|
||||
mul16u::@2 dominated by @28 main mul16u mul16u::@1 mul16u::@2 sin16s @begin sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 mulu16_sel sin16s::@2
|
||||
mul16u::@7 dominated by @28 main mul16u mul16u::@1 mul16u::@2 sin16s @begin mul16u::@7 sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 mulu16_sel sin16s::@2
|
||||
mul16u::@4 dominated by @28 main mul16u mul16u::@1 mul16u::@2 sin16s @begin mul16u::@4 sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 mulu16_sel sin16s::@2
|
||||
div32u16u dominated by @28 main @begin sin16s_gen div32u16u
|
||||
div32u16u::@2 dominated by @28 main div32u16u::@2 @begin sin16s_gen div32u16u
|
||||
div32u16u::@3 dominated by @28 main div32u16u::@2 div32u16u::@3 @begin sin16s_gen div32u16u
|
||||
div32u16u::@return dominated by @28 main div32u16u::@2 div32u16u::@3 @begin sin16s_gen div32u16u div32u16u::@return
|
||||
divr16u dominated by divr16u @28 main @begin sin16s_gen div32u16u
|
||||
divr16u::@1 dominated by divr16u @28 divr16u::@1 main @begin sin16s_gen div32u16u
|
||||
divr16u::@4 dominated by divr16u @28 divr16u::@1 main divr16u::@4 @begin sin16s_gen div32u16u
|
||||
divr16u::@2 dominated by divr16u @28 divr16u::@2 divr16u::@1 main @begin sin16s_gen div32u16u
|
||||
divr16u::@5 dominated by divr16u @28 divr16u::@2 divr16u::@1 main divr16u::@5 @begin sin16s_gen div32u16u
|
||||
divr16u::@3 dominated by divr16u @28 divr16u::@2 divr16u::@1 main divr16u::@3 @begin sin16s_gen div32u16u
|
||||
divr16u::@6 dominated by divr16u @28 divr16u::@2 divr16u::@1 main divr16u::@3 divr16u::@6 @begin sin16s_gen div32u16u
|
||||
divr16u::@return dominated by divr16u @28 divr16u::@2 divr16u::@1 main divr16u::@3 divr16u::@6 @begin sin16s_gen div32u16u divr16u::@return
|
||||
|
||||
NATURAL LOOPS
|
||||
Found back edge: Loop head: main::@1 tails: main::@8 blocks: null
|
||||
@ -5745,17 +5512,17 @@ INITIAL ASM
|
||||
.label char_cursor = $a
|
||||
//SEG2 @begin
|
||||
bbegin:
|
||||
//SEG3 [1] phi from @begin to @29 [phi:@begin->@29]
|
||||
b29_from_bbegin:
|
||||
jmp b29
|
||||
//SEG4 @29
|
||||
b29:
|
||||
//SEG3 [1] phi from @begin to @28 [phi:@begin->@28]
|
||||
b28_from_bbegin:
|
||||
jmp b28
|
||||
//SEG4 @28
|
||||
b28:
|
||||
//SEG5 [2] call main param-assignment [ ] ( )
|
||||
//SEG6 [4] phi from @29 to main [phi:@29->main]
|
||||
main_from_b29:
|
||||
//SEG6 [4] phi from @28 to main [phi:@28->main]
|
||||
main_from_b28:
|
||||
jsr main
|
||||
//SEG7 [3] phi from @29 to @end [phi:@29->@end]
|
||||
bend_from_b29:
|
||||
//SEG7 [3] phi from @28 to @end [phi:@28->@end]
|
||||
bend_from_b28:
|
||||
jmp bend
|
||||
//SEG8 @end
|
||||
bend:
|
||||
@ -7275,17 +7042,17 @@ ASSEMBLER BEFORE OPTIMIZATION
|
||||
.label char_cursor = 8
|
||||
//SEG2 @begin
|
||||
bbegin:
|
||||
//SEG3 [1] phi from @begin to @29 [phi:@begin->@29]
|
||||
b29_from_bbegin:
|
||||
jmp b29
|
||||
//SEG4 @29
|
||||
b29:
|
||||
//SEG3 [1] phi from @begin to @28 [phi:@begin->@28]
|
||||
b28_from_bbegin:
|
||||
jmp b28
|
||||
//SEG4 @28
|
||||
b28:
|
||||
//SEG5 [2] call main param-assignment [ ] ( )
|
||||
//SEG6 [4] phi from @29 to main [phi:@29->main]
|
||||
main_from_b29:
|
||||
//SEG6 [4] phi from @28 to main [phi:@28->main]
|
||||
main_from_b28:
|
||||
jsr main
|
||||
//SEG7 [3] phi from @29 to @end [phi:@29->@end]
|
||||
bend_from_b29:
|
||||
//SEG7 [3] phi from @28 to @end [phi:@28->@end]
|
||||
bend_from_b28:
|
||||
jmp bend
|
||||
//SEG8 @end
|
||||
bend:
|
||||
@ -8344,7 +8111,7 @@ divr16u: {
|
||||
}
|
||||
|
||||
ASSEMBLER OPTIMIZATIONS
|
||||
Removing instruction jmp b29
|
||||
Removing instruction jmp b28
|
||||
Removing instruction jmp bend
|
||||
Removing instruction jmp b5
|
||||
Removing instruction jmp b1
|
||||
@ -8429,9 +8196,9 @@ Replacing label b3_from_b2 with b3
|
||||
Replacing label b3_from_b2 with b3
|
||||
Replacing label b1_from_b3 with b1
|
||||
Removing instruction bbegin:
|
||||
Removing instruction b29_from_bbegin:
|
||||
Removing instruction main_from_b29:
|
||||
Removing instruction bend_from_b29:
|
||||
Removing instruction b28_from_bbegin:
|
||||
Removing instruction main_from_b28:
|
||||
Removing instruction bend_from_b28:
|
||||
Removing instruction b5_from_main:
|
||||
Removing instruction print_cls_from_b5:
|
||||
Removing instruction b1_from_b8:
|
||||
@ -8462,7 +8229,7 @@ Removing instruction b2_from_b4:
|
||||
Removing instruction b3_from_b2:
|
||||
Removing instruction b3_from_b5:
|
||||
Succesful ASM optimization Pass5RedundantLabelElimination
|
||||
Removing instruction b29:
|
||||
Removing instruction b28:
|
||||
Removing instruction bend:
|
||||
Removing instruction sin16s_gen_from_main:
|
||||
Removing instruction b5:
|
||||
@ -8539,7 +8306,7 @@ Removing unreachable instruction jmp b3
|
||||
Succesful ASM optimization Pass5UnreachableCodeElimination
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
(label) @29
|
||||
(label) @28
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(dword) PI2_u4f28
|
||||
@ -8829,12 +8596,12 @@ Score: 20907
|
||||
.label rem16u = 4
|
||||
.label char_cursor = 8
|
||||
//SEG2 @begin
|
||||
//SEG3 [1] phi from @begin to @29 [phi:@begin->@29]
|
||||
//SEG4 @29
|
||||
//SEG3 [1] phi from @begin to @28 [phi:@begin->@28]
|
||||
//SEG4 @28
|
||||
//SEG5 [2] call main param-assignment [ ] ( )
|
||||
//SEG6 [4] phi from @29 to main [phi:@29->main]
|
||||
//SEG6 [4] phi from @28 to main [phi:@28->main]
|
||||
jsr main
|
||||
//SEG7 [3] phi from @29 to @end [phi:@29->@end]
|
||||
//SEG7 [3] phi from @28 to @end [phi:@28->@end]
|
||||
//SEG8 @end
|
||||
//SEG9 main
|
||||
main: {
|
||||
|
@ -1,4 +1,4 @@
|
||||
(label) @29
|
||||
(label) @28
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(dword) PI2_u4f28
|
||||
|
@ -1,13 +1,13 @@
|
||||
@begin: scope:[] from
|
||||
[0] phi() [ ] ( )
|
||||
to:@29
|
||||
@29: scope:[] from @begin
|
||||
to:@28
|
||||
@28: scope:[] from @begin
|
||||
[1] phi() [ ] ( )
|
||||
[2] call main param-assignment [ ] ( )
|
||||
to:@end
|
||||
@end: scope:[] from @29
|
||||
@end: scope:[] from @28
|
||||
[3] phi() [ ] ( )
|
||||
main: scope:[main] from @29
|
||||
main: scope:[main] from @28
|
||||
[4] phi() [ ] ( main:2 [ ] )
|
||||
[5] call sin8s_gen param-assignment [ ] ( main:2 [ ] )
|
||||
to:main::@5
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,4 +1,4 @@
|
||||
(label) @29
|
||||
(label) @28
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(word) PI2_u4f12
|
||||
|
@ -1,13 +1,13 @@
|
||||
@begin: scope:[] from
|
||||
[0] phi() [ ] ( )
|
||||
to:@29
|
||||
@29: scope:[] from @begin
|
||||
to:@28
|
||||
@28: scope:[] from @begin
|
||||
[1] phi() [ ] ( )
|
||||
[2] call main param-assignment [ ] ( )
|
||||
to:@end
|
||||
@end: scope:[] from @29
|
||||
@end: scope:[] from @28
|
||||
[3] phi() [ ] ( )
|
||||
main: scope:[main] from @29
|
||||
main: scope:[main] from @28
|
||||
[4] phi() [ ] ( main:2 [ ] )
|
||||
[5] call sin8s_gen param-assignment [ ] ( main:2 [ ] )
|
||||
to:main::@5
|
||||
|
@ -137,47 +137,6 @@ signed byte sin8s(word x) {
|
||||
return sinx;
|
||||
}
|
||||
|
||||
|
||||
// Generate (small) signed word sinus table - in the limited -$fff - $fff range
|
||||
// sintab - the table to generate into
|
||||
// wavelength - the number of sinus points in a total sinus wavelength (the size of the table)
|
||||
void sin16ss_gen(signed word* sintab, word wavelength) {
|
||||
// u[4.12] step = PI*2/wavelength
|
||||
dword step = div32u16u(PI2_u4f28, wavelength); // u[4.28]
|
||||
// Iterate over the table
|
||||
dword x = 0; // u[4.28]
|
||||
for( word i=0; i<wavelength; i++) {
|
||||
// Move x1 into the range 0-PI/2 using sinus mirror symmetries
|
||||
word x1 = >x; // u[4.12]
|
||||
byte isUpper = 0;
|
||||
if(x1 >= PI_u4f12 ) {
|
||||
x1 = x1 - PI_u4f12;
|
||||
isUpper = 1;
|
||||
}
|
||||
if(x1 >= PI_HALF_u4f12 ) {
|
||||
x1 = PI_u4f12 - x1;
|
||||
}
|
||||
// s[4.12] sinx = x - x^3/6 + x5/128;
|
||||
word x2 = mulu16_sel(x1, x1, 4); // u[4.12]
|
||||
word x3 = mulu16_sel(x2, x1, 4); // u[4.12]
|
||||
word x3_6 = mulu16_sel(x3, $10000/6, 0); // u[4.12] - u[0.16] div6 = 1/6;
|
||||
word usinx = x1 - x3_6; // u[4.12]
|
||||
word x4 = mulu16_sel(x3, x1, 4); // u[4.12]
|
||||
word x5 = mulu16_sel(x4, x1, 4); // u[4.12]
|
||||
word x5_128 = mulu16_sel(x5, $10000/128, 0); // u[4.12] - u[0.16] div128 = 1/128;
|
||||
usinx = usinx + x5_128;
|
||||
signed word sinx;
|
||||
if(isUpper!=0) {
|
||||
sinx = -(signed word)usinx; // s[4.12];
|
||||
} else {
|
||||
sinx = (signed word)usinx; // s[4.12]
|
||||
}
|
||||
*sintab = sinx;
|
||||
sintab = sintab + 2;
|
||||
x = x + step;
|
||||
}
|
||||
}
|
||||
|
||||
// Calculate val*val for two unsigned word values - the result is 16 selected bits of the 32-bit result.
|
||||
// The select parameter indicates how many of the highest bits of the 32-bit result to skip
|
||||
word mulu16_sel(word v1, word v2, byte select) {
|
||||
@ -405,7 +364,6 @@ Adding pre/post-modifier (word) sin16s_gen::i ← ++ (word) sin16s_gen::i
|
||||
Adding pre/post-modifier (signed byte*) sin8s_gen::sintab ← ++ (signed byte*) sin8s_gen::sintab
|
||||
Adding pre/post-modifier (word) sin8s_gen::i ← ++ (word) sin8s_gen::i
|
||||
Adding pre/post-modifier (byte) sin8s::usinx ← -- (byte) sin8s::usinx
|
||||
Adding pre/post-modifier (word) sin16ss_gen::i ← ++ (word) sin16ss_gen::i
|
||||
Importing print.kc
|
||||
PARSING src/test/java/dk/camelot64/kickc/test/kc/print.kc
|
||||
|
||||
@ -967,68 +925,6 @@ sin8s::@return:
|
||||
(signed byte) sin8s::return ← (signed byte) sin8s::return
|
||||
return (signed byte) sin8s::return
|
||||
endproc // sin8s()
|
||||
proc (void()) sin16ss_gen((signed word*) sin16ss_gen::sintab , (word) sin16ss_gen::wavelength)
|
||||
(dword~) sin16ss_gen::$0 ← call div32u16u (dword) PI2_u4f28 (word) sin16ss_gen::wavelength
|
||||
(dword) sin16ss_gen::step ← (dword~) sin16ss_gen::$0
|
||||
(dword) sin16ss_gen::x ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
(word) sin16ss_gen::i ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
sin16ss_gen::@1:
|
||||
(word~) sin16ss_gen::$1 ← > (dword) sin16ss_gen::x
|
||||
(word) sin16ss_gen::x1 ← (word~) sin16ss_gen::$1
|
||||
(byte) sin16ss_gen::isUpper ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
(boolean~) sin16ss_gen::$2 ← (word) sin16ss_gen::x1 >= (word) PI_u4f12
|
||||
(boolean~) sin16ss_gen::$3 ← ! (boolean~) sin16ss_gen::$2
|
||||
if((boolean~) sin16ss_gen::$3) goto sin16ss_gen::@2
|
||||
(word~) sin16ss_gen::$4 ← (word) sin16ss_gen::x1 - (word) PI_u4f12
|
||||
(word) sin16ss_gen::x1 ← (word~) sin16ss_gen::$4
|
||||
(byte) sin16ss_gen::isUpper ← (byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
sin16ss_gen::@2:
|
||||
(boolean~) sin16ss_gen::$5 ← (word) sin16ss_gen::x1 >= (word) PI_HALF_u4f12
|
||||
(boolean~) sin16ss_gen::$6 ← ! (boolean~) sin16ss_gen::$5
|
||||
if((boolean~) sin16ss_gen::$6) goto sin16ss_gen::@3
|
||||
(word~) sin16ss_gen::$7 ← (word) PI_u4f12 - (word) sin16ss_gen::x1
|
||||
(word) sin16ss_gen::x1 ← (word~) sin16ss_gen::$7
|
||||
sin16ss_gen::@3:
|
||||
(word~) sin16ss_gen::$8 ← call mulu16_sel (word) sin16ss_gen::x1 (word) sin16ss_gen::x1 (byte/signed byte/word/signed word/dword/signed dword) 4
|
||||
(word) sin16ss_gen::x2 ← (word~) sin16ss_gen::$8
|
||||
(word~) sin16ss_gen::$9 ← call mulu16_sel (word) sin16ss_gen::x2 (word) sin16ss_gen::x1 (byte/signed byte/word/signed word/dword/signed dword) 4
|
||||
(word) sin16ss_gen::x3 ← (word~) sin16ss_gen::$9
|
||||
(word/signed word/dword/signed dword~) sin16ss_gen::$10 ← (dword/signed dword) 65536 / (byte/signed byte/word/signed word/dword/signed dword) 6
|
||||
(word~) sin16ss_gen::$11 ← call mulu16_sel (word) sin16ss_gen::x3 (word/signed word/dword/signed dword~) sin16ss_gen::$10 (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
(word) sin16ss_gen::x3_6 ← (word~) sin16ss_gen::$11
|
||||
(word~) sin16ss_gen::$12 ← (word) sin16ss_gen::x1 - (word) sin16ss_gen::x3_6
|
||||
(word) sin16ss_gen::usinx ← (word~) sin16ss_gen::$12
|
||||
(word~) sin16ss_gen::$13 ← call mulu16_sel (word) sin16ss_gen::x3 (word) sin16ss_gen::x1 (byte/signed byte/word/signed word/dword/signed dword) 4
|
||||
(word) sin16ss_gen::x4 ← (word~) sin16ss_gen::$13
|
||||
(word~) sin16ss_gen::$14 ← call mulu16_sel (word) sin16ss_gen::x4 (word) sin16ss_gen::x1 (byte/signed byte/word/signed word/dword/signed dword) 4
|
||||
(word) sin16ss_gen::x5 ← (word~) sin16ss_gen::$14
|
||||
(word/signed word/dword/signed dword~) sin16ss_gen::$15 ← (dword/signed dword) 65536 / (byte/word/signed word/dword/signed dword) 128
|
||||
(word~) sin16ss_gen::$16 ← call mulu16_sel (word) sin16ss_gen::x5 (word/signed word/dword/signed dword~) sin16ss_gen::$15 (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
(word) sin16ss_gen::x5_128 ← (word~) sin16ss_gen::$16
|
||||
(word~) sin16ss_gen::$17 ← (word) sin16ss_gen::usinx + (word) sin16ss_gen::x5_128
|
||||
(word) sin16ss_gen::usinx ← (word~) sin16ss_gen::$17
|
||||
(boolean~) sin16ss_gen::$18 ← (byte) sin16ss_gen::isUpper != (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
(boolean~) sin16ss_gen::$19 ← ! (boolean~) sin16ss_gen::$18
|
||||
if((boolean~) sin16ss_gen::$19) goto sin16ss_gen::@4
|
||||
(signed word~) sin16ss_gen::$20 ← ((signed word)) (word) sin16ss_gen::usinx
|
||||
(signed word~) sin16ss_gen::$21 ← - (signed word~) sin16ss_gen::$20
|
||||
(signed word) sin16ss_gen::sinx ← (signed word~) sin16ss_gen::$21
|
||||
goto sin16ss_gen::@5
|
||||
sin16ss_gen::@4:
|
||||
(signed word~) sin16ss_gen::$22 ← ((signed word)) (word) sin16ss_gen::usinx
|
||||
(signed word) sin16ss_gen::sinx ← (signed word~) sin16ss_gen::$22
|
||||
sin16ss_gen::@5:
|
||||
*((signed word*) sin16ss_gen::sintab) ← (signed word) sin16ss_gen::sinx
|
||||
(signed word*~) sin16ss_gen::$23 ← (signed word*) sin16ss_gen::sintab + (byte/signed byte/word/signed word/dword/signed dword) 2
|
||||
(signed word*) sin16ss_gen::sintab ← (signed word*~) sin16ss_gen::$23
|
||||
(dword~) sin16ss_gen::$24 ← (dword) sin16ss_gen::x + (dword) sin16ss_gen::step
|
||||
(dword) sin16ss_gen::x ← (dword~) sin16ss_gen::$24
|
||||
(word) sin16ss_gen::i ← ++ (word) sin16ss_gen::i
|
||||
(boolean~) sin16ss_gen::$25 ← (word) sin16ss_gen::i < (word) sin16ss_gen::wavelength
|
||||
if((boolean~) sin16ss_gen::$25) goto sin16ss_gen::@1
|
||||
sin16ss_gen::@return:
|
||||
return
|
||||
endproc // sin16ss_gen()
|
||||
proc (word()) mulu16_sel((word) mulu16_sel::v1 , (word) mulu16_sel::v2 , (byte) mulu16_sel::select)
|
||||
(dword~) mulu16_sel::$0 ← call mul16u (word) mulu16_sel::v1 (word) mulu16_sel::v2
|
||||
(dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select
|
||||
@ -1598,54 +1494,6 @@ SYMBOLS
|
||||
(dword) sin16s_gen::step
|
||||
(word) sin16s_gen::wavelength
|
||||
(dword) sin16s_gen::x
|
||||
(void()) sin16ss_gen((signed word*) sin16ss_gen::sintab , (word) sin16ss_gen::wavelength)
|
||||
(dword~) sin16ss_gen::$0
|
||||
(word~) sin16ss_gen::$1
|
||||
(word/signed word/dword/signed dword~) sin16ss_gen::$10
|
||||
(word~) sin16ss_gen::$11
|
||||
(word~) sin16ss_gen::$12
|
||||
(word~) sin16ss_gen::$13
|
||||
(word~) sin16ss_gen::$14
|
||||
(word/signed word/dword/signed dword~) sin16ss_gen::$15
|
||||
(word~) sin16ss_gen::$16
|
||||
(word~) sin16ss_gen::$17
|
||||
(boolean~) sin16ss_gen::$18
|
||||
(boolean~) sin16ss_gen::$19
|
||||
(boolean~) sin16ss_gen::$2
|
||||
(signed word~) sin16ss_gen::$20
|
||||
(signed word~) sin16ss_gen::$21
|
||||
(signed word~) sin16ss_gen::$22
|
||||
(signed word*~) sin16ss_gen::$23
|
||||
(dword~) sin16ss_gen::$24
|
||||
(boolean~) sin16ss_gen::$25
|
||||
(boolean~) sin16ss_gen::$3
|
||||
(word~) sin16ss_gen::$4
|
||||
(boolean~) sin16ss_gen::$5
|
||||
(boolean~) sin16ss_gen::$6
|
||||
(word~) sin16ss_gen::$7
|
||||
(word~) sin16ss_gen::$8
|
||||
(word~) sin16ss_gen::$9
|
||||
(label) sin16ss_gen::@1
|
||||
(label) sin16ss_gen::@2
|
||||
(label) sin16ss_gen::@3
|
||||
(label) sin16ss_gen::@4
|
||||
(label) sin16ss_gen::@5
|
||||
(label) sin16ss_gen::@return
|
||||
(word) sin16ss_gen::i
|
||||
(byte) sin16ss_gen::isUpper
|
||||
(signed word*) sin16ss_gen::sintab
|
||||
(signed word) sin16ss_gen::sinx
|
||||
(dword) sin16ss_gen::step
|
||||
(word) sin16ss_gen::usinx
|
||||
(word) sin16ss_gen::wavelength
|
||||
(dword) sin16ss_gen::x
|
||||
(word) sin16ss_gen::x1
|
||||
(word) sin16ss_gen::x2
|
||||
(word) sin16ss_gen::x3
|
||||
(word) sin16ss_gen::x3_6
|
||||
(word) sin16ss_gen::x4
|
||||
(word) sin16ss_gen::x5
|
||||
(word) sin16ss_gen::x5_128
|
||||
(signed byte()) sin8s((word) sin8s::x)
|
||||
(boolean~) sin8s::$0
|
||||
(boolean~) sin8s::$1
|
||||
@ -2351,85 +2199,6 @@ sin8s::@9: scope:[sin8s] from
|
||||
to:sin8s::@return
|
||||
@15: scope:[] from @14
|
||||
to:@16
|
||||
sin16ss_gen: scope:[sin16ss_gen] from
|
||||
(dword~) sin16ss_gen::$0 ← call div32u16u (dword) PI2_u4f28 (word) sin16ss_gen::wavelength
|
||||
(dword) sin16ss_gen::step ← (dword~) sin16ss_gen::$0
|
||||
(dword) sin16ss_gen::x ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
(word) sin16ss_gen::i ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
to:sin16ss_gen::@1
|
||||
sin16ss_gen::@1: scope:[sin16ss_gen] from sin16ss_gen sin16ss_gen::@5
|
||||
(word~) sin16ss_gen::$1 ← > (dword) sin16ss_gen::x
|
||||
(word) sin16ss_gen::x1 ← (word~) sin16ss_gen::$1
|
||||
(byte) sin16ss_gen::isUpper ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
(boolean~) sin16ss_gen::$2 ← (word) sin16ss_gen::x1 >= (word) PI_u4f12
|
||||
(boolean~) sin16ss_gen::$3 ← ! (boolean~) sin16ss_gen::$2
|
||||
if((boolean~) sin16ss_gen::$3) goto sin16ss_gen::@2
|
||||
to:sin16ss_gen::@6
|
||||
sin16ss_gen::@2: scope:[sin16ss_gen] from sin16ss_gen::@1 sin16ss_gen::@6
|
||||
(boolean~) sin16ss_gen::$5 ← (word) sin16ss_gen::x1 >= (word) PI_HALF_u4f12
|
||||
(boolean~) sin16ss_gen::$6 ← ! (boolean~) sin16ss_gen::$5
|
||||
if((boolean~) sin16ss_gen::$6) goto sin16ss_gen::@3
|
||||
to:sin16ss_gen::@7
|
||||
sin16ss_gen::@6: scope:[sin16ss_gen] from sin16ss_gen::@1
|
||||
(word~) sin16ss_gen::$4 ← (word) sin16ss_gen::x1 - (word) PI_u4f12
|
||||
(word) sin16ss_gen::x1 ← (word~) sin16ss_gen::$4
|
||||
(byte) sin16ss_gen::isUpper ← (byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
to:sin16ss_gen::@2
|
||||
sin16ss_gen::@3: scope:[sin16ss_gen] from sin16ss_gen::@2 sin16ss_gen::@7
|
||||
(word~) sin16ss_gen::$8 ← call mulu16_sel (word) sin16ss_gen::x1 (word) sin16ss_gen::x1 (byte/signed byte/word/signed word/dword/signed dword) 4
|
||||
(word) sin16ss_gen::x2 ← (word~) sin16ss_gen::$8
|
||||
(word~) sin16ss_gen::$9 ← call mulu16_sel (word) sin16ss_gen::x2 (word) sin16ss_gen::x1 (byte/signed byte/word/signed word/dword/signed dword) 4
|
||||
(word) sin16ss_gen::x3 ← (word~) sin16ss_gen::$9
|
||||
(word/signed word/dword/signed dword~) sin16ss_gen::$10 ← (dword/signed dword) 65536 / (byte/signed byte/word/signed word/dword/signed dword) 6
|
||||
(word~) sin16ss_gen::$11 ← call mulu16_sel (word) sin16ss_gen::x3 (word/signed word/dword/signed dword~) sin16ss_gen::$10 (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
(word) sin16ss_gen::x3_6 ← (word~) sin16ss_gen::$11
|
||||
(word~) sin16ss_gen::$12 ← (word) sin16ss_gen::x1 - (word) sin16ss_gen::x3_6
|
||||
(word) sin16ss_gen::usinx ← (word~) sin16ss_gen::$12
|
||||
(word~) sin16ss_gen::$13 ← call mulu16_sel (word) sin16ss_gen::x3 (word) sin16ss_gen::x1 (byte/signed byte/word/signed word/dword/signed dword) 4
|
||||
(word) sin16ss_gen::x4 ← (word~) sin16ss_gen::$13
|
||||
(word~) sin16ss_gen::$14 ← call mulu16_sel (word) sin16ss_gen::x4 (word) sin16ss_gen::x1 (byte/signed byte/word/signed word/dword/signed dword) 4
|
||||
(word) sin16ss_gen::x5 ← (word~) sin16ss_gen::$14
|
||||
(word/signed word/dword/signed dword~) sin16ss_gen::$15 ← (dword/signed dword) 65536 / (byte/word/signed word/dword/signed dword) 128
|
||||
(word~) sin16ss_gen::$16 ← call mulu16_sel (word) sin16ss_gen::x5 (word/signed word/dword/signed dword~) sin16ss_gen::$15 (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
(word) sin16ss_gen::x5_128 ← (word~) sin16ss_gen::$16
|
||||
(word~) sin16ss_gen::$17 ← (word) sin16ss_gen::usinx + (word) sin16ss_gen::x5_128
|
||||
(word) sin16ss_gen::usinx ← (word~) sin16ss_gen::$17
|
||||
(boolean~) sin16ss_gen::$18 ← (byte) sin16ss_gen::isUpper != (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
(boolean~) sin16ss_gen::$19 ← ! (boolean~) sin16ss_gen::$18
|
||||
if((boolean~) sin16ss_gen::$19) goto sin16ss_gen::@4
|
||||
to:sin16ss_gen::@8
|
||||
sin16ss_gen::@7: scope:[sin16ss_gen] from sin16ss_gen::@2
|
||||
(word~) sin16ss_gen::$7 ← (word) PI_u4f12 - (word) sin16ss_gen::x1
|
||||
(word) sin16ss_gen::x1 ← (word~) sin16ss_gen::$7
|
||||
to:sin16ss_gen::@3
|
||||
sin16ss_gen::@4: scope:[sin16ss_gen] from sin16ss_gen::@3 sin16ss_gen::@9
|
||||
(signed word~) sin16ss_gen::$22 ← ((signed word)) (word) sin16ss_gen::usinx
|
||||
(signed word) sin16ss_gen::sinx ← (signed word~) sin16ss_gen::$22
|
||||
to:sin16ss_gen::@5
|
||||
sin16ss_gen::@8: scope:[sin16ss_gen] from sin16ss_gen::@3
|
||||
(signed word~) sin16ss_gen::$20 ← ((signed word)) (word) sin16ss_gen::usinx
|
||||
(signed word~) sin16ss_gen::$21 ← - (signed word~) sin16ss_gen::$20
|
||||
(signed word) sin16ss_gen::sinx ← (signed word~) sin16ss_gen::$21
|
||||
to:sin16ss_gen::@5
|
||||
sin16ss_gen::@5: scope:[sin16ss_gen] from sin16ss_gen::@4 sin16ss_gen::@8
|
||||
*((signed word*) sin16ss_gen::sintab) ← (signed word) sin16ss_gen::sinx
|
||||
(signed word*~) sin16ss_gen::$23 ← (signed word*) sin16ss_gen::sintab + (byte/signed byte/word/signed word/dword/signed dword) 2
|
||||
(signed word*) sin16ss_gen::sintab ← (signed word*~) sin16ss_gen::$23
|
||||
(dword~) sin16ss_gen::$24 ← (dword) sin16ss_gen::x + (dword) sin16ss_gen::step
|
||||
(dword) sin16ss_gen::x ← (dword~) sin16ss_gen::$24
|
||||
(word) sin16ss_gen::i ← ++ (word) sin16ss_gen::i
|
||||
(boolean~) sin16ss_gen::$25 ← (word) sin16ss_gen::i < (word) sin16ss_gen::wavelength
|
||||
if((boolean~) sin16ss_gen::$25) goto sin16ss_gen::@1
|
||||
to:sin16ss_gen::@10
|
||||
sin16ss_gen::@9: scope:[sin16ss_gen] from
|
||||
to:sin16ss_gen::@4
|
||||
sin16ss_gen::@10: scope:[sin16ss_gen] from sin16ss_gen::@5
|
||||
to:sin16ss_gen::@return
|
||||
sin16ss_gen::@return: scope:[sin16ss_gen] from sin16ss_gen::@10
|
||||
return
|
||||
to:@return
|
||||
@16: scope:[] from @15
|
||||
to:@17
|
||||
mulu16_sel: scope:[mulu16_sel] from
|
||||
(dword~) mulu16_sel::$0 ← call mul16u (word) mulu16_sel::v1 (word) mulu16_sel::v2
|
||||
(dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select
|
||||
@ -2442,8 +2211,8 @@ mulu16_sel::@return: scope:[mulu16_sel] from mulu16_sel mulu16_sel::@1
|
||||
to:@return
|
||||
mulu16_sel::@1: scope:[mulu16_sel] from
|
||||
to:mulu16_sel::@return
|
||||
@17: scope:[] from @16
|
||||
to:@18
|
||||
@16: scope:[] from @15
|
||||
to:@17
|
||||
mulu8_sel: scope:[mulu8_sel] from
|
||||
(word~) mulu8_sel::$0 ← call mul8u (byte) mulu8_sel::v1 (byte) mulu8_sel::v2
|
||||
(word~) mulu8_sel::$1 ← (word~) mulu8_sel::$0 << (byte) mulu8_sel::select
|
||||
@ -2456,11 +2225,11 @@ mulu8_sel::@return: scope:[mulu8_sel] from mulu8_sel mulu8_sel::@1
|
||||
to:@return
|
||||
mulu8_sel::@1: scope:[mulu8_sel] from
|
||||
to:mulu8_sel::@return
|
||||
@18: scope:[] from @17
|
||||
@17: scope:[] from @16
|
||||
(byte*) SCREEN ← ((byte*)) (word/signed word/dword/signed dword) 1024
|
||||
(byte*) line_cursor ← (byte*) SCREEN
|
||||
(byte*) char_cursor ← (byte*) line_cursor
|
||||
to:@19
|
||||
to:@18
|
||||
print_str: scope:[print_str] from
|
||||
to:print_str::@1
|
||||
print_str::@1: scope:[print_str] from print_str print_str::@2
|
||||
@ -2483,8 +2252,8 @@ print_str::@6: scope:[print_str] from
|
||||
print_str::@return: scope:[print_str] from print_str::@3
|
||||
return
|
||||
to:@return
|
||||
@19: scope:[] from @18
|
||||
to:@20
|
||||
@18: scope:[] from @17
|
||||
to:@19
|
||||
print_ln: scope:[print_ln] from
|
||||
to:print_ln::@1
|
||||
print_ln::@1: scope:[print_ln] from print_ln print_ln::@1
|
||||
@ -2499,8 +2268,8 @@ print_ln::@2: scope:[print_ln] from print_ln::@1
|
||||
print_ln::@return: scope:[print_ln] from print_ln::@2
|
||||
return
|
||||
to:@return
|
||||
@20: scope:[] from @19
|
||||
to:@21
|
||||
@19: scope:[] from @18
|
||||
to:@20
|
||||
print_sword: scope:[print_sword] from
|
||||
(boolean~) print_sword::$0 ← (signed word) print_sword::w < (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
(boolean~) print_sword::$1 ← ! (boolean~) print_sword::$0
|
||||
@ -2518,8 +2287,8 @@ print_sword::@2: scope:[print_sword] from print_sword
|
||||
print_sword::@return: scope:[print_sword] from print_sword::@1
|
||||
return
|
||||
to:@return
|
||||
@21: scope:[] from @20
|
||||
to:@22
|
||||
@20: scope:[] from @19
|
||||
to:@21
|
||||
print_sbyte: scope:[print_sbyte] from
|
||||
(boolean~) print_sbyte::$0 ← (signed byte) print_sbyte::b < (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
(boolean~) print_sbyte::$1 ← ! (boolean~) print_sbyte::$0
|
||||
@ -2537,8 +2306,8 @@ print_sbyte::@2: scope:[print_sbyte] from print_sbyte
|
||||
print_sbyte::@return: scope:[print_sbyte] from print_sbyte::@1
|
||||
return
|
||||
to:@return
|
||||
@22: scope:[] from @21
|
||||
to:@23
|
||||
@21: scope:[] from @20
|
||||
to:@22
|
||||
print_word: scope:[print_word] from
|
||||
(byte~) print_word::$0 ← > (word) print_word::w
|
||||
(void~) print_word::$1 ← call print_byte (byte~) print_word::$0
|
||||
@ -2548,8 +2317,8 @@ print_word: scope:[print_word] from
|
||||
print_word::@return: scope:[print_word] from print_word
|
||||
return
|
||||
to:@return
|
||||
@23: scope:[] from @22
|
||||
to:@24
|
||||
@22: scope:[] from @21
|
||||
to:@23
|
||||
print_dword: scope:[print_dword] from
|
||||
(word~) print_dword::$0 ← > (dword) print_dword::dw
|
||||
(void~) print_dword::$1 ← call print_word (word~) print_dword::$0
|
||||
@ -2559,8 +2328,8 @@ print_dword: scope:[print_dword] from
|
||||
print_dword::@return: scope:[print_dword] from print_dword
|
||||
return
|
||||
to:@return
|
||||
@24: scope:[] from @23
|
||||
to:@25
|
||||
@23: scope:[] from @22
|
||||
to:@24
|
||||
print_sdword: scope:[print_sdword] from
|
||||
(boolean~) print_sdword::$0 ← (signed dword) print_sdword::dw < (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
(boolean~) print_sdword::$1 ← ! (boolean~) print_sdword::$0
|
||||
@ -2578,8 +2347,8 @@ print_sdword::@2: scope:[print_sdword] from print_sdword
|
||||
print_sdword::@return: scope:[print_sdword] from print_sdword::@1
|
||||
return
|
||||
to:@return
|
||||
@25: scope:[] from @24
|
||||
to:@26
|
||||
@24: scope:[] from @23
|
||||
to:@25
|
||||
print_byte: scope:[print_byte] from
|
||||
(byte[]) print_byte::hextab ← (string) "0123456789abcdef"
|
||||
(byte~) print_byte::$0 ← (byte) print_byte::b >> (byte/signed byte/word/signed word/dword/signed dword) 4
|
||||
@ -2590,8 +2359,8 @@ print_byte: scope:[print_byte] from
|
||||
print_byte::@return: scope:[print_byte] from print_byte
|
||||
return
|
||||
to:@return
|
||||
@26: scope:[] from @25
|
||||
to:@27
|
||||
@25: scope:[] from @24
|
||||
to:@26
|
||||
print_char: scope:[print_char] from
|
||||
*((byte*) char_cursor) ← (byte) print_char::ch
|
||||
(byte*) char_cursor ← ++ (byte*) char_cursor
|
||||
@ -2599,8 +2368,8 @@ print_char: scope:[print_char] from
|
||||
print_char::@return: scope:[print_char] from print_char
|
||||
return
|
||||
to:@return
|
||||
@27: scope:[] from @26
|
||||
to:@28
|
||||
@26: scope:[] from @25
|
||||
to:@27
|
||||
print_cls: scope:[print_cls] from
|
||||
(byte*) print_cls::sc ← (byte*) SCREEN
|
||||
to:print_cls::@1
|
||||
@ -2618,8 +2387,8 @@ print_cls::@2: scope:[print_cls] from print_cls::@1
|
||||
print_cls::@return: scope:[print_cls] from print_cls::@2
|
||||
return
|
||||
to:@return
|
||||
@28: scope:[] from @27
|
||||
to:@29
|
||||
@27: scope:[] from @26
|
||||
to:@28
|
||||
main: scope:[main] from
|
||||
(word) main::wavelength ← (byte/word/signed word/dword/signed dword) 192
|
||||
(signed byte[192]) main::sintabb ← { fill( 192, 0) }
|
||||
@ -2658,16 +2427,15 @@ main::@4: scope:[main] from main::@2
|
||||
main::@return: scope:[main] from main::@4
|
||||
return
|
||||
to:@return
|
||||
@29: scope:[] from @28
|
||||
@28: scope:[] from @27
|
||||
call main
|
||||
to:@end
|
||||
@end: scope:[] from @29
|
||||
@end: scope:[] from @28
|
||||
|
||||
Removing unused procedure div8s
|
||||
Removing unused procedure div16s
|
||||
Removing unused procedure mul8s
|
||||
Removing unused procedure mul16s
|
||||
Removing unused procedure sin16ss_gen
|
||||
Removing unused procedure print_ln
|
||||
Removing unused procedure print_sword
|
||||
Removing unused procedure print_sdword
|
||||
@ -2719,14 +2487,14 @@ Removing empty block sin16s::@7
|
||||
Removing empty block @14
|
||||
Removing empty block sin8s::@9
|
||||
Removing empty block @15
|
||||
Removing empty block @16
|
||||
Removing empty block mulu16_sel::@1
|
||||
Removing empty block @17
|
||||
Removing empty block @16
|
||||
Removing empty block mulu8_sel::@1
|
||||
Removing empty block print_str::@4
|
||||
Removing empty block print_str::@3
|
||||
Removing empty block print_str::@5
|
||||
Removing empty block print_str::@6
|
||||
Removing empty block @18
|
||||
Removing empty block @19
|
||||
Removing empty block @20
|
||||
Removing empty block @21
|
||||
@ -2736,7 +2504,6 @@ Removing empty block @24
|
||||
Removing empty block @25
|
||||
Removing empty block @26
|
||||
Removing empty block @27
|
||||
Removing empty block @28
|
||||
Removing empty block main::@4
|
||||
PROCEDURE MODIFY VARIABLE ANALYSIS
|
||||
divr16u modifies rem16u
|
||||
@ -3015,7 +2782,7 @@ mul16u::@return: scope:[mul16u] from mul16u::@3
|
||||
(word) PI2_u4f12#0 ← (word/signed word/dword/signed dword) 25736
|
||||
(word) PI_u4f12#0 ← (word/signed word/dword/signed dword) 12868
|
||||
(word) PI_HALF_u4f12#0 ← (word/signed word/dword/signed dword) 6434
|
||||
to:@18
|
||||
to:@17
|
||||
sin16s_gen: scope:[sin16s_gen] from main::@5
|
||||
(signed word*) sin16s_gen::sintab#5 ← phi( main::@5/(signed word*) sin16s_gen::sintab#1 )
|
||||
(word) rem16u#32 ← phi( main::@5/(word) rem16u#12 )
|
||||
@ -3423,12 +3190,12 @@ mulu8_sel::@return: scope:[mulu8_sel] from mulu8_sel::@2
|
||||
(byte) mulu8_sel::return#6 ← (byte) mulu8_sel::return#12
|
||||
return
|
||||
to:@return
|
||||
@18: scope:[] from @11
|
||||
@17: scope:[] from @11
|
||||
(word) rem16u#42 ← phi( @11/(word) rem16u#43 )
|
||||
(byte*) SCREEN#0 ← ((byte*)) (word/signed word/dword/signed dword) 1024
|
||||
(byte*) line_cursor#0 ← (byte*) SCREEN#0
|
||||
(byte*) char_cursor#0 ← (byte*) line_cursor#0
|
||||
to:@29
|
||||
to:@28
|
||||
print_str: scope:[print_str] from main::@3 main::@8
|
||||
(byte*) char_cursor#44 ← phi( main::@3/(byte*) char_cursor#42 main::@8/(byte*) char_cursor#14 )
|
||||
(byte*) print_str::str#5 ← phi( main::@3/(byte*) print_str::str#2 main::@8/(byte*) print_str::str#1 )
|
||||
@ -3545,10 +3312,10 @@ print_cls::@return: scope:[print_cls] from print_cls::@2
|
||||
(byte*) char_cursor#12 ← (byte*) char_cursor#29
|
||||
return
|
||||
to:@return
|
||||
main: scope:[main] from @29
|
||||
(byte*) char_cursor#48 ← phi( @29/(byte*) char_cursor#43 )
|
||||
(byte*) line_cursor#15 ← phi( @29/(byte*) line_cursor#12 )
|
||||
(word) rem16u#36 ← phi( @29/(word) rem16u#38 )
|
||||
main: scope:[main] from @28
|
||||
(byte*) char_cursor#48 ← phi( @28/(byte*) char_cursor#43 )
|
||||
(byte*) line_cursor#15 ← phi( @28/(byte*) line_cursor#12 )
|
||||
(word) rem16u#36 ← phi( @28/(word) rem16u#38 )
|
||||
(word) main::wavelength#0 ← (byte/word/signed word/dword/signed dword) 192
|
||||
(signed byte[192]) main::sintabb#0 ← { fill( 192, 0) }
|
||||
(signed byte*) sin8s_gen::sintab#1 ← (signed byte[192]) main::sintabb#0
|
||||
@ -3653,28 +3420,28 @@ main::@return: scope:[main] from main::@9
|
||||
(byte*) char_cursor#17 ← (byte*) char_cursor#34
|
||||
return
|
||||
to:@return
|
||||
@29: scope:[] from @18
|
||||
(byte*) char_cursor#43 ← phi( @18/(byte*) char_cursor#0 )
|
||||
(byte*) line_cursor#12 ← phi( @18/(byte*) line_cursor#0 )
|
||||
(word) rem16u#38 ← phi( @18/(word) rem16u#42 )
|
||||
@28: scope:[] from @17
|
||||
(byte*) char_cursor#43 ← phi( @17/(byte*) char_cursor#0 )
|
||||
(byte*) line_cursor#12 ← phi( @17/(byte*) line_cursor#0 )
|
||||
(word) rem16u#38 ← phi( @17/(word) rem16u#42 )
|
||||
call main param-assignment
|
||||
to:@30
|
||||
@30: scope:[] from @29
|
||||
(byte*) char_cursor#35 ← phi( @29/(byte*) char_cursor#17 )
|
||||
(byte*) line_cursor#9 ← phi( @29/(byte*) line_cursor#4 )
|
||||
(word) rem16u#29 ← phi( @29/(word) rem16u#14 )
|
||||
to:@29
|
||||
@29: scope:[] from @28
|
||||
(byte*) char_cursor#35 ← phi( @28/(byte*) char_cursor#17 )
|
||||
(byte*) line_cursor#9 ← phi( @28/(byte*) line_cursor#4 )
|
||||
(word) rem16u#29 ← phi( @28/(word) rem16u#14 )
|
||||
(word) rem16u#15 ← (word) rem16u#29
|
||||
(byte*) line_cursor#5 ← (byte*) line_cursor#9
|
||||
(byte*) char_cursor#18 ← (byte*) char_cursor#35
|
||||
to:@end
|
||||
@end: scope:[] from @30
|
||||
@end: scope:[] from @29
|
||||
|
||||
SYMBOL TABLE SSA
|
||||
(label) @11
|
||||
(label) @18
|
||||
(label) @17
|
||||
(label) @2
|
||||
(label) @28
|
||||
(label) @29
|
||||
(label) @30
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(word) PI2_u4f12
|
||||
@ -5253,13 +5020,13 @@ Culled Empty Block (label) @2
|
||||
Culled Empty Block (label) mul8u::@3
|
||||
Culled Empty Block (label) mul16u::@3
|
||||
Culled Empty Block (label) @11
|
||||
Culled Empty Block (label) @18
|
||||
Culled Empty Block (label) @17
|
||||
Culled Empty Block (label) print_sbyte::@3
|
||||
Culled Empty Block (label) print_byte::@2
|
||||
Culled Empty Block (label) print_cls::@2
|
||||
Culled Empty Block (label) main::@7
|
||||
Culled Empty Block (label) main::@10
|
||||
Culled Empty Block (label) @30
|
||||
Culled Empty Block (label) @29
|
||||
Succesful SSA optimization Pass2CullEmptyBlocks
|
||||
Not aliassing across scopes: rem16u#1 divr16u::rem#10
|
||||
Not aliassing across scopes: divr16u::return#2 divr16u::return#0
|
||||
@ -5669,7 +5436,7 @@ Constant inlined print_str::str#1 = (const string) main::str
|
||||
Constant inlined print_byte::$4 = (const string) print_byte::hextab#0
|
||||
Constant inlined sin8s_gen::i#0 = (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
Succesful SSA optimization Pass2ConstantInlining
|
||||
Block Sequence Planned @begin @29 @end main main::@5 main::@6 main::@1 main::@3 main::@2 main::@8 main::@9 main::@return print_str print_str::@1 print_str::@return print_str::@2 print_sbyte print_sbyte::@2 print_sbyte::@4 print_sbyte::@1 print_sbyte::@return print_byte print_byte::@1 print_byte::@return print_char print_char::@return print_cls print_cls::@1 print_cls::@return sin16s_gen sin16s_gen::@3 sin16s_gen::@1 sin16s_gen::@4 sin16s_gen::@return sin16s sin16s::@4 sin16s::@1 sin16s::@5 sin16s::@2 sin16s::@8 sin16s::@9 sin16s::@10 sin16s::@11 sin16s::@12 sin16s::@6 sin16s::@3 sin16s::@return mulu16_sel mulu16_sel::@2 mulu16_sel::@return mul16u mul16u::@1 mul16u::@return mul16u::@2 mul16u::@7 mul16u::@4 div32u16u div32u16u::@2 div32u16u::@3 div32u16u::@return divr16u divr16u::@1 divr16u::@4 divr16u::@2 divr16u::@5 divr16u::@3 divr16u::@6 divr16u::@return sin8s_gen sin8s_gen::@3 sin8s_gen::@1 sin8s_gen::@4 sin8s_gen::@return sin8s sin8s::@5 sin8s::@1 sin8s::@6 sin8s::@2 sin8s::@10 sin8s::@11 sin8s::@12 sin8s::@13 sin8s::@14 sin8s::@7 sin8s::@3 sin8s::@8 sin8s::@4 sin8s::@return mulu8_sel mulu8_sel::@2 mulu8_sel::@return mul8u mul8u::@1 mul8u::@return mul8u::@2 mul8u::@7 mul8u::@4 div16u div16u::@2 div16u::@return
|
||||
Block Sequence Planned @begin @28 @end main main::@5 main::@6 main::@1 main::@3 main::@2 main::@8 main::@9 main::@return print_str print_str::@1 print_str::@return print_str::@2 print_sbyte print_sbyte::@2 print_sbyte::@4 print_sbyte::@1 print_sbyte::@return print_byte print_byte::@1 print_byte::@return print_char print_char::@return print_cls print_cls::@1 print_cls::@return sin16s_gen sin16s_gen::@3 sin16s_gen::@1 sin16s_gen::@4 sin16s_gen::@return sin16s sin16s::@4 sin16s::@1 sin16s::@5 sin16s::@2 sin16s::@8 sin16s::@9 sin16s::@10 sin16s::@11 sin16s::@12 sin16s::@6 sin16s::@3 sin16s::@return mulu16_sel mulu16_sel::@2 mulu16_sel::@return mul16u mul16u::@1 mul16u::@return mul16u::@2 mul16u::@7 mul16u::@4 div32u16u div32u16u::@2 div32u16u::@3 div32u16u::@return divr16u divr16u::@1 divr16u::@4 divr16u::@2 divr16u::@5 divr16u::@3 divr16u::@6 divr16u::@return sin8s_gen sin8s_gen::@3 sin8s_gen::@1 sin8s_gen::@4 sin8s_gen::@return sin8s sin8s::@5 sin8s::@1 sin8s::@6 sin8s::@2 sin8s::@10 sin8s::@11 sin8s::@12 sin8s::@13 sin8s::@14 sin8s::@7 sin8s::@3 sin8s::@8 sin8s::@4 sin8s::@return mulu8_sel mulu8_sel::@2 mulu8_sel::@return mul8u mul8u::@1 mul8u::@return mul8u::@2 mul8u::@7 mul8u::@4 div16u div16u::@2 div16u::@return
|
||||
Added new block during phi lifting main::@11(between main::@9 and main::@1)
|
||||
Added new block during phi lifting main::@12(between main::@1 and main::@2)
|
||||
Added new block during phi lifting print_sbyte::@5(between print_sbyte and print_sbyte::@1)
|
||||
@ -5690,9 +5457,9 @@ Added new block during phi lifting sin8s::@16(between sin8s::@1 and sin8s::@2)
|
||||
Added new block during phi lifting sin8s::@17(between sin8s::@14 and sin8s::@3)
|
||||
Added new block during phi lifting sin8s::@18(between sin8s::@3 and sin8s::@4)
|
||||
Added new block during phi lifting mul8u::@10(between mul8u::@2 and mul8u::@4)
|
||||
Block Sequence Planned @begin @29 @end main main::@5 main::@6 main::@1 main::@3 main::@2 main::@8 main::@9 main::@return main::@11 main::@12 print_str print_str::@1 print_str::@return print_str::@2 print_sbyte print_sbyte::@2 print_sbyte::@4 print_sbyte::@1 print_sbyte::@return print_sbyte::@5 print_byte print_byte::@1 print_byte::@return print_char print_char::@return print_cls print_cls::@1 print_cls::@return print_cls::@3 sin16s_gen sin16s_gen::@3 sin16s_gen::@1 sin16s_gen::@4 sin16s_gen::@return sin16s_gen::@5 sin16s sin16s::@4 sin16s::@1 sin16s::@5 sin16s::@2 sin16s::@8 sin16s::@9 sin16s::@10 sin16s::@11 sin16s::@12 sin16s::@6 sin16s::@3 sin16s::@return sin16s::@15 sin16s::@14 sin16s::@13 mulu16_sel mulu16_sel::@2 mulu16_sel::@return mul16u mul16u::@1 mul16u::@return mul16u::@2 mul16u::@7 mul16u::@4 mul16u::@10 div32u16u div32u16u::@2 div32u16u::@3 div32u16u::@return divr16u divr16u::@1 divr16u::@4 divr16u::@2 divr16u::@5 divr16u::@3 divr16u::@6 divr16u::@return divr16u::@8 divr16u::@10 divr16u::@9 sin8s_gen sin8s_gen::@3 sin8s_gen::@1 sin8s_gen::@4 sin8s_gen::@return sin8s_gen::@5 sin8s sin8s::@5 sin8s::@1 sin8s::@6 sin8s::@2 sin8s::@10 sin8s::@11 sin8s::@12 sin8s::@13 sin8s::@14 sin8s::@7 sin8s::@3 sin8s::@8 sin8s::@4 sin8s::@return sin8s::@18 sin8s::@17 sin8s::@16 sin8s::@15 mulu8_sel mulu8_sel::@2 mulu8_sel::@return mul8u mul8u::@1 mul8u::@return mul8u::@2 mul8u::@7 mul8u::@4 mul8u::@10 div16u div16u::@2 div16u::@return
|
||||
Block Sequence Planned @begin @28 @end main main::@5 main::@6 main::@1 main::@3 main::@2 main::@8 main::@9 main::@return main::@11 main::@12 print_str print_str::@1 print_str::@return print_str::@2 print_sbyte print_sbyte::@2 print_sbyte::@4 print_sbyte::@1 print_sbyte::@return print_sbyte::@5 print_byte print_byte::@1 print_byte::@return print_char print_char::@return print_cls print_cls::@1 print_cls::@return print_cls::@3 sin16s_gen sin16s_gen::@3 sin16s_gen::@1 sin16s_gen::@4 sin16s_gen::@return sin16s_gen::@5 sin16s sin16s::@4 sin16s::@1 sin16s::@5 sin16s::@2 sin16s::@8 sin16s::@9 sin16s::@10 sin16s::@11 sin16s::@12 sin16s::@6 sin16s::@3 sin16s::@return sin16s::@15 sin16s::@14 sin16s::@13 mulu16_sel mulu16_sel::@2 mulu16_sel::@return mul16u mul16u::@1 mul16u::@return mul16u::@2 mul16u::@7 mul16u::@4 mul16u::@10 div32u16u div32u16u::@2 div32u16u::@3 div32u16u::@return divr16u divr16u::@1 divr16u::@4 divr16u::@2 divr16u::@5 divr16u::@3 divr16u::@6 divr16u::@return divr16u::@8 divr16u::@10 divr16u::@9 sin8s_gen sin8s_gen::@3 sin8s_gen::@1 sin8s_gen::@4 sin8s_gen::@return sin8s_gen::@5 sin8s sin8s::@5 sin8s::@1 sin8s::@6 sin8s::@2 sin8s::@10 sin8s::@11 sin8s::@12 sin8s::@13 sin8s::@14 sin8s::@7 sin8s::@3 sin8s::@8 sin8s::@4 sin8s::@return sin8s::@18 sin8s::@17 sin8s::@16 sin8s::@15 mulu8_sel mulu8_sel::@2 mulu8_sel::@return mul8u mul8u::@1 mul8u::@return mul8u::@2 mul8u::@7 mul8u::@4 mul8u::@10 div16u div16u::@2 div16u::@return
|
||||
Adding NOP phi() at start of @begin
|
||||
Adding NOP phi() at start of @29
|
||||
Adding NOP phi() at start of @28
|
||||
Adding NOP phi() at start of @end
|
||||
Adding NOP phi() at start of main
|
||||
Adding NOP phi() at start of main::@5
|
||||
@ -5861,9 +5628,9 @@ Culled Empty Block (label) sin8s::@17
|
||||
Culled Empty Block (label) sin8s::@16
|
||||
Culled Empty Block (label) sin8s::@15
|
||||
Culled Empty Block (label) mul8u::@10
|
||||
Block Sequence Planned @begin @29 @end main main::@5 main::@6 main::@1 main::@3 main::@2 main::@8 main::@9 main::@return print_str print_str::@1 print_str::@return print_str::@2 print_sbyte print_sbyte::@2 print_sbyte::@4 print_sbyte::@1 print_sbyte::@return print_byte print_byte::@1 print_byte::@return print_char print_char::@return print_cls print_cls::@1 print_cls::@return sin16s_gen sin16s_gen::@3 sin16s_gen::@1 sin16s_gen::@4 sin16s_gen::@return sin16s sin16s::@4 sin16s::@1 sin16s::@5 sin16s::@2 sin16s::@8 sin16s::@9 sin16s::@10 sin16s::@11 sin16s::@12 sin16s::@6 sin16s::@3 sin16s::@return sin16s::@15 mulu16_sel mulu16_sel::@2 mulu16_sel::@return mul16u mul16u::@1 mul16u::@return mul16u::@2 mul16u::@7 mul16u::@4 div32u16u div32u16u::@2 div32u16u::@3 div32u16u::@return divr16u divr16u::@1 divr16u::@4 divr16u::@2 divr16u::@5 divr16u::@3 divr16u::@6 divr16u::@return sin8s_gen sin8s_gen::@3 sin8s_gen::@1 sin8s_gen::@4 sin8s_gen::@return sin8s sin8s::@5 sin8s::@1 sin8s::@6 sin8s::@2 sin8s::@10 sin8s::@11 sin8s::@12 sin8s::@13 sin8s::@14 sin8s::@7 sin8s::@3 sin8s::@8 sin8s::@4 sin8s::@return sin8s::@18 mulu8_sel mulu8_sel::@2 mulu8_sel::@return mul8u mul8u::@1 mul8u::@return mul8u::@2 mul8u::@7 mul8u::@4 div16u div16u::@2 div16u::@return
|
||||
Block Sequence Planned @begin @28 @end main main::@5 main::@6 main::@1 main::@3 main::@2 main::@8 main::@9 main::@return print_str print_str::@1 print_str::@return print_str::@2 print_sbyte print_sbyte::@2 print_sbyte::@4 print_sbyte::@1 print_sbyte::@return print_byte print_byte::@1 print_byte::@return print_char print_char::@return print_cls print_cls::@1 print_cls::@return sin16s_gen sin16s_gen::@3 sin16s_gen::@1 sin16s_gen::@4 sin16s_gen::@return sin16s sin16s::@4 sin16s::@1 sin16s::@5 sin16s::@2 sin16s::@8 sin16s::@9 sin16s::@10 sin16s::@11 sin16s::@12 sin16s::@6 sin16s::@3 sin16s::@return sin16s::@15 mulu16_sel mulu16_sel::@2 mulu16_sel::@return mul16u mul16u::@1 mul16u::@return mul16u::@2 mul16u::@7 mul16u::@4 div32u16u div32u16u::@2 div32u16u::@3 div32u16u::@return divr16u divr16u::@1 divr16u::@4 divr16u::@2 divr16u::@5 divr16u::@3 divr16u::@6 divr16u::@return sin8s_gen sin8s_gen::@3 sin8s_gen::@1 sin8s_gen::@4 sin8s_gen::@return sin8s sin8s::@5 sin8s::@1 sin8s::@6 sin8s::@2 sin8s::@10 sin8s::@11 sin8s::@12 sin8s::@13 sin8s::@14 sin8s::@7 sin8s::@3 sin8s::@8 sin8s::@4 sin8s::@return sin8s::@18 mulu8_sel mulu8_sel::@2 mulu8_sel::@return mul8u mul8u::@1 mul8u::@return mul8u::@2 mul8u::@7 mul8u::@4 div16u div16u::@2 div16u::@return
|
||||
Adding NOP phi() at start of @begin
|
||||
Adding NOP phi() at start of @29
|
||||
Adding NOP phi() at start of @28
|
||||
Adding NOP phi() at start of @end
|
||||
Adding NOP phi() at start of main
|
||||
Adding NOP phi() at start of main::@5
|
||||
@ -5915,14 +5682,14 @@ Propagating live ranges...
|
||||
FINAL CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
[0] phi() [ ] ( )
|
||||
to:@29
|
||||
@29: scope:[] from @begin
|
||||
to:@28
|
||||
@28: scope:[] from @begin
|
||||
[1] phi() [ ] ( )
|
||||
[2] call main param-assignment [ ] ( )
|
||||
to:@end
|
||||
@end: scope:[] from @29
|
||||
@end: scope:[] from @28
|
||||
[3] phi() [ ] ( )
|
||||
main: scope:[main] from @29
|
||||
main: scope:[main] from @28
|
||||
[4] phi() [ ] ( main:2 [ ] )
|
||||
[5] call sin8s_gen param-assignment [ ] ( main:2 [ ] )
|
||||
to:main::@5
|
||||
@ -6388,107 +6155,107 @@ div16u::@return: scope:[div16u] from div16u::@2
|
||||
|
||||
DOMINATORS
|
||||
@begin dominated by @begin
|
||||
@29 dominated by @29 @begin
|
||||
@end dominated by @end @29 @begin
|
||||
main dominated by @29 main @begin
|
||||
main::@5 dominated by main::@5 @29 main @begin
|
||||
main::@6 dominated by main::@5 main::@6 @29 main @begin
|
||||
main::@1 dominated by main::@1 main::@5 main::@6 @29 main @begin
|
||||
main::@3 dominated by main::@1 main::@5 main::@6 main::@3 @29 main @begin
|
||||
main::@2 dominated by main::@1 main::@2 main::@5 main::@6 @29 main @begin
|
||||
main::@8 dominated by main::@8 main::@1 main::@2 main::@5 main::@6 @29 main @begin
|
||||
main::@9 dominated by main::@9 main::@8 main::@1 main::@2 main::@5 main::@6 @29 main @begin
|
||||
main::@return dominated by main::@9 main::@8 main::@1 main::@2 main::@5 main::@6 main::@return @29 main @begin
|
||||
print_str dominated by main::@1 main::@5 main::@6 print_str @29 main @begin
|
||||
print_str::@1 dominated by main::@1 main::@5 main::@6 print_str::@1 print_str @29 main @begin
|
||||
print_str::@return dominated by main::@1 main::@5 main::@6 print_str::@return print_str::@1 print_str @29 main @begin
|
||||
print_str::@2 dominated by main::@1 main::@5 main::@6 print_str::@1 print_str::@2 print_str @29 main @begin
|
||||
print_sbyte dominated by main::@1 main::@2 main::@5 main::@6 print_sbyte @29 main @begin
|
||||
print_sbyte::@2 dominated by main::@1 main::@2 main::@5 main::@6 print_sbyte @29 main print_sbyte::@2 @begin
|
||||
print_sbyte::@4 dominated by main::@1 main::@2 main::@5 main::@6 print_sbyte @29 main print_sbyte::@4 print_sbyte::@2 @begin
|
||||
print_sbyte::@1 dominated by main::@1 main::@2 main::@5 main::@6 print_sbyte @29 main print_sbyte::@1 @begin
|
||||
print_sbyte::@return dominated by main::@1 main::@2 main::@5 main::@6 print_sbyte @29 main print_sbyte::@1 @begin print_sbyte::@return
|
||||
print_byte dominated by main::@1 main::@2 main::@5 main::@6 print_byte print_sbyte @29 main print_sbyte::@1 @begin
|
||||
print_byte::@1 dominated by main::@1 main::@2 main::@5 main::@6 print_byte::@1 print_byte print_sbyte @29 main print_sbyte::@1 @begin
|
||||
print_byte::@return dominated by main::@1 main::@2 main::@5 main::@6 print_byte::@1 print_byte print_sbyte @29 main print_sbyte::@1 @begin print_byte::@return
|
||||
print_char dominated by main::@1 main::@2 main::@5 main::@6 print_sbyte @29 main print_char @begin
|
||||
print_char::@return dominated by main::@1 main::@2 main::@5 main::@6 print_sbyte @29 main print_char print_char::@return @begin
|
||||
print_cls dominated by main::@5 main::@6 print_cls @29 main @begin
|
||||
print_cls::@1 dominated by main::@5 main::@6 print_cls @29 main @begin print_cls::@1
|
||||
print_cls::@return dominated by main::@5 main::@6 print_cls @29 main @begin print_cls::@return print_cls::@1
|
||||
sin16s_gen dominated by main::@5 sin16s_gen @29 main @begin
|
||||
sin16s_gen::@3 dominated by main::@5 sin16s_gen sin16s_gen::@3 @29 main @begin
|
||||
sin16s_gen::@1 dominated by main::@5 sin16s_gen sin16s_gen::@3 sin16s_gen::@1 @29 main @begin
|
||||
sin16s_gen::@4 dominated by main::@5 sin16s_gen sin16s_gen::@3 sin16s_gen::@4 sin16s_gen::@1 @29 main @begin
|
||||
sin16s_gen::@return dominated by main::@5 sin16s_gen::@return sin16s_gen sin16s_gen::@3 sin16s_gen::@4 sin16s_gen::@1 @29 main @begin
|
||||
sin16s dominated by main::@5 sin16s sin16s_gen sin16s_gen::@3 sin16s_gen::@1 @29 main @begin
|
||||
sin16s::@4 dominated by main::@5 sin16s sin16s_gen sin16s_gen::@3 sin16s_gen::@1 sin16s::@4 @29 main @begin
|
||||
sin16s::@1 dominated by main::@5 sin16s sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 @29 main @begin
|
||||
sin16s::@5 dominated by main::@5 sin16s sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 sin16s::@5 @29 main @begin
|
||||
sin16s::@2 dominated by main::@5 sin16s sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 sin16s::@2 @29 main @begin
|
||||
sin16s::@8 dominated by main::@5 sin16s sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 sin16s::@8 sin16s::@2 @29 main @begin
|
||||
sin16s::@9 dominated by main::@5 sin16s sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 sin16s::@9 sin16s::@8 sin16s::@2 @29 main @begin
|
||||
sin16s::@10 dominated by main::@5 sin16s sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 sin16s::@9 sin16s::@8 sin16s::@2 @29 main @begin sin16s::@10
|
||||
sin16s::@11 dominated by main::@5 sin16s sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 sin16s::@9 sin16s::@8 sin16s::@2 @29 main @begin sin16s::@11 sin16s::@10
|
||||
sin16s::@12 dominated by main::@5 sin16s sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 sin16s::@9 sin16s::@8 sin16s::@2 @29 main @begin sin16s::@12 sin16s::@11 sin16s::@10
|
||||
sin16s::@6 dominated by main::@5 sin16s sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 sin16s::@9 sin16s::@8 sin16s::@6 sin16s::@2 @29 main @begin sin16s::@12 sin16s::@11 sin16s::@10
|
||||
sin16s::@3 dominated by main::@5 sin16s sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 sin16s::@9 sin16s::@8 sin16s::@3 sin16s::@2 @29 main @begin sin16s::@12 sin16s::@11 sin16s::@10
|
||||
sin16s::@return dominated by main::@5 sin16s sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 sin16s::@9 sin16s::@8 sin16s::@3 sin16s::@2 @29 main @begin sin16s::@return sin16s::@12 sin16s::@11 sin16s::@10
|
||||
sin16s::@15 dominated by main::@5 sin16s sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 sin16s::@9 sin16s::@8 sin16s::@2 @29 main @begin sin16s::@15 sin16s::@12 sin16s::@11 sin16s::@10
|
||||
mulu16_sel dominated by main::@5 sin16s sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 mulu16_sel sin16s::@2 @29 main @begin
|
||||
mulu16_sel::@2 dominated by main::@5 sin16s sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 mulu16_sel sin16s::@2 @29 main @begin mulu16_sel::@2
|
||||
mulu16_sel::@return dominated by main::@5 sin16s sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 mulu16_sel sin16s::@2 @29 main @begin mulu16_sel::@return mulu16_sel::@2
|
||||
mul16u dominated by mul16u main::@5 sin16s sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 mulu16_sel sin16s::@2 @29 main @begin
|
||||
mul16u::@1 dominated by mul16u main::@5 sin16s sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 mulu16_sel sin16s::@2 @29 main mul16u::@1 @begin
|
||||
mul16u::@return dominated by mul16u main::@5 sin16s sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 mulu16_sel sin16s::@2 mul16u::@return @29 main mul16u::@1 @begin
|
||||
mul16u::@2 dominated by mul16u main::@5 sin16s sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 mulu16_sel sin16s::@2 @29 main mul16u::@1 mul16u::@2 @begin
|
||||
mul16u::@7 dominated by mul16u main::@5 sin16s sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 mulu16_sel sin16s::@2 @29 main mul16u::@1 mul16u::@2 @begin mul16u::@7
|
||||
mul16u::@4 dominated by mul16u main::@5 sin16s sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 mulu16_sel sin16s::@2 @29 main mul16u::@1 mul16u::@2 @begin mul16u::@4
|
||||
div32u16u dominated by main::@5 sin16s_gen div32u16u @29 main @begin
|
||||
div32u16u::@2 dominated by main::@5 sin16s_gen div32u16u @29 main div32u16u::@2 @begin
|
||||
div32u16u::@3 dominated by main::@5 sin16s_gen div32u16u @29 main div32u16u::@2 div32u16u::@3 @begin
|
||||
div32u16u::@return dominated by main::@5 sin16s_gen div32u16u div32u16u::@return @29 main div32u16u::@2 div32u16u::@3 @begin
|
||||
divr16u dominated by divr16u @29 main @begin
|
||||
divr16u::@1 dominated by divr16u::@1 divr16u @29 main @begin
|
||||
divr16u::@4 dominated by divr16u::@1 divr16u::@4 divr16u @29 main @begin
|
||||
divr16u::@2 dominated by divr16u::@2 divr16u::@1 divr16u @29 main @begin
|
||||
divr16u::@5 dominated by divr16u::@2 divr16u::@1 divr16u::@5 divr16u @29 main @begin
|
||||
divr16u::@3 dominated by divr16u::@2 divr16u::@1 divr16u::@3 divr16u @29 main @begin
|
||||
divr16u::@6 dominated by divr16u::@2 divr16u::@1 divr16u::@3 divr16u::@6 divr16u @29 main @begin
|
||||
divr16u::@return dominated by divr16u::@2 divr16u::@1 divr16u::@3 divr16u::@6 divr16u::@return divr16u @29 main @begin
|
||||
sin8s_gen dominated by sin8s_gen @29 main @begin
|
||||
sin8s_gen::@3 dominated by sin8s_gen @29 main @begin sin8s_gen::@3
|
||||
sin8s_gen::@1 dominated by sin8s_gen @29 main @begin sin8s_gen::@1 sin8s_gen::@3
|
||||
sin8s_gen::@4 dominated by sin8s_gen @29 main @begin sin8s_gen::@1 sin8s_gen::@3 sin8s_gen::@4
|
||||
sin8s_gen::@return dominated by sin8s_gen sin8s_gen::@return @29 main @begin sin8s_gen::@1 sin8s_gen::@3 sin8s_gen::@4
|
||||
sin8s dominated by sin8s_gen @29 main sin8s @begin sin8s_gen::@1 sin8s_gen::@3
|
||||
sin8s::@5 dominated by sin8s_gen @29 main sin8s @begin sin8s::@5 sin8s_gen::@1 sin8s_gen::@3
|
||||
sin8s::@1 dominated by sin8s_gen @29 main sin8s @begin sin8s::@1 sin8s_gen::@1 sin8s_gen::@3
|
||||
sin8s::@6 dominated by sin8s_gen @29 main sin8s @begin sin8s::@1 sin8s::@6 sin8s_gen::@1 sin8s_gen::@3
|
||||
sin8s::@2 dominated by sin8s_gen @29 main sin8s @begin sin8s::@2 sin8s::@1 sin8s_gen::@1 sin8s_gen::@3
|
||||
sin8s::@10 dominated by sin8s_gen sin8s::@10 @29 main sin8s @begin sin8s::@2 sin8s::@1 sin8s_gen::@1 sin8s_gen::@3
|
||||
sin8s::@11 dominated by sin8s_gen sin8s::@11 sin8s::@10 @29 main sin8s @begin sin8s::@2 sin8s::@1 sin8s_gen::@1 sin8s_gen::@3
|
||||
sin8s::@12 dominated by sin8s_gen sin8s::@12 sin8s::@11 sin8s::@10 @29 main sin8s @begin sin8s::@2 sin8s::@1 sin8s_gen::@1 sin8s_gen::@3
|
||||
sin8s::@13 dominated by sin8s_gen sin8s::@13 sin8s::@12 sin8s::@11 sin8s::@10 @29 main sin8s @begin sin8s::@2 sin8s::@1 sin8s_gen::@1 sin8s_gen::@3
|
||||
sin8s::@14 dominated by sin8s_gen sin8s::@14 sin8s::@13 sin8s::@12 sin8s::@11 sin8s::@10 @29 main sin8s @begin sin8s::@2 sin8s::@1 sin8s_gen::@1 sin8s_gen::@3
|
||||
sin8s::@7 dominated by sin8s_gen sin8s::@14 sin8s::@13 sin8s::@12 sin8s::@11 sin8s::@10 @29 main sin8s @begin sin8s::@2 sin8s::@1 sin8s::@7 sin8s_gen::@1 sin8s_gen::@3
|
||||
sin8s::@3 dominated by sin8s_gen sin8s::@14 sin8s::@13 sin8s::@12 sin8s::@11 sin8s::@10 @29 main sin8s @begin sin8s::@2 sin8s::@1 sin8s::@3 sin8s_gen::@1 sin8s_gen::@3
|
||||
sin8s::@8 dominated by sin8s_gen sin8s::@14 sin8s::@13 sin8s::@12 sin8s::@11 sin8s::@10 @29 main sin8s @begin sin8s::@2 sin8s::@1 sin8s::@3 sin8s::@8 sin8s_gen::@1 sin8s_gen::@3
|
||||
sin8s::@4 dominated by sin8s_gen sin8s::@14 sin8s::@13 sin8s::@12 sin8s::@11 sin8s::@10 @29 main sin8s @begin sin8s::@2 sin8s::@1 sin8s::@4 sin8s::@3 sin8s_gen::@1 sin8s_gen::@3
|
||||
sin8s::@return dominated by sin8s_gen sin8s::@14 sin8s::@13 sin8s::@12 sin8s::@11 sin8s::@10 sin8s::@return @29 main sin8s @begin sin8s::@2 sin8s::@1 sin8s::@4 sin8s::@3 sin8s_gen::@1 sin8s_gen::@3
|
||||
sin8s::@18 dominated by sin8s_gen sin8s::@18 sin8s::@14 sin8s::@13 sin8s::@12 sin8s::@11 sin8s::@10 @29 main sin8s @begin sin8s::@2 sin8s::@1 sin8s::@3 sin8s_gen::@1 sin8s_gen::@3
|
||||
mulu8_sel dominated by sin8s_gen mulu8_sel @29 main sin8s @begin sin8s::@2 sin8s::@1 sin8s_gen::@1 sin8s_gen::@3
|
||||
mulu8_sel::@2 dominated by mulu8_sel::@2 sin8s_gen mulu8_sel @29 main sin8s @begin sin8s::@2 sin8s::@1 sin8s_gen::@1 sin8s_gen::@3
|
||||
mulu8_sel::@return dominated by mulu8_sel::@2 sin8s_gen mulu8_sel::@return mulu8_sel @29 main sin8s @begin sin8s::@2 sin8s::@1 sin8s_gen::@1 sin8s_gen::@3
|
||||
mul8u dominated by sin8s_gen mul8u mulu8_sel @29 main sin8s @begin sin8s::@2 sin8s::@1 sin8s_gen::@1 sin8s_gen::@3
|
||||
mul8u::@1 dominated by sin8s_gen mul8u mulu8_sel @29 main sin8s @begin sin8s::@2 sin8s::@1 sin8s_gen::@1 sin8s_gen::@3 mul8u::@1
|
||||
mul8u::@return dominated by sin8s_gen mul8u mulu8_sel mul8u::@return @29 main sin8s @begin sin8s::@2 sin8s::@1 sin8s_gen::@1 sin8s_gen::@3 mul8u::@1
|
||||
mul8u::@2 dominated by sin8s_gen mul8u mulu8_sel @29 main sin8s @begin sin8s::@2 sin8s::@1 sin8s_gen::@1 sin8s_gen::@3 mul8u::@2 mul8u::@1
|
||||
mul8u::@7 dominated by sin8s_gen mul8u mulu8_sel @29 main sin8s @begin sin8s::@2 sin8s::@1 sin8s_gen::@1 sin8s_gen::@3 mul8u::@7 mul8u::@2 mul8u::@1
|
||||
mul8u::@4 dominated by sin8s_gen mul8u mulu8_sel @29 main sin8s @begin sin8s::@2 sin8s::@1 sin8s_gen::@1 sin8s_gen::@3 mul8u::@2 mul8u::@1 mul8u::@4
|
||||
div16u dominated by div16u sin8s_gen @29 main @begin
|
||||
div16u::@2 dominated by div16u sin8s_gen div16u::@2 @29 main @begin
|
||||
div16u::@return dominated by div16u::@return div16u sin8s_gen div16u::@2 @29 main @begin
|
||||
@28 dominated by @28 @begin
|
||||
@end dominated by @end @28 @begin
|
||||
main dominated by @28 main @begin
|
||||
main::@5 dominated by main::@5 @28 main @begin
|
||||
main::@6 dominated by main::@5 main::@6 @28 main @begin
|
||||
main::@1 dominated by main::@1 main::@5 main::@6 @28 main @begin
|
||||
main::@3 dominated by main::@1 main::@5 main::@6 main::@3 @28 main @begin
|
||||
main::@2 dominated by main::@1 main::@2 main::@5 main::@6 @28 main @begin
|
||||
main::@8 dominated by main::@8 main::@1 main::@2 main::@5 main::@6 @28 main @begin
|
||||
main::@9 dominated by main::@9 main::@8 main::@1 main::@2 main::@5 main::@6 @28 main @begin
|
||||
main::@return dominated by main::@9 main::@8 main::@1 main::@2 main::@5 main::@6 main::@return @28 main @begin
|
||||
print_str dominated by main::@1 main::@5 main::@6 print_str @28 main @begin
|
||||
print_str::@1 dominated by main::@1 main::@5 main::@6 print_str::@1 print_str @28 main @begin
|
||||
print_str::@return dominated by main::@1 main::@5 main::@6 print_str::@return print_str::@1 print_str @28 main @begin
|
||||
print_str::@2 dominated by main::@1 main::@5 main::@6 print_str::@1 print_str::@2 print_str @28 main @begin
|
||||
print_sbyte dominated by main::@1 main::@2 main::@5 main::@6 print_sbyte @28 main @begin
|
||||
print_sbyte::@2 dominated by main::@1 main::@2 main::@5 main::@6 print_sbyte @28 main print_sbyte::@2 @begin
|
||||
print_sbyte::@4 dominated by main::@1 main::@2 main::@5 main::@6 print_sbyte @28 main print_sbyte::@4 print_sbyte::@2 @begin
|
||||
print_sbyte::@1 dominated by main::@1 main::@2 main::@5 main::@6 print_sbyte @28 main print_sbyte::@1 @begin
|
||||
print_sbyte::@return dominated by main::@1 main::@2 main::@5 main::@6 print_sbyte @28 main print_sbyte::@1 @begin print_sbyte::@return
|
||||
print_byte dominated by main::@1 main::@2 main::@5 main::@6 print_byte print_sbyte @28 main print_sbyte::@1 @begin
|
||||
print_byte::@1 dominated by main::@1 main::@2 main::@5 main::@6 print_byte::@1 print_byte print_sbyte @28 main print_sbyte::@1 @begin
|
||||
print_byte::@return dominated by main::@1 main::@2 main::@5 main::@6 print_byte::@1 print_byte print_sbyte @28 main print_sbyte::@1 @begin print_byte::@return
|
||||
print_char dominated by main::@1 main::@2 main::@5 main::@6 print_sbyte @28 main print_char @begin
|
||||
print_char::@return dominated by main::@1 main::@2 main::@5 main::@6 print_sbyte @28 main print_char print_char::@return @begin
|
||||
print_cls dominated by main::@5 main::@6 print_cls @28 main @begin
|
||||
print_cls::@1 dominated by main::@5 main::@6 print_cls @28 main @begin print_cls::@1
|
||||
print_cls::@return dominated by main::@5 main::@6 print_cls @28 main @begin print_cls::@return print_cls::@1
|
||||
sin16s_gen dominated by main::@5 sin16s_gen @28 main @begin
|
||||
sin16s_gen::@3 dominated by main::@5 sin16s_gen sin16s_gen::@3 @28 main @begin
|
||||
sin16s_gen::@1 dominated by main::@5 sin16s_gen sin16s_gen::@3 sin16s_gen::@1 @28 main @begin
|
||||
sin16s_gen::@4 dominated by main::@5 sin16s_gen sin16s_gen::@3 sin16s_gen::@4 sin16s_gen::@1 @28 main @begin
|
||||
sin16s_gen::@return dominated by main::@5 sin16s_gen::@return sin16s_gen sin16s_gen::@3 sin16s_gen::@4 sin16s_gen::@1 @28 main @begin
|
||||
sin16s dominated by main::@5 sin16s sin16s_gen sin16s_gen::@3 sin16s_gen::@1 @28 main @begin
|
||||
sin16s::@4 dominated by main::@5 sin16s sin16s_gen sin16s_gen::@3 sin16s_gen::@1 sin16s::@4 @28 main @begin
|
||||
sin16s::@1 dominated by main::@5 sin16s sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 @28 main @begin
|
||||
sin16s::@5 dominated by main::@5 sin16s sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 sin16s::@5 @28 main @begin
|
||||
sin16s::@2 dominated by main::@5 sin16s sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 sin16s::@2 @28 main @begin
|
||||
sin16s::@8 dominated by main::@5 sin16s sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 sin16s::@8 sin16s::@2 @28 main @begin
|
||||
sin16s::@9 dominated by main::@5 sin16s sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 sin16s::@9 sin16s::@8 sin16s::@2 @28 main @begin
|
||||
sin16s::@10 dominated by main::@5 sin16s sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 sin16s::@9 sin16s::@8 sin16s::@2 @28 main @begin sin16s::@10
|
||||
sin16s::@11 dominated by main::@5 sin16s sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 sin16s::@9 sin16s::@8 sin16s::@2 @28 main @begin sin16s::@11 sin16s::@10
|
||||
sin16s::@12 dominated by main::@5 sin16s sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 sin16s::@9 sin16s::@8 sin16s::@2 @28 main @begin sin16s::@12 sin16s::@11 sin16s::@10
|
||||
sin16s::@6 dominated by main::@5 sin16s sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 sin16s::@9 sin16s::@8 sin16s::@6 sin16s::@2 @28 main @begin sin16s::@12 sin16s::@11 sin16s::@10
|
||||
sin16s::@3 dominated by main::@5 sin16s sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 sin16s::@9 sin16s::@8 sin16s::@3 sin16s::@2 @28 main @begin sin16s::@12 sin16s::@11 sin16s::@10
|
||||
sin16s::@return dominated by main::@5 sin16s sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 sin16s::@9 sin16s::@8 sin16s::@3 sin16s::@2 @28 main @begin sin16s::@return sin16s::@12 sin16s::@11 sin16s::@10
|
||||
sin16s::@15 dominated by main::@5 sin16s sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 sin16s::@9 sin16s::@8 sin16s::@2 @28 main @begin sin16s::@15 sin16s::@12 sin16s::@11 sin16s::@10
|
||||
mulu16_sel dominated by main::@5 sin16s sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 mulu16_sel sin16s::@2 @28 main @begin
|
||||
mulu16_sel::@2 dominated by main::@5 sin16s sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 mulu16_sel sin16s::@2 @28 main @begin mulu16_sel::@2
|
||||
mulu16_sel::@return dominated by main::@5 sin16s sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 mulu16_sel sin16s::@2 @28 main @begin mulu16_sel::@return mulu16_sel::@2
|
||||
mul16u dominated by mul16u main::@5 sin16s sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 mulu16_sel sin16s::@2 @28 main @begin
|
||||
mul16u::@1 dominated by mul16u main::@5 sin16s sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 mulu16_sel sin16s::@2 @28 main mul16u::@1 @begin
|
||||
mul16u::@return dominated by mul16u main::@5 sin16s sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 mulu16_sel sin16s::@2 mul16u::@return @28 main mul16u::@1 @begin
|
||||
mul16u::@2 dominated by mul16u main::@5 sin16s sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 mulu16_sel sin16s::@2 @28 main mul16u::@1 mul16u::@2 @begin
|
||||
mul16u::@7 dominated by mul16u main::@5 sin16s sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 mulu16_sel sin16s::@2 @28 main mul16u::@1 mul16u::@2 @begin mul16u::@7
|
||||
mul16u::@4 dominated by mul16u main::@5 sin16s sin16s_gen sin16s_gen::@3 sin16s::@1 sin16s_gen::@1 mulu16_sel sin16s::@2 @28 main mul16u::@1 mul16u::@2 @begin mul16u::@4
|
||||
div32u16u dominated by main::@5 sin16s_gen div32u16u @28 main @begin
|
||||
div32u16u::@2 dominated by main::@5 sin16s_gen div32u16u @28 main div32u16u::@2 @begin
|
||||
div32u16u::@3 dominated by main::@5 sin16s_gen div32u16u @28 main div32u16u::@2 div32u16u::@3 @begin
|
||||
div32u16u::@return dominated by main::@5 sin16s_gen div32u16u div32u16u::@return @28 main div32u16u::@2 div32u16u::@3 @begin
|
||||
divr16u dominated by divr16u @28 main @begin
|
||||
divr16u::@1 dominated by divr16u::@1 divr16u @28 main @begin
|
||||
divr16u::@4 dominated by divr16u::@1 divr16u::@4 divr16u @28 main @begin
|
||||
divr16u::@2 dominated by divr16u::@2 divr16u::@1 divr16u @28 main @begin
|
||||
divr16u::@5 dominated by divr16u::@2 divr16u::@1 divr16u::@5 divr16u @28 main @begin
|
||||
divr16u::@3 dominated by divr16u::@2 divr16u::@1 divr16u::@3 divr16u @28 main @begin
|
||||
divr16u::@6 dominated by divr16u::@2 divr16u::@1 divr16u::@3 divr16u::@6 divr16u @28 main @begin
|
||||
divr16u::@return dominated by divr16u::@2 divr16u::@1 divr16u::@3 divr16u::@6 divr16u::@return divr16u @28 main @begin
|
||||
sin8s_gen dominated by sin8s_gen @28 main @begin
|
||||
sin8s_gen::@3 dominated by sin8s_gen @28 main @begin sin8s_gen::@3
|
||||
sin8s_gen::@1 dominated by sin8s_gen @28 main @begin sin8s_gen::@1 sin8s_gen::@3
|
||||
sin8s_gen::@4 dominated by sin8s_gen @28 main @begin sin8s_gen::@1 sin8s_gen::@3 sin8s_gen::@4
|
||||
sin8s_gen::@return dominated by sin8s_gen sin8s_gen::@return @28 main @begin sin8s_gen::@1 sin8s_gen::@3 sin8s_gen::@4
|
||||
sin8s dominated by sin8s_gen @28 main sin8s @begin sin8s_gen::@1 sin8s_gen::@3
|
||||
sin8s::@5 dominated by sin8s_gen @28 main sin8s @begin sin8s::@5 sin8s_gen::@1 sin8s_gen::@3
|
||||
sin8s::@1 dominated by sin8s_gen @28 main sin8s @begin sin8s::@1 sin8s_gen::@1 sin8s_gen::@3
|
||||
sin8s::@6 dominated by sin8s_gen @28 main sin8s @begin sin8s::@1 sin8s::@6 sin8s_gen::@1 sin8s_gen::@3
|
||||
sin8s::@2 dominated by sin8s_gen @28 main sin8s @begin sin8s::@2 sin8s::@1 sin8s_gen::@1 sin8s_gen::@3
|
||||
sin8s::@10 dominated by sin8s_gen sin8s::@10 @28 main sin8s @begin sin8s::@2 sin8s::@1 sin8s_gen::@1 sin8s_gen::@3
|
||||
sin8s::@11 dominated by sin8s_gen sin8s::@11 sin8s::@10 @28 main sin8s @begin sin8s::@2 sin8s::@1 sin8s_gen::@1 sin8s_gen::@3
|
||||
sin8s::@12 dominated by sin8s_gen sin8s::@12 sin8s::@11 sin8s::@10 @28 main sin8s @begin sin8s::@2 sin8s::@1 sin8s_gen::@1 sin8s_gen::@3
|
||||
sin8s::@13 dominated by sin8s_gen sin8s::@13 sin8s::@12 sin8s::@11 sin8s::@10 @28 main sin8s @begin sin8s::@2 sin8s::@1 sin8s_gen::@1 sin8s_gen::@3
|
||||
sin8s::@14 dominated by sin8s_gen sin8s::@14 sin8s::@13 sin8s::@12 sin8s::@11 sin8s::@10 @28 main sin8s @begin sin8s::@2 sin8s::@1 sin8s_gen::@1 sin8s_gen::@3
|
||||
sin8s::@7 dominated by sin8s_gen sin8s::@14 sin8s::@13 sin8s::@12 sin8s::@11 sin8s::@10 @28 main sin8s @begin sin8s::@2 sin8s::@1 sin8s::@7 sin8s_gen::@1 sin8s_gen::@3
|
||||
sin8s::@3 dominated by sin8s_gen sin8s::@14 sin8s::@13 sin8s::@12 sin8s::@11 sin8s::@10 @28 main sin8s @begin sin8s::@2 sin8s::@1 sin8s::@3 sin8s_gen::@1 sin8s_gen::@3
|
||||
sin8s::@8 dominated by sin8s_gen sin8s::@14 sin8s::@13 sin8s::@12 sin8s::@11 sin8s::@10 @28 main sin8s @begin sin8s::@2 sin8s::@1 sin8s::@3 sin8s::@8 sin8s_gen::@1 sin8s_gen::@3
|
||||
sin8s::@4 dominated by sin8s_gen sin8s::@14 sin8s::@13 sin8s::@12 sin8s::@11 sin8s::@10 @28 main sin8s @begin sin8s::@2 sin8s::@1 sin8s::@4 sin8s::@3 sin8s_gen::@1 sin8s_gen::@3
|
||||
sin8s::@return dominated by sin8s_gen sin8s::@14 sin8s::@13 sin8s::@12 sin8s::@11 sin8s::@10 sin8s::@return @28 main sin8s @begin sin8s::@2 sin8s::@1 sin8s::@4 sin8s::@3 sin8s_gen::@1 sin8s_gen::@3
|
||||
sin8s::@18 dominated by sin8s_gen sin8s::@18 sin8s::@14 sin8s::@13 sin8s::@12 sin8s::@11 sin8s::@10 @28 main sin8s @begin sin8s::@2 sin8s::@1 sin8s::@3 sin8s_gen::@1 sin8s_gen::@3
|
||||
mulu8_sel dominated by sin8s_gen mulu8_sel @28 main sin8s @begin sin8s::@2 sin8s::@1 sin8s_gen::@1 sin8s_gen::@3
|
||||
mulu8_sel::@2 dominated by mulu8_sel::@2 sin8s_gen mulu8_sel @28 main sin8s @begin sin8s::@2 sin8s::@1 sin8s_gen::@1 sin8s_gen::@3
|
||||
mulu8_sel::@return dominated by mulu8_sel::@2 sin8s_gen mulu8_sel::@return mulu8_sel @28 main sin8s @begin sin8s::@2 sin8s::@1 sin8s_gen::@1 sin8s_gen::@3
|
||||
mul8u dominated by sin8s_gen mul8u mulu8_sel @28 main sin8s @begin sin8s::@2 sin8s::@1 sin8s_gen::@1 sin8s_gen::@3
|
||||
mul8u::@1 dominated by sin8s_gen mul8u mulu8_sel @28 main sin8s @begin sin8s::@2 sin8s::@1 sin8s_gen::@1 sin8s_gen::@3 mul8u::@1
|
||||
mul8u::@return dominated by sin8s_gen mul8u mulu8_sel mul8u::@return @28 main sin8s @begin sin8s::@2 sin8s::@1 sin8s_gen::@1 sin8s_gen::@3 mul8u::@1
|
||||
mul8u::@2 dominated by sin8s_gen mul8u mulu8_sel @28 main sin8s @begin sin8s::@2 sin8s::@1 sin8s_gen::@1 sin8s_gen::@3 mul8u::@2 mul8u::@1
|
||||
mul8u::@7 dominated by sin8s_gen mul8u mulu8_sel @28 main sin8s @begin sin8s::@2 sin8s::@1 sin8s_gen::@1 sin8s_gen::@3 mul8u::@7 mul8u::@2 mul8u::@1
|
||||
mul8u::@4 dominated by sin8s_gen mul8u mulu8_sel @28 main sin8s @begin sin8s::@2 sin8s::@1 sin8s_gen::@1 sin8s_gen::@3 mul8u::@2 mul8u::@1 mul8u::@4
|
||||
div16u dominated by div16u sin8s_gen @28 main @begin
|
||||
div16u::@2 dominated by div16u sin8s_gen div16u::@2 @28 main @begin
|
||||
div16u::@return dominated by div16u::@return div16u sin8s_gen div16u::@2 @28 main @begin
|
||||
|
||||
NATURAL LOOPS
|
||||
Found back edge: Loop head: main::@1 tails: main::@9 blocks: null
|
||||
@ -7177,17 +6944,17 @@ INITIAL ASM
|
||||
.label char_cursor = 7
|
||||
//SEG2 @begin
|
||||
bbegin:
|
||||
//SEG3 [1] phi from @begin to @29 [phi:@begin->@29]
|
||||
b29_from_bbegin:
|
||||
jmp b29
|
||||
//SEG4 @29
|
||||
b29:
|
||||
//SEG3 [1] phi from @begin to @28 [phi:@begin->@28]
|
||||
b28_from_bbegin:
|
||||
jmp b28
|
||||
//SEG4 @28
|
||||
b28:
|
||||
//SEG5 [2] call main param-assignment [ ] ( )
|
||||
//SEG6 [4] phi from @29 to main [phi:@29->main]
|
||||
main_from_b29:
|
||||
//SEG6 [4] phi from @28 to main [phi:@28->main]
|
||||
main_from_b28:
|
||||
jsr main
|
||||
//SEG7 [3] phi from @29 to @end [phi:@29->@end]
|
||||
bend_from_b29:
|
||||
//SEG7 [3] phi from @28 to @end [phi:@28->@end]
|
||||
bend_from_b28:
|
||||
jmp bend
|
||||
//SEG8 @end
|
||||
bend:
|
||||
@ -9437,17 +9204,17 @@ ASSEMBLER BEFORE OPTIMIZATION
|
||||
.label char_cursor = 5
|
||||
//SEG2 @begin
|
||||
bbegin:
|
||||
//SEG3 [1] phi from @begin to @29 [phi:@begin->@29]
|
||||
b29_from_bbegin:
|
||||
jmp b29
|
||||
//SEG4 @29
|
||||
b29:
|
||||
//SEG3 [1] phi from @begin to @28 [phi:@begin->@28]
|
||||
b28_from_bbegin:
|
||||
jmp b28
|
||||
//SEG4 @28
|
||||
b28:
|
||||
//SEG5 [2] call main param-assignment [ ] ( )
|
||||
//SEG6 [4] phi from @29 to main [phi:@29->main]
|
||||
main_from_b29:
|
||||
//SEG6 [4] phi from @28 to main [phi:@28->main]
|
||||
main_from_b28:
|
||||
jsr main
|
||||
//SEG7 [3] phi from @29 to @end [phi:@29->@end]
|
||||
bend_from_b29:
|
||||
//SEG7 [3] phi from @28 to @end [phi:@28->@end]
|
||||
bend_from_b28:
|
||||
jmp bend
|
||||
//SEG8 @end
|
||||
bend:
|
||||
@ -10970,7 +10737,7 @@ div16u: {
|
||||
}
|
||||
|
||||
ASSEMBLER OPTIMIZATIONS
|
||||
Removing instruction jmp b29
|
||||
Removing instruction jmp b28
|
||||
Removing instruction jmp bend
|
||||
Removing instruction jmp b5
|
||||
Removing instruction jmp b6
|
||||
@ -11093,9 +10860,9 @@ Replacing label b3_from_b14 with b3
|
||||
Replacing label b4_from_b18 with b4
|
||||
Replacing label b4_from_b2 with b4
|
||||
Removing instruction bbegin:
|
||||
Removing instruction b29_from_bbegin:
|
||||
Removing instruction main_from_b29:
|
||||
Removing instruction bend_from_b29:
|
||||
Removing instruction b28_from_bbegin:
|
||||
Removing instruction main_from_b28:
|
||||
Removing instruction bend_from_b28:
|
||||
Removing instruction b5_from_main:
|
||||
Removing instruction sin16s_gen_from_b5:
|
||||
Removing instruction b6_from_b5:
|
||||
@ -11138,7 +10905,7 @@ Removing instruction breturn:
|
||||
Removing instruction b4_from_b2:
|
||||
Removing instruction b4_from_b7:
|
||||
Succesful ASM optimization Pass5RedundantLabelElimination
|
||||
Removing instruction b29:
|
||||
Removing instruction b28:
|
||||
Removing instruction bend:
|
||||
Removing instruction sin8s_gen_from_main:
|
||||
Removing instruction b5:
|
||||
@ -11244,7 +11011,7 @@ Removing unreachable instruction jmp b3
|
||||
Succesful ASM optimization Pass5UnreachableCodeElimination
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
(label) @29
|
||||
(label) @28
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(word) PI2_u4f12
|
||||
@ -11700,12 +11467,12 @@ Score: 28398
|
||||
.label rem16u = 5
|
||||
.label char_cursor = 5
|
||||
//SEG2 @begin
|
||||
//SEG3 [1] phi from @begin to @29 [phi:@begin->@29]
|
||||
//SEG4 @29
|
||||
//SEG3 [1] phi from @begin to @28 [phi:@begin->@28]
|
||||
//SEG4 @28
|
||||
//SEG5 [2] call main param-assignment [ ] ( )
|
||||
//SEG6 [4] phi from @29 to main [phi:@29->main]
|
||||
//SEG6 [4] phi from @28 to main [phi:@28->main]
|
||||
jsr main
|
||||
//SEG7 [3] phi from @29 to @end [phi:@29->@end]
|
||||
//SEG7 [3] phi from @28 to @end [phi:@28->@end]
|
||||
//SEG8 @end
|
||||
//SEG9 main
|
||||
main: {
|
||||
|
@ -1,4 +1,4 @@
|
||||
(label) @29
|
||||
(label) @28
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(word) PI2_u4f12
|
||||
|
Loading…
Reference in New Issue
Block a user