Review Board 2.0.15


O3: Fix mispredicts from non control instructions.

Review Request #343 - Created Dec. 6, 2010 and submitted

Information
Ali Saidi
gem5
Reviewers
Default
ali, gblack, nate, stever
O3: Fix mispredicts from non control instructions.
The squash inside the fetch unit should not attempt to remove them from the
branch predictor as non-control instructions are not pushed into the predictor.

   
Review request changed
Updated (Jan. 12, 2011, 1:08 a.m.)

Summary:

-Fix mispredicts from non control instructions. The squash inside the
+O3: Fix mispredicts from non control instructions.

Description:

~  

Fix mispredicts from non control instructions. The squash inside the

~   fetch unit should not attempt to remove them from the branch predictor
~   as non-control instructions are not pushed into the predictor.

  ~

O3: Fix mispredicts from non control instructions.

  ~ The squash inside the fetch unit should not attempt to remove them from the
  ~ branch predictor as non-control instructions are not pushed into the predictor.

Diff:

Revision 2 (+16 -4)

Show changes

Ship it!
Posted (Jan. 16, 2011, 4:47 p.m.)
This new version looks basically ok to me.
Posted (Jan. 17, 2011, 12:32 a.m.)
Hugely improved!  It seems clear from the assertion now that the branchMispredict flag is redundant (you could add the converse check to be sure that mispredictInst is NULL whenever branchMispredict is false, but it seems unnecessary if the line above where you set mispredictInst to NULL is the one place where branchMispredict is set to false).  Why not get rid of the flag and just use mispredictInst == NULL to signal that there was no misprediction?  The redundancy only adds confusion IMO b/c then you're left wondering if there is a case where they wouldn't be consistent, and if so, what that would mean.  If it helps to add a wrapper like
  bool branchMispredict() { return (mispredictInst != NULL); }
that's ok with me.