LLVM 24.0.0git
PISATargetMachine.h
Go to the documentation of this file.
1//===----------------------------------------------------------------------===//
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/// \file
10/// This file declares the PISA target machine.
11///
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_LIB_TARGET_PISA_PISATARGETMACHINE_H
15#define LLVM_LIB_TARGET_PISA_PISATARGETMACHINE_H
16
17#include "PISASubtarget.h"
18#include "llvm/ADT/StringMap.h"
20#include <memory>
21#include <optional>
22
23namespace llvm {
25 std::unique_ptr<TargetLoweringObjectFile> TLOF;
26 PISASubtarget Subtarget;
27 mutable StringMap<std::unique_ptr<PISASubtarget>> SubtargetMap;
28
29public:
30 PISATargetMachine(const Target &T, const Triple &TT, StringRef CPU,
32 std::optional<Reloc::Model> RM,
33 std::optional<CodeModel::Model> CM, CodeGenOptLevel OL,
34 bool JIT);
35
36 const PISASubtarget *getSubtargetImpl(const Function &F) const override;
37 // DO NOT IMPLEMENT: subtargets are per-function entities based on the
38 // target-specific attributes of each function.
39 const PISASubtarget *getSubtargetImpl() const = delete;
40
42
43 bool usesPhysRegsForValues() const override { return false; }
44
46 return TLOF.get();
47 }
48};
49} // namespace llvm
50
51#endif // LLVM_LIB_TARGET_PISA_PISATARGETMACHINE_H
This file defines the StringMap class.
#define F(x, y, z)
Definition MD5.cpp:54
#define T
This file declares the PISA subtarget.
CodeGenTargetMachineImpl(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Reloc::Model RM, CodeModel::Model CM, CodeGenOptLevel OL)
TargetPassConfig * createPassConfig(PassManagerBase &PM) override
Create a pass configuration object to be used by addPassToEmitX methods for generating a pipeline of ...
PISATargetMachine(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, std::optional< Reloc::Model > RM, std::optional< CodeModel::Model > CM, CodeGenOptLevel OL, bool JIT)
bool usesPhysRegsForValues() const override
True if the target uses physical regs (as nearly all targets do).
TargetLoweringObjectFile * getObjFileLowering() const override
const PISASubtarget * getSubtargetImpl() const =delete
StringMap - This is an unconventional map that is specialized for handling keys that are "strings",...
Definition StringMap.h:129
Represent a constant reference to a string, i.e.
Definition StringRef.h:56
TargetOptions Options
Target-Independent Code Generator Pass Configuration Options.
Target - Wrapper for Target specific information.
Triple - Helper class for working with autoconf configuration names.
Definition Triple.h:48
PassManagerBase - An abstract interface to allow code to add passes to a pass manager without having ...
This is an optimization pass for GlobalISel generic memory operations.
CodeGenOptLevel
Code generation optimization level.
Definition CodeGen.h:280