blob: 892b770a28cb9d050cad03fd990a0e72b4f81093 [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()),
Tim Northovered55a052016-11-15 21:06:07 +000031 TRI(*STI.getRegisterInfo()) {}
Diana Picus22274932016-11-11 08:27:37 +000032
33bool ARMInstructionSelector::select(llvm::MachineInstr &I) const {
34 return !isPreISelGenericOpcode(I.getOpcode());
35}