Inlined call call __init

CONTROL FLOW GRAPH SSA

void main()
main: scope:[main]  from __start::@1
  SCREEN[1] = 'b'
  to:main::@return
main::@return: scope:[main]  from main
  return 
  to:@return

void init()
init: scope:[init]  from __start::__init1
  SCREEN[0] = 'a'
  to:init::@return
init::@return: scope:[init]  from init
  return 
  to:@return

void __start()
__start: scope:[__start]  from
  to:__start::__init1
__start::__init1: scope:[__start]  from __start
  call init
  to:__start::@2
__start::@2: scope:[__start]  from __start::__init1
  to:__start::@1
__start::@1: scope:[__start]  from __start::@2
  call main
  to:__start::@3
__start::@3: scope:[__start]  from __start::@1
  to:__start::@return
__start::@return: scope:[__start]  from __start::@3
  return 
  to:@return

SYMBOL TABLE SSA
__constant char * const SCREEN = (char *)$400
void __start()
void init()
void main()

Adding number conversion cast (unumber) 1 in SCREEN[1] = 'b'
Adding number conversion cast (unumber) 0 in SCREEN[0] = 'a'
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant pointer cast (char *) 1024
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (char) 1
Finalized unsigned number type (char) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Simplifying expression containing zero SCREEN in [2] SCREEN[0] = 'a'
Successful SSA optimization PassNSimplifyExpressionWithZero
Consolidated array index constant in *(SCREEN+1)
Successful SSA optimization Pass2ConstantAdditionElimination
Adding NOP phi() at start of __start
Adding NOP phi() at start of __start::__init1
Adding NOP phi() at start of __start::@2
Adding NOP phi() at start of __start::@1
Adding NOP phi() at start of __start::@3
CALL GRAPH
Calls in [__start] to init:2 main:5 

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

FINAL CONTROL FLOW GRAPH

void __start()
__start: scope:[__start]  from
  [0] phi()
  to:__start::__init1
__start::__init1: scope:[__start]  from __start
  [1] phi()
  [2] call init
  to:__start::@1
__start::@1: scope:[__start]  from __start::__init1
  [3] phi()
  [4] call main
  to:__start::@return
__start::@return: scope:[__start]  from __start::@1
  [5] return 
  to:@return

void init()
init: scope:[init]  from __start::__init1
  [6] *SCREEN = 'a'
  to:init::@return
init::@return: scope:[init]  from init
  [7] return 
  to:@return

void main()
main: scope:[main]  from __start::@1
  [8] *(SCREEN+1) = 'b'
  to:main::@return
main::@return: scope:[main]  from main
  [9] return 
  to:@return


VARIABLE REGISTER WEIGHTS
void __start()
void init()
void main()

Initial phi equivalence classes
Complete equivalence classes
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [6] *SCREEN = 'a' [ ] (  [ ] { }  init:2 [ ] { }  ) always clobbers reg byte a 
Statement [8] *(SCREEN+1) = 'b' [ ] ( main:4 [ ] { }  ) always clobbers reg byte a 

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

Uplifting [main] best 57 combination 
Uplifting [init] best 57 combination 
Uplifting [__start] best 57 combination 
Uplifting [] best 57 combination 

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
// Test #pragma without parenthesis
  // Upstart
  // Commodore VIC 20 executable PRG file
.file [name="pragma-noparenthesis.prg", type="prg", segments="Program"]
.segmentdef Program [segments="Basic, Code, Data"]
.segmentdef Basic [start=$1001]
.segmentdef Code [start=$100d]
.segmentdef Data [startAfter="Code"]
.segment Basic
:BasicUpstart(__start)
  // Global Constants & labels
  .label SCREEN = $400
.segment Code
  // __start
__start: {
    // [1] phi from __start to __start::__init1 [phi:__start->__start::__init1]
  __init1_from___start:
    jmp __init1
    // __start::__init1
  __init1:
    // [2] call init
    jsr init
    // [3] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1]
  __b1_from___init1:
    jmp __b1
    // __start::@1
  __b1:
    // [4] call main
    jsr main
    jmp __breturn
    // __start::@return
  __breturn:
    // [5] return 
    rts
}
  // init
init: {
    // [6] *SCREEN = 'a' -- _deref_pbuc1=vbuc2 
    lda #'a'
    sta SCREEN
    jmp __breturn
    // init::@return
  __breturn:
    // [7] return 
    rts
}
  // main
main: {
    // [8] *(SCREEN+1) = 'b' -- _deref_pbuc1=vbuc2 
    lda #'b'
    sta SCREEN+1
    jmp __breturn
    // main::@return
  __breturn:
    // [9] return 
    rts
}
  // File Data

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp __init1
Removing instruction jmp __b1
Removing instruction jmp __breturn
Removing instruction jmp __breturn
Removing instruction jmp __breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction __init1_from___start:
Removing instruction __b1_from___init1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction __init1:
Removing instruction __b1:
Removing instruction __breturn:
Removing instruction __breturn:
Removing instruction __breturn:
Succesful ASM optimization Pass5UnusedLabelElimination

FINAL SYMBOL TABLE
__constant char * const SCREEN = (char *) 1024
void __start()
void init()
void main()



FINAL ASSEMBLER
Score: 42

  // File Comments
// Test #pragma without parenthesis
  // Upstart
  // Commodore VIC 20 executable PRG file
.file [name="pragma-noparenthesis.prg", type="prg", segments="Program"]
.segmentdef Program [segments="Basic, Code, Data"]
.segmentdef Basic [start=$1001]
.segmentdef Code [start=$100d]
.segmentdef Data [startAfter="Code"]
.segment Basic
:BasicUpstart(__start)
  // Global Constants & labels
  .label SCREEN = $400
.segment Code
  // __start
__start: {
    // [1] phi from __start to __start::__init1 [phi:__start->__start::__init1]
    // __start::__init1
    // [2] call init
    jsr init
    // [3] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1]
    // __start::@1
    // [4] call main
    jsr main
    // __start::@return
    // [5] return 
    rts
}
  // init
init: {
    // SCREEN[0] = 'a'
    // [6] *SCREEN = 'a' -- _deref_pbuc1=vbuc2 
    lda #'a'
    sta SCREEN
    // init::@return
    // }
    // [7] return 
    rts
}
  // main
main: {
    // SCREEN[1] = 'b'
    // [8] *(SCREEN+1) = 'b' -- _deref_pbuc1=vbuc2 
    lda #'b'
    sta SCREEN+1
    // main::@return
    // }
    // [9] return 
    rts
}
  // File Data

