From 38339e0a7f7ce119feefc95591703df2f851ee4d Mon Sep 17 00:00:00 2001 From: Nikos Nikoleris Date: Thu, 3 Jan 2019 17:45:56 +0000 Subject: cpu-o3: Make the smtFetchPolicy a Param.ScopedEnum The smtFetchPolicy is a parameter in the o3 cpu that can have 5 different values. Previously this setting was done through a string and a parser function would turn it into a c++ enum value. This changeset turns the string into a python Param.ScopedEnum. Change-Id: Iafb4b4b27587541185ea912e5ed581bce09695f5 Signed-off-by: Nikos Nikoleris Reviewed-by: Giacomo Travaglini Reviewed-on: https://gem5-review.googlesource.com/c/15396 Reviewed-by: Anthony Gutierrez Maintainer: Anthony Gutierrez --- src/cpu/o3/deriv.cc | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/cpu/o3/deriv.cc') diff --git a/src/cpu/o3/deriv.cc b/src/cpu/o3/deriv.cc index 6b2af76e0..e8ff66913 100644 --- a/src/cpu/o3/deriv.cc +++ b/src/cpu/o3/deriv.cc @@ -57,14 +57,8 @@ DerivO3CPUParams::create() numThreads = actual_num_threads; - // Default smtFetchPolicy to "RoundRobin", if necessary. - std::string round_robin_policy = "RoundRobin"; - std::string single_thread = "SingleThread"; - - if (actual_num_threads > 1 && single_thread.compare(smtFetchPolicy) == 0) - smtFetchPolicy = round_robin_policy; - else - smtFetchPolicy = smtFetchPolicy; + if (actual_num_threads > 1 && smtFetchPolicy == FetchPolicy::SingleThread) + smtFetchPolicy = FetchPolicy::RoundRobin; return new DerivO3CPU(this); } -- cgit v1.2.3