loop_predictor.hh (13627:ec1395943cd2) loop_predictor.hh (13685:bb3377c81303)
1/*
2 * Copyright (c) 2014 The University of Wisconsin
3 *
4 * Copyright (c) 2006 INRIA (Institut National de Recherche en
5 * Informatique et en Automatique / French National Research Institute
6 * for Computer Science and Applied Mathematics)
7 *
8 * All rights reserved.

--- 166 unchanged lines hidden (view full) ---

175
176 /**
177 * Updates the loop predictor.
178 * @param pc The unshifted branch PC.
179 * @param taken The actual branch outcome.
180 * @param bi Pointer to information on the
181 * prediction recorded at prediction time.
182 * @param tage_pred tage prediction of the branch
1/*
2 * Copyright (c) 2014 The University of Wisconsin
3 *
4 * Copyright (c) 2006 INRIA (Institut National de Recherche en
5 * Informatique et en Automatique / French National Research Institute
6 * for Computer Science and Applied Mathematics)
7 *
8 * All rights reserved.

--- 166 unchanged lines hidden (view full) ---

175
176 /**
177 * Updates the loop predictor.
178 * @param pc The unshifted branch PC.
179 * @param taken The actual branch outcome.
180 * @param bi Pointer to information on the
181 * prediction recorded at prediction time.
182 * @param tage_pred tage prediction of the branch
183 * @param random0 random value
184 * @param random1 random value
185 * @param random2 random value
186 */
183 */
187 void loopUpdate(Addr pc, bool Taken, BranchInfo* bi, bool tage_pred,
188 int random0, int random1, int random2);
184 void loopUpdate(Addr pc, bool Taken, BranchInfo* bi, bool tage_pred);
189
190 /**
191 * Speculatively updates the loop predictor
192 * iteration count (only for useSpeculation).
193 * @param taken The predicted branch outcome.
194 * @param bi Pointer to information on the prediction
195 * recorded at prediction time.
196 */
197 void specLoopUpdate(bool taken, BranchInfo* bi);
198
199 /**
200 * Update LTAGE for conditional branches.
201 * @param branch_pc The unshifted branch PC.
202 * @param taken Actual branch outcome.
203 * @param tage_pred Prediction from TAGE
204 * @param bi Pointer to information on the prediction
205 * recorded at prediction time.
206 * @param instShiftAmt Number of bits to shift instructions
185
186 /**
187 * Speculatively updates the loop predictor
188 * iteration count (only for useSpeculation).
189 * @param taken The predicted branch outcome.
190 * @param bi Pointer to information on the prediction
191 * recorded at prediction time.
192 */
193 void specLoopUpdate(bool taken, BranchInfo* bi);
194
195 /**
196 * Update LTAGE for conditional branches.
197 * @param branch_pc The unshifted branch PC.
198 * @param taken Actual branch outcome.
199 * @param tage_pred Prediction from TAGE
200 * @param bi Pointer to information on the prediction
201 * recorded at prediction time.
202 * @param instShiftAmt Number of bits to shift instructions
207 * @param rand0 Random integer value
208 * @param rand1 Random integer value
209 * @param rand2 Random integer value
210 */
203 */
211 void condBranchUpdate(
212 ThreadID tid, Addr branch_pc, bool taken, bool tage_pred,
213 BranchInfo* bi, unsigned instShiftAmt, int rand0, int rand1,
214 int rand2);
204 void condBranchUpdate(ThreadID tid, Addr branch_pc, bool taken,
205 bool tage_pred, BranchInfo* bi, unsigned instShiftAmt);
215
216 /**
217 * Get the loop prediction
218 * @param tid The thread ID to select the global
219 * histories to use.
220 * @param branch_pc The unshifted branch PC.
221 * @param cond_branch True if the branch is conditional.
222 * @param bi Reference to wrapping pointer to allow storing

--- 16 unchanged lines hidden (view full) ---

239 void updateStats(bool taken, BranchInfo* bi);
240
241 void squashLoop(BranchInfo * bi);
242
243 void squash(ThreadID tid, BranchInfo *bi);
244
245 virtual bool calcConf(int index) const;
246
206
207 /**
208 * Get the loop prediction
209 * @param tid The thread ID to select the global
210 * histories to use.
211 * @param branch_pc The unshifted branch PC.
212 * @param cond_branch True if the branch is conditional.
213 * @param bi Reference to wrapping pointer to allow storing

--- 16 unchanged lines hidden (view full) ---

230 void updateStats(bool taken, BranchInfo* bi);
231
232 void squashLoop(BranchInfo * bi);
233
234 void squash(ThreadID tid, BranchInfo *bi);
235
236 virtual bool calcConf(int index) const;
237
247 virtual bool optionalAgeInc(int nrand) const;
238 virtual bool optionalAgeInc() const;
248
249 virtual BranchInfo *makeBranchInfo();
250
251 /**
252 * Gets the value of the loop use counter
253 * @return the loop use counter value
254 */
255 int8_t getLoopUseCounter() const

--- 17 unchanged lines hidden ---
239
240 virtual BranchInfo *makeBranchInfo();
241
242 /**
243 * Gets the value of the loop use counter
244 * @return the loop use counter value
245 */
246 int8_t getLoopUseCounter() const

--- 17 unchanged lines hidden ---