Gabe Black has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/52028 )

Change subject: cpu: Fix style in BPredUnit.
......................................................................

cpu: Fix style in BPredUnit.

Change-Id: I0a8b5a9e0dc557fe6571abf2618a3a262e76a610
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/52028
Reviewed-by: Daniel Carvalho <oda...@yahoo.com.br>
Maintainer: Gabe Black <gabe.bl...@gmail.com>
Tested-by: kokoro <noreply+kok...@google.com>
---
M src/cpu/pred/bpred_unit.cc
M src/cpu/pred/bpred_unit.hh
2 files changed, 29 insertions(+), 13 deletions(-)

Approvals:
  Daniel Carvalho: Looks good to me, approved
  Gabe Black: Looks good to me, approved
  kokoro: Regressions pass




diff --git a/src/cpu/pred/bpred_unit.cc b/src/cpu/pred/bpred_unit.cc
index 5d23a26..9fcb9ba 100644
--- a/src/cpu/pred/bpred_unit.cc
+++ b/src/cpu/pred/bpred_unit.cc
@@ -75,7 +75,8 @@

 BPredUnit::BPredUnitStats::BPredUnitStats(statistics::Group *parent)
     : statistics::Group(parent),
- ADD_STAT(lookups, statistics::units::Count::get(), "Number of BP lookups"),
+      ADD_STAT(lookups, statistics::units::Count::get(),
+              "Number of BP lookups"),
       ADD_STAT(condPredicted, statistics::units::Count::get(),
                "Number of conditional branches predicted"),
       ADD_STAT(condIncorrect, statistics::units::Count::get(),
@@ -145,8 +146,7 @@
     void *indirect_history = NULL;

     if (inst->isUncondCtrl()) {
-        DPRINTF(Branch, "[tid:%i] [sn:%llu] "
-            "Unconditional control\n",
+        DPRINTF(Branch, "[tid:%i] [sn:%llu] Unconditional control\n",
             tid,seqNum);
         pred_taken = true;
         // Tell the BP there was an unconditional branch.
@@ -165,9 +165,9 @@
         iPred->genIndirectInfo(tid, indirect_history);
     }

-    DPRINTF(Branch, "[tid:%i] [sn:%llu] "
-            "Creating prediction history "
-            "for PC %s\n", tid, seqNum, pc);
+    DPRINTF(Branch,
+            "[tid:%i] [sn:%llu] Creating prediction history for PC %s\n",
+            tid, seqNum, pc);

     PredictorHistory predict_record(seqNum, pc.instAddr(), pred_taken,
bp_history, indirect_history, tid, inst);
diff --git a/src/cpu/pred/bpred_unit.hh b/src/cpu/pred/bpred_unit.hh
index d6b40e1..0e1f5d3 100644
--- a/src/cpu/pred/bpred_unit.hh
+++ b/src/cpu/pred/bpred_unit.hh
@@ -152,16 +152,14 @@
      * @param inst_PC The PC to look up.
      * @return Whether the BTB contains the given PC.
      */
-    bool BTBValid(Addr instPC)
-    { return BTB.valid(instPC, 0); }
+    bool BTBValid(Addr instPC) { return BTB.valid(instPC, 0); }

     /**
      * Looks up a given PC in the BTB to get the predicted target.
      * @param inst_PC The PC to look up.
      * @return The address of the target of the branch.
      */
-    TheISA::PCState BTBLookup(Addr instPC)
-    { return BTB.lookup(instPC, 0); }
+ TheISA::PCState BTBLookup(Addr instPC) { return BTB.lookup(instPC, 0); }

     /**
      * Updates the BP with taken/not taken information.
@@ -184,8 +182,11 @@
      * @param inst_PC The branch's PC that will be updated.
      * @param target_PC The branch's target that will be added to the BTB.
      */
-    void BTBUpdate(Addr instPC, const TheISA::PCState &target)
-    { BTB.update(instPC, target, 0); }
+    void
+    BTBUpdate(Addr instPC, const TheISA::PCState &target)
+    {
+        BTB.update(instPC, target, 0);
+    }


     void dump();
@@ -208,7 +209,9 @@
               inst(inst)
         {}

-        bool operator==(const PredictorHistory &entry) const {
+        bool
+        operator==(const PredictorHistory &entry) const
+        {
             return this->seqNum == entry.seqNum;
         }


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/52028
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I0a8b5a9e0dc557fe6571abf2618a3a262e76a610
Gerrit-Change-Number: 52028
Gerrit-PatchSet: 2
Gerrit-Owner: Gabe Black <gabe.bl...@gmail.com>
Gerrit-Reviewer: Daniel Carvalho <oda...@yahoo.com.br>
Gerrit-Reviewer: Gabe Black <gabe.bl...@gmail.com>
Gerrit-Reviewer: Jason Lowe-Power <ja...@lowepower.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to