diff --git a/compiler/optimizer/ir/inst.cpp b/compiler/optimizer/ir/inst.cpp index ea6ff69fedd38abf59e204c45088f19556c8567f..7ffdadf01b78af8dc7e99e8174bec43e724e24a7 100644 --- a/compiler/optimizer/ir/inst.cpp +++ b/compiler/optimizer/ir/inst.cpp @@ -275,18 +275,6 @@ Inst *Inst::Clone(const Graph *targetGraph) const return clone; } -template -Inst *FixedInputsInst::Clone(const Graph *targetGraph) const -{ - auto clone = static_cast(Inst::Clone(targetGraph)); -#ifndef NDEBUG - for (size_t i = 0; i < INPUT_COUNT; ++i) { - clone->SetSrcReg(i, GetSrcReg(i)); - } -#endif - return clone; -} - #if PANDA_TARGET_MACOS template class FixedInputsInst<0>; template class FixedInputsInst<1>; diff --git a/compiler/optimizer/ir/inst.h b/compiler/optimizer/ir/inst.h index 7e089f81f55779664f498986960d279b64023457..a6e245c530e888201f9cd8c189cf6e6c197649ea 100644 --- a/compiler/optimizer/ir/inst.h +++ b/compiler/optimizer/ir/inst.h @@ -1668,6 +1668,18 @@ private: std::array src_regs_ = CreateArray(INVALID_REG, std::make_index_sequence()); }; +template +Inst *FixedInputsInst::Clone(const Graph *targetGraph) const +{ + auto clone = static_cast(Inst::Clone(targetGraph)); +#ifndef NDEBUG + for (size_t i = 0; i < INPUT_COUNT; ++i) { + clone->SetSrcReg(i, GetSrcReg(i)); + } +#endif + return clone; +} + /** * Instructions with fixed static inputs * We need to explicitly declare these proxy classes because some code can't work with the templated inst classes, for