Eric Christopher | ab69588 | 2010-07-21 22:26:11 +0000 | [diff] [blame] | 1 | //===-- 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" |
| 32 | #include "llvm/Support/ErrorHandling.h" |
| 33 | #include "llvm/Support/GetElementPtrTypeIterator.h" |
| 34 | #include "llvm/Target/TargetOptions.h" |
| 35 | using namespace llvm; |
| 36 | |
| 37 | namespace { |
| 38 | |
| 39 | class ARMFastISel : public FastISel { |
| 40 | |
| 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; |
| 44 | |
| 45 | public: |
| 46 | explicit ARMFastISel(FunctionLoweringInfo &funcInfo) : FastISel(funcInfo) { |
| 47 | Subtarget = &TM.getSubtarget<ARMSubtarget>(); |
| 48 | } |
| 49 | |
| 50 | virtual bool TargetSelectInstruction(const Instruction *I); |
| 51 | |
| 52 | #include "ARMGenFastISel.inc" |
| 53 | |
| 54 | }; |
| 55 | |
| 56 | } // end anonymous namespace |
| 57 | |
| 58 | // #include "ARMGenCallingConv.inc" |
| 59 | |
| 60 | bool ARMFastISel::TargetSelectInstruction(const Instruction *I) { |
| 61 | switch (I->getOpcode()) { |
| 62 | default: break; |
| 63 | } |
| 64 | return false; |
| 65 | } |
| 66 | |
| 67 | namespace llvm { |
| 68 | llvm::FastISel *ARM::createFastISel(FunctionLoweringInfo &funcInfo) { |
| 69 | return new ARMFastISel(funcInfo); |
| 70 | } |
| 71 | } |