63a64
> lsqPolicy(readLSQPolicy(params->smtLSQPolicy)),
65a67,70
> maxLQEntries(maxLSQAllocation(lsqPolicy, LQEntries, params->numThreads,
> params->smtLSQThreshold)),
> maxSQEntries(maxLSQAllocation(lsqPolicy, SQEntries, params->numThreads,
> params->smtLSQThreshold)),
73d77
< std::string policy = params->smtLSQPolicy;
75,78d78
< //Convert string to lowercase
< std::transform(policy.begin(), policy.end(), policy.begin(),
< (int(*)(int)) tolower);
<
80,85c80
< if (policy == "dynamic") {
< lsqPolicy = Dynamic;
<
< maxLQEntries = LQEntries;
< maxSQEntries = SQEntries;
<
---
> if (lsqPolicy == Dynamic) {
87,93c82
< } else if (policy == "partitioned") {
< lsqPolicy = Partitioned;
<
< //@todo:make work if part_amt doesnt divide evenly.
< maxLQEntries = LQEntries / numThreads;
< maxSQEntries = SQEntries / numThreads;
<
---
> } else if (lsqPolicy == Partitioned) {
97,98c86
< } else if (policy == "threshold") {
< lsqPolicy = Threshold;
---
> } else if (lsqPolicy == Threshold) {
103,108d90
< //Divide up by threshold amount
< //@todo: Should threads check the max and the total
< //amount of the LSQ
< maxLQEntries = params->smtLSQThreshold;
< maxSQEntries = params->smtLSQThreshold;
<
117,118c99
< //Initialize LSQs
< thread = new LSQUnit[numThreads];
---
> thread.reserve(numThreads);
120,121c101,102
< thread[tid].init(cpu, iew_ptr, params, this,
< maxLQEntries, maxSQEntries, tid);
---
> thread.emplace_back(maxLQEntries, maxSQEntries);
> thread[tid].init(cpu, iew_ptr, params, this, tid);