From 341dbf266258dcbdb1e5e9f09c244b8ac271faaf Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Sat, 27 Sep 2014 09:08:36 -0400 Subject: arch: Use const StaticInstPtr references where possible This patch optimises the passing of StaticInstPtr by avoiding copying the reference-counting pointer. This avoids first incrementing and then decrementing the reference-counting pointer. --- src/cpu/simple/probes/simpoint.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cpu/simple/probes') diff --git a/src/cpu/simple/probes/simpoint.cc b/src/cpu/simple/probes/simpoint.cc index 22eaad086..f2c0be62b 100644 --- a/src/cpu/simple/probes/simpoint.cc +++ b/src/cpu/simple/probes/simpoint.cc @@ -77,7 +77,7 @@ void SimPoint::profile(const std::pair& p) { SimpleThread* thread = p.first; - StaticInstPtr inst = p.second; + const StaticInstPtr &inst = p.second; if (!currentBBVInstCount) currentBBV.first = thread->pcState().instAddr(); -- cgit v1.2.3