Lines Matching defs:tid

246 MultiperspectivePerceptron::findBest(ThreadID tid,
263 pairs[i].mpreds = threadData[tid]->mpreds[i];
272 MultiperspectivePerceptron::getIndex(ThreadID tid, const MPPBranchInfo &bi,
275 unsigned int g = spec.getHash(tid, bi.getPC(), bi.getPC2(), index);
287 h ^= threadData[tid]->imli_counter[0];
290 h ^= threadData[tid]->imli_counter[3];
294 h ^= RECENCYPOS::hash(threadData[tid]->recency_stack, table_sizes,
303 MultiperspectivePerceptron::computeOutput(ThreadID tid, MPPBranchInfo &bi)
313 int lhist = threadData[tid]->localHistories[bi.getPC()];
314 int history_len = threadData[tid]->localHistories.getLocalHistoryLength();
326 findBest(tid, best_preds);
334 unsigned int hashed_idx = getIndex(tid, bi, spec, i);
336 int counter = threadData[tid]->tables[i][hashed_idx];
339 threadData[tid]->sign_bits[i][hashed_idx][bi.getHPC() % n_sign_bits];
403 MultiperspectivePerceptron::train(ThreadID tid, MPPBranchInfo &bi, bool taken)
405 std::vector<std::vector<short int>> &tables = threadData[tid]->tables;
407 threadData[tid]->sign_bits;
408 std::vector<int> &mpreds = threadData[tid]->mpreds;
421 unsigned int hashed_idx = getIndex(tid, bi, spec, i);
469 unsigned int hashed_idx = getIndex(tid, bi, spec, i);
503 unsigned int hashed_idx = getIndex(tid, bi, spec, i);
521 unsigned int hashed_idx = getIndex(tid, bi, spec, i);
544 MultiperspectivePerceptron::uncondBranch(ThreadID tid, Addr pc,
548 std::vector<unsigned int> &ghist_words = threadData[tid]->ghist_words;
560 memmove(&threadData[tid]->path_history[1],
561 &threadData[tid]->path_history[0],
563 threadData[tid]->path_history[0] = pc2;
567 MultiperspectivePerceptron::lookup(ThreadID tid, Addr instPC,
575 if (!threadData[tid]->filterTable.empty()) {
577 bi->getHashFilter(threadData[tid]->last_ghist_bit) %
578 threadData[tid]->filterTable.size();
579 FilterEntry &f = threadData[tid]->filterTable[findex];
594 int bestval = computeOutput(tid, *bi);
609 MultiperspectivePerceptron::update(ThreadID tid, Addr instPC, bool taken,
629 if (!threadData[tid]->filterTable.empty()) {
630 int findex = bi->getHashFilter(threadData[tid]->last_ghist_bit) %
631 threadData[tid]->filterTable.size();
632 FilterEntry &f = threadData[tid]->filterTable[findex];
653 threadData[tid]->occupancy += 1;
659 ((threadData[tid]->occupancy > decay) || (decay == 1))) {
661 threadData[tid]->filterTable.size();
662 FilterEntry &frand = threadData[tid]->filterTable[rnd];
664 threadData[tid]->occupancy -= 1;
672 train(tid, *bi, taken);
690 threadData[tid]->imli_counter[0] += 1;
692 threadData[tid]->imli_counter[0] = 0;
695 threadData[tid]->imli_counter[1] += 1;
697 threadData[tid]->imli_counter[1] = 0;
701 threadData[tid]->imli_counter[2] += 1;
703 threadData[tid]->imli_counter[2] = 0;
706 threadData[tid]->imli_counter[3] += 1;
708 threadData[tid]->imli_counter[3] = 0;
718 assert(threadData[tid]->ghist_words.size() > 0);
720 unsigned int a = threadData[tid]->ghist_words[i];
726 threadData[tid]->ghist_words[i] = a;
732 assert(threadData[tid]->path_history.size() > 0);
733 memmove(&threadData[tid]->path_history[1],
734 &threadData[tid]->path_history[0],
736 threadData[tid]->path_history[0] = bi->getPC2();
741 threadData[tid]->updateAcyclic(hashed_taken, bi->getHPC());
749 memmove(&threadData[tid]->modpath_histories[i][1],
750 &threadData[tid]->modpath_histories[i][0],
752 threadData[tid]->modpath_histories[i][0] = bi->getPC2();
760 threadData[tid]->blurrypath_histories;
783 threadData[tid]->mod_histories[i][j] =
784 threadData[tid]->mod_histories[i][j-1];
786 threadData[tid]->mod_histories[i][0] = hashed_taken;
794 threadData[tid]->insertRecency(bi->getPC2(), assoc);
800 threadData[tid]->localHistories.update(bi->getPC(), hashed_taken);
804 threadData[tid]->last_ghist_bit = taken;
810 MultiperspectivePerceptron::btbUpdate(ThreadID tid, Addr branch_pc,
816 MultiperspectivePerceptron::squash(ThreadID tid, void *bp_history)