1 //===-- SimpleBBISel.cpp - Implement the SimpleBBISel class ---------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This implements simple basic block instruction selection. If the given
11 // BasicBlock is considered "simple", i.e. all operations are supported by
12 // the target and their types are legal, it does instruction directly from
13 // LLVM BasicBlock to MachineInstr's.
15 //===----------------------------------------------------------------------===//
17 #define DEBUG_TYPE "simple-isel"
18 #include "SimpleBBISel.h"
19 #include "llvm/CodeGen/MachineFunction.h"
20 #include "llvm/CodeGen/MachineInstrBuilder.h"
21 #include "llvm/CodeGen/SelectionDAG.h"
24 /// SelectBasicBlock - Try to convert a LLVM basic block into a
25 /// MachineBasicBlock using simple instruction selection. Returns false if it
26 /// is not able to do so.
27 bool SimpleBBISel::SelectBasicBlock(BasicBlock *BB, MachineBasicBlock *MBB) {