LLVM  9.0.0svn
AArch64TargetMachine.h
Go to the documentation of this file.
1 //==-- AArch64TargetMachine.h - Define TargetMachine for AArch64 -*- C++ -*-==//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file declares the AArch64 specific subclass of TargetMachine.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef LLVM_LIB_TARGET_AARCH64_AARCH64TARGETMACHINE_H
14 #define LLVM_LIB_TARGET_AARCH64_AARCH64TARGETMACHINE_H
15 
16 #include "AArch64InstrInfo.h"
17 #include "AArch64Subtarget.h"
18 #include "llvm/IR/DataLayout.h"
20 
21 namespace llvm {
22 
23 class AArch64RegisterBankInfo;
24 
26 protected:
27  std::unique_ptr<TargetLoweringObjectFile> TLOF;
29 
30 public:
31  AArch64TargetMachine(const Target &T, const Triple &TT, StringRef CPU,
32  StringRef FS, const TargetOptions &Options,
34  CodeGenOpt::Level OL, bool JIT, bool IsLittleEndian);
35 
36  ~AArch64TargetMachine() override;
37  const AArch64Subtarget *getSubtargetImpl(const Function &F) const override;
38  // DO NOT IMPLEMENT: There is no such thing as a valid default subtarget,
39  // subtargets are per-function entities based on the target-specific
40  // attributes of each function.
41  const AArch64Subtarget *getSubtargetImpl() const = delete;
42 
43  // Pass Pipeline Configuration
45 
47 
49  return TLOF.get();
50  }
51 
52 private:
53  bool isLittle;
54 };
55 
56 // AArch64 little endian target machine.
57 //
59  virtual void anchor();
60 public:
61  AArch64leTargetMachine(const Target &T, const Triple &TT, StringRef CPU,
62  StringRef FS, const TargetOptions &Options,
65  bool JIT);
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  bool JIT);
78 };
79 
80 } // end namespace llvm
81 
82 #endif
This class represents lattice values for constants.
Definition: AllocatorList.h:23
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 ...
AArch64TargetMachine(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Optional< Reloc::Model > RM, Optional< CodeModel::Model > CM, CodeGenOpt::Level OL, bool JIT, bool IsLittleEndian)
Create an AArch64 architecture model.
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:43
This pass provides access to the codegen interfaces that are needed for IR-level transformations.
PassManagerBase - An abstract interface to allow code to add passes to a pass manager without having ...
StringMap - This is an unconventional map that is specialized for handling keys that are "strings"...
Definition: StringMap.h:219
Target - Wrapper for Target specific information.
StringMap< std::unique_ptr< AArch64Subtarget > > SubtargetMap
TargetOptions Options
Definition: TargetMachine.h:96
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:48
TargetTransformInfo getTargetTransformInfo(const Function &F) override
Get a TargetTransformInfo implementation for the target.