LLVM: lib/Target/VE/VETargetMachine.cpp Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
14#include "VE.h"
23#include
24
25using namespace llvm;
26
27#define DEBUG_TYPE "ve"
28
37
41
42namespace {
44 void Initialize(MCContext &Ctx, const TargetMachine &TM) override {
47 }
48};
49}
50
51static std::unique_ptr createTLOF() {
52 return std::make_unique();
53}
54
55
59 std::optionalReloc::Model RM,
60 std::optionalCodeModel::Model CM,
66 Subtarget(TT, std::string(CPU), std::string(FS), *this) {
68}
69
71
76
83
84namespace {
85
87public:
90
93 }
94
95 void addIRPasses() override;
96 bool addInstSelector() override;
97 void addPreEmitPass() override;
98};
99}
100
102 return new VEPassConfig(*this, PM);
103}
104
105void VEPassConfig::addIRPasses() {
106
109}
110
111bool VEPassConfig::addInstSelector() {
113 return false;
114}
115
116void VEPassConfig::addPreEmitPass() {
117
119}
static std::unique_ptr< TargetLoweringObjectFile > createTLOF(const Triple &TT)
static Reloc::Model getEffectiveRelocModel()
#define LLVM_EXTERNAL_VISIBILITY
const GCNTargetMachine & getTM(const GCNSubtarget *STI)
static TableGen::Emitter::OptClass< SkeletonEmitter > X("gen-skeleton-class", "Generate example skeleton class")
Target-Independent Code Generator Pass Configuration Options pass.
LLVM_ABI LLVM_EXTERNAL_VISIBILITY void LLVMInitializeVETarget()
Definition VETargetMachine.cpp:29
static std::unique_ptr< TargetLoweringObjectFile > createTLOF()
Definition VETargetMachine.cpp:51
This file a TargetTransformInfoImplBase conforming object specific to the VE target machine.
CodeGenTargetMachineImpl(const Target &T, StringRef DataLayoutString, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Reloc::Model RM, CodeModel::Model CM, CodeGenOptLevel OL)
PassRegistry - This class manages the registration and intitialization of the pass subsystem as appli...
static LLVM_ABI PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
StringRef - Represent a constant reference to a string, i.e.
void Initialize(MCContext &Ctx, const TargetMachine &TM) override
This method must be called before any actual lowering is done.
std::unique_ptr< const MCSubtargetInfo > STI
unsigned UseInitArray
UseInitArray - Use .init_array instead of .ctors for static constructors.
Target-Independent Code Generator Pass Configuration Options.
virtual void addIRPasses()
Add common target configurable passes that perform LLVM IR to IR transforms following machine indepen...
TargetSubtargetInfo - Generic base class for all target subtargets.
This pass provides access to the codegen interfaces that are needed for IR-level transformations.
Target - Wrapper for Target specific information.
Triple - Helper class for working with autoconf configuration names.
~VETargetMachine() override
VETargetMachine(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)
Create an Aurora VE architecture model.
Definition VETargetMachine.cpp:56
MachineFunctionInfo * createMachineFunctionInfo(BumpPtrAllocator &Allocator, const Function &F, const TargetSubtargetInfo *STI) const override
Create the target's instance of MachineFunctionInfo.
Definition VETargetMachine.cpp:77
TargetPassConfig * createPassConfig(PassManagerBase &PM) override
Create a pass configuration object to be used by addPassToEmitX methods for generating a pipeline of ...
Definition VETargetMachine.cpp:101
TargetTransformInfo getTargetTransformInfo(const Function &F) const override
Get a TargetTransformInfo implementation for the target.
Definition VETargetMachine.cpp:73
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.
void initializeVEDAGToDAGISelLegacyPass(PassRegistry &)
FunctionPass * createLVLGenPass()
FunctionPass * createVEISelDag(VETargetMachine &TM)
createVEISelDag - This pass converts a legalized DAG into a VE-specific DAG, ready for instruction sc...
Target & getTheVETarget()
static Reloc::Model getEffectiveRelocModel(std::optional< Reloc::Model > RM)
CodeModel::Model getEffectiveCodeModel(std::optional< CodeModel::Model > CM, CodeModel::Model Default)
Helper method for getting the code model, returning Default if CM does not have a value.
CodeGenOptLevel
Code generation optimization level.
void initializeVEAsmPrinterPass(PassRegistry &)
LLVM_ABI FunctionPass * createAtomicExpandLegacyPass()
AtomicExpandPass - At IR level this pass replace atomic instructions with __atomic_* library calls,...
BumpPtrAllocatorImpl<> BumpPtrAllocator
The standard BumpPtrAllocator which just uses the default template parameters.
Implement std::hash so that hash_code can be used in STL containers.
MachineFunctionInfo - This class can be derived from and used by targets to hold private target-speci...
static FuncInfoTy * create(BumpPtrAllocator &Allocator, const Function &F, const SubtargetTy *STI)
Factory function: default behavior is to call new using the supplied allocator.
RegisterTargetMachine - Helper template for registering a target machine implementation,...