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:
Subv 2016-07-18 11:27:33 -05:00
parent f7e3d7b8d2
commit 703a46ec99
2 changed files with 2 additions and 2 deletions

View file

@ -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());
}
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();
reg_alloc.Reset();

View file

@ -23,7 +23,7 @@ public:
EmitX64(Gen::XEmitter* code, Routines* routines, UserCallbacks cb, Jit* 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) {
auto iter = basic_blocks.find(descriptor);