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/arch/power/utility.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/arch/power/utility.hh') diff --git a/src/arch/power/utility.hh b/src/arch/power/utility.hh index 907e451b9..1a13d1e40 100644 --- a/src/arch/power/utility.hh +++ b/src/arch/power/utility.hh @@ -73,7 +73,7 @@ copyMiscRegs(ThreadContext *src, ThreadContext *dest) void skipFunction(ThreadContext *tc); inline void -advancePC(PCState &pc, const StaticInstPtr inst) +advancePC(PCState &pc, const StaticInstPtr &inst) { pc.advance(); } -- cgit v1.2.3