Lines Matching refs:CLG_
46 call_stack CLG_(current_call_stack);
48 void CLG_(init_call_stack)(call_stack* s) in CLG_() function
63 call_entry* CLG_(get_call_entry)(Int sp) in CLG_() function
65 CLG_ASSERT(sp <= CLG_(current_call_stack).sp); in CLG_()
66 return &(CLG_(current_call_stack).entry[sp]); in CLG_()
69 void CLG_(copy_current_call_stack)(call_stack* dst) in CLG_() function
73 dst->size = CLG_(current_call_stack).size; in CLG_()
74 dst->entry = CLG_(current_call_stack).entry; in CLG_()
75 dst->sp = CLG_(current_call_stack).sp; in CLG_()
78 void CLG_(set_current_call_stack)(call_stack* s) in CLG_() function
82 CLG_(current_call_stack).size = s->size; in CLG_()
83 CLG_(current_call_stack).entry = s->entry; in CLG_()
84 CLG_(current_call_stack).sp = s->sp; in CLG_()
92 call_stack *cs = &CLG_(current_call_stack); in ensure_stack_size()
107 CLG_(stat).call_stack_resizes++; in ensure_stack_size()
111 CLG_(current_call_stack).size); in ensure_stack_size()
123 Int old = CLG_(clo).verbose; in function_entered()
124 CLG_(clo).verbose = fn->verbosity; in function_entered()
128 fn->name, CLG_(clo).verbose); in function_entered()
135 CLG_(dump_profile)(trigger, True); in function_entered()
138 CLG_(zero_all_cost)(True); in function_entered()
142 CLG_(current_state).collect = !CLG_(current_state).collect; in function_entered()
145 CLG_(current_state).collect ? "ON" : "OFF"); in function_entered()
157 CLG_(dump_profile)(trigger, True); in function_left()
160 CLG_(current_state).collect = !CLG_(current_state).collect; in function_left()
163 CLG_(current_state).collect ? "ON" : "OFF"); in function_left()
168 Int old = CLG_(clo).verbose; in function_left()
169 CLG_(clo).verbose = fn->verbosity; in function_left()
173 fn->name, CLG_(clo).verbose); in function_left()
186 void CLG_(push_call_stack)(BBCC* from, UInt jmp, BBCC* to, Addr sp, Bool skip) in CLG_() function
197 ensure_stack_size(CLG_(current_call_stack).sp +1); in CLG_()
198 current_entry = &(CLG_(current_call_stack).entry[CLG_(current_call_stack).sp]); in CLG_()
206 if (CLG_(current_state).nonskipped) { in CLG_()
208 CLG_ASSERT(CLG_(current_state).nonskipped == from); in CLG_()
214 CLG_(copy_cost_lz)( CLG_(sets).full, &(current_entry->enter_cost), in CLG_()
215 CLG_(current_state).cost ); in CLG_()
217 jcc = CLG_(get_jcc)(from, jmp, to); in CLG_()
220 pdepth = CLG_(get_fn_entry)(to_fn->number); in CLG_()
221 if (CLG_(clo).skip_direct_recursion) { in CLG_()
228 CLG_(stat).rec_call_counter++; in CLG_()
231 CLG_(stat).call_counter++; in CLG_()
251 current_entry->nonskipped = CLG_(current_state).nonskipped; in CLG_()
253 CLG_(current_call_stack).sp++; in CLG_()
256 CLG_ASSERT(CLG_(current_call_stack).sp < CLG_(current_call_stack).size); in CLG_()
261 CLG_(current_state).nonskipped = 0; in CLG_()
262 else if (!CLG_(current_state).nonskipped) { in CLG_()
264 CLG_(current_state).nonskipped = from; in CLG_()
265 if (!CLG_(current_state).nonskipped->skipped) { in CLG_()
266 CLG_(init_cost_lz)( CLG_(sets).full, in CLG_()
267 &CLG_(current_state).nonskipped->skipped); in CLG_()
268 CLG_(stat).distinct_skips++; in CLG_()
274 if (CLG_(clo).verbose<2) { in CLG_()
282 int s = CLG_(current_call_stack).sp; in CLG_()
294 else if (CLG_(clo).verbose<4) { in CLG_()
295 VG_(printf)("+ %2d ", CLG_(current_call_stack).sp); in CLG_()
296 CLG_(print_short_jcc)(jcc); in CLG_()
301 CLG_(print_stackentry)(3, CLG_(current_call_stack).sp-1); in CLG_()
314 void CLG_(pop_call_stack)() in CLG_() function
320 if (CLG_(current_state).sig >0) { in CLG_()
323 CLG_(run_post_signal_on_call_stack_bottom)(); in CLG_()
327 &(CLG_(current_call_stack).entry[CLG_(current_call_stack).sp-1]); in CLG_()
330 CLG_(current_call_stack).sp, lower_entry->jcc); in CLG_()
334 CLG_(current_state).nonskipped = lower_entry->nonskipped; in CLG_()
338 UInt* pdepth = CLG_(get_fn_entry)(to_fn->number); in CLG_()
339 if (CLG_(clo).skip_direct_recursion) { in CLG_()
347 if ( CLG_(add_diff_cost_lz)( CLG_(sets).full, &(jcc->cost), in CLG_()
349 CLG_(current_state).cost) ) { in CLG_()
356 CLG_(stat).ret_counter++; in CLG_()
359 CLG_(current_state).cxt = lower_entry->cxt; in CLG_()
360 CLG_(current_fn_stack).top = in CLG_()
361 CLG_(current_fn_stack).bottom + lower_entry->fn_sp; in CLG_()
362 CLG_ASSERT(CLG_(current_state).cxt != 0); in CLG_()
370 CLG_(current_call_stack).sp--; in CLG_()
374 if (CLG_(clo).verbose<4) { in CLG_()
378 CLG_(current_call_stack).sp, in CLG_()
380 CLG_(print_addr)(bb_jmpaddr(jcc->from->bb)); in CLG_()
382 CLG_(current_call_stack).entry[CLG_(current_call_stack).sp].sp); in CLG_()
383 CLG_(print_cost)(10, CLG_(sets).full, jcc->cost); in CLG_()
387 CLG_(current_call_stack).sp, in CLG_()
388 CLG_(current_call_stack).entry[CLG_(current_call_stack).sp].sp); in CLG_()
392 CLG_(print_stackentry)(7, CLG_(current_call_stack).sp); in CLG_()
395 CLG_(print_addr_ln)(bb_jmpaddr(jcc->from->bb)); in CLG_()
407 Int CLG_(unwind_call_stack)(Addr sp, Int minpops) in CLG_() function
412 sp, minpops, CLG_(current_call_stack).sp); in CLG_()
420 while( (csp=CLG_(current_call_stack).sp) >0) { in CLG_()
421 call_entry* top_ce = &(CLG_(current_call_stack).entry[csp-1]); in CLG_()
428 CLG_(pop_call_stack)(); in CLG_()
429 csp=CLG_(current_call_stack).sp; in CLG_()