Nikos Nikoleris has submitted this change and it was merged. ( https://gem5-review.googlesource.com/11119 )

Change subject: mem-cache: Remove unnecessary cast in SectorTags::findVictim
......................................................................

mem-cache: Remove unnecessary cast in SectorTags::findVictim

Removes an uneccessary cast that also caused an unused variable
error (due to -Werror) when compiling .fast targets.

Change-Id: Ic043f462925e7eaa7b691455f1d9e08a1c101980
Reviewed-on: https://gem5-review.googlesource.com/11119
Reviewed-by: Daniel Carvalho <[email protected]>
Maintainer: Nikos Nikoleris <[email protected]>
---
M src/mem/cache/tags/sector_tags.cc
1 file changed, 2 insertions(+), 3 deletions(-)

Approvals:
  Daniel Carvalho: Looks good to me, approved
  Nikos Nikoleris: Looks good to me, approved



diff --git a/src/mem/cache/tags/sector_tags.cc b/src/mem/cache/tags/sector_tags.cc
index cec7bd4..33269ec 100644
--- a/src/mem/cache/tags/sector_tags.cc
+++ b/src/mem/cache/tags/sector_tags.cc
@@ -278,7 +278,7 @@
     }

     // Get the location of the victim block within the sector
-    CacheBlk* victim = victim_sector->blks[extractSectorOffset(addr)];
+    SectorSubBlk* victim = victim_sector->blks[extractSectorOffset(addr)];

// Get evicted blocks. Blocks are only evicted if the sectors mismatch and
     // the currently existing sector is valid.
@@ -294,10 +294,9 @@
         }
     }

-    SectorSubBlk* victim_cast = static_cast<SectorSubBlk*>(victim);
     DPRINTF(CacheRepl, "set %x, way %x, sector offset %x: %s\n",
             "selecting blk for replacement\n", victim->set, victim->way,
-            victim_cast->getSectorOffset());
+            victim->getSectorOffset());

     return victim;
 }

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

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: Ic043f462925e7eaa7b691455f1d9e08a1c101980
Gerrit-Change-Number: 11119
Gerrit-PatchSet: 4
Gerrit-Owner: Nikos Nikoleris <[email protected]>
Gerrit-Assignee: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Nikos Nikoleris <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to