diff options
author | Andreas Hansson <andreas.hansson@arm.com> | 2014-09-27 09:08:36 -0400 |
---|---|---|
committer | Andreas Hansson <andreas.hansson@arm.com> | 2014-09-27 09:08:36 -0400 |
commit | 341dbf266258dcbdb1e5e9f09c244b8ac271faaf (patch) | |
tree | f071f9a91adeb0c1eb0888ae751c3ee0196bd65d /src/cpu/simple/probes | |
parent | deb2200671d5b4856ca27d4286253db0d9e12a32 (diff) | |
download | gem5-341dbf266258dcbdb1e5e9f09c244b8ac271faaf.tar.xz |
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.
Diffstat (limited to 'src/cpu/simple/probes')
-rw-r--r-- | src/cpu/simple/probes/simpoint.cc | 2 |
1 files changed, 1 insertions, 1 deletions
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<SimpleThread*, StaticInstPtr>& p) { SimpleThread* thread = p.first; - StaticInstPtr inst = p.second; + const StaticInstPtr &inst = p.second; if (!currentBBVInstCount) currentBBV.first = thread->pcState().instAddr(); |