Diana Picus | 2227493 | 2016-11-11 08:27:37 +0000 | [diff] [blame] | 1 | //===- ARMInstructionSelector.cpp ----------------------------*- C++ -*-==// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | /// \file |
| 10 | /// This file implements the targeting of the InstructionSelector class for ARM. |
| 11 | /// \todo This should be generated by TableGen. |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #include "ARMInstructionSelector.h" |
| 15 | #include "ARMRegisterBankInfo.h" |
| 16 | #include "ARMSubtarget.h" |
| 17 | #include "ARMTargetMachine.h" |
| 18 | #include "llvm/Support/Debug.h" |
| 19 | |
| 20 | #define DEBUG_TYPE "arm-isel" |
| 21 | |
| 22 | using namespace llvm; |
| 23 | |
| 24 | #ifndef LLVM_BUILD_GLOBAL_ISEL |
| 25 | #error "You shouldn't build this" |
| 26 | #endif |
| 27 | |
Diana Picus | 895c6aa | 2016-11-15 16:42:10 +0000 | [diff] [blame^] | 28 | ARMInstructionSelector::ARMInstructionSelector(const ARMSubtarget &STI, |
Diana Picus | 2227493 | 2016-11-11 08:27:37 +0000 | [diff] [blame] | 29 | const ARMRegisterBankInfo &RBI) |
Diana Picus | 895c6aa | 2016-11-15 16:42:10 +0000 | [diff] [blame^] | 30 | : InstructionSelector(), TII(*STI.getInstrInfo()), |
Diana Picus | 2227493 | 2016-11-11 08:27:37 +0000 | [diff] [blame] | 31 | TRI(*STI.getRegisterInfo()), RBI(RBI) {} |
| 32 | |
| 33 | bool ARMInstructionSelector::select(llvm::MachineInstr &I) const { |
| 34 | return !isPreISelGenericOpcode(I.getOpcode()); |
| 35 | } |