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 28 ARMInstructionSelector::ARMInstructionSelector(const ARMSubtarget &STI, 29 const ARMRegisterBankInfo &RBI) 30 : InstructionSelector(), TII(*STI.getInstrInfo()), 31 TRI(*STI.getRegisterInfo()) {} 32 33 bool ARMInstructionSelector::select(llvm::MachineInstr &I) const { 34 return !isPreISelGenericOpcode(I.getOpcode()); 35 } 36