summaryrefslogtreecommitdiff
path: root/src/mem
diff options
context:
space:
mode:
authorNikos Nikoleris <nikos.nikoleris@arm.com>2016-05-26 11:56:24 +0100
committerNikos Nikoleris <nikos.nikoleris@arm.com>2016-05-26 11:56:24 +0100
commita69a0f33cbe546826756b31dcefbe9d1fdb84b2a (patch)
tree179e55753c1e8bdaadde578c6769f690570dc6ee /src/mem
parentf9d62b63e10a05be824b094f51f792e9ae4e04f3 (diff)
downloadgem5-a69a0f33cbe546826756b31dcefbe9d1fdb84b2a.tar.xz
mem: fix headers include order in the cache related classes
Change-Id: Ia57cc104978861ab342720654e408dbbfcbe4b69 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'src/mem')
-rw-r--r--src/mem/cache/base.cc7
-rw-r--r--src/mem/cache/blk.cc3
-rw-r--r--src/mem/cache/mshr.cc3
-rw-r--r--src/mem/cache/tags/base.cc3
-rw-r--r--src/mem/cache/tags/base_set_assoc.cc3
-rw-r--r--src/mem/cache/tags/base_set_assoc.hh4
-rw-r--r--src/mem/cache/tags/cacheset.hh1
-rw-r--r--src/mem/cache/tags/fa_lru.cc3
-rw-r--r--src/mem/cache/tags/fa_lru.hh2
-rw-r--r--src/mem/cache/tags/lru.cc3
-rw-r--r--src/mem/cache/tags/random_repl.cc3
11 files changed, 21 insertions, 14 deletions
diff --git a/src/mem/cache/base.cc b/src/mem/cache/base.cc
index c11208021..b6b3b1481 100644
--- a/src/mem/cache/base.cc
+++ b/src/mem/cache/base.cc
@@ -45,14 +45,15 @@
* Definition of BaseCache functions.
*/
+#include "mem/cache/base.hh"
+
#include "debug/Cache.hh"
#include "debug/Drain.hh"
+#include "mem/cache/cache.hh"
+#include "mem/cache/mshr.hh"
#include "mem/cache/tags/fa_lru.hh"
#include "mem/cache/tags/lru.hh"
#include "mem/cache/tags/random_repl.hh"
-#include "mem/cache/base.hh"
-#include "mem/cache/cache.hh"
-#include "mem/cache/mshr.hh"
#include "sim/full_system.hh"
using namespace std;
diff --git a/src/mem/cache/blk.cc b/src/mem/cache/blk.cc
index 210304dbf..9475bda31 100644
--- a/src/mem/cache/blk.cc
+++ b/src/mem/cache/blk.cc
@@ -38,9 +38,10 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "base/cprintf.hh"
#include "mem/cache/blk.hh"
+#include "base/cprintf.hh"
+
void
CacheBlkPrintWrapper::print(std::ostream &os, int verbosity,
const std::string &prefix) const
diff --git a/src/mem/cache/mshr.cc b/src/mem/cache/mshr.cc
index 5c4481e02..56284dcc6 100644
--- a/src/mem/cache/mshr.cc
+++ b/src/mem/cache/mshr.cc
@@ -47,6 +47,8 @@
* Miss Status and Handling Register (MSHR) definitions.
*/
+#include "mem/cache/mshr.hh"
+
#include <algorithm>
#include <cassert>
#include <string>
@@ -56,7 +58,6 @@
#include "base/types.hh"
#include "debug/Cache.hh"
#include "mem/cache/cache.hh"
-#include "mem/cache/mshr.hh"
#include "sim/core.hh"
using namespace std;
diff --git a/src/mem/cache/tags/base.cc b/src/mem/cache/tags/base.cc
index 8d2322e51..c413fbc5d 100644
--- a/src/mem/cache/tags/base.cc
+++ b/src/mem/cache/tags/base.cc
@@ -46,8 +46,9 @@
* Definitions of BaseTags.
*/
-#include "cpu/smt.hh" //maxThreadsPerCPU
#include "mem/cache/tags/base.hh"
+
+#include "cpu/smt.hh" //maxThreadsPerCPU
#include "mem/cache/base.hh"
#include "sim/sim_exit.hh"
diff --git a/src/mem/cache/tags/base_set_assoc.cc b/src/mem/cache/tags/base_set_assoc.cc
index 6fc186d19..86036aa9b 100644
--- a/src/mem/cache/tags/base_set_assoc.cc
+++ b/src/mem/cache/tags/base_set_assoc.cc
@@ -45,10 +45,11 @@
* Definitions of a base set associative tag store.
*/
+#include "mem/cache/tags/base_set_assoc.hh"
+
#include <string>
#include "base/intmath.hh"
-#include "mem/cache/tags/base_set_assoc.hh"
#include "sim/core.hh"
using namespace std;
diff --git a/src/mem/cache/tags/base_set_assoc.hh b/src/mem/cache/tags/base_set_assoc.hh
index 053274c53..31284991f 100644
--- a/src/mem/cache/tags/base_set_assoc.hh
+++ b/src/mem/cache/tags/base_set_assoc.hh
@@ -52,10 +52,10 @@
#include <cstring>
#include <list>
-#include "mem/cache/tags/base.hh"
-#include "mem/cache/tags/cacheset.hh"
#include "mem/cache/base.hh"
#include "mem/cache/blk.hh"
+#include "mem/cache/tags/base.hh"
+#include "mem/cache/tags/cacheset.hh"
#include "mem/packet.hh"
#include "params/BaseSetAssoc.hh"
diff --git a/src/mem/cache/tags/cacheset.hh b/src/mem/cache/tags/cacheset.hh
index 8bf0989f7..69109d10c 100644
--- a/src/mem/cache/tags/cacheset.hh
+++ b/src/mem/cache/tags/cacheset.hh
@@ -50,7 +50,6 @@
#include <cassert>
-
/**
* An associative set of cache blocks.
*/
diff --git a/src/mem/cache/tags/fa_lru.cc b/src/mem/cache/tags/fa_lru.cc
index ecac88afa..0d6a3392d 100644
--- a/src/mem/cache/tags/fa_lru.cc
+++ b/src/mem/cache/tags/fa_lru.cc
@@ -45,12 +45,13 @@
* Definitions a fully associative LRU tagstore.
*/
+#include "mem/cache/tags/fa_lru.hh"
+
#include <cassert>
#include <sstream>
#include "base/intmath.hh"
#include "base/misc.hh"
-#include "mem/cache/tags/fa_lru.hh"
using namespace std;
diff --git a/src/mem/cache/tags/fa_lru.hh b/src/mem/cache/tags/fa_lru.hh
index ecfe467ef..1bbd9fbfb 100644
--- a/src/mem/cache/tags/fa_lru.hh
+++ b/src/mem/cache/tags/fa_lru.hh
@@ -51,8 +51,8 @@
#include <list>
#include <unordered_map>
-#include "mem/cache/tags/base.hh"
#include "mem/cache/blk.hh"
+#include "mem/cache/tags/base.hh"
#include "mem/packet.hh"
#include "params/FALRU.hh"
diff --git a/src/mem/cache/tags/lru.cc b/src/mem/cache/tags/lru.cc
index a85b63889..a38478755 100644
--- a/src/mem/cache/tags/lru.cc
+++ b/src/mem/cache/tags/lru.cc
@@ -45,8 +45,9 @@
* Definitions of a LRU tag store.
*/
-#include "debug/CacheRepl.hh"
#include "mem/cache/tags/lru.hh"
+
+#include "debug/CacheRepl.hh"
#include "mem/cache/base.hh"
LRU::LRU(const Params *p)
diff --git a/src/mem/cache/tags/random_repl.cc b/src/mem/cache/tags/random_repl.cc
index 9f1ef800a..4157a30cd 100644
--- a/src/mem/cache/tags/random_repl.cc
+++ b/src/mem/cache/tags/random_repl.cc
@@ -33,9 +33,10 @@
* Definitions of a random replacement tag store.
*/
+#include "mem/cache/tags/random_repl.hh"
+
#include "base/random.hh"
#include "debug/CacheRepl.hh"
-#include "mem/cache/tags/random_repl.hh"
#include "mem/cache/base.hh"
RandomRepl::RandomRepl(const Params *p)