From 9db24ceb0116da65e128033a4a94313034735e6e Mon Sep 17 00:00:00 2001 From: jespergravgaard Date: Sun, 2 Feb 2020 10:24:44 +0100 Subject: [PATCH] Removed main return value --- .../kc/millfork-benchmarks/linkedlist-kc.kc | 3 +- .../ref/millfork-benchmarks/linkedlist-kc.cfg | 6 +- .../ref/millfork-benchmarks/linkedlist-kc.log | 206 ++++++++---------- .../ref/millfork-benchmarks/linkedlist-kc.sym | 3 +- 4 files changed, 97 insertions(+), 121 deletions(-) diff --git a/src/test/kc/millfork-benchmarks/linkedlist-kc.kc b/src/test/kc/millfork-benchmarks/linkedlist-kc.kc index 5a2c73336..931236a88 100644 --- a/src/test/kc/millfork-benchmarks/linkedlist-kc.kc +++ b/src/test/kc/millfork-benchmarks/linkedlist-kc.kc @@ -42,7 +42,7 @@ unsigned int sum(void) { return s; } -int main(void) { +void main(void) { unsigned int i; unsigned char c; start(); @@ -54,5 +54,4 @@ int main(void) { print_char((byte)sum()); } end(); - return 0; } \ No newline at end of file diff --git a/src/test/ref/millfork-benchmarks/linkedlist-kc.cfg b/src/test/ref/millfork-benchmarks/linkedlist-kc.cfg index c74fe0ced..c86e11902 100644 --- a/src/test/ref/millfork-benchmarks/linkedlist-kc.cfg +++ b/src/test/ref/millfork-benchmarks/linkedlist-kc.cfg @@ -14,14 +14,14 @@ @end: scope:[] from @3 [5] phi() -(signed word()) main() +(void()) main() main: scope:[main] from @3 [6] phi() [7] call start to:main::@1 main::@1: scope:[main] from main main::@7 - [8] (byte) main::c#8 ← phi( main::@7/(byte) main::c#2 main/(byte) 0 ) - [8] (byte*) print_char_cursor#49 ← phi( main::@7/(byte*) print_char_cursor#10 main/(byte*) 1024 ) + [8] (byte) main::c#8 ← phi( main/(byte) 0 main::@7/(byte) main::c#2 ) + [8] (byte*) print_char_cursor#49 ← phi( main/(byte*) 1024 main::@7/(byte*) print_char_cursor#10 ) [9] call init to:main::@2 main::@2: scope:[main] from main::@1 main::@5 diff --git a/src/test/ref/millfork-benchmarks/linkedlist-kc.log b/src/test/ref/millfork-benchmarks/linkedlist-kc.log index e6e2fe092..95a1a27ee 100644 --- a/src/test/ref/millfork-benchmarks/linkedlist-kc.log +++ b/src/test/ref/millfork-benchmarks/linkedlist-kc.log @@ -73,7 +73,6 @@ Culled Empty Block (label) sum::@5 Culled Empty Block (label) sum::@6 Culled Empty Block (label) sum::@7 Culled Empty Block (label) @50 -Culled Empty Block (label) main::@5 CONTROL FLOW GRAPH SSA @begin: scope:[] from @@ -162,9 +161,9 @@ print_byte::@return: scope:[print_byte] from print_byte::@2 to:@return (void()) print_char((byte) print_char::ch) -print_char: scope:[print_char] from main::@9 print_byte print_byte::@1 - (byte*) print_char_cursor#26 ← phi( main::@9/(byte*) print_char_cursor#38 print_byte/(byte*) print_char_cursor#37 print_byte::@1/(byte*) print_char_cursor#6 ) - (byte) print_char::ch#3 ← phi( main::@9/(byte) print_char::ch#2 print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 ) +print_char: scope:[print_char] from main::@8 print_byte print_byte::@1 + (byte*) print_char_cursor#26 ← phi( main::@8/(byte*) print_char_cursor#38 print_byte/(byte*) print_char_cursor#37 print_byte::@1/(byte*) print_char_cursor#6 ) + (byte) print_char::ch#3 ← phi( main::@8/(byte) print_char::ch#2 print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 ) *((byte*) print_char_cursor#26) ← (byte) print_char::ch#3 (byte*) print_char_cursor#9 ← ++ (byte*) print_char_cursor#26 to:print_char::@return @@ -354,7 +353,7 @@ sum::@return: scope:[sum] from sum::@3 return to:@return -(signed word()) main() +(void()) main() main: scope:[main] from @51 (byte*) print_line_cursor#33 ← phi( @51/(byte*) print_line_cursor#19 ) (word) Ticks#26 ← phi( @51/(word) Ticks#14 ) @@ -366,30 +365,30 @@ main: scope:[main] from @51 (word) main::i#0 ← (word) 0 (byte) main::c#0 ← (byte) 0 call start - to:main::@6 -main::@6: scope:[main] from main + to:main::@5 +main::@5: scope:[main] from main (byte*) print_line_cursor#32 ← phi( main/(byte*) print_line_cursor#33 ) (word) Ticks#25 ← phi( main/(word) Ticks#26 ) (word) last_time#25 ← phi( main/(word) last_time#26 ) (byte*) print_char_cursor#51 ← phi( main/(byte*) print_char_cursor#52 ) - (struct node*) root#24 ← phi( main/(struct node*) root#26 ) - (word) free_#26 ← phi( main/(word) free_#28 ) + (struct node*) root#23 ← phi( main/(struct node*) root#26 ) + (word) free_#25 ← phi( main/(word) free_#28 ) (word) rand_seed#12 ← phi( main/(word) rand_seed#1 ) (word) rand_seed#5 ← (word) rand_seed#12 (byte) main::c#1 ← (number) 0 to:main::@1 -main::@1: scope:[main] from main::@10 main::@6 - (byte*) print_line_cursor#31 ← phi( main::@10/(byte*) print_line_cursor#21 main::@6/(byte*) print_line_cursor#32 ) - (word) rand_seed#29 ← phi( main::@10/(word) rand_seed#22 main::@6/(word) rand_seed#5 ) - (word) Ticks#24 ← phi( main::@10/(word) Ticks#16 main::@6/(word) Ticks#25 ) - (word) last_time#24 ← phi( main::@10/(word) last_time#16 main::@6/(word) last_time#25 ) - (byte) main::c#9 ← phi( main::@10/(byte) main::c#2 main::@6/(byte) main::c#1 ) - (byte*) print_char_cursor#50 ← phi( main::@10/(byte*) print_char_cursor#14 main::@6/(byte*) print_char_cursor#51 ) - (struct node*) root#19 ← phi( main::@10/(struct node*) root#23 main::@6/(struct node*) root#24 ) - (word) free_#21 ← phi( main::@10/(word) free_#25 main::@6/(word) free_#26 ) +main::@1: scope:[main] from main::@5 main::@9 + (byte*) print_line_cursor#31 ← phi( main::@5/(byte*) print_line_cursor#32 main::@9/(byte*) print_line_cursor#21 ) + (word) rand_seed#29 ← phi( main::@5/(word) rand_seed#5 main::@9/(word) rand_seed#22 ) + (word) Ticks#24 ← phi( main::@5/(word) Ticks#25 main::@9/(word) Ticks#16 ) + (word) last_time#24 ← phi( main::@5/(word) last_time#25 main::@9/(word) last_time#16 ) + (byte) main::c#9 ← phi( main::@5/(byte) main::c#1 main::@9/(byte) main::c#2 ) + (byte*) print_char_cursor#50 ← phi( main::@5/(byte*) print_char_cursor#51 main::@9/(byte*) print_char_cursor#14 ) + (struct node*) root#19 ← phi( main::@5/(struct node*) root#23 main::@9/(struct node*) root#24 ) + (word) free_#21 ← phi( main::@5/(word) free_#25 main::@9/(word) free_#26 ) call init - to:main::@7 -main::@7: scope:[main] from main::@1 + to:main::@6 +main::@6: scope:[main] from main::@1 (byte*) print_line_cursor#30 ← phi( main::@1/(byte*) print_line_cursor#31 ) (word) rand_seed#28 ← phi( main::@1/(word) rand_seed#29 ) (word) Ticks#23 ← phi( main::@1/(word) Ticks#24 ) @@ -402,20 +401,20 @@ main::@7: scope:[main] from main::@1 (struct node*) root#5 ← (struct node*) root#13 (word) main::i#1 ← (number) 0 to:main::@2 -main::@2: scope:[main] from main::@7 main::@8 - (byte*) print_line_cursor#29 ← phi( main::@7/(byte*) print_line_cursor#30 main::@8/(byte*) print_line_cursor#28 ) - (word) rand_seed#27 ← phi( main::@7/(word) rand_seed#28 main::@8/(word) rand_seed#26 ) - (word) Ticks#22 ← phi( main::@7/(word) Ticks#23 main::@8/(word) Ticks#21 ) - (word) last_time#22 ← phi( main::@7/(word) last_time#23 main::@8/(word) last_time#21 ) - (byte) main::c#7 ← phi( main::@7/(byte) main::c#8 main::@8/(byte) main::c#6 ) - (byte*) print_char_cursor#48 ← phi( main::@7/(byte*) print_char_cursor#49 main::@8/(byte*) print_char_cursor#46 ) - (struct node*) root#20 ← phi( main::@7/(struct node*) root#5 main::@8/(struct node*) root#6 ) - (word) free_#22 ← phi( main::@7/(word) free_#7 main::@8/(word) free_#8 ) - (word) main::i#3 ← phi( main::@7/(word) main::i#1 main::@8/(word) main::i#2 ) +main::@2: scope:[main] from main::@6 main::@7 + (byte*) print_line_cursor#29 ← phi( main::@6/(byte*) print_line_cursor#30 main::@7/(byte*) print_line_cursor#28 ) + (word) rand_seed#27 ← phi( main::@6/(word) rand_seed#28 main::@7/(word) rand_seed#26 ) + (word) Ticks#22 ← phi( main::@6/(word) Ticks#23 main::@7/(word) Ticks#21 ) + (word) last_time#22 ← phi( main::@6/(word) last_time#23 main::@7/(word) last_time#21 ) + (byte) main::c#7 ← phi( main::@6/(byte) main::c#8 main::@7/(byte) main::c#6 ) + (byte*) print_char_cursor#48 ← phi( main::@6/(byte*) print_char_cursor#49 main::@7/(byte*) print_char_cursor#46 ) + (struct node*) root#20 ← phi( main::@6/(struct node*) root#5 main::@7/(struct node*) root#6 ) + (word) free_#22 ← phi( main::@6/(word) free_#7 main::@7/(word) free_#8 ) + (word) main::i#3 ← phi( main::@6/(word) main::i#1 main::@7/(word) main::i#2 ) (word) prepend::x#0 ← (word) main::i#3 call prepend - to:main::@8 -main::@8: scope:[main] from main::@2 + to:main::@7 +main::@7: scope:[main] from main::@2 (byte*) print_line_cursor#28 ← phi( main::@2/(byte*) print_line_cursor#29 ) (word) rand_seed#26 ← phi( main::@2/(word) rand_seed#27 ) (word) Ticks#21 ← phi( main::@2/(word) Ticks#22 ) @@ -431,19 +430,19 @@ main::@8: scope:[main] from main::@2 (bool~) main::$4 ← (word) main::i#2 != rangelast(0,$bb7) if((bool~) main::$4) goto main::@2 to:main::@3 -main::@3: scope:[main] from main::@8 - (byte*) print_line_cursor#27 ← phi( main::@8/(byte*) print_line_cursor#28 ) - (word) rand_seed#25 ← phi( main::@8/(word) rand_seed#26 ) - (word) Ticks#20 ← phi( main::@8/(word) Ticks#21 ) - (word) last_time#20 ← phi( main::@8/(word) last_time#21 ) - (word) free_#30 ← phi( main::@8/(word) free_#8 ) - (byte) main::c#5 ← phi( main::@8/(byte) main::c#6 ) - (byte*) print_char_cursor#43 ← phi( main::@8/(byte*) print_char_cursor#46 ) - (struct node*) root#18 ← phi( main::@8/(struct node*) root#6 ) +main::@3: scope:[main] from main::@7 + (byte*) print_line_cursor#27 ← phi( main::@7/(byte*) print_line_cursor#28 ) + (word) rand_seed#25 ← phi( main::@7/(word) rand_seed#26 ) + (word) Ticks#20 ← phi( main::@7/(word) Ticks#21 ) + (word) last_time#20 ← phi( main::@7/(word) last_time#21 ) + (word) free_#30 ← phi( main::@7/(word) free_#8 ) + (byte) main::c#5 ← phi( main::@7/(byte) main::c#6 ) + (byte*) print_char_cursor#43 ← phi( main::@7/(byte*) print_char_cursor#46 ) + (struct node*) root#18 ← phi( main::@7/(struct node*) root#6 ) call sum (word) sum::return#2 ← (word) sum::return#1 - to:main::@9 -main::@9: scope:[main] from main::@3 + to:main::@8 +main::@8: scope:[main] from main::@3 (byte*) print_line_cursor#25 ← phi( main::@3/(byte*) print_line_cursor#27 ) (word) rand_seed#24 ← phi( main::@3/(word) rand_seed#25 ) (word) Ticks#19 ← phi( main::@3/(word) Ticks#20 ) @@ -457,32 +456,32 @@ main::@9: scope:[main] from main::@3 (byte~) main::$6 ← ((byte)) (word~) main::$5 (byte) print_char::ch#2 ← (byte~) main::$6 call print_char - to:main::@10 -main::@10: scope:[main] from main::@9 - (byte*) print_line_cursor#21 ← phi( main::@9/(byte*) print_line_cursor#25 ) - (word) rand_seed#22 ← phi( main::@9/(word) rand_seed#24 ) - (word) Ticks#16 ← phi( main::@9/(word) Ticks#19 ) - (word) last_time#16 ← phi( main::@9/(word) last_time#19 ) - (struct node*) root#23 ← phi( main::@9/(struct node*) root#27 ) - (word) free_#25 ← phi( main::@9/(word) free_#29 ) - (byte) main::c#3 ← phi( main::@9/(byte) main::c#4 ) - (byte*) print_char_cursor#31 ← phi( main::@9/(byte*) print_char_cursor#10 ) + to:main::@9 +main::@9: scope:[main] from main::@8 + (byte*) print_line_cursor#21 ← phi( main::@8/(byte*) print_line_cursor#25 ) + (word) rand_seed#22 ← phi( main::@8/(word) rand_seed#24 ) + (word) Ticks#16 ← phi( main::@8/(word) Ticks#19 ) + (word) last_time#16 ← phi( main::@8/(word) last_time#19 ) + (struct node*) root#24 ← phi( main::@8/(struct node*) root#27 ) + (word) free_#26 ← phi( main::@8/(word) free_#29 ) + (byte) main::c#3 ← phi( main::@8/(byte) main::c#4 ) + (byte*) print_char_cursor#31 ← phi( main::@8/(byte*) print_char_cursor#10 ) (byte*) print_char_cursor#14 ← (byte*) print_char_cursor#31 (byte) main::c#2 ← (byte) main::c#3 + rangenext(0,4) (bool~) main::$8 ← (byte) main::c#2 != rangelast(0,4) if((bool~) main::$8) goto main::@1 to:main::@4 -main::@4: scope:[main] from main::@10 - (struct node*) root#25 ← phi( main::@10/(struct node*) root#23 ) - (word) free_#27 ← phi( main::@10/(word) free_#25 ) - (byte*) print_line_cursor#18 ← phi( main::@10/(byte*) print_line_cursor#21 ) - (byte*) print_char_cursor#40 ← phi( main::@10/(byte*) print_char_cursor#14 ) - (word) rand_seed#19 ← phi( main::@10/(word) rand_seed#22 ) - (word) Ticks#13 ← phi( main::@10/(word) Ticks#16 ) - (word) last_time#12 ← phi( main::@10/(word) last_time#16 ) +main::@4: scope:[main] from main::@9 + (struct node*) root#25 ← phi( main::@9/(struct node*) root#24 ) + (word) free_#27 ← phi( main::@9/(word) free_#26 ) + (byte*) print_line_cursor#18 ← phi( main::@9/(byte*) print_line_cursor#21 ) + (byte*) print_char_cursor#40 ← phi( main::@9/(byte*) print_char_cursor#14 ) + (word) rand_seed#19 ← phi( main::@9/(word) rand_seed#22 ) + (word) Ticks#13 ← phi( main::@9/(word) Ticks#16 ) + (word) last_time#12 ← phi( main::@9/(word) last_time#16 ) call end - to:main::@11 -main::@11: scope:[main] from main::@4 + to:main::@10 +main::@10: scope:[main] from main::@4 (struct node*) root#21 ← phi( main::@4/(struct node*) root#25 ) (word) free_#23 ← phi( main::@4/(word) free_#27 ) (byte*) print_line_cursor#13 ← phi( main::@4/(byte*) print_line_cursor#4 ) @@ -495,18 +494,15 @@ main::@11: scope:[main] from main::@4 (word) last_time#3 ← (word) last_time#9 (byte*) print_char_cursor#15 ← (byte*) print_char_cursor#32 (byte*) print_line_cursor#5 ← (byte*) print_line_cursor#13 - (signed word) main::return#0 ← (number) 0 to:main::@return -main::@return: scope:[main] from main::@11 - (byte*) print_line_cursor#14 ← phi( main::@11/(byte*) print_line_cursor#5 ) - (word) last_time#10 ← phi( main::@11/(word) last_time#3 ) - (word) Ticks#10 ← phi( main::@11/(word) Ticks#4 ) - (byte*) print_char_cursor#33 ← phi( main::@11/(byte*) print_char_cursor#15 ) - (struct node*) root#15 ← phi( main::@11/(struct node*) root#21 ) - (word) free_#18 ← phi( main::@11/(word) free_#23 ) - (word) rand_seed#14 ← phi( main::@11/(word) rand_seed#6 ) - (signed word) main::return#3 ← phi( main::@11/(signed word) main::return#0 ) - (signed word) main::return#1 ← (signed word) main::return#3 +main::@return: scope:[main] from main::@10 + (byte*) print_line_cursor#14 ← phi( main::@10/(byte*) print_line_cursor#5 ) + (word) last_time#10 ← phi( main::@10/(word) last_time#3 ) + (word) Ticks#10 ← phi( main::@10/(word) Ticks#4 ) + (byte*) print_char_cursor#33 ← phi( main::@10/(byte*) print_char_cursor#15 ) + (struct node*) root#15 ← phi( main::@10/(struct node*) root#21 ) + (word) free_#18 ← phi( main::@10/(word) free_#23 ) + (word) rand_seed#14 ← phi( main::@10/(word) rand_seed#6 ) (word) rand_seed#7 ← (word) rand_seed#14 (word) free_#9 ← (word) free_#18 (struct node*) root#7 ← (struct node*) root#15 @@ -525,7 +521,6 @@ main::@return: scope:[main] from main::@11 (word) free_#24 ← phi( @46/(word) free_#0 ) (word) rand_seed#20 ← phi( @46/(word) rand_seed#23 ) call main - (signed word) main::return#2 ← (signed word) main::return#1 to:@52 @52: scope:[] from @51 (byte*) print_line_cursor#15 ← phi( @51/(byte*) print_line_cursor#6 ) @@ -670,17 +665,17 @@ SYMBOL TABLE SSA (word) last_time#7 (word) last_time#8 (word) last_time#9 -(signed word()) main() +(void()) main() (bool~) main::$4 (word~) main::$5 (byte~) main::$6 (bool~) main::$8 (label) main::@1 (label) main::@10 -(label) main::@11 (label) main::@2 (label) main::@3 (label) main::@4 +(label) main::@5 (label) main::@6 (label) main::@7 (label) main::@8 @@ -703,11 +698,6 @@ SYMBOL TABLE SSA (word) main::i#2 (word) main::i#3 (word) main::i#4 -(signed word) main::return -(signed word) main::return#0 -(signed word) main::return#1 -(signed word) main::return#2 -(signed word) main::return#3 (struct node*) node::next (word) node::value (void()) prepend((word) prepend::x) @@ -949,7 +939,6 @@ Adding number conversion cast (unumber) 0 in (word) free_#1 ← (number) 0 Adding number conversion cast (unumber) 0 in (word) sum::s#1 ← (number) 0 Adding number conversion cast (unumber) 0 in (byte) main::c#1 ← (number) 0 Adding number conversion cast (unumber) 0 in (word) main::i#1 ← (number) 0 -Adding number conversion cast (snumber) 0 in (signed word) main::return#0 ← (number) 0 Successful SSA optimization PassNAddNumberTypeConversions Inlining cast (word) rand_seed#0 ← (unumber)(number) $194a Inlining cast (word) free_#1 ← (unumber)(number) 0 @@ -958,7 +947,6 @@ Inlining cast (word) sum::s#1 ← (unumber)(number) 0 Inlining cast (byte) main::c#1 ← (unumber)(number) 0 Inlining cast (word) main::i#1 ← (unumber)(number) 0 Inlining cast (byte~) main::$6 ← (byte)(word~) main::$5 -Inlining cast (signed word) main::return#0 ← (snumber)(number) 0 Successful SSA optimization Pass2InlineCast Simplifying constant pointer cast (byte*) 1024 Simplifying constant integer cast $28 @@ -970,7 +958,6 @@ Simplifying constant pointer cast (struct node*) 0 Simplifying constant integer cast 0 Simplifying constant integer cast 0 Simplifying constant integer cast 0 -Simplifying constant integer cast 0 Successful SSA optimization PassNCastSimplification Finalized unsigned number type (byte) $28 Finalized unsigned number type (byte) 4 @@ -980,7 +967,6 @@ Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 0 -Finalized signed number type (signed byte) 0 Successful SSA optimization PassNFinalizeNumberTypeConversions Inferred type updated to byte in (unumber~) print_byte::$2 ← (byte) print_byte::b#3 & (byte) $f Alias candidate removed (volatile)(word) last_time#6 = (word) Ticks#1 (word) last_time#7 (word) Ticks#7 @@ -1018,8 +1004,8 @@ Alias (struct node*) prepend::new#1 = (struct node*~) prepend::$0 Alias (struct node*) root#11 = (struct node*) root#3 (struct node*) root#4 Alias (struct node*) sum::current#3 = (struct node*) sum::current#4 Alias (word) sum::s#3 = (word) sum::s#5 (word) sum::s#4 (word) sum::return#0 (word) sum::return#3 (word) sum::return#1 -Alias (word) free_#26 = (word) free_#28 -Alias (struct node*) root#24 = (struct node*) root#26 +Alias (word) free_#25 = (word) free_#28 +Alias (struct node*) root#23 = (struct node*) root#26 Alias (byte*) print_char_cursor#51 = (byte*) print_char_cursor#52 Alias (word) last_time#25 = (word) last_time#26 Alias (word) Ticks#25 = (word) Ticks#26 @@ -1040,8 +1026,8 @@ Alias (word) last_time#12 = (word) last_time#21 (word) last_time#22 (word) last_ Alias (word) Ticks#13 = (word) Ticks#21 (word) Ticks#22 (word) Ticks#20 (word) Ticks#19 (word) Ticks#16 Alias (word) rand_seed#19 = (word) rand_seed#26 (word) rand_seed#27 (word) rand_seed#25 (word) rand_seed#24 (word) rand_seed#22 Alias (byte*) print_line_cursor#18 = (byte*) print_line_cursor#28 (byte*) print_line_cursor#29 (byte*) print_line_cursor#27 (byte*) print_line_cursor#25 (byte*) print_line_cursor#21 -Alias (word) free_#17 = (word) free_#8 (word) free_#30 (word) free_#29 (word) free_#25 (word) free_#27 (word) free_#23 (word) free_#18 (word) free_#9 -Alias (struct node*) root#14 = (struct node*) root#6 (struct node*) root#18 (struct node*) root#27 (struct node*) root#23 (struct node*) root#25 (struct node*) root#21 (struct node*) root#15 (struct node*) root#7 +Alias (word) free_#17 = (word) free_#8 (word) free_#30 (word) free_#29 (word) free_#26 (word) free_#27 (word) free_#23 (word) free_#18 (word) free_#9 +Alias (struct node*) root#14 = (struct node*) root#6 (struct node*) root#18 (struct node*) root#27 (struct node*) root#24 (struct node*) root#25 (struct node*) root#21 (struct node*) root#15 (struct node*) root#7 Alias (word) sum::return#2 = (word) sum::return#4 Alias (byte) print_char::ch#2 = (byte~) main::$6 Alias (byte*) print_char_cursor#14 = (byte*) print_char_cursor#31 (byte*) print_char_cursor#40 @@ -1050,7 +1036,6 @@ Alias (word) rand_seed#13 = (word) rand_seed#6 (word) rand_seed#14 (word) rand_s Alias (word) last_time#10 = (word) last_time#3 (word) last_time#9 (word) last_time#4 Alias (byte*) print_char_cursor#15 = (byte*) print_char_cursor#32 (byte*) print_char_cursor#33 (byte*) print_char_cursor#16 Alias (byte*) print_line_cursor#13 = (byte*) print_line_cursor#5 (byte*) print_line_cursor#14 (byte*) print_line_cursor#6 -Alias (signed word) main::return#0 = (signed word) main::return#3 (signed word) main::return#1 Alias (word) free_#0 = (word) free_#24 Alias (struct node*) root#0 = (struct node*) root#22 Alias (word) rand_seed#15 = (word) rand_seed#8 @@ -1095,8 +1080,8 @@ Identical Phi Values (word) prepend::x#1 (word) prepend::x#0 Identical Phi Values (word) free_#14 (word) free_#13 Identical Phi Values (struct node*) root#12 (struct node*) root#14 Identical Phi Values (word) rand_seed#18 (word) rand_seed#20 -Identical Phi Values (word) free_#26 (word) free_#0 -Identical Phi Values (struct node*) root#24 (struct node*) root#0 +Identical Phi Values (word) free_#25 (word) free_#0 +Identical Phi Values (struct node*) root#23 (struct node*) root#0 Identical Phi Values (byte*) print_char_cursor#51 (byte*) print_char_cursor#0 Identical Phi Values (word) last_time#25 (word) last_time#0 Identical Phi Values (word) Ticks#25 (word) Ticks#0 @@ -1152,9 +1137,6 @@ Constant (const word) main::i#0 = 0 Constant (const byte) main::c#0 = 0 Constant (const byte) main::c#1 = 0 Constant (const word) main::i#1 = 0 -Constant (const signed word) main::return#0 = 0 -Successful SSA optimization Pass2ConstantIdentification -Constant (const signed word) main::return#2 = main::return#0 Successful SSA optimization Pass2ConstantIdentification Resolved ranged next value [155] main::i#2 ← ++ main::i#3 to ++ Resolved ranged comparison value [157] if(main::i#2!=rangelast(0,$bb7)) goto main::@2 to (number) $bb8 @@ -1183,11 +1165,9 @@ Eliminating unused constant (const struct node*) sum::current#0 Eliminating unused constant (const word) sum::s#0 Eliminating unused constant (const word) main::i#0 Eliminating unused constant (const byte) main::c#0 -Eliminating unused constant (const signed word) main::return#2 Eliminating unused constant (const byte) OFFSET_STRUCT_NODE_NEXT Eliminating unused constant (const word) Ticks#0 Successful SSA optimization PassNEliminateUnusedVars -Eliminating unused constant (const signed word) main::return#0 Eliminating unused constant (const word) free_#0 Eliminating unused constant (const struct node*) root#0 Successful SSA optimization PassNEliminateUnusedVars @@ -1222,8 +1202,8 @@ Eliminating unused constant (const byte) SIZEOF_STRUCT_NODE Successful SSA optimization PassNEliminateUnusedVars Alias candidate removed (volatile)(word) last_time#1 = (word) Ticks#2 (word) last_time#2 Added new block during phi lifting print_ln::@3(between print_ln::@1 and print_ln::@1) -Added new block during phi lifting main::@12(between main::@10 and main::@1) -Added new block during phi lifting main::@13(between main::@8 and main::@2) +Added new block during phi lifting main::@11(between main::@9 and main::@1) +Added new block during phi lifting main::@12(between main::@7 and main::@2) Adding NOP phi() at start of @begin Adding NOP phi() at start of @13 Adding NOP phi() at start of @46 @@ -1231,11 +1211,11 @@ Adding NOP phi() at start of @51 Adding NOP phi() at start of @52 Adding NOP phi() at start of @end Adding NOP phi() at start of main +Adding NOP phi() at start of main::@5 Adding NOP phi() at start of main::@6 -Adding NOP phi() at start of main::@7 Adding NOP phi() at start of main::@3 Adding NOP phi() at start of main::@4 -Adding NOP phi() at start of main::@11 +Adding NOP phi() at start of main::@10 Adding NOP phi() at start of end::@2 Adding NOP phi() at start of end::@3 Adding NOP phi() at start of print_ln @@ -1276,11 +1256,11 @@ Coalesced down to 11 phi equivalence classes Culled Empty Block (label) @13 Culled Empty Block (label) @46 Culled Empty Block (label) @52 +Culled Empty Block (label) main::@5 Culled Empty Block (label) main::@6 -Culled Empty Block (label) main::@7 +Culled Empty Block (label) main::@10 Culled Empty Block (label) main::@11 Culled Empty Block (label) main::@12 -Culled Empty Block (label) main::@13 Culled Empty Block (label) end::@3 Culled Empty Block (label) print_ln::@2 Culled Empty Block (label) print_ln::@3 @@ -1290,9 +1270,9 @@ Culled Empty Block (label) sum::@3 Renumbering block @43 to @1 Renumbering block @45 to @2 Renumbering block @51 to @3 -Renumbering block main::@8 to main::@5 -Renumbering block main::@9 to main::@6 -Renumbering block main::@10 to main::@7 +Renumbering block main::@7 to main::@5 +Renumbering block main::@8 to main::@6 +Renumbering block main::@9 to main::@7 Adding NOP phi() at start of @begin Adding NOP phi() at start of @3 Adding NOP phi() at start of @end @@ -1321,14 +1301,14 @@ FINAL CONTROL FLOW GRAPH @end: scope:[] from @3 [5] phi() -(signed word()) main() +(void()) main() main: scope:[main] from @3 [6] phi() [7] call start to:main::@1 main::@1: scope:[main] from main main::@7 - [8] (byte) main::c#8 ← phi( main::@7/(byte) main::c#2 main/(byte) 0 ) - [8] (byte*) print_char_cursor#49 ← phi( main::@7/(byte*) print_char_cursor#10 main/(byte*) 1024 ) + [8] (byte) main::c#8 ← phi( main/(byte) 0 main::@7/(byte) main::c#2 ) + [8] (byte*) print_char_cursor#49 ← phi( main/(byte*) 1024 main::@7/(byte*) print_char_cursor#10 ) [9] call init to:main::@2 main::@2: scope:[main] from main::@1 main::@5 @@ -1517,7 +1497,7 @@ VARIABLE REGISTER WEIGHTS (word) last_time#0 0.2608695652173913 (word) last_time#1 1.0 (word) last_time#2 20.0 -(signed word()) main() +(void()) main() (word~) main::$5 11.0 (byte) main::c (byte) main::c#2 16.5 @@ -1525,7 +1505,6 @@ VARIABLE REGISTER WEIGHTS (word) main::i (word) main::i#2 151.5 (word) main::i#3 101.0 -(signed word) main::return (struct node*) node::next (word) node::value (void()) prepend((word) prepend::x) @@ -2953,7 +2932,7 @@ FINAL SYMBOL TABLE (word) last_time#0 last_time zp[2]:10 0.2608695652173913 (word) last_time#1 last_time zp[2]:10 1.0 (word) last_time#2 last_time zp[2]:10 20.0 -(signed word()) main() +(void()) main() (word~) main::$5 zp[2]:8 11.0 (label) main::@1 (label) main::@2 @@ -2969,7 +2948,6 @@ FINAL SYMBOL TABLE (word) main::i (word) main::i#2 i zp[2]:4 151.5 (word) main::i#3 i zp[2]:4 101.0 -(signed word) main::return (struct node*) node::next (word) node::value (void()) prepend((word) prepend::x) diff --git a/src/test/ref/millfork-benchmarks/linkedlist-kc.sym b/src/test/ref/millfork-benchmarks/linkedlist-kc.sym index 8e825b969..215241e49 100644 --- a/src/test/ref/millfork-benchmarks/linkedlist-kc.sym +++ b/src/test/ref/millfork-benchmarks/linkedlist-kc.sym @@ -32,7 +32,7 @@ (word) last_time#0 last_time zp[2]:10 0.2608695652173913 (word) last_time#1 last_time zp[2]:10 1.0 (word) last_time#2 last_time zp[2]:10 20.0 -(signed word()) main() +(void()) main() (word~) main::$5 zp[2]:8 11.0 (label) main::@1 (label) main::@2 @@ -48,7 +48,6 @@ (word) main::i (word) main::i#2 i zp[2]:4 151.5 (word) main::i#3 i zp[2]:4 101.0 -(signed word) main::return (struct node*) node::next (word) node::value (void()) prepend((word) prepend::x)