blob: 69b94b6b1f4f7c2b7f21a617a90b83a7b9a368aa [file] [log] [blame]
Diana Picus22274932016-11-11 08:27:37 +00001//===- 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
22using namespace llvm;
23
24#ifndef LLVM_BUILD_GLOBAL_ISEL
25#error "You shouldn't build this"
26#endif
27
Diana Picus895c6aa2016-11-15 16:42:10 +000028ARMInstructionSelector::ARMInstructionSelector(const ARMSubtarget &STI,
Diana Picus22274932016-11-11 08:27:37 +000029 const ARMRegisterBankInfo &RBI)
Diana Picus895c6aa2016-11-15 16:42:10 +000030 : InstructionSelector(), TII(*STI.getInstrInfo()),
Diana Picus22274932016-11-11 08:27:37 +000031 TRI(*STI.getRegisterInfo()), RBI(RBI) {}
32
33bool ARMInstructionSelector::select(llvm::MachineInstr &I) const {
34 return !isPreISelGenericOpcode(I.getOpcode());
35}