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.
This commit is contained in:
@@ -86,8 +86,8 @@ class M5DebugFault : public FaultBase
|
||||
}
|
||||
|
||||
void
|
||||
invoke(ThreadContext *tc,
|
||||
StaticInstPtr inst = StaticInst::nullStaticInstPtr)
|
||||
invoke(ThreadContext *tc, const StaticInstPtr &inst =
|
||||
StaticInst::nullStaticInstPtr)
|
||||
{
|
||||
switch (func) {
|
||||
case PanicFunc:
|
||||
|
||||
Reference in New Issue
Block a user