LLVM API Documentation

ARMTargetMachine.h
Go to the documentation of this file.
00001 //===-- ARMTargetMachine.h - Define TargetMachine for ARM -------*- C++ -*-===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 //
00010 // This file declares the ARM specific subclass of TargetMachine.
00011 //
00012 //===----------------------------------------------------------------------===//
00013 
00014 #ifndef LLVM_LIB_TARGET_ARM_ARMTARGETMACHINE_H
00015 #define LLVM_LIB_TARGET_ARM_ARMTARGETMACHINE_H
00016 
00017 #include "ARMInstrInfo.h"
00018 #include "ARMSubtarget.h"
00019 #include "llvm/IR/DataLayout.h"
00020 #include "llvm/Target/TargetMachine.h"
00021 
00022 namespace llvm {
00023 
00024 class ARMBaseTargetMachine : public LLVMTargetMachine {
00025 protected:
00026   ARMSubtarget        Subtarget;
00027 public:
00028   ARMBaseTargetMachine(const Target &T, StringRef TT,
00029                        StringRef CPU, StringRef FS,
00030                        const TargetOptions &Options,
00031                        Reloc::Model RM, CodeModel::Model CM,
00032                        CodeGenOpt::Level OL,
00033                        bool isLittle);
00034 
00035   const ARMSubtarget *getSubtargetImpl() const override { return &Subtarget; }
00036 
00037   /// \brief Register ARM analysis passes with a pass manager.
00038   void addAnalysisPasses(PassManagerBase &PM) override;
00039 
00040   // Pass Pipeline Configuration
00041   TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
00042 };
00043 
00044 /// ARMTargetMachine - ARM target machine.
00045 ///
00046 class ARMTargetMachine : public ARMBaseTargetMachine {
00047   virtual void anchor();
00048  public:
00049    ARMTargetMachine(const Target &T, StringRef TT, StringRef CPU, StringRef FS,
00050                     const TargetOptions &Options, Reloc::Model RM,
00051                     CodeModel::Model CM, CodeGenOpt::Level OL, bool isLittle);
00052 };
00053 
00054 /// ARMLETargetMachine - ARM little endian target machine.
00055 ///
00056 class ARMLETargetMachine : public ARMTargetMachine {
00057   void anchor() override;
00058 public:
00059   ARMLETargetMachine(const Target &T, StringRef TT,
00060                      StringRef CPU, StringRef FS, const TargetOptions &Options,
00061                      Reloc::Model RM, CodeModel::Model CM,
00062                      CodeGenOpt::Level OL);
00063 };
00064 
00065 /// ARMBETargetMachine - ARM big endian target machine.
00066 ///
00067 class ARMBETargetMachine : public ARMTargetMachine {
00068   void anchor() override;
00069 public:
00070   ARMBETargetMachine(const Target &T, StringRef TT, StringRef CPU, StringRef FS,
00071                      const TargetOptions &Options, Reloc::Model RM,
00072                      CodeModel::Model CM, CodeGenOpt::Level OL);
00073 };
00074 
00075 /// ThumbTargetMachine - Thumb target machine.
00076 /// Due to the way architectures are handled, this represents both
00077 ///   Thumb-1 and Thumb-2.
00078 ///
00079 class ThumbTargetMachine : public ARMBaseTargetMachine {
00080   virtual void anchor();
00081 public:
00082   ThumbTargetMachine(const Target &T, StringRef TT, StringRef CPU, StringRef FS,
00083                      const TargetOptions &Options, Reloc::Model RM,
00084                      CodeModel::Model CM, CodeGenOpt::Level OL, bool isLittle);
00085 };
00086 
00087 /// ThumbLETargetMachine - Thumb little endian target machine.
00088 ///
00089 class ThumbLETargetMachine : public ThumbTargetMachine {
00090   void anchor() override;
00091 public:
00092   ThumbLETargetMachine(const Target &T, StringRef TT, StringRef CPU,
00093                        StringRef FS, const TargetOptions &Options,
00094                        Reloc::Model RM, CodeModel::Model CM,
00095                        CodeGenOpt::Level OL);
00096 };
00097 
00098 /// ThumbBETargetMachine - Thumb big endian target machine.
00099 ///
00100 class ThumbBETargetMachine : public ThumbTargetMachine {
00101   void anchor() override;
00102 public:
00103   ThumbBETargetMachine(const Target &T, StringRef TT, StringRef CPU,
00104                        StringRef FS, const TargetOptions &Options,
00105                        Reloc::Model RM, CodeModel::Model CM,
00106                        CodeGenOpt::Level OL);
00107 };
00108 
00109 } // end namespace llvm
00110 
00111 #endif