Home | History | Annotate | Download | only in code_gen

Lines Matching full:instruction

118 void CodeGenVisitor::Visit(InstructionNode* instruction) {
119 std::string instr = instruction->GetInstruction()->DumpString(NULL);
123 void CodeGenVisitor::Visit(UnnamedConstInstructionNode* instruction) {
124 std::string instr = instruction->GetInstruction()->DumpString(NULL);
125 std::cout << "1.Instruction: " << instr << std::endl;
126 llvm_data_->AddValue(instruction,
127 llvm::ConstantInt::get(*llvm_data_->context_, llvm::APInt(32, instruction->GetConstValue())));
130 void CodeGenVisitor::Visit(ConstInstructionNode* instruction) {
131 std::string instr = instruction->GetInstruction()->DumpString(NULL);
132 std::cout << "1.Instruction: " << instr << std::endl;
133 llvm_data_->AddValue(instruction,
134 llvm::ConstantInt::get(*llvm_data_->context_, llvm::APInt(32, instruction->GetConstValue())));
136 void CodeGenVisitor::Visit(ReturnInstructionNode* instruction) {
137 std::string instr = instruction->GetInstruction()->DumpString(NULL);
138 std::cout << "2.Instruction: " << instr << std::endl;
139 DCHECK_GT(instruction->GetSSAProducers().size(), 0u);
140 llvm::Value* return_value = llvm_data_->GetValue(instruction->GetSSAProducers().at(0));
143 void CodeGenVisitor::Visit(IfNeInstructionNode* instruction) {
144 std::string instr = instruction->GetInstruction()->DumpString(NULL);
145 std::cout << "3.Instruction: " << instr << std::endl;
146 std::vector<InstructionNode*> ssa_uses = instruction->GetSSAProducers();
153 llvm::Value* ifne = llvm_data_->builder_.CreateICmpNE(left, right, instruction->StringId());
154 DCHECK(instruction->GetRegion() != NULL);
155 std::vector<Region*>* successors = instruction->GetRegion()->GetSuccessors();
164 void CodeGenVisitor::Visit(AddIntLitInstructionNode* instruction) {
165 std::string instr = instruction->GetInstruction()->DumpString(NULL);
166 std::cout << "4.Instruction: " << instr << std::endl;
167 std::vector<InstructionNode*> ssa_uses = instruction->GetSSAUses();
171 llvm::APInt(32, instruction->GetConstValue()));
173 llvm_data->AddValue(instruction, result);
176 void CodeGenVisitor::Visit(MoveResultInstructionNode* instruction) {
177 std::string instr = instruction->GetInstruction()->DumpString(NULL);
178 std::cout << "5.Instruction: " << instr << std::endl;
179 // TODO: Currently, this "mov" instruction is simulated by "res = return_register + 0".
186 // instruction subclasses for functions and procedures.)
187 std::vector<InstructionNode*> ssa_uses = instruction->GetSSAProducers();
192 llvm_data_->AddValue(instruction, result);
196 std::cout << "6.Instruction: " << instr << std::endl;
218 void CodeGenVisitor::Visit(AddIntInstructionNode* instruction) {
219 std::string instr = instruction->GetInstruction()->DumpString(NULL);
220 std::cout << "7.Instruction: " << instr << std::endl;
221 std::vector<InstructionNode*> ssa_uses = instruction->GetSSAProducers();
228 llvm_data_->AddValue(instruction, result);
230 void CodeGenVisitor::Visit(GotoInstructionNode* instruction) {
231 std::string instr = instruction->GetInstruction()->DumpString(NULL);
232 std::cout << "8.Instruction: " << instr << std::endl;
233 std::vector<sea_ir::Region*>* targets = instruction->GetRegion()->GetSuccessors();
238 void CodeGenVisitor::Visit(IfEqzInstructionNode* instruction) {
239 std::string instr = instruction->GetInstruction()->DumpString(NULL);
240 std::cout << "9. Instruction: " << instr << "; Id: " <<instruction << std::endl;
241 std::vector<InstructionNode*> ssa_uses = instruction->GetSSAProducers();
247 instruction->StringId());
248 DCHECK(instruction->GetRegion() != NULL);
249 std::vector<Region*>* successors = instruction->GetRegion()->GetSuccessors();
257 std::cout << "10. Instruction: Phi(" << phi->GetRegisterNumber() << ")" << std::endl;