-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Implement the new way to train the branch predictor. #93
Open
xusine
wants to merge
17
commits into
maintainer/bryan
Choose a base branch
from
feat/redirection_and_bp_training
base: maintainer/bryan
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
**Description** If the instruction is predicted as branch but it is not a branch, it does not trigger a branch misprediction. **Steps to Reproduce** Run data caching image with 2 coresAfter some time an instruction is predicted as a taken branch modifying the PCExpected BehaviorAfter we dispatch we should rollback the next instructions and give branch feedback to the frontend **Actual Behavior** No rollback happens when we notice the instruction is not a branch
Register 31 is the stack pointer, and therefor cannot be used as a results register.
DAIF register is not part of the PSTATE anymore (from QEMU perspective)
Small fix for DAIFset
*Description* There are a couple problematic cases for memory decoding. Namely prefetch instruction with register offset and atomic load stores (ldxr) *Expected Behavior* Prefetch instruction should be decoded as nop and ldxr register should be decoded with blackbox as it is not implemented. *Actual Behavior* They are decoded as normal load store instructions.
*Description* LDP and STP instructions load or store to 2 memory locations. It is normally implemented as two uOps in hardware, but it is a single uOp in flexus. This causes some unintended bugs where store-load forwarding breaks etc. *Steps to Reproduce* Run data caching image with 2 coresAfter some time, there will be a sequence of instructions as follows:str to address x + 8ldp to address x *Expected Behavior* Load pair should get a part of its value from str because the second load value of the pair address matches the str address. *Actual Behavior* It does not forward because the addresses x and x+8 are not the same.
Now the rediction and the training is decoupled: - Redirection can happen speculatively. Redirection requires to restore the branch history (for TAGE) and append the new history of the instruction triggering redirection (e.g., branches, resync request). - Training the branch predictor happens for all instructions in their commit stage. This step includes updating the BTB as well as update the corresponding counters in the TAGE. This commit also cleans unused effects related to the branches.
branylagaffe
force-pushed
the
maintainer/bryan
branch
from
December 18, 2024 13:49
b0426f6
to
fc1f4f1
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Now the rediction and the training is decoupled:
This commit also cleans unused effects related to the branches.