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/checker/cpu_impl.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cpu/checker') diff --git a/src/cpu/checker/cpu_impl.hh b/src/cpu/checker/cpu_impl.hh index 9743905c1..b64e1bff1 100644 --- a/src/cpu/checker/cpu_impl.hh +++ b/src/cpu/checker/cpu_impl.hh @@ -303,7 +303,7 @@ Checker::verify(DynInstPtr &completed_inst) microcodeRom.fetchMicroop(pcState.microPC(), NULL); } else if (!curMacroStaticInst) { //We're not in the middle of a macro instruction - StaticInstPtr instPtr = NULL; + StaticInstPtr instPtr = nullptr; //Predecode, ie bundle up an ExtMachInst //If more fetch data is needed, pass it in. -- cgit v1.2.3