Lines Matching refs:bi

272 MultiperspectivePerceptron::getIndex(ThreadID tid, const MPPBranchInfo &bi,
275 unsigned int g = spec.getHash(tid, bi.getPC(), bi.getPC2(), index);
280 h ^= bi.getPC2();
283 h ^= bi.getHPC();
295 bi.getPC2(), 31, index);
303 MultiperspectivePerceptron::computeOutput(ThreadID tid, MPPBranchInfo &bi)
309 bi.yout = 0;
313 int lhist = threadData[tid]->localHistories[bi.getPC()];
316 bi.yout = bias0;
318 bi.yout = bias1;
320 bi.yout = biasmostly0;
322 bi.yout = biasmostly1;
334 unsigned int hashed_idx = getIndex(tid, bi, spec, i);
339 threadData[tid]->sign_bits[i][hashed_idx][bi.getHPC() % n_sign_bits];
346 bi.yout += val;
361 bi.yout *= fudge;
403 MultiperspectivePerceptron::train(ThreadID tid, MPPBranchInfo &bi, bool taken)
410 bool correct = (bi.yout >= 1) == taken;
412 int abs_yout = abs(bi.yout);
421 unsigned int hashed_idx = getIndex(tid, bi, spec, i);
422 bool sign = sign_bits[i][hashed_idx][bi.getHPC() % n_sign_bits];
469 unsigned int hashed_idx = getIndex(tid, bi, spec, i);
472 bool sign = sign_bits[i][hashed_idx][bi.getHPC() % n_sign_bits];
477 sign_bits[i][hashed_idx][bi.getHPC() % n_sign_bits] = sign;
503 unsigned int hashed_idx = getIndex(tid, bi, spec, i);
506 sign_bits[i][hashed_idx][bi.getHPC() % n_sign_bits];
521 unsigned int hashed_idx = getIndex(tid, bi, spec, i);
524 sign_bits[i][hashed_idx][bi.getHPC() % n_sign_bits];
547 MPPBranchInfo *bi = new MPPBranchInfo(pc, pcshift, false);
550 bp_history = (void *)bi;
570 MPPBranchInfo *bi = new MPPBranchInfo(instPC, pcshift, true);
571 bp_history = (void *)bi;
577 bi->getHashFilter(threadData[tid]->last_ghist_bit) %
581 bi->filtered = true;
582 bi->prediction = false;
585 bi->filtered = true;
586 bi->prediction = true;
594 int bestval = computeOutput(tid, *bi);
596 bi->prediction = false;
598 if (abs(bi->yout) <= threshold) {
599 bi->prediction = (bestval >= 1);
601 bi->prediction = (bi->yout >= 1);
605 return bi->prediction;
615 MPPBranchInfo *bi = static_cast<MPPBranchInfo*>(bp_history);
618 //delete bi;
622 if (bi->isUnconditional()) {
623 delete bi;
630 int findex = bi->getHashFilter(threadData[tid]->last_ghist_bit) %
672 train(tid, *bi, taken);
686 if (!bi->filtered || (record_mask & RECORD_FILTERED_IMLI)) {
688 if (target < bi->getPC()) {
713 bool hashed_taken = hash_taken ? (taken ^ !!(bi->getPC() & (1<<pcbit)))
716 if (!bi->filtered || (record_mask & RECORD_FILTERED_GHIST)) {
731 if (!bi->filtered || (record_mask & RECORD_FILTERED_PATH)) {
736 threadData[tid]->path_history[0] = bi->getPC2();
740 if (!bi->filtered || (record_mask & RECORD_FILTERED_ACYCLIC)) {
741 threadData[tid]->updateAcyclic(hashed_taken, bi->getHPC());
745 if (!bi->filtered || (record_mask & RECORD_FILTERED_MOD)) {
748 if (bi->getHPC() % (i + 2) == 0) {
752 threadData[tid]->modpath_histories[i][0] = bi->getPC2();
758 if (!bi->filtered || (record_mask & RECORD_FILTERED_BLURRY)) {
765 unsigned int z = bi->getPC() >> i;
778 if (!bi->filtered || (record_mask & RECORD_FILTERED_MOD)) {
781 if (bi->getHPC() % (i + 2) == 0) {
793 if (!bi->filtered || (record_mask & RECORD_FILTERED_RECENCY)) {
794 threadData[tid]->insertRecency(bi->getPC2(), assoc);
799 if (!bi->filtered || (record_mask & RECORD_FILTERED_LOCAL)) {
800 threadData[tid]->localHistories.update(bi->getPC(), hashed_taken);
806 delete bi;
819 MPPBranchInfo *bi = static_cast<MPPBranchInfo*>(bp_history);
820 delete bi;