1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2025-02-23 04:29:05 +00:00

Fixed test data

This commit is contained in:
Jesper Gravgaard 2017-07-31 23:39:42 +02:00
parent 27084f8667
commit 46dd64e46c
19 changed files with 160 additions and 262 deletions

View File

@ -45,6 +45,6 @@ B2:
lda 5 lda 5
sec sec
sbc #39 sbc #39
B3_from_B2:
sta 5 sta 5
B3_from_B2:
jmp B3 jmp B3

View File

@ -1046,11 +1046,6 @@ Initial phi equivalence classes
[ x#2 x#1 ] [ x#2 x#1 ]
[ e#3 e#5 e#1 e#2 ] [ e#3 e#5 e#1 e#2 ]
[ y#2 y#4 y#1 ] [ y#2 y#4 y#1 ]
Copy Coalesced equivalence classes
[ cursor#3 cursor#5 cursor#1 cursor#2 ]
[ x#2 x#1 ]
[ e#3 e#5 e#1 e#2 ]
[ y#2 y#4 y#1 ]
Complete equivalence classes Complete equivalence classes
[ cursor#3 cursor#5 cursor#1 cursor#2 ] [ cursor#3 cursor#5 cursor#1 cursor#2 ]
[ x#2 x#1 ] [ x#2 x#1 ]
@ -1093,11 +1088,11 @@ zp byte:4 [ x#2 x#1 ]
zp byte:5 [ e#3 e#5 e#1 e#2 ] zp byte:5 [ e#3 e#5 e#1 e#2 ]
zp byte:6 [ y#2 y#4 y#1 ] zp byte:6 [ y#2 y#4 y#1 ]
Re-allocated ZP register from zp ptr byte:2 to zp ptr byte:2 Uplifting max weight 55.0 live range equivalence class zp byte:5 [ e#3 e#5 e#1 e#2 ]
Re-allocated ZP register from zp byte:4 to zp byte:4 Uplift to reg byte a resulted in clobber.
Re-allocated ZP register from zp byte:5 to zp byte:5 Register Cycles: reg byte x 78
Re-allocated ZP register from zp byte:6 to zp byte:6 Uplift to reg byte x succesfull.
Uplifting of variable (byte) e#2 to A Uplift to reg byte y resulted in clobber.
REGISTER UPLIFTING REGISTER UPLIFTING
(byte[1000]) SCREEN (byte[1000]) SCREEN
(byte) STAR (byte) STAR
@ -1108,7 +1103,7 @@ REGISTER UPLIFTING
(byte*) cursor#5 zp ptr byte:2 16.5 (byte*) cursor#5 zp ptr byte:2 16.5
(byte) e (byte) e
(byte) e#1 zp byte:5 11.0 (byte) e#1 zp byte:5 11.0
(byte) e#2 reg byte a 22.0 (byte) e#2 zp byte:5 22.0
(byte) e#3 zp byte:5 5.5 (byte) e#3 zp byte:5 5.5
(byte) e#5 zp byte:5 16.5 (byte) e#5 zp byte:5 16.5
(byte) x (byte) x
@ -1198,14 +1193,14 @@ B2:
bcc !+ bcc !+
inc 2+1 inc 2+1
!: !:
// [10] (byte) e#2 ← (byte) e#1 - (byte) 39 [ x#1 cursor#2 e#2 y#1 ] // aby=zpby1_minus_coby1 // [10] (byte) e#2 ← (byte) e#1 - (byte) 39 [ x#1 cursor#2 e#2 y#1 ] // zpby1=zpby1_minus_coby1
lda 5 lda 5
sec sec
sbc #39 sbc #39
sta 5
B3_from_B2: B3_from_B2:
// (byte) y#4 = (byte) y#1 // register copy zp byte:6 // (byte) y#4 = (byte) y#1 // register copy zp byte:6
// (byte) e#5 = (byte) e#2 // zpby1=aby // (byte) e#5 = (byte) e#2 // register copy zp byte:5
sta 5
// (byte*) cursor#5 = (byte*) cursor#2 // register copy zp ptr byte:2 // (byte*) cursor#5 = (byte*) cursor#2 // register copy zp ptr byte:2
jmp B3 jmp B3
@ -1278,14 +1273,14 @@ B2:
bcc !+ bcc !+
inc 2+1 inc 2+1
!: !:
// [10] (byte) e#2 ← (byte) e#1 - (byte) 39 [ x#1 cursor#2 e#2 y#1 ] // aby=zpby1_minus_coby1 // [10] (byte) e#2 ← (byte) e#1 - (byte) 39 [ x#1 cursor#2 e#2 y#1 ] // zpby1=zpby1_minus_coby1
lda 5 lda 5
sec sec
sbc #39 sbc #39
sta 5
B3_from_B2: B3_from_B2:
// (byte) y#4 = (byte) y#1 // register copy zp byte:6 // (byte) y#4 = (byte) y#1 // register copy zp byte:6
// (byte) e#5 = (byte) e#2 // zpby1=aby // (byte) e#5 = (byte) e#2 // register copy zp byte:5
sta 5
// (byte*) cursor#5 = (byte*) cursor#2 // register copy zp ptr byte:2 // (byte*) cursor#5 = (byte*) cursor#2 // register copy zp ptr byte:2
jmp B3 jmp B3
@ -1355,14 +1350,14 @@ B2:
bcc !+ bcc !+
inc 2+1 inc 2+1
!: !:
// [10] (byte) e#2 ← (byte) e#1 - (byte) 39 [ x#1 cursor#2 e#2 y#1 ] // aby=zpby1_minus_coby1 // [10] (byte) e#2 ← (byte) e#1 - (byte) 39 [ x#1 cursor#2 e#2 y#1 ] // zpby1=zpby1_minus_coby1
lda 5 lda 5
sec sec
sbc #39 sbc #39
sta 5
B3_from_B2: B3_from_B2:
// (byte) y#4 = (byte) y#1 // register copy zp byte:6 // (byte) y#4 = (byte) y#1 // register copy zp byte:6
// (byte) e#5 = (byte) e#2 // zpby1=aby // (byte) e#5 = (byte) e#2 // register copy zp byte:5
sta 5
// (byte*) cursor#5 = (byte*) cursor#2 // register copy zp ptr byte:2 // (byte*) cursor#5 = (byte*) cursor#2 // register copy zp ptr byte:2
jmp B3 jmp B3
@ -1381,7 +1376,7 @@ FINAL SYMBOL TABLE
(byte*) cursor#5 zp ptr byte:2 16.5 (byte*) cursor#5 zp ptr byte:2 16.5
(byte) e (byte) e
(byte) e#1 zp byte:5 11.0 (byte) e#1 zp byte:5 11.0
(byte) e#2 reg byte a 22.0 (byte) e#2 zp byte:5 22.0
(byte) e#3 zp byte:5 5.5 (byte) e#3 zp byte:5 5.5
(byte) e#5 zp byte:5 16.5 (byte) e#5 zp byte:5 16.5
(byte) x (byte) x
@ -1467,14 +1462,14 @@ B2:
bcc !+ bcc !+
inc 2+1 inc 2+1
!: !:
// [10] (byte) e#2 ← (byte) e#1 - (byte) 39 [ x#1 cursor#2 e#2 y#1 ] // aby=zpby1_minus_coby1 // [10] (byte) e#2 ← (byte) e#1 - (byte) 39 [ x#1 cursor#2 e#2 y#1 ] // zpby1=zpby1_minus_coby1
lda 5 lda 5
sec sec
sbc #39 sbc #39
sta 5
B3_from_B2: B3_from_B2:
// (byte) y#4 = (byte) y#1 // register copy zp byte:6 // (byte) y#4 = (byte) y#1 // register copy zp byte:6
// (byte) e#5 = (byte) e#2 // zpby1=aby // (byte) e#5 = (byte) e#2 // register copy zp byte:5
sta 5
// (byte*) cursor#5 = (byte*) cursor#2 // register copy zp ptr byte:2 // (byte*) cursor#5 = (byte*) cursor#2 // register copy zp ptr byte:2
jmp B3 jmp B3

View File

@ -12,7 +12,7 @@
(byte*) cursor#5 zp ptr byte:2 16.5 (byte*) cursor#5 zp ptr byte:2 16.5
(byte) e (byte) e
(byte) e#1 zp byte:5 11.0 (byte) e#1 zp byte:5 11.0
(byte) e#2 reg byte a 22.0 (byte) e#2 zp byte:5 22.0
(byte) e#3 zp byte:5 5.5 (byte) e#3 zp byte:5 5.5
(byte) e#5 zp byte:5 16.5 (byte) e#5 zp byte:5 16.5
(byte) x (byte) x

View File

@ -17,8 +17,8 @@ B1:
lda 3 lda 3
clc clc
adc 4 adc 4
sta 3 sta 5
lda 3 lda 5
ldx 2 ldx 2
sta 4354,x sta 4354,x
inc 2 inc 2

View File

@ -417,18 +417,18 @@ Loop head: @1 tails: @1 blocks: @1 depth: 1
Initial phi equivalence classes Initial phi equivalence classes
[ i#2 i#1 ] [ i#2 i#1 ]
Copy Coalesced equivalence classes
[ i#2 i#1 ]
Added variable $1 to zero page equivalence class [ $1 ] Added variable $1 to zero page equivalence class [ $1 ]
Added variable $3 to zero page equivalence class [ $3 ] Added variable $3 to zero page equivalence class [ $3 ]
Added variable $4 to zero page equivalence class [ $1 $4 ] Added variable $4 to zero page equivalence class [ $4 ]
Complete equivalence classes Complete equivalence classes
[ i#2 i#1 ] [ i#2 i#1 ]
[ $1 $4 ] [ $1 ]
[ $3 ] [ $3 ]
[ $4 ]
Allocated zp byte:2 to zp byte:2 [ i#2 i#1 ] Allocated zp byte:2 to zp byte:2 [ i#2 i#1 ]
Allocated zp byte:3 to zp byte:3 [ $1 $4 ] Allocated zp byte:3 to zp byte:3 [ $1 ]
Allocated zp byte:4 to zp byte:4 [ $3 ] Allocated zp byte:4 to zp byte:4 [ $3 ]
Allocated zp byte:5 to zp byte:5 [ $4 ]
VARIABLE REGISTER WEIGHTS VARIABLE REGISTER WEIGHTS
(byte~) $1 11.0 (byte~) $1 11.0
@ -440,36 +440,31 @@ VARIABLE REGISTER WEIGHTS
(byte) i#2 11.0 (byte) i#2 11.0
zp byte:2 [ i#2 i#1 ] zp byte:2 [ i#2 i#1 ]
zp byte:3 [ $1 $4 ] zp byte:3 [ $1 ]
zp byte:4 [ $3 ] zp byte:4 [ $3 ]
zp byte:5 [ $4 ]
Uplifting max weight 33.0 live range equivalence class zp byte:3 [ $1 $4 ] Uplifting max weight 27.5 live range equivalence class zp byte:2 [ i#2 i#1 ]
Error! Alive variable $1 register reg byte a clobbered by the ASM generated by statement [4] $3 ← 4353 *idx i#2
ldx 2
lda 4353,x
sta 4
Uplift to reg byte a resulted in clobber. Uplift to reg byte a resulted in clobber.
Error! Alive variable $1 register reg byte x clobbered by the ASM generated by statement [4] $3 ← 4353 *idx i#2 Register Cycles: reg byte x 39
ldx 2 Uplift to reg byte x succesfull.
lda 4353,x Register Cycles: reg byte y 39
sta 4
Uplift to reg byte x resulted in clobber.
Uplift to reg byte y succesfull. Uplift to reg byte y succesfull.
REGISTER UPLIFTING REGISTER UPLIFTING
(byte~) $1 zp byte:3 11.0 (byte~) $1 zp byte:3 11.0
(byte~) $3 zp byte:4 22.0 (byte~) $3 zp byte:4 22.0
(byte~) $4 zp byte:3 22.0 (byte~) $4 zp byte:5 22.0
(byte[15]) fibs (byte[15]) fibs
(byte) i (byte) i
(byte) i#1 zp byte:2 16.5 (byte) i#1 zp byte:2 16.5
(byte) i#2 zp byte:2 11.0 (byte) i#2 zp byte:2 11.0
zp byte:2 [ i#2 i#1 ] zp byte:2 [ i#2 i#1 ]
zp byte:3 [ $1 $4 ] zp byte:3 [ $1 ]
zp byte:4 [ $3 ] zp byte:4 [ $3 ]
zp byte:5 [ $4 ]
Coalescing zero page register [ zp byte:3 [ $1 ] ] with [ zp byte:5 [ $4 ] ]
INITIAL ASM INITIAL ASM
BBEGIN: BBEGIN:
// [0] *((word) 4352) ← (byte) 0 [ ] // _star_cowo1=coby2 // [0] *((word) 4352) ← (byte) 0 [ ] // _star_cowo1=coby2
@ -495,13 +490,13 @@ B1:
ldx 2 ldx 2
lda 4353,x lda 4353,x
sta 4 sta 4
// [5] (byte~) $4 ← (byte~) $1 + (byte~) $3 [ i#2 $4 ] // zpby1=zpby1_plus_zpby2 // [5] (byte~) $4 ← (byte~) $1 + (byte~) $3 [ i#2 $4 ] // zpby1=zpby2_plus_zpby3
lda 3 lda 3
clc clc
adc 4 adc 4
sta 3 sta 5
// [6] *((word) 4354 + (byte) i#2) ← (byte~) $4 [ i#2 ] // cowo1_staridx_zpby1=zpby2 // [6] *((word) 4354 + (byte) i#2) ← (byte~) $4 [ i#2 ] // cowo1_staridx_zpby1=zpby2
lda 3 lda 5
ldx 2 ldx 2
sta 4354,x sta 4354,x
// [7] (byte) i#1 ← (byte) i#2 + (byte) 1 [ i#1 ] // zpby1=zpby1_plus_1 // [7] (byte) i#1 ← (byte) i#2 + (byte) 1 [ i#1 ] // zpby1=zpby1_plus_1
@ -540,13 +535,13 @@ B1:
ldx 2 ldx 2
lda 4353,x lda 4353,x
sta 4 sta 4
// [5] (byte~) $4 ← (byte~) $1 + (byte~) $3 [ i#2 $4 ] // zpby1=zpby1_plus_zpby2 // [5] (byte~) $4 ← (byte~) $1 + (byte~) $3 [ i#2 $4 ] // zpby1=zpby2_plus_zpby3
lda 3 lda 3
clc clc
adc 4 adc 4
sta 3 sta 5
// [6] *((word) 4354 + (byte) i#2) ← (byte~) $4 [ i#2 ] // cowo1_staridx_zpby1=zpby2 // [6] *((word) 4354 + (byte) i#2) ← (byte~) $4 [ i#2 ] // cowo1_staridx_zpby1=zpby2
lda 3 lda 5
ldx 2 ldx 2
sta 4354,x sta 4354,x
// [7] (byte) i#1 ← (byte) i#2 + (byte) 1 [ i#1 ] // zpby1=zpby1_plus_1 // [7] (byte) i#1 ← (byte) i#2 + (byte) 1 [ i#1 ] // zpby1=zpby1_plus_1
@ -582,13 +577,13 @@ B1:
ldx 2 ldx 2
lda 4353,x lda 4353,x
sta 4 sta 4
// [5] (byte~) $4 ← (byte~) $1 + (byte~) $3 [ i#2 $4 ] // zpby1=zpby1_plus_zpby2 // [5] (byte~) $4 ← (byte~) $1 + (byte~) $3 [ i#2 $4 ] // zpby1=zpby2_plus_zpby3
lda 3 lda 3
clc clc
adc 4 adc 4
sta 3 sta 5
// [6] *((word) 4354 + (byte) i#2) ← (byte~) $4 [ i#2 ] // cowo1_staridx_zpby1=zpby2 // [6] *((word) 4354 + (byte) i#2) ← (byte~) $4 [ i#2 ] // cowo1_staridx_zpby1=zpby2
lda 3 lda 5
ldx 2 ldx 2
sta 4354,x sta 4354,x
// [7] (byte) i#1 ← (byte) i#2 + (byte) 1 [ i#1 ] // zpby1=zpby1_plus_1 // [7] (byte) i#1 ← (byte) i#2 + (byte) 1 [ i#1 ] // zpby1=zpby1_plus_1
@ -602,7 +597,7 @@ BEND:
FINAL SYMBOL TABLE FINAL SYMBOL TABLE
(byte~) $1 zp byte:3 11.0 (byte~) $1 zp byte:3 11.0
(byte~) $3 zp byte:4 22.0 (byte~) $3 zp byte:4 22.0
(byte~) $4 zp byte:3 22.0 (byte~) $4 zp byte:5 22.0
(label) @1 (label) @1
(label) @BEGIN (label) @BEGIN
(label) @END (label) @END
@ -638,13 +633,13 @@ B1:
ldx 2 ldx 2
lda 4353,x lda 4353,x
sta 4 sta 4
// [5] (byte~) $4 ← (byte~) $1 + (byte~) $3 [ i#2 $4 ] // zpby1=zpby1_plus_zpby2 // [5] (byte~) $4 ← (byte~) $1 + (byte~) $3 [ i#2 $4 ] // zpby1=zpby2_plus_zpby3
lda 3 lda 3
clc clc
adc 4 adc 4
sta 3 sta 5
// [6] *((word) 4354 + (byte) i#2) ← (byte~) $4 [ i#2 ] // cowo1_staridx_zpby1=zpby2 // [6] *((word) 4354 + (byte) i#2) ← (byte~) $4 [ i#2 ] // cowo1_staridx_zpby1=zpby2
lda 3 lda 5
ldx 2 ldx 2
sta 4354,x sta 4354,x
// [7] (byte) i#1 ← (byte) i#2 + (byte) 1 [ i#1 ] // zpby1=zpby1_plus_1 // [7] (byte) i#1 ← (byte) i#2 + (byte) 1 [ i#1 ] // zpby1=zpby1_plus_1

View File

@ -1,6 +1,6 @@
(byte~) $1 zp byte:3 11.0 (byte~) $1 zp byte:3 11.0
(byte~) $3 zp byte:4 22.0 (byte~) $3 zp byte:4 22.0
(byte~) $4 zp byte:3 22.0 (byte~) $4 zp byte:5 22.0
(label) @1 (label) @1
(label) @BEGIN (label) @BEGIN
(label) @END (label) @END

View File

@ -4028,18 +4028,6 @@ Initial phi equivalence classes
[ flip::c#2 flip::c#1 ] [ flip::c#2 flip::c#1 ]
[ flip::i#2 flip::i#1 ] [ flip::i#2 flip::i#1 ]
[ prepare::i#2 prepare::i#1 ] [ prepare::i#2 prepare::i#1 ]
Copy Coalesced equivalence classes
[ main::c#2 main::c#1 ]
[ plot::line#2 plot::line#1 ]
[ plot::y#2 plot::y#1 ]
[ plot::i#2 plot::i#3 plot::i#1 ]
[ plot::x#2 plot::x#1 ]
[ flip::r#2 flip::r#1 ]
[ flip::srcIdx#2 flip::srcIdx#3 flip::srcIdx#1 ]
[ flip::dstIdx#3 flip::dstIdx#5 flip::dstIdx#2 flip::dstIdx#1 ]
[ flip::c#2 flip::c#1 ]
[ flip::i#2 flip::i#1 ]
[ prepare::i#2 prepare::i#1 ]
Added variable main::$1 to zero page equivalence class [ main::$1 ] Added variable main::$1 to zero page equivalence class [ main::$1 ]
Added variable main::$3 to zero page equivalence class [ main::$3 ] Added variable main::$3 to zero page equivalence class [ main::$3 ]
Added variable plot::$3 to zero page equivalence class [ plot::$3 ] Added variable plot::$3 to zero page equivalence class [ plot::$3 ]
@ -4149,23 +4137,9 @@ zp byte:17 [ flip::$0 ]
zp byte:18 [ flip::$4 ] zp byte:18 [ flip::$4 ]
Uplifting max weight 2252.25 live range equivalence class zp byte:7 [ plot::x#2 plot::x#1 ] Uplifting max weight 2252.25 live range equivalence class zp byte:7 [ plot::x#2 plot::x#1 ]
Error! Alive variable plot::x#2 register reg byte a clobbered by the ASM generated by statement [15] plot::$3 ← 4096 *idx plot::i#2
ldx 6
lda 4096,x
sta 16
Error! Alive variable plot::x#2 register reg byte a clobbered by the ASM generated by statement [16] *(plot::line#2 + plot::x#2) ← plot::$3
tay
lda 16
sta (3),y
Uplift to reg byte a resulted in clobber. Uplift to reg byte a resulted in clobber.
Error! Alive variable plot::x#2 register reg byte x clobbered by the ASM generated by statement [15] plot::$3 ← 4096 *idx plot::i#2
ldx 6
lda 4096,x
sta 16
Uplift to reg byte x resulted in clobber. Uplift to reg byte x resulted in clobber.
Register Cycles: reg byte y 30
Uplift to reg byte y succesfull. Uplift to reg byte y succesfull.
REGISTER UPLIFTING REGISTER UPLIFTING
(byte*) RASTER (byte*) RASTER

View File

@ -363,9 +363,6 @@ Loop head: @1 tails: @3 blocks: @3 @1 @2 depth: 1
Initial phi equivalence classes Initial phi equivalence classes
[ i#2 i#1 ] [ i#2 i#1 ]
[ s#2 s#4 s#1 ] [ s#2 s#4 s#1 ]
Copy Coalesced equivalence classes
[ i#2 i#1 ]
[ s#2 s#4 s#1 ]
Complete equivalence classes Complete equivalence classes
[ i#2 i#1 ] [ i#2 i#1 ]
[ s#2 s#4 s#1 ] [ s#2 s#4 s#1 ]
@ -385,19 +382,10 @@ zp byte:2 [ i#2 i#1 ]
zp byte:3 [ s#2 s#4 s#1 ] zp byte:3 [ s#2 s#4 s#1 ]
Uplifting max weight 49.5 live range equivalence class zp byte:3 [ s#2 s#4 s#1 ] Uplifting max weight 49.5 live range equivalence class zp byte:3 [ s#2 s#4 s#1 ]
Error! Alive variable s#2 register reg byte a clobbered by the ASM generated by statement [1] if(i#2>5) goto @2
lda 2
cmp #5
beq !+
bcs B2
!:
Error! Alive variable s#4 register reg byte a clobbered by the ASM generated by statement [4] if(i#1>0) goto @1
lda 2
bne B1_from_B3
Uplift to reg byte a resulted in clobber. Uplift to reg byte a resulted in clobber.
Register Cycles: reg byte x 28
Uplift to reg byte x succesfull. Uplift to reg byte x succesfull.
Register Cycles: reg byte y 28
Uplift to reg byte y succesfull. Uplift to reg byte y succesfull.
REGISTER UPLIFTING REGISTER UPLIFTING
(byte) i (byte) i

View File

@ -711,9 +711,6 @@ Loop head: nest::@1 tails: nest::@1 blocks: nest::@1 depth: 2
Initial phi equivalence classes Initial phi equivalence classes
[ main::i#2 main::i#1 ] [ main::i#2 main::i#1 ]
[ nest::j#2 nest::j#1 ] [ nest::j#2 nest::j#1 ]
Copy Coalesced equivalence classes
[ main::i#2 main::i#1 ]
[ nest::j#2 nest::j#1 ]
Complete equivalence classes Complete equivalence classes
[ main::i#2 main::i#1 ] [ main::i#2 main::i#1 ]
[ nest::j#2 nest::j#1 ] [ nest::j#2 nest::j#1 ]
@ -735,8 +732,11 @@ zp byte:2 [ main::i#2 main::i#1 ]
zp byte:3 [ nest::j#2 nest::j#1 ] zp byte:3 [ nest::j#2 nest::j#1 ]
Uplifting max weight 303.0 live range equivalence class zp byte:3 [ nest::j#2 nest::j#1 ] Uplifting max weight 303.0 live range equivalence class zp byte:3 [ nest::j#2 nest::j#1 ]
Register Cycles: reg byte a 12
Uplift to reg byte a succesfull. Uplift to reg byte a succesfull.
Register Cycles: reg byte x 10
Uplift to reg byte x succesfull. Uplift to reg byte x succesfull.
Register Cycles: reg byte y 10
Uplift to reg byte y succesfull. Uplift to reg byte y succesfull.
REGISTER UPLIFTING REGISTER UPLIFTING
(byte*) SCREEN (byte*) SCREEN

View File

@ -1797,13 +1797,6 @@ Initial phi equivalence classes
[ nest1::j#2 nest1::j#1 ] [ nest1::j#2 nest1::j#1 ]
[ nest2::i#2 nest2::i#1 ] [ nest2::i#2 nest2::i#1 ]
[ nest2::j#2 nest2::j#1 ] [ nest2::j#2 nest2::j#1 ]
Copy Coalesced equivalence classes
[ main::i#2 main::i#1 ]
[ main::j#2 main::j#1 ]
[ nest1::i#2 nest1::i#1 ]
[ nest1::j#2 nest1::j#1 ]
[ nest2::i#2 nest2::i#1 ]
[ nest2::j#2 nest2::j#1 ]
Complete equivalence classes Complete equivalence classes
[ main::i#2 main::i#1 ] [ main::i#2 main::i#1 ]
[ main::j#2 main::j#1 ] [ main::j#2 main::j#1 ]
@ -1850,8 +1843,11 @@ zp byte:6 [ nest2::i#2 nest2::i#1 ]
zp byte:7 [ nest2::j#2 nest2::j#1 ] zp byte:7 [ nest2::j#2 nest2::j#1 ]
Uplifting max weight 3000003.0 live range equivalence class zp byte:7 [ nest2::j#2 nest2::j#1 ] Uplifting max weight 3000003.0 live range equivalence class zp byte:7 [ nest2::j#2 nest2::j#1 ]
Register Cycles: reg byte a 12
Uplift to reg byte a succesfull. Uplift to reg byte a succesfull.
Register Cycles: reg byte x 10
Uplift to reg byte x succesfull. Uplift to reg byte x succesfull.
Register Cycles: reg byte y 10
Uplift to reg byte y succesfull. Uplift to reg byte y succesfull.
REGISTER UPLIFTING REGISTER UPLIFTING
(byte*) SCREEN (byte*) SCREEN

View File

@ -516,9 +516,6 @@ Loop head: main::@1 tails: main::@5 main::@4 blocks: main::@5 main::@2 main::@1
Initial phi equivalence classes Initial phi equivalence classes
[ main::i#2 main::i#1 ] [ main::i#2 main::i#1 ]
[ main::s#3 main::s#1 main::s#2 ] [ main::s#3 main::s#1 main::s#2 ]
Copy Coalesced equivalence classes
[ main::i#2 main::i#1 ]
[ main::s#3 main::s#1 main::s#2 ]
Complete equivalence classes Complete equivalence classes
[ main::i#2 main::i#1 ] [ main::i#2 main::i#1 ]
[ main::s#3 main::s#1 main::s#2 ] [ main::s#3 main::s#1 main::s#2 ]
@ -539,19 +536,10 @@ zp byte:2 [ main::i#2 main::i#1 ]
zp byte:3 [ main::s#3 main::s#1 main::s#2 ] zp byte:3 [ main::s#3 main::s#1 main::s#2 ]
Uplifting max weight 55.0 live range equivalence class zp byte:3 [ main::s#3 main::s#1 main::s#2 ] Uplifting max weight 55.0 live range equivalence class zp byte:3 [ main::s#3 main::s#1 main::s#2 ]
Error! Alive variable main::s#3 register reg byte a clobbered by the ASM generated by statement [3] if(main::i#1>0) goto main::@2
lda 2
bne main__B2
Error! Alive variable main::s#3 register reg byte a clobbered by the ASM generated by statement [5] if(main::i#1>50) goto main::@4
lda 2
cmp #50
beq !+
bcs main__B4
!:
Uplift to reg byte a resulted in clobber. Uplift to reg byte a resulted in clobber.
Register Cycles: reg byte x 23
Uplift to reg byte x succesfull. Uplift to reg byte x succesfull.
Register Cycles: reg byte y 23
Uplift to reg byte y succesfull. Uplift to reg byte y succesfull.
REGISTER UPLIFTING REGISTER UPLIFTING
(void()) main() (void()) main()

View File

@ -292,8 +292,6 @@ Loop head: @1 tails: @1 blocks: @1 depth: 1
Initial phi equivalence classes Initial phi equivalence classes
[ i#2 i#1 ] [ i#2 i#1 ]
Copy Coalesced equivalence classes
[ i#2 i#1 ]
Added variable $1 to zero page equivalence class [ $1 ] Added variable $1 to zero page equivalence class [ $1 ]
Complete equivalence classes Complete equivalence classes
[ i#2 i#1 ] [ i#2 i#1 ]
@ -312,18 +310,10 @@ zp byte:2 [ i#2 i#1 ]
zp byte:3 [ $1 ] zp byte:3 [ $1 ]
Uplifting max weight 31.166666666666664 live range equivalence class zp byte:2 [ i#2 i#1 ] Uplifting max weight 31.166666666666664 live range equivalence class zp byte:2 [ i#2 i#1 ]
Error! Alive variable i#2 register reg byte a clobbered by the ASM generated by statement [1] $1 ← i#2 + 4
clc
adc #4
sta 3
Error! Alive variable i#2 register reg byte a clobbered by the ASM generated by statement [2] *(4352 + i#2) ← $1
tax
lda 3
sta 4352,x
Uplift to reg byte a resulted in clobber. Uplift to reg byte a resulted in clobber.
Register Cycles: reg byte x 23
Uplift to reg byte x succesfull. Uplift to reg byte x succesfull.
Register Cycles: reg byte y 23
Uplift to reg byte y succesfull. Uplift to reg byte y succesfull.
REGISTER UPLIFTING REGISTER UPLIFTING
(byte~) $1 zp byte:3 22.0 (byte~) $1 zp byte:3 22.0

View File

@ -78,7 +78,7 @@ rvalue__Breturn:
rvalue__B2: rvalue__B2:
ldx 8 ldx 8
lda 1024,x lda 1024,x
sta 8 sta 13
inc 8 inc 8
rvalue__B1_from_B2: rvalue__B1_from_B2:
jmp rvalue__B1 jmp rvalue__B1

View File

@ -1815,36 +1815,31 @@ Initial phi equivalence classes
[ rvaluevar::screen#2 rvaluevar::screen#1 ] [ rvaluevar::screen#2 rvaluevar::screen#1 ]
[ rvalue::i#2 rvalue::i#1 ] [ rvalue::i#2 rvalue::i#1 ]
[ lvalue::i#2 lvalue::i#1 ] [ lvalue::i#2 lvalue::i#1 ]
Copy Coalesced equivalence classes Added variable rvaluevar::b#0 to zero page equivalence class [ rvaluevar::b#0 ]
Added variable rvalue::b#0 to zero page equivalence class [ rvalue::b#0 ]
Added variable rvalue::b#1 to zero page equivalence class [ rvalue::b#1 ]
Added variable rvalue::b#2 to zero page equivalence class [ rvalue::b#2 ]
Complete equivalence classes
[ lvaluevar::i#2 lvaluevar::i#1 ] [ lvaluevar::i#2 lvaluevar::i#1 ]
[ lvaluevar::screen#2 lvaluevar::screen#1 ] [ lvaluevar::screen#2 lvaluevar::screen#1 ]
[ rvaluevar::i#2 rvaluevar::i#1 ] [ rvaluevar::i#2 rvaluevar::i#1 ]
[ rvaluevar::screen#2 rvaluevar::screen#1 ] [ rvaluevar::screen#2 rvaluevar::screen#1 ]
[ rvalue::i#2 rvalue::i#1 ] [ rvalue::i#2 rvalue::i#1 ]
[ lvalue::i#2 lvalue::i#1 ] [ lvalue::i#2 lvalue::i#1 ]
Added variable rvaluevar::b#0 to zero page equivalence class [ rvaluevar::b#0 ]
Added variable rvalue::b#0 to zero page equivalence class [ rvalue::b#0 ]
Added variable rvalue::b#1 to zero page equivalence class [ rvalue::b#1 ]
Added variable rvalue::b#2 to zero page equivalence class [ rvalue::i#2 rvalue::i#1 rvalue::b#2 ]
Complete equivalence classes
[ lvaluevar::i#2 lvaluevar::i#1 ]
[ lvaluevar::screen#2 lvaluevar::screen#1 ]
[ rvaluevar::i#2 rvaluevar::i#1 ]
[ rvaluevar::screen#2 rvaluevar::screen#1 ]
[ rvalue::i#2 rvalue::i#1 rvalue::b#2 ]
[ lvalue::i#2 lvalue::i#1 ]
[ rvaluevar::b#0 ] [ rvaluevar::b#0 ]
[ rvalue::b#0 ] [ rvalue::b#0 ]
[ rvalue::b#1 ] [ rvalue::b#1 ]
[ rvalue::b#2 ]
Allocated zp byte:2 to zp byte:2 [ lvaluevar::i#2 lvaluevar::i#1 ] Allocated zp byte:2 to zp byte:2 [ lvaluevar::i#2 lvaluevar::i#1 ]
Allocated zp ptr byte:3 to zp ptr byte:3 [ lvaluevar::screen#2 lvaluevar::screen#1 ] Allocated zp ptr byte:3 to zp ptr byte:3 [ lvaluevar::screen#2 lvaluevar::screen#1 ]
Allocated zp byte:5 to zp byte:5 [ rvaluevar::i#2 rvaluevar::i#1 ] Allocated zp byte:5 to zp byte:5 [ rvaluevar::i#2 rvaluevar::i#1 ]
Allocated zp ptr byte:6 to zp ptr byte:6 [ rvaluevar::screen#2 rvaluevar::screen#1 ] Allocated zp ptr byte:6 to zp ptr byte:6 [ rvaluevar::screen#2 rvaluevar::screen#1 ]
Allocated zp byte:8 to zp byte:8 [ rvalue::i#2 rvalue::i#1 rvalue::b#2 ] Allocated zp byte:8 to zp byte:8 [ rvalue::i#2 rvalue::i#1 ]
Allocated zp byte:9 to zp byte:9 [ lvalue::i#2 lvalue::i#1 ] Allocated zp byte:9 to zp byte:9 [ lvalue::i#2 lvalue::i#1 ]
Allocated zp byte:10 to zp byte:10 [ rvaluevar::b#0 ] Allocated zp byte:10 to zp byte:10 [ rvaluevar::b#0 ]
Allocated zp byte:11 to zp byte:11 [ rvalue::b#0 ] Allocated zp byte:11 to zp byte:11 [ rvalue::b#0 ]
Allocated zp byte:12 to zp byte:12 [ rvalue::b#1 ] Allocated zp byte:12 to zp byte:12 [ rvalue::b#1 ]
Allocated zp byte:13 to zp byte:13 [ rvalue::b#2 ]
VARIABLE REGISTER WEIGHTS VARIABLE REGISTER WEIGHTS
(void()) lvalue() (void()) lvalue()
@ -1884,28 +1879,20 @@ zp byte:2 [ lvaluevar::i#2 lvaluevar::i#1 ]
zp ptr byte:3 [ lvaluevar::screen#2 lvaluevar::screen#1 ] zp ptr byte:3 [ lvaluevar::screen#2 lvaluevar::screen#1 ]
zp byte:5 [ rvaluevar::i#2 rvaluevar::i#1 ] zp byte:5 [ rvaluevar::i#2 rvaluevar::i#1 ]
zp ptr byte:6 [ rvaluevar::screen#2 rvaluevar::screen#1 ] zp ptr byte:6 [ rvaluevar::screen#2 rvaluevar::screen#1 ]
zp byte:8 [ rvalue::i#2 rvalue::i#1 rvalue::b#2 ] zp byte:8 [ rvalue::i#2 rvalue::i#1 ]
zp byte:9 [ lvalue::i#2 lvalue::i#1 ] zp byte:9 [ lvalue::i#2 lvalue::i#1 ]
zp byte:10 [ rvaluevar::b#0 ] zp byte:10 [ rvaluevar::b#0 ]
zp byte:11 [ rvalue::b#0 ] zp byte:11 [ rvalue::b#0 ]
zp byte:12 [ rvalue::b#1 ] zp byte:12 [ rvalue::b#1 ]
zp byte:13 [ rvalue::b#2 ]
Uplifting max weight Infinity live range equivalence class zp byte:8 [ rvalue::i#2 rvalue::i#1 rvalue::b#2 ] Uplifting max weight Infinity live range equivalence class zp byte:10 [ rvaluevar::b#0 ]
Error! Alive variable rvalue::i#2 register reg byte a clobbered by the ASM generated by statement [23] rvalue::b#2 ← 1024 *idx rvalue::i#2 Register Cycles: reg byte a 0
tax Uplift to reg byte a succesfull.
lda 1024,x Register Cycles: reg byte x 0
Uplift to reg byte x succesfull.
Uplift to reg byte a resulted in clobber. Register Cycles: reg byte y 0
Error! Alive variable rvalue::i#2 register reg byte x clobbered by the ASM generated by statement [23] rvalue::b#2 ← 1024 *idx rvalue::i#2 Uplift to reg byte y succesfull.
lda 1024,x
tax
Uplift to reg byte x resulted in clobber.
Error! Alive variable rvalue::i#2 register reg byte y clobbered by the ASM generated by statement [23] rvalue::b#2 ← 1024 *idx rvalue::i#2
lda 1024,y
tay
Uplift to reg byte y resulted in clobber.
REGISTER UPLIFTING REGISTER UPLIFTING
(void()) lvalue() (void()) lvalue()
(byte[1024]) lvalue::SCREEN (byte[1024]) lvalue::SCREEN
@ -1926,7 +1913,7 @@ REGISTER UPLIFTING
(byte) rvalue::b (byte) rvalue::b
(byte) rvalue::b#0 zp byte:11 Infinity (byte) rvalue::b#0 zp byte:11 Infinity
(byte) rvalue::b#1 zp byte:12 Infinity (byte) rvalue::b#1 zp byte:12 Infinity
(byte) rvalue::b#2 zp byte:8 Infinity (byte) rvalue::b#2 zp byte:13 Infinity
(byte) rvalue::i (byte) rvalue::i
(byte) rvalue::i#1 zp byte:8 22.0 (byte) rvalue::i#1 zp byte:8 22.0
(byte) rvalue::i#2 zp byte:8 14.666666666666666 (byte) rvalue::i#2 zp byte:8 14.666666666666666
@ -1944,18 +1931,20 @@ zp byte:2 [ lvaluevar::i#2 lvaluevar::i#1 ]
zp ptr byte:3 [ lvaluevar::screen#2 lvaluevar::screen#1 ] zp ptr byte:3 [ lvaluevar::screen#2 lvaluevar::screen#1 ]
zp byte:5 [ rvaluevar::i#2 rvaluevar::i#1 ] zp byte:5 [ rvaluevar::i#2 rvaluevar::i#1 ]
zp ptr byte:6 [ rvaluevar::screen#2 rvaluevar::screen#1 ] zp ptr byte:6 [ rvaluevar::screen#2 rvaluevar::screen#1 ]
zp byte:8 [ rvalue::i#2 rvalue::i#1 rvalue::b#2 ] zp byte:8 [ rvalue::i#2 rvalue::i#1 ]
zp byte:9 [ lvalue::i#2 lvalue::i#1 ] zp byte:9 [ lvalue::i#2 lvalue::i#1 ]
zp byte:10 [ rvaluevar::b#0 ] zp byte:10 [ rvaluevar::b#0 ]
zp byte:11 [ rvalue::b#0 ] zp byte:11 [ rvalue::b#0 ]
zp byte:12 [ rvalue::b#1 ] zp byte:12 [ rvalue::b#1 ]
zp byte:13 [ rvalue::b#2 ]
Coalescing zero page register [ zp byte:2 [ lvaluevar::i#2 lvaluevar::i#1 ] ] with [ zp byte:5 [ rvaluevar::i#2 rvaluevar::i#1 ] ] Coalescing zero page register [ zp byte:2 [ lvaluevar::i#2 lvaluevar::i#1 ] ] with [ zp byte:5 [ rvaluevar::i#2 rvaluevar::i#1 ] ]
Coalescing zero page register [ zp byte:2 [ lvaluevar::i#2 lvaluevar::i#1 rvaluevar::i#2 rvaluevar::i#1 ] ] with [ zp byte:8 [ rvalue::i#2 rvalue::i#1 rvalue::b#2 ] ] Coalescing zero page register [ zp byte:2 [ lvaluevar::i#2 lvaluevar::i#1 rvaluevar::i#2 rvaluevar::i#1 ] ] with [ zp byte:8 [ rvalue::i#2 rvalue::i#1 ] ]
Coalescing zero page register [ zp byte:2 [ lvaluevar::i#2 lvaluevar::i#1 rvaluevar::i#2 rvaluevar::i#1 rvalue::i#2 rvalue::i#1 rvalue::b#2 ] ] with [ zp byte:9 [ lvalue::i#2 lvalue::i#1 ] ] Coalescing zero page register [ zp byte:2 [ lvaluevar::i#2 lvaluevar::i#1 rvaluevar::i#2 rvaluevar::i#1 rvalue::i#2 rvalue::i#1 ] ] with [ zp byte:9 [ lvalue::i#2 lvalue::i#1 ] ]
Coalescing zero page register [ zp byte:2 [ lvaluevar::i#2 lvaluevar::i#1 rvaluevar::i#2 rvaluevar::i#1 rvalue::i#2 rvalue::i#1 rvalue::b#2 lvalue::i#2 lvalue::i#1 ] ] with [ zp byte:10 [ rvaluevar::b#0 ] ] Coalescing zero page register [ zp byte:2 [ lvaluevar::i#2 lvaluevar::i#1 rvaluevar::i#2 rvaluevar::i#1 rvalue::i#2 rvalue::i#1 lvalue::i#2 lvalue::i#1 ] ] with [ zp byte:10 [ rvaluevar::b#0 ] ]
Coalescing zero page register [ zp byte:2 [ lvaluevar::i#2 lvaluevar::i#1 rvaluevar::i#2 rvaluevar::i#1 rvalue::i#2 rvalue::i#1 rvalue::b#2 lvalue::i#2 lvalue::i#1 rvaluevar::b#0 ] ] with [ zp byte:11 [ rvalue::b#0 ] ] Coalescing zero page register [ zp byte:2 [ lvaluevar::i#2 lvaluevar::i#1 rvaluevar::i#2 rvaluevar::i#1 rvalue::i#2 rvalue::i#1 lvalue::i#2 lvalue::i#1 rvaluevar::b#0 ] ] with [ zp byte:11 [ rvalue::b#0 ] ]
Coalescing zero page register [ zp byte:2 [ lvaluevar::i#2 lvaluevar::i#1 rvaluevar::i#2 rvaluevar::i#1 rvalue::i#2 rvalue::i#1 rvalue::b#2 lvalue::i#2 lvalue::i#1 rvaluevar::b#0 rvalue::b#0 ] ] with [ zp byte:12 [ rvalue::b#1 ] ] Coalescing zero page register [ zp byte:2 [ lvaluevar::i#2 lvaluevar::i#1 rvaluevar::i#2 rvaluevar::i#1 rvalue::i#2 rvalue::i#1 lvalue::i#2 lvalue::i#1 rvaluevar::b#0 rvalue::b#0 ] ] with [ zp byte:12 [ rvalue::b#1 ] ]
Coalescing zero page register [ zp byte:2 [ lvaluevar::i#2 lvaluevar::i#1 rvaluevar::i#2 rvaluevar::i#1 rvalue::i#2 rvalue::i#1 lvalue::i#2 lvalue::i#1 rvaluevar::b#0 rvalue::b#0 rvalue::b#1 ] ] with [ zp byte:13 [ rvalue::b#2 ] ]
Coalescing zero page register [ zp ptr byte:3 [ lvaluevar::screen#2 lvaluevar::screen#1 ] ] with [ zp ptr byte:6 [ rvaluevar::screen#2 rvaluevar::screen#1 ] ] Coalescing zero page register [ zp ptr byte:3 [ lvaluevar::screen#2 lvaluevar::screen#1 ] ] with [ zp ptr byte:6 [ rvaluevar::screen#2 rvaluevar::screen#1 ] ]
INITIAL ASM INITIAL ASM
BBEGIN: BBEGIN:
@ -2067,10 +2056,10 @@ rvalue__B1:
rvalue__Breturn: rvalue__Breturn:
rts rts
rvalue__B2: rvalue__B2:
// [23] (byte) rvalue::b#2 ← (word) 1024 *idx (byte) rvalue::i#2 [ rvalue::i#2 ] // zpby1=cowo1_staridx_zpby1 // [23] (byte) rvalue::b#2 ← (word) 1024 *idx (byte) rvalue::i#2 [ rvalue::i#2 ] // zpby1=cowo1_staridx_zpby2
ldx 8 ldx 8
lda 1024,x lda 1024,x
sta 8 sta 13
// [24] (byte) rvalue::i#1 ← ++ (byte) rvalue::i#2 [ rvalue::i#1 ] // zpby1=_inc_zpby1 // [24] (byte) rvalue::i#1 ← ++ (byte) rvalue::i#2 [ rvalue::i#1 ] // zpby1=_inc_zpby1
inc 8 inc 8
rvalue__B1_from_B2: rvalue__B1_from_B2:
@ -2220,10 +2209,10 @@ rvalue__B1:
rvalue__Breturn: rvalue__Breturn:
rts rts
rvalue__B2: rvalue__B2:
// [23] (byte) rvalue::b#2 ← (word) 1024 *idx (byte) rvalue::i#2 [ rvalue::i#2 ] // zpby1=cowo1_staridx_zpby1 // [23] (byte) rvalue::b#2 ← (word) 1024 *idx (byte) rvalue::i#2 [ rvalue::i#2 ] // zpby1=cowo1_staridx_zpby2
ldx 8 ldx 8
lda 1024,x lda 1024,x
sta 8 sta 13
// [24] (byte) rvalue::i#1 ← ++ (byte) rvalue::i#2 [ rvalue::i#1 ] // zpby1=_inc_zpby1 // [24] (byte) rvalue::i#1 ← ++ (byte) rvalue::i#2 [ rvalue::i#1 ] // zpby1=_inc_zpby1
inc 8 inc 8
rvalue__B1_from_B2: rvalue__B1_from_B2:
@ -2293,7 +2282,7 @@ FINAL SYMBOL TABLE
(byte) rvalue::b (byte) rvalue::b
(byte) rvalue::b#0 zp byte:11 Infinity (byte) rvalue::b#0 zp byte:11 Infinity
(byte) rvalue::b#1 zp byte:12 Infinity (byte) rvalue::b#1 zp byte:12 Infinity
(byte) rvalue::b#2 zp byte:8 Infinity (byte) rvalue::b#2 zp byte:13 Infinity
(byte) rvalue::i (byte) rvalue::i
(byte) rvalue::i#1 zp byte:8 22.0 (byte) rvalue::i#1 zp byte:8 22.0
(byte) rvalue::i#2 zp byte:8 14.666666666666666 (byte) rvalue::i#2 zp byte:8 14.666666666666666
@ -2310,7 +2299,7 @@ FINAL SYMBOL TABLE
(byte*) rvaluevar::screen#1 zp ptr byte:6 11.0 (byte*) rvaluevar::screen#1 zp ptr byte:6 11.0
(byte*) rvaluevar::screen#2 zp ptr byte:6 11.0 (byte*) rvaluevar::screen#2 zp ptr byte:6 11.0
zp byte:2 [ lvaluevar::i#2 lvaluevar::i#1 rvaluevar::i#2 rvaluevar::i#1 rvalue::i#2 rvalue::i#1 rvalue::b#2 lvalue::i#2 lvalue::i#1 rvaluevar::b#0 rvalue::b#0 rvalue::b#1 ] zp byte:2 [ lvaluevar::i#2 lvaluevar::i#1 rvaluevar::i#2 rvaluevar::i#1 rvalue::i#2 rvalue::i#1 lvalue::i#2 lvalue::i#1 rvaluevar::b#0 rvalue::b#0 rvalue::b#1 rvalue::b#2 ]
zp ptr byte:3 [ lvaluevar::screen#2 lvaluevar::screen#1 rvaluevar::screen#2 rvaluevar::screen#1 ] zp ptr byte:3 [ lvaluevar::screen#2 lvaluevar::screen#1 rvaluevar::screen#2 rvaluevar::screen#1 ]
FINAL CODE FINAL CODE
@ -2412,10 +2401,10 @@ rvalue__B1:
rvalue__Breturn: rvalue__Breturn:
rts rts
rvalue__B2: rvalue__B2:
// [23] (byte) rvalue::b#2 ← (word) 1024 *idx (byte) rvalue::i#2 [ rvalue::i#2 ] // zpby1=cowo1_staridx_zpby1 // [23] (byte) rvalue::b#2 ← (word) 1024 *idx (byte) rvalue::i#2 [ rvalue::i#2 ] // zpby1=cowo1_staridx_zpby2
ldx 8 ldx 8
lda 1024,x lda 1024,x
sta 8 sta 13
// [24] (byte) rvalue::i#1 ← ++ (byte) rvalue::i#2 [ rvalue::i#1 ] // zpby1=_inc_zpby1 // [24] (byte) rvalue::i#1 ← ++ (byte) rvalue::i#2 [ rvalue::i#1 ] // zpby1=_inc_zpby1
inc 8 inc 8
rvalue__B1_from_B2: rvalue__B1_from_B2:

View File

@ -32,7 +32,7 @@
(byte) rvalue::b (byte) rvalue::b
(byte) rvalue::b#0 zp byte:11 Infinity (byte) rvalue::b#0 zp byte:11 Infinity
(byte) rvalue::b#1 zp byte:12 Infinity (byte) rvalue::b#1 zp byte:12 Infinity
(byte) rvalue::b#2 zp byte:8 Infinity (byte) rvalue::b#2 zp byte:13 Infinity
(byte) rvalue::i (byte) rvalue::i
(byte) rvalue::i#1 zp byte:8 22.0 (byte) rvalue::i#1 zp byte:8 22.0
(byte) rvalue::i#2 zp byte:8 14.666666666666666 (byte) rvalue::i#2 zp byte:8 14.666666666666666
@ -49,5 +49,5 @@
(byte*) rvaluevar::screen#1 zp ptr byte:6 11.0 (byte*) rvaluevar::screen#1 zp ptr byte:6 11.0
(byte*) rvaluevar::screen#2 zp ptr byte:6 11.0 (byte*) rvaluevar::screen#2 zp ptr byte:6 11.0
zp byte:2 [ lvaluevar::i#2 lvaluevar::i#1 rvaluevar::i#2 rvaluevar::i#1 rvalue::i#2 rvalue::i#1 rvalue::b#2 lvalue::i#2 lvalue::i#1 rvaluevar::b#0 rvalue::b#0 rvalue::b#1 ] zp byte:2 [ lvaluevar::i#2 lvaluevar::i#1 rvaluevar::i#2 rvaluevar::i#1 rvalue::i#2 rvalue::i#1 lvalue::i#2 lvalue::i#1 rvaluevar::b#0 rvalue::b#0 rvalue::b#1 rvalue::b#2 ]
zp ptr byte:3 [ lvaluevar::screen#2 lvaluevar::screen#1 rvaluevar::screen#2 rvaluevar::screen#1 ] zp ptr byte:3 [ lvaluevar::screen#2 lvaluevar::screen#1 rvaluevar::screen#2 rvaluevar::screen#1 ]

View File

@ -6,7 +6,7 @@ sum_from_BBEGIN:
sta 2 sta 2
jsr sum jsr sum
B2: B2:
lda 2 lda 7
sta 4 sta 4
sum_from_B2: sum_from_B2:
lda #13 lda #13
@ -15,17 +15,17 @@ sum_from_B2:
sta 2 sta 2
jsr sum jsr sum
B3: B3:
lda 2 lda 7
sta 5 sta 5
lda 4 lda 4
clc clc
adc 5 adc 5
sta 4 sta 6
BEND: BEND:
sum: sum:
lda 2 lda 2
clc clc
adc 3 adc 3
sta 2 sta 7
sum__Breturn: sum__Breturn:
rts rts

View File

@ -353,22 +353,23 @@ NATURAL LOOPS WITH DEPTH
Initial phi equivalence classes Initial phi equivalence classes
[ sum::a#2 ] [ sum::a#2 ]
[ sum::b#2 ] [ sum::b#2 ]
Copy Coalesced equivalence classes
[ sum::a#2 ]
[ sum::b#2 ]
Added variable s1#0 to zero page equivalence class [ s1#0 ] Added variable s1#0 to zero page equivalence class [ s1#0 ]
Added variable s2#0 to zero page equivalence class [ s2#0 ] Added variable s2#0 to zero page equivalence class [ s2#0 ]
Added variable s3#0 to zero page equivalence class [ s1#0 s3#0 ] Added variable s3#0 to zero page equivalence class [ s3#0 ]
Added variable sum::return#0 to zero page equivalence class [ sum::a#2 sum::return#0 ] Added variable sum::return#0 to zero page equivalence class [ sum::return#0 ]
Complete equivalence classes Complete equivalence classes
[ sum::a#2 sum::return#0 ] [ sum::a#2 ]
[ sum::b#2 ] [ sum::b#2 ]
[ s1#0 s3#0 ] [ s1#0 ]
[ s2#0 ] [ s2#0 ]
Allocated zp byte:2 to zp byte:2 [ sum::a#2 sum::return#0 ] [ s3#0 ]
[ sum::return#0 ]
Allocated zp byte:2 to zp byte:2 [ sum::a#2 ]
Allocated zp byte:3 to zp byte:3 [ sum::b#2 ] Allocated zp byte:3 to zp byte:3 [ sum::b#2 ]
Allocated zp byte:4 to zp byte:4 [ s1#0 s3#0 ] Allocated zp byte:4 to zp byte:4 [ s1#0 ]
Allocated zp byte:5 to zp byte:5 [ s2#0 ] Allocated zp byte:5 to zp byte:5 [ s2#0 ]
Allocated zp byte:6 to zp byte:6 [ s3#0 ]
Allocated zp byte:7 to zp byte:7 [ sum::return#0 ]
VARIABLE REGISTER WEIGHTS VARIABLE REGISTER WEIGHTS
(byte) s1 (byte) s1
@ -385,40 +386,19 @@ VARIABLE REGISTER WEIGHTS
(byte) sum::return (byte) sum::return
(byte) sum::return#0 1.2000000000000002 (byte) sum::return#0 1.2000000000000002
zp byte:2 [ sum::a#2 sum::return#0 ] zp byte:2 [ sum::a#2 ]
zp byte:3 [ sum::b#2 ] zp byte:3 [ sum::b#2 ]
zp byte:4 [ s1#0 s3#0 ] zp byte:4 [ s1#0 ]
zp byte:5 [ s2#0 ] zp byte:5 [ s2#0 ]
zp byte:6 [ s3#0 ]
zp byte:7 [ sum::return#0 ]
Uplifting max weight Infinity live range equivalence class zp byte:4 [ s1#0 s3#0 ] Uplifting max weight Infinity live range equivalence class zp byte:6 [ s3#0 ]
Error! Alive variable s1#0 register reg byte a clobbered by the ASM generated by statement [0] call sum param-assignment Register Cycles: reg byte a 0
sum_from_BBEGIN: Uplift to reg byte a succesfull.
lda #2 Register Cycles: reg byte x 0
sta 3
lda #1
sta 2
jsr sum
Error! Alive variable s1#0 register reg byte a clobbered by the ASM generated by statement [2] call sum param-assignment
sum_from_B2:
lda #13
sta 3
lda #9
sta 2
jsr sum
Error! Alive variable s1#0 register reg byte a clobbered by the ASM generated by statement [3] s2#0 ← sum::return#0
lda 2
sta 5
Error! Alive variable s1#0 register reg byte a clobbered by the ASM generated by statement [6] sum::return#0 ← sum::a#2 + sum::b#2
lda 2
clc
adc 3
sta 2
Uplift to reg byte a resulted in clobber.
Uplift to reg byte x succesfull. Uplift to reg byte x succesfull.
Register Cycles: reg byte y 0
Uplift to reg byte y succesfull. Uplift to reg byte y succesfull.
REGISTER UPLIFTING REGISTER UPLIFTING
(byte) s1 (byte) s1
@ -426,21 +406,25 @@ REGISTER UPLIFTING
(byte) s2 (byte) s2
(byte) s2#0 zp byte:5 4.0 (byte) s2#0 zp byte:5 4.0
(byte) s3 (byte) s3
(byte) s3#0 zp byte:4 Infinity (byte) s3#0 zp byte:6 Infinity
(byte()) sum((byte) sum::a , (byte) sum::b) (byte()) sum((byte) sum::a , (byte) sum::b)
(byte) sum::a (byte) sum::a
(byte) sum::a#2 zp byte:2 2.0 (byte) sum::a#2 zp byte:2 2.0
(byte) sum::b (byte) sum::b
(byte) sum::b#2 zp byte:3 2.0 (byte) sum::b#2 zp byte:3 2.0
(byte) sum::return (byte) sum::return
(byte) sum::return#0 zp byte:2 1.2000000000000002 (byte) sum::return#0 zp byte:7 1.2000000000000002
zp byte:2 [ sum::a#2 sum::return#0 ] zp byte:2 [ sum::a#2 ]
zp byte:3 [ sum::b#2 ] zp byte:3 [ sum::b#2 ]
zp byte:4 [ s1#0 s3#0 ] zp byte:4 [ s1#0 ]
zp byte:5 [ s2#0 ] zp byte:5 [ s2#0 ]
zp byte:6 [ s3#0 ]
zp byte:7 [ sum::return#0 ]
Coalescing zero page register [ zp byte:2 [ sum::a#2 sum::return#0 ] ] with [ zp byte:5 [ s2#0 ] ] Coalescing zero page register [ zp byte:2 [ sum::a#2 ] ] with [ zp byte:5 [ s2#0 ] ]
Coalescing zero page register [ zp byte:2 [ sum::a#2 s2#0 ] ] with [ zp byte:6 [ s3#0 ] ]
Coalescing zero page register [ zp byte:2 [ sum::a#2 s2#0 s3#0 ] ] with [ zp byte:7 [ sum::return#0 ] ]
INITIAL ASM INITIAL ASM
BBEGIN: BBEGIN:
sum_from_BBEGIN: sum_from_BBEGIN:
@ -454,7 +438,7 @@ sum_from_BBEGIN:
jmp B2 jmp B2
B2: B2:
// [1] (byte) s1#0 ← (byte) sum::return#0 [ sum::return#0 s1#0 ] // zpby1=zpby2 // [1] (byte) s1#0 ← (byte) sum::return#0 [ sum::return#0 s1#0 ] // zpby1=zpby2
lda 2 lda 7
sta 4 sta 4
sum_from_B2: sum_from_B2:
// (byte) sum::b#2 = (byte) 13 // zpby1=coby1 // (byte) sum::b#2 = (byte) 13 // zpby1=coby1
@ -467,21 +451,21 @@ sum_from_B2:
jmp B3 jmp B3
B3: B3:
// [3] (byte) s2#0 ← (byte) sum::return#0 [ s1#0 s2#0 ] // zpby1=zpby2 // [3] (byte) s2#0 ← (byte) sum::return#0 [ s1#0 s2#0 ] // zpby1=zpby2
lda 2 lda 7
sta 5 sta 5
// [4] (byte) s3#0 ← (byte) s1#0 + (byte) s2#0 [ ] // zpby1=zpby1_plus_zpby2 // [4] (byte) s3#0 ← (byte) s1#0 + (byte) s2#0 [ ] // zpby1=zpby2_plus_zpby3
lda 4 lda 4
clc clc
adc 5 adc 5
sta 4 sta 6
jmp BEND jmp BEND
BEND: BEND:
sum: sum:
// [6] (byte) sum::return#0 ← (byte) sum::a#2 + (byte) sum::b#2 [ sum::return#0 s1#0 ] // zpby1=zpby1_plus_zpby2 // [6] (byte) sum::return#0 ← (byte) sum::a#2 + (byte) sum::b#2 [ sum::return#0 s1#0 ] // zpby1=zpby2_plus_zpby3
lda 2 lda 2
clc clc
adc 3 adc 3
sta 2 sta 7
jmp sum__Breturn jmp sum__Breturn
sum__Breturn: sum__Breturn:
rts rts
@ -503,7 +487,7 @@ sum_from_BBEGIN:
jsr sum jsr sum
B2: B2:
// [1] (byte) s1#0 ← (byte) sum::return#0 [ sum::return#0 s1#0 ] // zpby1=zpby2 // [1] (byte) s1#0 ← (byte) sum::return#0 [ sum::return#0 s1#0 ] // zpby1=zpby2
lda 2 lda 7
sta 4 sta 4
sum_from_B2: sum_from_B2:
// (byte) sum::b#2 = (byte) 13 // zpby1=coby1 // (byte) sum::b#2 = (byte) 13 // zpby1=coby1
@ -515,20 +499,20 @@ sum_from_B2:
jsr sum jsr sum
B3: B3:
// [3] (byte) s2#0 ← (byte) sum::return#0 [ s1#0 s2#0 ] // zpby1=zpby2 // [3] (byte) s2#0 ← (byte) sum::return#0 [ s1#0 s2#0 ] // zpby1=zpby2
lda 2 lda 7
sta 5 sta 5
// [4] (byte) s3#0 ← (byte) s1#0 + (byte) s2#0 [ ] // zpby1=zpby1_plus_zpby2 // [4] (byte) s3#0 ← (byte) s1#0 + (byte) s2#0 [ ] // zpby1=zpby2_plus_zpby3
lda 4 lda 4
clc clc
adc 5 adc 5
sta 4 sta 6
BEND: BEND:
sum: sum:
// [6] (byte) sum::return#0 ← (byte) sum::a#2 + (byte) sum::b#2 [ sum::return#0 s1#0 ] // zpby1=zpby1_plus_zpby2 // [6] (byte) sum::return#0 ← (byte) sum::a#2 + (byte) sum::b#2 [ sum::return#0 s1#0 ] // zpby1=zpby2_plus_zpby3
lda 2 lda 2
clc clc
adc 3 adc 3
sta 2 sta 7
sum__Breturn: sum__Breturn:
rts rts
@ -542,7 +526,7 @@ FINAL SYMBOL TABLE
(byte) s2 (byte) s2
(byte) s2#0 zp byte:5 4.0 (byte) s2#0 zp byte:5 4.0
(byte) s3 (byte) s3
(byte) s3#0 zp byte:4 Infinity (byte) s3#0 zp byte:6 Infinity
(byte()) sum((byte) sum::a , (byte) sum::b) (byte()) sum((byte) sum::a , (byte) sum::b)
(label) sum::@return (label) sum::@return
(byte) sum::a (byte) sum::a
@ -550,11 +534,11 @@ FINAL SYMBOL TABLE
(byte) sum::b (byte) sum::b
(byte) sum::b#2 zp byte:3 2.0 (byte) sum::b#2 zp byte:3 2.0
(byte) sum::return (byte) sum::return
(byte) sum::return#0 zp byte:2 1.2000000000000002 (byte) sum::return#0 zp byte:7 1.2000000000000002
zp byte:2 [ sum::a#2 sum::return#0 s2#0 ] zp byte:2 [ sum::a#2 s2#0 s3#0 sum::return#0 ]
zp byte:3 [ sum::b#2 ] zp byte:3 [ sum::b#2 ]
zp byte:4 [ s1#0 s3#0 ] zp byte:4 [ s1#0 ]
FINAL CODE FINAL CODE
BBEGIN: BBEGIN:
@ -568,7 +552,7 @@ sum_from_BBEGIN:
jsr sum jsr sum
B2: B2:
// [1] (byte) s1#0 ← (byte) sum::return#0 [ sum::return#0 s1#0 ] // zpby1=zpby2 // [1] (byte) s1#0 ← (byte) sum::return#0 [ sum::return#0 s1#0 ] // zpby1=zpby2
lda 2 lda 7
sta 4 sta 4
sum_from_B2: sum_from_B2:
// (byte) sum::b#2 = (byte) 13 // zpby1=coby1 // (byte) sum::b#2 = (byte) 13 // zpby1=coby1
@ -580,20 +564,20 @@ sum_from_B2:
jsr sum jsr sum
B3: B3:
// [3] (byte) s2#0 ← (byte) sum::return#0 [ s1#0 s2#0 ] // zpby1=zpby2 // [3] (byte) s2#0 ← (byte) sum::return#0 [ s1#0 s2#0 ] // zpby1=zpby2
lda 2 lda 7
sta 5 sta 5
// [4] (byte) s3#0 ← (byte) s1#0 + (byte) s2#0 [ ] // zpby1=zpby1_plus_zpby2 // [4] (byte) s3#0 ← (byte) s1#0 + (byte) s2#0 [ ] // zpby1=zpby2_plus_zpby3
lda 4 lda 4
clc clc
adc 5 adc 5
sta 4 sta 6
BEND: BEND:
sum: sum:
// [6] (byte) sum::return#0 ← (byte) sum::a#2 + (byte) sum::b#2 [ sum::return#0 s1#0 ] // zpby1=zpby1_plus_zpby2 // [6] (byte) sum::return#0 ← (byte) sum::a#2 + (byte) sum::b#2 [ sum::return#0 s1#0 ] // zpby1=zpby2_plus_zpby3
lda 2 lda 2
clc clc
adc 3 adc 3
sta 2 sta 7
sum__Breturn: sum__Breturn:
rts rts

View File

@ -7,7 +7,7 @@
(byte) s2 (byte) s2
(byte) s2#0 zp byte:5 4.0 (byte) s2#0 zp byte:5 4.0
(byte) s3 (byte) s3
(byte) s3#0 zp byte:4 Infinity (byte) s3#0 zp byte:6 Infinity
(byte()) sum((byte) sum::a , (byte) sum::b) (byte()) sum((byte) sum::a , (byte) sum::b)
(label) sum::@return (label) sum::@return
(byte) sum::a (byte) sum::a
@ -15,8 +15,8 @@
(byte) sum::b (byte) sum::b
(byte) sum::b#2 zp byte:3 2.0 (byte) sum::b#2 zp byte:3 2.0
(byte) sum::return (byte) sum::return
(byte) sum::return#0 zp byte:2 1.2000000000000002 (byte) sum::return#0 zp byte:7 1.2000000000000002
zp byte:2 [ sum::a#2 sum::return#0 s2#0 ] zp byte:2 [ sum::a#2 s2#0 s3#0 sum::return#0 ]
zp byte:3 [ sum::b#2 ] zp byte:3 [ sum::b#2 ]
zp byte:4 [ s1#0 s3#0 ] zp byte:4 [ s1#0 ]

View File

@ -200,7 +200,6 @@ Found 0 loops in scope [main]
NATURAL LOOPS WITH DEPTH NATURAL LOOPS WITH DEPTH
Initial phi equivalence classes Initial phi equivalence classes
Copy Coalesced equivalence classes
Complete equivalence classes Complete equivalence classes
VARIABLE REGISTER WEIGHTS VARIABLE REGISTER WEIGHTS