cpu: Get rid of auto return types in the PhysRegFile.
authorGabe Black <gabeblack@google.com>
Sat, 20 Jun 2020 00:06:16 +0000 (17:06 -0700)
committerGabe Black <gabeblack@google.com>
Fri, 3 Jul 2020 21:28:19 +0000 (21:28 +0000)
This is a C++14 feature, where we only support up to C++11 currently. It
also unnecessarily obfuscates what these functions are doing, since the
return type is a simple and fixed.

Change-Id: I7459ed885c3f006edbcecd4c6be9835d77dbbbae
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30434
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/cpu/o3/regfile.cc

index de9cd5ecbfdfdaf02243029f9ec2408a4c9e3a29..e8164dca4d26e70c888e3f886294d75cb1c9977d 100644 (file)
@@ -180,8 +180,8 @@ PhysRegFile::initFreeList(UnifiedFreeList *freeList)
     freeList->addRegs(ccRegIds.begin(), ccRegIds.end());
 }
 
-auto
-PhysRegFile::getRegElemIds(PhysRegIdPtr reg) -> IdRange
+PhysRegFile::IdRange
+PhysRegFile::getRegElemIds(PhysRegIdPtr reg)
 {
     panic_if(!reg->isVectorPhysReg(),
             "Trying to get elems of a %s register", reg->className());
@@ -191,8 +191,8 @@ PhysRegFile::getRegElemIds(PhysRegIdPtr reg) -> IdRange
                 vecElemIds.begin() + (idx+1) * NumVecElemPerVecReg);
 }
 
-auto
-PhysRegFile::getRegIds(RegClass cls) -> IdRange
+PhysRegFile::IdRange
+PhysRegFile::getRegIds(RegClass cls)
 {
     switch (cls)
     {