Conversation
Change-Id: I7c0b359c8241119f090b2092766e56fa0174464c
Change-Id: Ic43dffba4ad2fd78e78f5e70b16529069a034676
This reverts commit 369a952.
📝 WalkthroughWalkthroughThis PR disables the default "update on read" behavior in the BTBTAGE branch predictor configuration and refactors trace recording logic in the update function to source prediction metadata fields from the original prediction snapshot instead of recomputed values. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/cpu/pred/btb/btb_tage.cc`:
- Around line 798-806: The code currently reads predMeta->preds[btb_entry.pc]
which default-inserts a trace prediction when the key is missing, mutating
predMeta and producing incorrect trace fields; replace that lookup with the
already-resolved source (use original_pred if present or recomputed if not)
instead of indexing predMeta->preds — i.e., obtain trace_pred from the existing
original_pred/recomputed variable used earlier and pass its fields into t.set
(keeping the same main_info/alt_info/taken/useAlt/alloc_success usage) so you
avoid implicit insertion into predMeta->preds.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 5c0f1254-dc45-44dd-b24d-226aba928c4a
📒 Files selected for processing (2)
src/cpu/pred/BranchPredictor.pysrc/cpu/pred/btb/btb_tage.cc
🚀 Coremark Smoke Test Results
✅ Difftest smoke test passed! |
Summary by CodeRabbit