local analysis of debug_printf scanning: __builtin_va_start (&argptr, 0); scanning: vsprintf (&str, msg_8(D), argptr); scanning: __builtin_va_end (&argptr); scanning: _1 = strlen (&str); scanning: len_11 = (u8) _1; scanning: _2 = (int) i_4; scanning: _3 = str[_2]; scanning: uart_putc (_3); scanning: i_15 = i_4 + 1; scanning: if (i_4 < len_11) scanning: return; ;; 2 loops found ;; ;; Loop 0 ;; header 0, latch 1 ;; depth 0, outer -1 ;; nodes: 0 1 2 3 4 5 ;; ;; Loop 1 ;; header 4, latch 3 ;; depth 1, outer 0 ;; nodes: 4 3 ;; 2 succs { 4 } ;; 3 succs { 4 } ;; 4 succs { 3 5 } ;; 5 succs { 1 } Function is locally const. Function can locally free. local analysis of uart_putc scanning: Lpuart_Uart_Ip_SyncSend (0, &ch, 1); scanning: return; Function is locally const. local analysis of Gvar_init scanning: gb.ubuf_head = 0; scanning: gb.ubuf_tail = 0; scanning: return; Function is locally const. local analysis of PrintLogo scanning: debug_printf ("\n\r\n"); scanning: debug_printf ("================================================\r\n"); scanning: debug_printf (" MR S32K344 APPLICATION\n"); scanning: debug_printf (" Version 0.1\n"); scanning: debug_printf (" Author : sihong89@gmail.com\n"); scanning: debug_printf (" Last compiled : %s %s\n", "Oct 16 2021", "14:16:57"); scanning: debug_printf ("================================================\r\n"); scanning: return; Function is locally const. callgraph: strlen/38 (strlen) @08711540 Type: function Visibility: external public References: Referring: Availability: not_available Function flags: optimize_size Called by: debug_printf/32 (118111600 (estimated locally),1.00 per call) Calls: __builtin_va_end/37 (__builtin_va_end) @087112a0 Type: function Visibility: external public References: Referring: Availability: not_available Function flags: optimize_size Called by: debug_printf/32 (118111600 (estimated locally),1.00 per call) Calls: vsprintf/36 (vsprintf) @08711000 Type: function Visibility: external public References: Referring: Availability: not_available Function flags: optimize_size Called by: debug_printf/32 (118111600 (estimated locally),1.00 per call) Calls: __builtin_va_start/35 (__builtin_va_start) @08711ee0 Type: function Visibility: external public References: Referring: Availability: not_available Function flags: optimize_size Called by: debug_printf/32 (118111600 (estimated locally),1.00 per call) Calls: Lpuart_Uart_Ip_SyncSend/34 (Lpuart_Uart_Ip_SyncSend) @08711d20 Type: function Visibility: external public References: Referring: Availability: not_available Function flags: optimize_size Called by: uart_putc/31 (1073741824 (estimated locally),1.00 per call) Calls: debug_printf/32 (debug_printf) @08711700 Type: function definition analyzed Visibility: externally_visible public Aux: @0250fbf0 References: Referring: Availability: available Function flags: count:118111600 (estimated locally) body optimize_size Called by: PrintLogo/29 (1073741824 (estimated locally),1.00 per call) PrintLogo/29 (1073741824 (estimated locally),1.00 per call) PrintLogo/29 (1073741824 (estimated locally),1.00 per call) PrintLogo/29 (1073741824 (estimated locally),1.00 per call) PrintLogo/29 (1073741824 (estimated locally),1.00 per call) PrintLogo/29 (1073741824 (estimated locally),1.00 per call) PrintLogo/29 (1073741824 (estimated locally),1.00 per call) Calls: uart_putc/31 (955630223 (estimated locally),8.09 per call) strlen/38 (118111600 (estimated locally),1.00 per call) __builtin_va_end/37 (118111600 (estimated locally),1.00 per call) vsprintf/36 (118111600 (estimated locally),1.00 per call) __builtin_va_start/35 (118111600 (estimated locally),1.00 per call) uart_putc/31 (uart_putc) @08711460 Type: function definition analyzed Visibility: externally_visible public Aux: @0250fb50 References: Referring: Availability: available Function flags: count:1073741824 (estimated locally) body optimize_size Called by: debug_printf/32 (955630223 (estimated locally),8.09 per call) Calls: Lpuart_Uart_Ip_SyncSend/34 (1073741824 (estimated locally),1.00 per call) Gvar_init/30 (Gvar_init) @087111c0 Type: function definition analyzed Visibility: externally_visible public Aux: @0250fd30 References: gb/33 (write)gb/33 (write) Referring: Availability: available Function flags: count:1073741824 (estimated locally) body optimize_size Called by: Calls: PrintLogo/29 (PrintLogo) @0870fee0 Type: function definition analyzed Visibility: externally_visible public Aux: @0250fb10 References: Referring: Availability: available Function flags: count:1073741824 (estimated locally) body optimize_size Called by: Calls: debug_printf/32 (1073741824 (estimated locally),1.00 per call) debug_printf/32 (1073741824 (estimated locally),1.00 per call) debug_printf/32 (1073741824 (estimated locally),1.00 per call) debug_printf/32 (1073741824 (estimated locally),1.00 per call) debug_printf/32 (1073741824 (estimated locally),1.00 per call) debug_printf/32 (1073741824 (estimated locally),1.00 per call) debug_printf/32 (1073741824 (estimated locally),1.00 per call) ordered call graph: reduced for nothrow debug_printf/32 (debug_printf) @08711700 Type: function definition analyzed Visibility: externally_visible public Aux: @0250fbf0 References: Referring: Availability: available Function flags: count:118111600 (estimated locally) body optimize_size Called by: PrintLogo/29 (1073741824 (estimated locally),1.00 per call) PrintLogo/29 (1073741824 (estimated locally),1.00 per call) PrintLogo/29 (1073741824 (estimated locally),1.00 per call) PrintLogo/29 (1073741824 (estimated locally),1.00 per call) PrintLogo/29 (1073741824 (estimated locally),1.00 per call) PrintLogo/29 (1073741824 (estimated locally),1.00 per call) PrintLogo/29 (1073741824 (estimated locally),1.00 per call) Calls: uart_putc/31 (955630223 (estimated locally),8.09 per call) strlen/38 (118111600 (estimated locally),1.00 per call) __builtin_va_end/37 (118111600 (estimated locally),1.00 per call) vsprintf/36 (118111600 (estimated locally),1.00 per call) __builtin_va_start/35 (118111600 (estimated locally),1.00 per call) uart_putc/31 (uart_putc) @08711460 Type: function definition analyzed Visibility: externally_visible public Aux: @0250fb50 References: Referring: Availability: available Function flags: count:1073741824 (estimated locally) body optimize_size Called by: debug_printf/32 (955630223 (estimated locally),8.09 per call) Calls: Lpuart_Uart_Ip_SyncSend/34 (1073741824 (estimated locally),1.00 per call) Gvar_init/30 (Gvar_init) @087111c0 Type: function definition analyzed Visibility: externally_visible public Aux: @0250fd30 References: gb/33 (write)gb/33 (write) Referring: Availability: available Function flags: count:1073741824 (estimated locally) body optimize_size Called by: Calls: PrintLogo/29 (PrintLogo) @0870fee0 Type: function definition analyzed Visibility: externally_visible public Aux: @0250fb10 References: Referring: Availability: available Function flags: count:1073741824 (estimated locally) body optimize_size Called by: Calls: debug_printf/32 (1073741824 (estimated locally),1.00 per call) debug_printf/32 (1073741824 (estimated locally),1.00 per call) debug_printf/32 (1073741824 (estimated locally),1.00 per call) debug_printf/32 (1073741824 (estimated locally),1.00 per call) debug_printf/32 (1073741824 (estimated locally),1.00 per call) debug_printf/32 (1073741824 (estimated locally),1.00 per call) debug_printf/32 (1073741824 (estimated locally),1.00 per call) MALLOC LATTICE Initial: debug_printf: malloc_bottom uart_putc: malloc_bottom Gvar_init: malloc_bottom PrintLogo: malloc_bottom MALLOC LATTICE after propagation: debug_printf: malloc_bottom uart_putc: malloc_bottom Gvar_init: malloc_bottom PrintLogo: malloc_bottom callgraph: strlen/38 (strlen) @08711540 Type: function Visibility: external public References: Referring: Availability: not_available Function flags: optimize_size Called by: debug_printf/32 (118111600 (estimated locally),1.00 per call) Calls: __builtin_va_end/37 (__builtin_va_end) @087112a0 Type: function Visibility: external public References: Referring: Availability: not_available Function flags: optimize_size Called by: debug_printf/32 (118111600 (estimated locally),1.00 per call) Calls: vsprintf/36 (vsprintf) @08711000 Type: function Visibility: external public References: Referring: Availability: not_available Function flags: optimize_size Called by: debug_printf/32 (118111600 (estimated locally),1.00 per call) Calls: __builtin_va_start/35 (__builtin_va_start) @08711ee0 Type: function Visibility: external public References: Referring: Availability: not_available Function flags: optimize_size Called by: debug_printf/32 (118111600 (estimated locally),1.00 per call) Calls: Lpuart_Uart_Ip_SyncSend/34 (Lpuart_Uart_Ip_SyncSend) @08711d20 Type: function Visibility: external public References: Referring: Availability: not_available Function flags: optimize_size Called by: uart_putc/31 (1073741824 (estimated locally),1.00 per call) Calls: debug_printf/32 (debug_printf) @08711700 Type: function definition analyzed Visibility: externally_visible public Aux: @0250fc70 References: Referring: Availability: available Function flags: count:118111600 (estimated locally) body optimize_size Called by: PrintLogo/29 (1073741824 (estimated locally),1.00 per call) PrintLogo/29 (1073741824 (estimated locally),1.00 per call) PrintLogo/29 (1073741824 (estimated locally),1.00 per call) PrintLogo/29 (1073741824 (estimated locally),1.00 per call) PrintLogo/29 (1073741824 (estimated locally),1.00 per call) PrintLogo/29 (1073741824 (estimated locally),1.00 per call) PrintLogo/29 (1073741824 (estimated locally),1.00 per call) Calls: uart_putc/31 (955630223 (estimated locally),8.09 per call) strlen/38 (118111600 (estimated locally),1.00 per call) __builtin_va_end/37 (118111600 (estimated locally),1.00 per call) vsprintf/36 (118111600 (estimated locally),1.00 per call) __builtin_va_start/35 (118111600 (estimated locally),1.00 per call) uart_putc/31 (uart_putc) @08711460 Type: function definition analyzed Visibility: externally_visible public Aux: @0250fcd0 References: Referring: Availability: available Function flags: count:1073741824 (estimated locally) body optimize_size Called by: debug_printf/32 (955630223 (estimated locally),8.09 per call) Calls: Lpuart_Uart_Ip_SyncSend/34 (1073741824 (estimated locally),1.00 per call) Gvar_init/30 (Gvar_init) @087111c0 Type: function definition analyzed Visibility: externally_visible public Aux: @0250fcf0 References: gb/33 (write)gb/33 (write) Referring: Availability: available Function flags: count:1073741824 (estimated locally) body optimize_size Called by: Calls: PrintLogo/29 (PrintLogo) @0870fee0 Type: function definition analyzed Visibility: externally_visible public Aux: @0250fdd0 References: Referring: Availability: available Function flags: count:1073741824 (estimated locally) body optimize_size Called by: Calls: debug_printf/32 (1073741824 (estimated locally),1.00 per call) debug_printf/32 (1073741824 (estimated locally),1.00 per call) debug_printf/32 (1073741824 (estimated locally),1.00 per call) debug_printf/32 (1073741824 (estimated locally),1.00 per call) debug_printf/32 (1073741824 (estimated locally),1.00 per call) debug_printf/32 (1073741824 (estimated locally),1.00 per call) debug_printf/32 (1073741824 (estimated locally),1.00 per call) ordered call graph: reduced Gvar_init/30 (Gvar_init) @087111c0 Type: function definition analyzed Visibility: externally_visible public Aux: @0250fcf0 References: gb/33 (write)gb/33 (write) Referring: Availability: available Function flags: count:1073741824 (estimated locally) body optimize_size Called by: Calls: PrintLogo/29 (PrintLogo) @0870fee0 Type: function definition analyzed Visibility: externally_visible public Aux: @0250fdd0 References: Referring: Availability: available Function flags: count:1073741824 (estimated locally) body optimize_size Called by: Calls: debug_printf/32 (1073741824 (estimated locally),1.00 per call) debug_printf/32 (1073741824 (estimated locally),1.00 per call) debug_printf/32 (1073741824 (estimated locally),1.00 per call) debug_printf/32 (1073741824 (estimated locally),1.00 per call) debug_printf/32 (1073741824 (estimated locally),1.00 per call) debug_printf/32 (1073741824 (estimated locally),1.00 per call) debug_printf/32 (1073741824 (estimated locally),1.00 per call) debug_printf/32 (debug_printf) @08711700 Type: function definition analyzed Visibility: externally_visible public Aux: @0250fc70 References: Referring: Availability: available Function flags: count:118111600 (estimated locally) body optimize_size Called by: PrintLogo/29 (1073741824 (estimated locally),1.00 per call) PrintLogo/29 (1073741824 (estimated locally),1.00 per call) PrintLogo/29 (1073741824 (estimated locally),1.00 per call) PrintLogo/29 (1073741824 (estimated locally),1.00 per call) PrintLogo/29 (1073741824 (estimated locally),1.00 per call) PrintLogo/29 (1073741824 (estimated locally),1.00 per call) PrintLogo/29 (1073741824 (estimated locally),1.00 per call) Calls: uart_putc/31 (955630223 (estimated locally),8.09 per call) strlen/38 (118111600 (estimated locally),1.00 per call) __builtin_va_end/37 (118111600 (estimated locally),1.00 per call) vsprintf/36 (118111600 (estimated locally),1.00 per call) __builtin_va_start/35 (118111600 (estimated locally),1.00 per call) uart_putc/31 (uart_putc) @08711460 Type: function definition analyzed Visibility: externally_visible public Aux: @0250fcd0 References: Referring: Availability: available Function flags: count:1073741824 (estimated locally) body optimize_size Called by: debug_printf/32 (955630223 (estimated locally),8.09 per call) Calls: Lpuart_Uart_Ip_SyncSend/34 (1073741824 (estimated locally),1.00 per call) Function found not to call free: Gvar_init debug_printf (char * msg) { u8 len; u8 i; struct va_list argptr; char str[256]; unsigned int _1; int _2; char _3; [local count: 118111600]: # DEBUG BEGIN_STMT # DEBUG BEGIN_STMT # DEBUG BEGIN_STMT # DEBUG BEGIN_STMT __builtin_va_start (&argptr, 0); # DEBUG BEGIN_STMT vsprintf (&str, msg_8(D), argptr); # DEBUG BEGIN_STMT __builtin_va_end (&argptr); # DEBUG BEGIN_STMT _1 = strlen (&str); len_11 = (u8) _1; # DEBUG len => len_11 # DEBUG BEGIN_STMT # DEBUG i => 0 goto ; [100.00%] [local count: 955630223]: # DEBUG BEGIN_STMT _2 = (int) i_4; _3 = str[_2]; uart_putc (_3); # DEBUG BEGIN_STMT i_15 = i_4 + 1; # DEBUG i => i_15 [local count: 1073741824]: # i_4 = PHI <0(2), i_15(3)> # DEBUG i => i_4 # DEBUG BEGIN_STMT if (i_4 < len_11) goto ; [89.00%] else goto ; [11.00%] [local count: 118111601]: str ={v} {CLOBBER}; argptr ={v} {CLOBBER}; return; } uart_putc (char ch) { [local count: 1073741824]: # DEBUG BEGIN_STMT Lpuart_Uart_Ip_SyncSend (0, &ch, 1); return; } Gvar_init () { [local count: 1073741824]: # DEBUG BEGIN_STMT gb.ubuf_head = 0; # DEBUG BEGIN_STMT gb.ubuf_tail = 0; return; } PrintLogo () { [local count: 1073741824]: # DEBUG BEGIN_STMT debug_printf ("\n\r\n"); # DEBUG BEGIN_STMT debug_printf ("================================================\r\n"); # DEBUG BEGIN_STMT debug_printf (" MR S32K344 APPLICATION\n"); # DEBUG BEGIN_STMT debug_printf (" Version 0.1\n"); # DEBUG BEGIN_STMT debug_printf (" Author : sihong89@gmail.com\n"); # DEBUG BEGIN_STMT debug_printf (" Last compiled : %s %s\n", "Oct 16 2021", "14:16:57"); # DEBUG BEGIN_STMT debug_printf ("================================================\r\n"); return; }