Pass the current IR::Block by reference to the emitter.
This avoids calling the copy constructor more times than needed.
This commit is contained in:
parent
f7e3d7b8d2
commit
703a46ec99
2 changed files with 2 additions and 2 deletions
|
@ -37,7 +37,7 @@ static IR::Inst* FindUseWithOpcode(IR::Inst* inst, IR::Opcode opcode) {
|
||||||
return iter == uses.end() ? nullptr : reinterpret_cast<IR::Inst*>(iter->get());
|
return iter == uses.end() ? nullptr : reinterpret_cast<IR::Inst*>(iter->get());
|
||||||
}
|
}
|
||||||
|
|
||||||
CodePtr EmitX64::Emit(const Arm::LocationDescriptor descriptor, Dynarmic::IR::Block block) {
|
CodePtr EmitX64::Emit(const Arm::LocationDescriptor descriptor, const Dynarmic::IR::Block& block) {
|
||||||
inhibit_emission.clear();
|
inhibit_emission.clear();
|
||||||
reg_alloc.Reset();
|
reg_alloc.Reset();
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ public:
|
||||||
EmitX64(Gen::XEmitter* code, Routines* routines, UserCallbacks cb, Jit* jit_interface)
|
EmitX64(Gen::XEmitter* code, Routines* routines, UserCallbacks cb, Jit* jit_interface)
|
||||||
: reg_alloc(code), code(code), routines(routines), cb(cb), jit_interface(jit_interface) {}
|
: reg_alloc(code), code(code), routines(routines), cb(cb), jit_interface(jit_interface) {}
|
||||||
|
|
||||||
CodePtr Emit(const Arm::LocationDescriptor descriptor, IR::Block ir);
|
CodePtr Emit(const Arm::LocationDescriptor descriptor, const IR::Block& ir);
|
||||||
|
|
||||||
CodePtr GetBasicBlock(Arm::LocationDescriptor descriptor) {
|
CodePtr GetBasicBlock(Arm::LocationDescriptor descriptor) {
|
||||||
auto iter = basic_blocks.find(descriptor);
|
auto iter = basic_blocks.find(descriptor);
|
||||||
|
|
Loading…
Reference in a new issue