[PowerPC] Materialize more constants with CR-field set in late peephole
[llvm-core.git] / lib / Target / AArch64 / AArch64TargetMachine.h
blob8d28a5e30ebfaa0610f9b37ed597d906985e2329
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.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_LIB_TARGET_AARCH64_AARCH64TARGETMACHINE_H
15 #define LLVM_LIB_TARGET_AARCH64_AARCH64TARGETMACHINE_H
17 #include "AArch64InstrInfo.h"
18 #include "AArch64Subtarget.h"
19 #include "llvm/IR/DataLayout.h"
20 #include "llvm/Target/TargetMachine.h"
22 namespace llvm {
24 class AArch64RegisterBankInfo;
26 class AArch64TargetMachine : public LLVMTargetMachine {
27 protected:
28 std::unique_ptr<TargetLoweringObjectFile> TLOF;
29 mutable StringMap<std::unique_ptr<AArch64Subtarget>> SubtargetMap;
31 public:
32 AArch64TargetMachine(const Target &T, const Triple &TT, StringRef CPU,
33 StringRef FS, const TargetOptions &Options,
34 Optional<Reloc::Model> RM, Optional<CodeModel::Model> CM,
35 CodeGenOpt::Level OL, bool JIT, bool IsLittleEndian);
37 ~AArch64TargetMachine() override;
38 const AArch64Subtarget *getSubtargetImpl(const Function &F) const override;
39 // DO NOT IMPLEMENT: There is no such thing as a valid default subtarget,
40 // subtargets are per-function entities based on the target-specific
41 // attributes of each function.
42 const AArch64Subtarget *getSubtargetImpl() const = delete;
44 // Pass Pipeline Configuration
45 TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
47 TargetTransformInfo getTargetTransformInfo(const Function &F) override;
49 TargetLoweringObjectFile* getObjFileLowering() const override {
50 return TLOF.get();
53 private:
54 bool isLittle;
57 // AArch64 little endian target machine.
59 class AArch64leTargetMachine : public AArch64TargetMachine {
60 virtual void anchor();
61 public:
62 AArch64leTargetMachine(const Target &T, const Triple &TT, StringRef CPU,
63 StringRef FS, const TargetOptions &Options,
64 Optional<Reloc::Model> RM,
65 Optional<CodeModel::Model> CM, CodeGenOpt::Level OL,
66 bool JIT);
69 // AArch64 big endian target machine.
71 class AArch64beTargetMachine : public AArch64TargetMachine {
72 virtual void anchor();
73 public:
74 AArch64beTargetMachine(const Target &T, const Triple &TT, StringRef CPU,
75 StringRef FS, const TargetOptions &Options,
76 Optional<Reloc::Model> RM,
77 Optional<CodeModel::Model> CM, CodeGenOpt::Level OL,
78 bool JIT);
81 } // end namespace llvm
83 #endif