LLVM  10.0.0svn
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,
29  StringRef FS, const TargetOptions &Options,
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,
50  StringRef FS, const TargetOptions &Options,
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,
61  StringRef FS, const TargetOptions &Options,
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,
71  StringRef FS, const TargetOptions &Options,
73  CodeGenOpt::Level OL, bool JIT);
74 };
75 
76 } // end namespace llvm
77 
78 #endif
This class represents lattice values for constants.
Definition: AllocatorList.h:23
const SparcSubtarget * getSubtargetImpl() const
Target-Independent Code Generator Pass Configuration Options.
TargetLoweringObjectFile * getObjFileLowering() const override
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
PassManagerBase - An abstract interface to allow code to add passes to a pass manager without having ...
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.
Sparc 32-bit target machine.
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.
TargetOptions Options
TargetPassConfig * createPassConfig(PassManagerBase &PM) override
Create a pass configuration object to be used by addPassToEmitX methods for generating a pipeline of ...
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:48
Sparc 64-bit target machine.