diff options
author | Korey Sewell <ksewell@umich.edu> | 2011-02-18 14:29:40 -0500 |
---|---|---|
committer | Korey Sewell <ksewell@umich.edu> | 2011-02-18 14:29:40 -0500 |
commit | a278df0b95daacb788b8442c7331f7a7f7c8aab6 (patch) | |
tree | f3ca9bfcac33fd425f89035120a2cdca4adc1261 /src | |
parent | 37df92595328d7d1443c1670cd72d4eae3b78bf7 (diff) | |
download | gem5-a278df0b95daacb788b8442c7331f7a7f7c8aab6.tar.xz |
inorder: don't overuse getLatency()
resources don't need to call getLatency because the latency is already a member
in the class. If there is some type of special case where different instructions
impose a different latency inside a resource then we can revisit this and
add getLatency() back in
Diffstat (limited to 'src')
-rw-r--r-- | src/cpu/inorder/resource.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/cpu/inorder/resource.cc b/src/cpu/inorder/resource.cc index 6a2f5e62a..701785658 100644 --- a/src/cpu/inorder/resource.cc +++ b/src/cpu/inorder/resource.cc @@ -325,10 +325,8 @@ Resource::ticks(int num_cycles) void Resource::scheduleExecution(int slot_num) { - int res_latency = getLatency(slot_num); - - if (res_latency >= 1) { - scheduleEvent(slot_num, res_latency); + if (latency >= 1) { + scheduleEvent(slot_num, latency); } else { execute(slot_num); } |