LLVM  14.0.0git
SparcTargetMachine.h
Go to the documentation of this file.
1 //===-- SparcTargetMachine.h - Define TargetMachine for Sparc ---*- 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 Sparc specific subclass of TargetMachine.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef LLVM_LIB_TARGET_SPARC_SPARCTARGETMACHINE_H
14 #define LLVM_LIB_TARGET_SPARC_SPARCTARGETMACHINE_H
15 
16 #include "SparcInstrInfo.h"
17 #include "SparcSubtarget.h"
19 
20 namespace llvm {
21 
23  std::unique_ptr<TargetLoweringObjectFile> TLOF;
24  SparcSubtarget Subtarget;
25  bool is64Bit;
26  mutable StringMap<std::unique_ptr<SparcSubtarget>> SubtargetMap;
27 public:
28  SparcTargetMachine(const Target &T, const Triple &TT, StringRef CPU,
31  CodeGenOpt::Level OL, bool JIT, bool is64bit);
32  ~SparcTargetMachine() override;
33 
34  const SparcSubtarget *getSubtargetImpl() const { return &Subtarget; }
35  const SparcSubtarget *getSubtargetImpl(const Function &) const override;
36 
37  // Pass Pipeline Configuration
40  return TLOF.get();
41  }
42 };
43 
44 /// Sparc 32-bit target machine
45 ///
47  virtual void anchor();
48 public:
49  SparcV8TargetMachine(const Target &T, const Triple &TT, StringRef CPU,
52  CodeGenOpt::Level OL, bool JIT);
53 };
54 
55 /// Sparc 64-bit target machine
56 ///
58  virtual void anchor();
59 public:
60  SparcV9TargetMachine(const Target &T, const Triple &TT, StringRef CPU,
63  CodeGenOpt::Level OL, bool JIT);
64 };
65 
67  virtual void anchor();
68 
69 public:
70  SparcelTargetMachine(const Target &T, const Triple &TT, StringRef CPU,
73  CodeGenOpt::Level OL, bool JIT);
74 };
75 
76 } // end namespace llvm
77 
78 #endif
SparcInstrInfo.h
llvm
This file implements support for optimizing divisions by a constant.
Definition: AllocatorList.h:23
llvm::TargetOptions
Definition: TargetOptions.h:124
llvm::SparcelTargetMachine::SparcelTargetMachine
SparcelTargetMachine(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)
Definition: SparcTargetMachine.cpp:207
llvm::Function
Definition: Function.h:62
llvm::Target
Target - Wrapper for Target specific information.
Definition: TargetRegistry.h:137
llvm::SparcV8TargetMachine
Sparc 32-bit target machine.
Definition: SparcTargetMachine.h:46
llvm::Triple
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:45
llvm::TargetMachine::RM
Reloc::Model RM
Definition: TargetMachine.h:102
llvm::Optional< Reloc::Model >
T
#define T
Definition: Mips16ISelLowering.cpp:341
llvm::SparcTargetMachine::getObjFileLowering
TargetLoweringObjectFile * getObjFileLowering() const override
Definition: SparcTargetMachine.h:39
llvm::TargetLoweringObjectFile
Definition: TargetLoweringObjectFile.h:44
llvm::SparcelTargetMachine
Definition: SparcTargetMachine.h:66
TargetMachine.h
llvm::SparcV9TargetMachine
Sparc 64-bit target machine.
Definition: SparcTargetMachine.h:57
llvm::X86AS::FS
@ FS
Definition: X86.h:188
llvm::SparcV9TargetMachine::SparcV9TargetMachine
SparcV9TargetMachine(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)
Definition: SparcTargetMachine.cpp:197
llvm::SparcSubtarget
Definition: SparcSubtarget.h:31
llvm::StringMap
StringMap - This is an unconventional map that is specialized for handling keys that are "strings",...
Definition: StringMap.h:108
llvm::SparcTargetMachine
Definition: SparcTargetMachine.h:22
SparcSubtarget.h
llvm::TargetPassConfig
Target-Independent Code Generator Pass Configuration Options.
Definition: TargetPassConfig.h:84
llvm::EngineKind::JIT
@ JIT
Definition: ExecutionEngine.h:524
llvm::SparcTargetMachine::~SparcTargetMachine
~SparcTargetMachine() override
Definition: SparcTargetMachine.cpp:105
llvm::SparcV8TargetMachine::SparcV8TargetMachine
SparcV8TargetMachine(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)
Definition: SparcTargetMachine.cpp:187
llvm::TargetMachine::Options
TargetOptions Options
Definition: TargetMachine.h:120
llvm::SparcTargetMachine::getSubtargetImpl
const SparcSubtarget * getSubtargetImpl() const
Definition: SparcTargetMachine.h:34
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:58
llvm::CodeGenOpt::Level
Level
Definition: CodeGen.h:52
llvm::SparcTargetMachine::SparcTargetMachine
SparcTargetMachine(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 is64bit)
Create an ILP32 architecture model.
Definition: SparcTargetMachine.cpp:90
llvm::SparcTargetMachine::createPassConfig
TargetPassConfig * createPassConfig(PassManagerBase &PM) override
Create a pass configuration object to be used by addPassToEmitX methods for generating a pipeline of ...
Definition: SparcTargetMachine.cpp:154
llvm::LLVMTargetMachine
This class describes a target machine that is implemented with the LLVM target-independent code gener...
Definition: TargetMachine.h:393
llvm::legacy::PassManagerBase
PassManagerBase - An abstract interface to allow code to add passes to a pass manager without having ...
Definition: LegacyPassManager.h:39