1 //===-- SparcTargetMachine.h - Define TargetMachine for Sparc ---*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file declares the Sparc specific subclass of TargetMachine.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_LIB_TARGET_SPARC_SPARCTARGETMACHINE_H
15 #define LLVM_LIB_TARGET_SPARC_SPARCTARGETMACHINE_H
17 #include "SparcInstrInfo.h"
18 #include "SparcSubtarget.h"
19 #include "llvm/Target/TargetMachine.h"
23 class SparcTargetMachine : public LLVMTargetMachine {
24 std::unique_ptr<TargetLoweringObjectFile> TLOF;
26 SparcSubtarget Subtarget;
28 SparcTargetMachine(const Target &T, StringRef TT,
29 StringRef CPU, StringRef FS, const TargetOptions &Options,
30 Reloc::Model RM, CodeModel::Model CM,
31 CodeGenOpt::Level OL, bool is64bit);
32 ~SparcTargetMachine() override;
34 const DataLayout *getDataLayout() const override { return &DL; }
35 const SparcSubtarget *getSubtargetImpl() const override { return &Subtarget; }
37 // Pass Pipeline Configuration
38 TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
39 TargetLoweringObjectFile *getObjFileLowering() const override {
44 /// SparcV8TargetMachine - Sparc 32-bit target machine
46 class SparcV8TargetMachine : public SparcTargetMachine {
47 virtual void anchor();
49 SparcV8TargetMachine(const Target &T, StringRef TT,
50 StringRef CPU, StringRef FS,
51 const TargetOptions &Options,
52 Reloc::Model RM, CodeModel::Model CM,
53 CodeGenOpt::Level OL);
56 /// SparcV9TargetMachine - Sparc 64-bit target machine
58 class SparcV9TargetMachine : public SparcTargetMachine {
59 virtual void anchor();
61 SparcV9TargetMachine(const Target &T, StringRef TT,
62 StringRef CPU, StringRef FS,
63 const TargetOptions &Options,
64 Reloc::Model RM, CodeModel::Model CM,
65 CodeGenOpt::Level OL);
68 } // end namespace llvm