summaryrefslogtreecommitdiff
path: root/src/cpu/timing_expr.hh
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2014-09-27 09:08:36 -0400
committerAndreas Hansson <andreas.hansson@arm.com>2014-09-27 09:08:36 -0400
commit341dbf266258dcbdb1e5e9f09c244b8ac271faaf (patch)
treef071f9a91adeb0c1eb0888ae751c3ee0196bd65d /src/cpu/timing_expr.hh
parentdeb2200671d5b4856ca27d4286253db0d9e12a32 (diff)
downloadgem5-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/timing_expr.hh')
-rw-r--r--src/cpu/timing_expr.hh4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cpu/timing_expr.hh b/src/cpu/timing_expr.hh
index d2c38ea90..0ec189437 100644
--- a/src/cpu/timing_expr.hh
+++ b/src/cpu/timing_expr.hh
@@ -73,7 +73,7 @@ class TimingExprEvalContext
{
public:
/** Special visible context */
- StaticInstPtr inst;
+ const StaticInstPtr &inst;
ThreadContext *thread;
/** Context visible as sub expressions. results will hold the results
@@ -83,7 +83,7 @@ class TimingExprEvalContext
std::vector<uint64_t> results;
std::vector<bool > resultAvailable;
- TimingExprEvalContext(StaticInstPtr inst_,
+ TimingExprEvalContext(const StaticInstPtr &inst_,
ThreadContext *thread_, TimingExprLet *let_);
};