
CONTROL FLOW GRAPH SSA

void main()
main: scope:[main]  from __start
  to:main::@1
main::@1: scope:[main]  from main main::@2
  if(true) goto main::@2
  to:main::@return
main::@2: scope:[main]  from main::@1
  kickasm() {{ inc $d020
         }}
  to:main::@1
main::@return: scope:[main]  from main::@1
  return 
  to:@return

void __start()
__start: scope:[__start]  from
  call main
  to:__start::@1
__start::@1: scope:[__start]  from __start
  to:__start::@return
__start::@return: scope:[__start]  from __start::@1
  return 
  to:@return

SYMBOL TABLE SSA
__constant char A[] = kickasm {{ .byte 1, 2, 3
 }}
void __start()
void main()

if() condition always true - replacing block destination [0] if(true) goto main::@2
Successful SSA optimization Pass2ConstantIfs
Removing unused block main::@return
Successful SSA optimization Pass2EliminateUnusedBlocks
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@1
CALL GRAPH

Created 0 initial phi equivalence classes
Coalesced down to 0 phi equivalence classes
Culled Empty Block label main::@1
Renumbering block main::@2 to main::@1
Adding NOP phi() at start of main

FINAL CONTROL FLOW GRAPH

void main()
main: scope:[main]  from
  [0] phi()
  to:main::@1
main::@1: scope:[main]  from main main::@1
  kickasm() {{ inc $d020
         }}
  to:main::@1


VARIABLE REGISTER WEIGHTS
void main()

Initial phi equivalence classes
Complete equivalence classes
REGISTER UPLIFT POTENTIAL REGISTERS

REGISTER UPLIFT SCOPES
Uplift Scope [main] 
Uplift Scope [] 

Uplifting [main] best 2620 combination 
Uplifting [] best 2620 combination 

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
// Test inline KickAssembler code
  // Upstart
  // Commodore 64 PRG executable file
.file [name="test-kasm.prg", type="prg", segments="Program"]
.segmentdef Program [segments="Basic, Code, Data"]
.segmentdef Basic [start=$0801]
.segmentdef Code [start=$80d]
.segmentdef Data [startAfter="Code"]
.segment Basic
:BasicUpstart(main)
  // Global Constants & labels
.segment Code
  // main
main: {
    jmp __b1
    // main::@1
  __b1:
    // kickasm() {{ inc $d020          }}
    // KickAsm inline code
    inc $d020
        
    jmp __b1
}
  // File Data
.segment Data
// KickAsm data initializer
A:
.byte 1, 2, 3


ASSEMBLER OPTIMIZATIONS
Removing instruction jmp __b1
Succesful ASM optimization Pass5NextJumpElimination

FINAL SYMBOL TABLE
__constant char A[] = kickasm {{ .byte 1, 2, 3
 }}
void main()



FINAL ASSEMBLER
Score: 2590

  // File Comments
// Test inline KickAssembler code
  // Upstart
  // Commodore 64 PRG executable file
.file [name="test-kasm.prg", type="prg", segments="Program"]
.segmentdef Program [segments="Basic, Code, Data"]
.segmentdef Basic [start=$0801]
.segmentdef Code [start=$80d]
.segmentdef Data [startAfter="Code"]
.segment Basic
:BasicUpstart(main)
  // Global Constants & labels
.segment Code
  // main
main: {
    // main::@1
  __b1:
    // kickasm
    // kickasm() {{ inc $d020          }}
    // KickAsm inline code
    inc $d020
        
    jmp __b1
}
  // File Data
.segment Data
// KickAsm data initializer
A:
.byte 1, 2, 3


