Lines Matching defs:Instruction
43 // - Instruction
94 class Instruction {
96 Instruction(Id resultId, Id typeId, Op opCode) : resultId(resultId), typeId(typeId), opCode(opCode), block(nullptr) { }
97 explicit Instruction(Op opCode) : resultId(NoResult), typeId(NoType), opCode(opCode), block(nullptr) { }
98 virtual ~Instruction() {}
180 Instruction(const Instruction&);
203 void addInstruction(std::unique_ptr<Instruction> inst);
205 void addLocalVariable(std::unique_ptr<Instruction> inst) { localVariables.push_back(std::move(inst)); }
208 const std::vector<std::unique_ptr<Instruction> >& getInstructions() const {
211 const std::vector<std::unique_ptr<Instruction> >& getLocalVariables() const { return localVariables; }
215 const Instruction* getMergeInstruction() const {
217 const Instruction* nextToLast = (instructions.cend() - 2)->get();
237 addInstruction(std::unique_ptr<Instruction>(new Instruction(OpUnreachable)));
251 Instruction* branch = new Instruction(OpBranch);
253 addInstruction(std::unique_ptr<Instruction>(branch));
290 std::vector<std::unique_ptr<Instruction> > instructions;
292 std::vector<std::unique_ptr<Instruction> > localVariables;
352 void addLocalVariable(std::unique_ptr<Instruction> inst);
365 lineInstruction = std::unique_ptr<Instruction>{new Instruction(OpLine)};
402 Instruction end(0, 0, OpFunctionEnd);
414 std::unique_ptr<Instruction> lineInstruction;
415 Instruction functionInstruction;
416 std::vector<Instruction*> parameterInstructions;
439 void mapInstruction(Instruction *instruction)
448 Instruction* getInstruction(Id id) const { return idToInstruction[id]; }
470 std::vector<Instruction*> idToInstruction;
495 Instruction* typeInst = parent.getInstruction(functionType);
498 Instruction* param = new Instruction(firstParamId + p, typeInst->getIdOperand(p + 1), OpFunctionParameter);
509 __inline void Function::addLocalVariable(std::unique_ptr<Instruction> inst)
511 Instruction* raw_instruction = inst.get();
518 instructions.push_back(std::unique_ptr<Instruction>(new Instruction(id, NoType, OpLabel)));
523 __inline void Block::addInstruction(std::unique_ptr<Instruction> inst)
525 Instruction* raw_instruction = inst.get();