LLVM  3.7.0
AArch64TargetMachine.h
Go to the documentation of this file.
1 //==-- AArch64TargetMachine.h - Define TargetMachine for AArch64 -*- 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 //
10 // This file declares the AArch64 specific subclass of TargetMachine.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_LIB_TARGET_AARCH64_AARCH64TARGETMACHINE_H
15 #define LLVM_LIB_TARGET_AARCH64_AARCH64TARGETMACHINE_H
16 
17 #include "AArch64InstrInfo.h"
18 #include "AArch64Subtarget.h"
19 #include "llvm/IR/DataLayout.h"
21 
22 namespace llvm {
23 
25 protected:
26  std::unique_ptr<TargetLoweringObjectFile> TLOF;
28 
29 public:
30  AArch64TargetMachine(const Target &T, const Triple &TT, StringRef CPU,
33  CodeGenOpt::Level OL, bool IsLittleEndian);
34 
35  ~AArch64TargetMachine() override;
36  const AArch64Subtarget *getSubtargetImpl(const Function &F) const override;
37 
38  // Pass Pipeline Configuration
39  TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
40 
41  /// \brief Get the TargetIRAnalysis for this target.
43 
45  return TLOF.get();
46  }
47 
48 private:
49  bool isLittle;
50 };
51 
52 // AArch64leTargetMachine - AArch64 little endian target machine.
53 //
55  virtual void anchor();
56 public:
57  AArch64leTargetMachine(const Target &T, const Triple &TT, StringRef CPU,
61 };
62 
63 // AArch64beTargetMachine - AArch64 big endian target machine.
64 //
66  virtual void anchor();
67 public:
68  AArch64beTargetMachine(const Target &T, const Triple &TT, StringRef CPU,
72 };
73 
74 } // end namespace llvm
75 
76 #endif
const AArch64Subtarget * getSubtargetImpl(const Function &F) const override
Virtual method implemented by subclasses that returns a reference to that target's TargetSubtargetInf...
Analysis pass providing the TargetTransformInfo.
std::unique_ptr< TargetLoweringObjectFile > TLOF
F(f)
TargetLoweringObjectFile * getObjFileLowering() const override
Target-Independent Code Generator Pass Configuration Options.
TargetPassConfig * createPassConfig(PassManagerBase &PM) override
Create a pass configuration object to be used by addPassToEmitX methods for generating a pipeline of ...
AArch64beTargetMachine(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL)
This class describes a target machine that is implemented with the LLVM target-independent code gener...
AArch64TargetMachine(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL, bool IsLittleEndian)
TargetMachine ctor - Create an AArch64 architecture model.
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:44
AArch64leTargetMachine(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL)
StringMap - This is an unconventional map that is specialized for handling keys that are "strings"...
Definition: StringMap.h:214
Target - Wrapper for Target specific information.
TargetIRAnalysis getTargetIRAnalysis() override
Get the TargetIRAnalysis for this target.
StringMap< std::unique_ptr< AArch64Subtarget > > SubtargetMap
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:40