cpu: Dynamically instantiate O3 CPU LSQUnits
Review Request #1958 - Created July 19, 2013 and submitted
| Information | |
|---|---|
| Joel Hestness | |
| gem5 | |
| default | |
| Reviewers | |
| Default | |
Changeset 9818:132e2bbe723e --------------------------- cpu: Dynamically instantiate O3 CPU LSQUnits Previously, the LSQ would instantiate MaxThreads LSQUnits in the body of it's object, but it would only initialize numThreads LSQUnits as specified by the user. This had the effect of leaving some LSQUnits uninitialized when the number of threads was less than MaxThreads, and when adding statistics to the LSQUnit that must be initialized, this caused the stats initialization check to fail. By dynamically instantiating LSQUnits, they are all initialized and this avoids uninitialized LSQUnits from floating around during runtime.
Ran O3 regressions and tested checkpoint restore with additional LSQUnit stats.
Posted (July 19, 2013, 10:39 a.m.)
-
src/cpu/o3/lsq.hh (Diff revision 1) -
Could this perhaps be a std::vector<LSQUnit*> rather?
-
src/cpu/o3/lsq_impl.hh (Diff revision 1) -
If it's a vector, then you can do this in the initalisation list and the delete goes away.
Posted (July 20, 2013, 2:49 a.m.)
-
src/cpu/o3/lsq.hh (Diff revision 1) -
My bad, std::vector<LSQUnit> is what I was thinking
LGTM
