• Home
  • Raw
  • Download

Lines Matching refs:CLG_

43 void CLG_(init_bbcc_hash)(bbcc_hash* bbccs)  in CLG_()  function
57 void CLG_(copy_current_bbcc_hash)(bbcc_hash* dst) in CLG_() function
66 bbcc_hash* CLG_(get_current_bbcc_hash)() in CLG_() function
71 void CLG_(set_current_bbcc_hash)(bbcc_hash* h) in CLG_() function
83 void CLG_(zero_bbcc)(BBCC* bbcc) in CLG_() function
104 CLG_(init_cost)( CLG_(sets).full, jcc->cost ); in CLG_()
112 void CLG_(forall_bbccs)(void (*func)(BBCC*)) in CLG_() function
164 if (!CLG_(clo).separate_threads) { in lookup_bbcc()
168 if (bbcc->tid == CLG_(current_tid)) return bbcc; in lookup_bbcc()
171 CLG_(stat).bbcc_lru_misses++; in lookup_bbcc()
186 if (bbcc) CLG_(print_bbcc)(-2,bbcc); in lookup_bbcc()
239 CLG_(stat).bbcc_hash_resizes++; in resize_bbcc_hash()
278 bbcc->tid = CLG_(current_tid); in new_bbcc()
282 bbcc->cost = CLG_(get_costarray)(bb->cost_count); in new_bbcc()
296 CLG_(stat).distinct_bbccs++; in new_bbcc()
299 bb_addr(bb), bbcc, CLG_(stat).distinct_bbccs); in new_bbcc()
387 CLG_ASSERT((orig->tid != CLG_(current_tid)) || in clone_bbcc()
398 if (CLG_(clo).separate_threads) in clone_bbcc()
399 CLG_ASSERT(orig->tid == CLG_(current_tid)); in clone_bbcc()
419 CLG_(print_bbcc)(-2, bbcc); in clone_bbcc()
432 CLG_(stat).bbcc_clones++; in clone_bbcc()
444 BBCC* CLG_(get_bbcc)(BB* bb) in CLG_() function
465 CLG_(print_bbcc)(-2, bbcc); in CLG_()
502 source_bb = CLG_(get_bb)(bb_addr(bb)-1, 0, &seen_before); in handleUnderflow()
503 source_bbcc = CLG_(get_bbcc)(source_bb); in handleUnderflow()
507 source_bbcc->ecounter_sum = CLG_(current_state).collect ? 1 : 0; in handleUnderflow()
509 else if (CLG_(current_state).collect) in handleUnderflow()
513 CLG_(current_fn_stack).top--; in handleUnderflow()
514 CLG_(current_state).cxt = 0; in handleUnderflow()
515 caller = CLG_(get_fn_node)(bb); in handleUnderflow()
516 CLG_(push_cxt)( caller ); in handleUnderflow()
524 source_bbcc->cxt = CLG_(current_state).cxt; in handleUnderflow()
527 CLG_ASSERT(CLG_(current_state).bbcc); in handleUnderflow()
530 fn_number = CLG_(current_state).bbcc->cxt->fn[0]->number; in handleUnderflow()
531 pactive = CLG_(get_fn_entry)(fn_number); in handleUnderflow()
538 CLG_(current_state).nonskipped = 0; /* we didn't skip this function */ in handleUnderflow()
540 CLG_(push_cxt)( CLG_(current_state).bbcc->cxt->fn[0] ); in handleUnderflow()
541 CLG_(push_call_stack)(source_bbcc, 0, CLG_(current_state).bbcc, in handleUnderflow()
544 &(CLG_(current_call_stack).entry[CLG_(current_call_stack).sp -1]); in handleUnderflow()
547 if (CLG_(current_state).sig == 0) in handleUnderflow()
548 CLG_(copy_cost)( CLG_(sets).full, call_entry_up->enter_cost, in handleUnderflow()
549 CLG_(get_current_thread)()->lastdump_cost ); in handleUnderflow()
551 CLG_(zero_cost)( CLG_(sets).full, call_entry_up->enter_cost ); in handleUnderflow()
561 void CLG_(setup_bbcc)(BB* bb) in CLG_() function
588 if (UNLIKELY(tid != CLG_(current_tid))) in CLG_()
589 CLG_(switch_thread)(tid); in CLG_()
591 CLG_ASSERT(VG_(get_running_tid)() == CLG_(current_tid)); in CLG_()
595 last_bbcc = CLG_(current_state).bbcc; in CLG_()
599 passed = CLG_(current_state).jmps_passed; in CLG_()
604 if (CLG_(current_state).collect) { in CLG_()
605 if (!CLG_(current_state).nonskipped) { in CLG_()
608 if (!CLG_(clo).simulate_cache) { in CLG_()
611 CLG_(current_state).cost[ fullOffset(EG_IR) ] += instr_count; in CLG_()
617 if (!CLG_(clo).simulate_cache) { in CLG_()
620 CLG_(current_state).cost[ fullOffset(EG_IR) ] += instr_count; in CLG_()
621 CLG_(current_state).nonskipped->skipped[ fullOffset(EG_IR) ] in CLG_()
628 CLG_(print_execstate)(-2, &CLG_(current_state) ); in CLG_()
629 CLG_(print_bbcc_cost)(-2, last_bbcc); in CLG_()
639 csp = CLG_(current_call_stack).sp; in CLG_()
644 call_entry* top_ce = &(CLG_(current_call_stack).entry[csp_up]); in CLG_()
661 top_ce = &(CLG_(current_call_stack).entry[csp_up]); in CLG_()
704 if (CLG_(get_fn_node)(last_bb)->pop_on_jump && (csp>0)) { in CLG_()
706 call_entry* top_ce = &(CLG_(current_call_stack).entry[csp-1]); in CLG_()
713 CLG_(current_state).bbcc = top_ce->jcc->from; in CLG_()
716 CLG_(pop_call_stack)(); in CLG_()
719 CLG_ASSERT(CLG_(current_state).nonskipped != 0); in CLG_()
729 skip = CLG_(get_fn_node)(bb)->skip; in CLG_()
751 ((CLG_(current_fn_stack).top > CLG_(current_fn_stack).bottom) && in CLG_()
752 ( *(CLG_(current_fn_stack).top-1)==0)) ) { in CLG_()
758 CLG_(pop_call_stack)(); in CLG_()
762 CLG_(unwind_call_stack)(sp, popcount_on_return); in CLG_()
766 Int unwind_count = CLG_(unwind_call_stack)(sp, 0); in CLG_()
775 csp = CLG_(current_call_stack).sp; in CLG_()
777 sp = CLG_(current_call_stack).entry[csp-1].sp; in CLG_()
783 if ((delayed_push && !skip) || (CLG_(current_state).cxt == 0)) { in CLG_()
784 CLG_(push_cxt)(CLG_(get_fn_node)(bb)); in CLG_()
786 CLG_ASSERT(CLG_(current_fn_stack).top > CLG_(current_fn_stack).bottom); in CLG_()
789 bbcc = CLG_(get_bbcc)(bb); in CLG_()
793 bbcc->cxt = CLG_(current_state).cxt; in CLG_()
795 new_recursion((*CLG_(current_fn_stack).top)->separate_recursions); in CLG_()
809 (bbcc->cxt != CLG_(current_state).cxt))) in CLG_()
816 bbcc = lookup_bbcc(bb, CLG_(current_state).cxt); in CLG_()
818 bbcc = clone_bbcc(bb->bbcc_list, CLG_(current_state).cxt, 0); in CLG_()
827 if ((*CLG_(current_fn_stack).top)->separate_recursions >1) { in CLG_()
829 fn_node* top = *(CLG_(current_fn_stack).top); in CLG_()
831 level = *CLG_(get_fn_entry)(top->number); in CLG_()
834 if (CLG_(clo).skip_direct_recursion) { in CLG_()
836 CLG_ASSERT(CLG_(current_state).bbcc != 0); in CLG_()
838 if (CLG_(current_state).bbcc->cxt->fn[0] != bbcc->cxt->fn[0]) in CLG_()
849 *CLG_(get_fn_entry)(top->number) = 1; in CLG_()
856 bbcc = clone_bbcc(bbcc, CLG_(current_state).cxt, idx); in CLG_()
862 if (!skip && CLG_(current_state).nonskipped) { in CLG_()
864 CLG_(current_state).bbcc = CLG_(current_state).nonskipped; in CLG_()
866 passed = CLG_(current_state).bbcc->bb->cjmp_count; in CLG_()
868 CLG_(push_call_stack)(CLG_(current_state).bbcc, passed, in CLG_()
872 if (CLG_(clo).collect_jumps && (jmpkind == jk_Jump)) { in CLG_()
877 jCC* jcc = CLG_(get_jcc)(last_bbcc, passed, bbcc); in CLG_()
889 CLG_(stat).jcnd_counter++; in CLG_()
891 CLG_(stat).jump_counter++; in CLG_()
894 CLG_(current_state).bbcc = bbcc; in CLG_()
898 CLG_(current_state).jmps_passed = 0; in CLG_()
900 CLG_(bb_base) = bb->obj->offset + bb->offset; in CLG_()
901 CLG_(cost_base) = bbcc->cost; in CLG_()
905 CLG_(print_bbcc_fn)(bbcc); in CLG_()
913 CLG_(print_cxt)(-8, CLG_(current_state).cxt, bbcc->rec_index); in CLG_()
916 CLG_(stat).bb_executions++; in CLG_()