@@ -109,51 +109,7 @@ static void appendCodeTemplates(const LLVMState &State,
109109 }
110110 case ExecutionMode::SERIAL_VIA_MEMORY_INSTR: {
111111 // Select back-to-back memory instruction.
112-
113- auto &I = Variant.getInstr ();
114- if (I.Description .mayLoad ()) {
115- // If instruction is load, we can self-alias it in case when instruction
116- // overrides whole address register. For that we use provided scratch
117- // memory.
118-
119- // TODO: now it is not checked if load writes the whole register.
120-
121- auto DefOpIt = find_if (I.Operands , [](Operand const &op) {
122- return op.isDef () && op.isReg ();
123- });
124-
125- if (DefOpIt == I.Operands .end ())
126- return ;
127-
128- const Operand &DefOp = *DefOpIt;
129- auto &ET = State.getExegesisTarget ();
130- auto ScratchMemoryRegister = ET.getScratchMemoryRegister (
131- State.getTargetMachine ().getTargetTriple ());
132- auto &RegClass =
133- State.getTargetMachine ().getMCRegisterInfo ()->getRegClass (
134- DefOp.getExplicitOperandInfo ().RegClass );
135-
136- // Register classes of def operand and memory operand must be the same
137- // to perform aliasing.
138- if (!RegClass.contains (ScratchMemoryRegister))
139- return ;
140-
141- ET.fillMemoryOperands (Variant, ScratchMemoryRegister, 0 );
142- Variant.getValueFor (DefOp) = MCOperand::createReg (ScratchMemoryRegister);
143-
144- CodeTemplate CT;
145- CT.Execution = ExecutionModeBit;
146- if (CT.ScratchSpacePointerInReg == 0 )
147- CT.ScratchSpacePointerInReg = ScratchMemoryRegister;
148-
149- CT.Info = std::string (ExecutionClassDescription);
150- CT.Instructions .push_back (std::move (Variant));
151- CT.PreinitScratchMemory .emplace_back (ScratchMemoryRegister,
152- /* Offset */ 0 );
153- CodeTemplates.push_back (std::move (CT));
154- }
155-
156- // TODO: implement more cases
112+ // TODO: Implement me.
157113 return ;
158114 }
159115 case ExecutionMode::SERIAL_VIA_EXPLICIT_REGS: {
0 commit comments