1 //===-- ARMFastISel.cpp - ARM FastISel implementation ---------------------===//
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 file defines the ARM-specific support for the FastISel class. Some
11 // of the target-specific code is generated by tablegen in the file
12 // ARMGenFastISel.inc, which is #included here.
14 //===----------------------------------------------------------------------===//
17 #include "ARMRegisterInfo.h"
18 #include "ARMTargetMachine.h"
19 #include "ARMSubtarget.h"
20 #include "llvm/CallingConv.h"
21 #include "llvm/DerivedTypes.h"
22 #include "llvm/GlobalVariable.h"
23 #include "llvm/Instructions.h"
24 #include "llvm/IntrinsicInst.h"
25 #include "llvm/CodeGen/Analysis.h"
26 #include "llvm/CodeGen/FastISel.h"
27 #include "llvm/CodeGen/FunctionLoweringInfo.h"
28 #include "llvm/CodeGen/MachineConstantPool.h"
29 #include "llvm/CodeGen/MachineFrameInfo.h"
30 #include "llvm/CodeGen/MachineRegisterInfo.h"
31 #include "llvm/Support/CallSite.h"
32 #include "llvm/Support/ErrorHandling.h"
33 #include "llvm/Support/GetElementPtrTypeIterator.h"
34 #include "llvm/Target/TargetOptions.h"
39 class ARMFastISel : public FastISel {
41 /// Subtarget - Keep a pointer to the ARMSubtarget around so that we can
42 /// make the right decision when generating code for different targets.
43 const ARMSubtarget *Subtarget;
46 explicit ARMFastISel(FunctionLoweringInfo &funcInfo) : FastISel(funcInfo) {
47 Subtarget = &TM.getSubtarget<ARMSubtarget>();
50 virtual bool TargetSelectInstruction(const Instruction *I);
52 #include "ARMGenFastISel.inc"
56 } // end anonymous namespace
58 // #include "ARMGenCallingConv.inc"
60 bool ARMFastISel::TargetSelectInstruction(const Instruction *I) {
61 switch (I->getOpcode()) {
68 llvm::FastISel *ARM::createFastISel(FunctionLoweringInfo &funcInfo) {
69 // Turn it off for now. It's not quite ready.