blob: 3679b59e328ee83d1125d9750bebdfab4d41f366 [file] [log] [blame]
Eric Christopherab695882010-07-21 22:26:11 +00001//===-- ARMFastISel.cpp - ARM FastISel implementation ---------------------===//
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//
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.
13//
14//===----------------------------------------------------------------------===//
15
16#include "ARM.h"
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"
Eric Christopher038fea52010-08-17 00:46:57 +000032#include "llvm/Support/CommandLine.h"
Eric Christopherab695882010-07-21 22:26:11 +000033#include "llvm/Support/ErrorHandling.h"
34#include "llvm/Support/GetElementPtrTypeIterator.h"
35#include "llvm/Target/TargetOptions.h"
36using namespace llvm;
37
Eric Christopher038fea52010-08-17 00:46:57 +000038static cl::opt<bool>
39EnableARMFastISel("arm-fast-isel",
40 cl::desc("Turn on experimental ARM fast-isel support"),
41 cl::init(false), cl::Hidden);
42
Eric Christopherab695882010-07-21 22:26:11 +000043namespace {
44
45class ARMFastISel : public FastISel {
46
47 /// Subtarget - Keep a pointer to the ARMSubtarget around so that we can
48 /// make the right decision when generating code for different targets.
49 const ARMSubtarget *Subtarget;
50
51 public:
52 explicit ARMFastISel(FunctionLoweringInfo &funcInfo) : FastISel(funcInfo) {
53 Subtarget = &TM.getSubtarget<ARMSubtarget>();
54 }
55
56 virtual bool TargetSelectInstruction(const Instruction *I);
57
58 #include "ARMGenFastISel.inc"
59
60 };
61
62} // end anonymous namespace
63
64// #include "ARMGenCallingConv.inc"
65
66bool ARMFastISel::TargetSelectInstruction(const Instruction *I) {
67 switch (I->getOpcode()) {
68 default: break;
69 }
70 return false;
71}
72
73namespace llvm {
74 llvm::FastISel *ARM::createFastISel(FunctionLoweringInfo &funcInfo) {
Eric Christopher038fea52010-08-17 00:46:57 +000075 if (EnableARMFastISel) return new ARMFastISel(funcInfo);
Evan Cheng09447952010-07-26 18:32:55 +000076 return 0;
Eric Christopherab695882010-07-21 22:26:11 +000077 }
78}