From 41fc8a573ea61b2463606a0714a9e563494da329 Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Fri, 19 Sep 2014 10:35:18 -0400 Subject: arch: Pass faults by const reference where possible This patch changes how faults are passed between methods in an attempt to copy as few reference-counting pointer instances as possible. This should avoid unecessary copies being created, contributing to the increment/decrement of the reference counters. --- src/cpu/inorder/resources/fetch_seq_unit.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cpu/inorder/resources/fetch_seq_unit.cc') diff --git a/src/cpu/inorder/resources/fetch_seq_unit.cc b/src/cpu/inorder/resources/fetch_seq_unit.cc index 03741b55c..ead4953fb 100644 --- a/src/cpu/inorder/resources/fetch_seq_unit.cc +++ b/src/cpu/inorder/resources/fetch_seq_unit.cc @@ -304,7 +304,7 @@ FetchSeqUnit::suspendThread(ThreadID tid) } void -FetchSeqUnit::trap(Fault fault, ThreadID tid, DynInstPtr inst) +FetchSeqUnit::trap(const Fault &fault, ThreadID tid, DynInstPtr inst) { pcValid[tid] = true; pc[tid] = cpu->pcState(tid); -- cgit v1.2.3