LLVM  5.0.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 
24 class AArch64RegisterBankInfo;
25 
27 protected:
28  std::unique_ptr<TargetLoweringObjectFile> TLOF;
30 
31 public:
32  AArch64TargetMachine(const Target &T, const Triple &TT, StringRef CPU,
33  StringRef FS, const TargetOptions &Options,
35  CodeGenOpt::Level OL, bool IsLittleEndian);
36 
37  ~AArch64TargetMachine() override;
38  const AArch64Subtarget *getSubtargetImpl(const Function &F) const override;
39  // The no argument getSubtargetImpl, while it exists on some, targets is
40  // deprecated and should not be used.
41  const AArch64Subtarget *getSubtargetImpl() const = delete;
42 
43  // Pass Pipeline Configuration
44  TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
45 
46  /// \brief Get the TargetIRAnalysis for this target.
48 
50  return TLOF.get();
51  }
52 
53 private:
54  bool isLittle;
55 };
56 
57 // AArch64 little endian target machine.
58 //
60  virtual void anchor();
61 public:
62  AArch64leTargetMachine(const Target &T, const Triple &TT, StringRef CPU,
63  StringRef FS, const TargetOptions &Options,
66 };
67 
68 // AArch64 big endian target machine.
69 //
71  virtual void anchor();
72 public:
73  AArch64beTargetMachine(const Target &T, const Triple &TT, StringRef CPU,
74  StringRef FS, const TargetOptions &Options,
77 };
78 
79 } // end namespace llvm
80 
81 #endif
Analysis pass providing the TargetTransformInfo.
std::unique_ptr< TargetLoweringObjectFile > TLOF
TargetLoweringObjectFile * getObjFileLowering() const override
AArch64TargetMachine(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Optional< Reloc::Model > RM, CodeModel::Model CM, CodeGenOpt::Level OL, bool IsLittleEndian)
Create an AArch64 architecture model.
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 ...
#define F(x, y, z)
Definition: MD5.cpp:55
AArch64beTargetMachine(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Optional< Reloc::Model > RM, CodeModel::Model CM, CodeGenOpt::Level OL)
AArch64leTargetMachine(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Optional< Reloc::Model > RM, CodeModel::Model CM, CodeGenOpt::Level OL)
const AArch64Subtarget * getSubtargetImpl() const =delete
This class describes a target machine that is implemented with the LLVM target-independent code gener...
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:44
StringMap - This is an unconventional map that is specialized for handling keys that are "strings"...
Definition: StringMap.h:220
Target - Wrapper for Target specific information.
TargetIRAnalysis getTargetIRAnalysis() override
Get the TargetIRAnalysis for this target.
StringMap< std::unique_ptr< AArch64Subtarget > > SubtargetMap
TargetOptions Options
Definition: TargetMachine.h:95
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49