/** Checks if a branch address is in the BTB. Intended as a quick check * before calling lookup. Does not update statistics. * @param inst_PC The address of the branch to look up. * @return Whether or not the branch exists in the BTB. */ virtualboolvalid(ThreadID tid, Addr instPC)= 0;
/** Looks up an address in the BTB to get the target of the branch. * @param inst_PC The address of the branch to look up. * @param type Optional type of the branch to look up. * @return The target of the branch or nullptr if the branch is not * in the BTB. */ virtualconst PCStateBase *lookup(ThreadID tid, Addr instPC, BranchType type = BranchType::NoBranch)= 0;
/** Looks up an address in the BTB and return the instruction * information if existant. Does not update statistics. * @param inst_PC The address of the branch to look up. * @return Returns the target of the branch. */ virtualconst StaticInstPtr getInst(ThreadID tid, Addr instPC)= 0;
/** Updates the BTB with the target of a branch. * @param inst_pc The address of the branch being updated. * @param target_pc The target address of the branch. */ virtualvoidupdate(ThreadID tid, Addr inst_pc, const PCStateBase &target_pc, BranchType type = BranchType::NoBranch, StaticInstPtr inst = nullptr)= 0;