summaryrefslogtreecommitdiff
path: root/src/cpu/o3/lsq_unit.hh
diff options
context:
space:
mode:
authorRekai Gonzalez-Alberquilla <rekai.gonzalezalberquilla@arm.com>2017-03-01 13:49:08 +0000
committerGiacomo Gabrielli <giacomo.gabrielli@arm.com>2018-12-03 14:23:56 +0000
commit9af1214ffe48178c0dadfb874fd62bd0ff2e0f31 (patch)
tree1b4dd7edf77791c81f40f6d919829495eb80db93 /src/cpu/o3/lsq_unit.hh
parentb5cc34d767410e98f54f2955bb274f0f8c3708e4 (diff)
downloadgem5-9af1214ffe48178c0dadfb874fd62bd0ff2e0f31.tar.xz
cpu: Change raw pointers to STL Containers
This patch changes two members from being raw pointers to being STL containers. The reason behind, other than cleanlyness and arguable OO best practices is that containers have more intronspections capabilities than naked pointers do, as the size is known. Using STL containers adds little overhead and eases the automation of process during debugging (gdb). Change-Id: I4d9d3eedafa8b5e50ac512ea93b458a4200229f2 Signed-off-by: Giacomo Gabrielli <giacomo.gabrielli@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/13126 Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Maintainer: Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'src/cpu/o3/lsq_unit.hh')
-rw-r--r--src/cpu/o3/lsq_unit.hh11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/cpu/o3/lsq_unit.hh b/src/cpu/o3/lsq_unit.hh
index 813a3cac7..48a06b386 100644
--- a/src/cpu/o3/lsq_unit.hh
+++ b/src/cpu/o3/lsq_unit.hh
@@ -86,12 +86,17 @@ class LSQUnit {
public:
/** Constructs an LSQ unit. init() must be called prior to use. */
- LSQUnit();
+ LSQUnit(uint32_t lqEntries, uint32_t sqEntries);
+
+ /** We cannot copy LSQUnit because it has stats for which copy
+ * contructor is deleted explicitly. However, STL vector requires
+ * a valid copy constructor for the base type at compile time.
+ */
+ LSQUnit(const LSQUnit &l) { panic("LSQUnit is not copy-able"); }
/** Initializes the LSQ unit with the specified number of entries. */
void init(O3CPU *cpu_ptr, IEW *iew_ptr, DerivO3CPUParams *params,
- LSQ *lsq_ptr, unsigned maxLQEntries, unsigned maxSQEntries,
- unsigned id);
+ LSQ *lsq_ptr, unsigned id);
/** Returns the name of the LSQ unit. */
std::string name() const;