LLVM  14.0.0git
LanaiTargetMachine.h
Go to the documentation of this file.
1 //===-- LanaiTargetMachine.h - Define TargetMachine for Lanai --- 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 Lanai specific subclass of TargetMachine.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef LLVM_LIB_TARGET_LANAI_LANAITARGETMACHINE_H
14 #define LLVM_LIB_TARGET_LANAI_LANAITARGETMACHINE_H
15 
16 #include "LanaiISelLowering.h"
17 #include "LanaiInstrInfo.h"
18 #include "LanaiSelectionDAGInfo.h"
19 #include "LanaiSubtarget.h"
21 
22 namespace llvm {
23 
25  LanaiSubtarget Subtarget;
26  std::unique_ptr<TargetLoweringObjectFile> TLOF;
27 
28 public:
30  StringRef Cpu, StringRef FeatureString,
31  const TargetOptions &Options,
32  Optional<Reloc::Model> RelocationModel,
35 
36  const LanaiSubtarget *
37  getSubtargetImpl(const llvm::Function & /*Fn*/) const override {
38  return &Subtarget;
39  }
40 
42 
43  // Pass Pipeline Configuration
44  TargetPassConfig *createPassConfig(PassManagerBase &pass_manager) override;
45 
47  return TLOF.get();
48  }
49 
50  bool isMachineVerifierClean() const override {
51  return false;
52  }
53 };
54 } // namespace llvm
55 
56 #endif // LLVM_LIB_TARGET_LANAI_LANAITARGETMACHINE_H
LanaiSelectionDAGInfo.h
llvm
---------------------— PointerInfo ------------------------------------—
Definition: AllocatorList.h:23
llvm::LanaiTargetMachine::createPassConfig
TargetPassConfig * createPassConfig(PassManagerBase &pass_manager) override
Create a pass configuration object to be used by addPassToEmitX methods for generating a pipeline of ...
Definition: LanaiTargetMachine.cpp:93
llvm::TargetOptions
Definition: TargetOptions.h:113
llvm::Function
Definition: Function.h:61
llvm::TargetMachine::TheTarget
const Target & TheTarget
The Target that this machine was created for.
Definition: TargetMachine.h:84
llvm::Target
Target - Wrapper for Target specific information.
Definition: TargetRegistry.h:137
llvm::TargetTransformInfo
This pass provides access to the codegen interfaces that are needed for IR-level transformations.
Definition: TargetTransformInfo.h:167
llvm::Triple
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:45
llvm::Optional< Reloc::Model >
F
#define F(x, y, z)
Definition: MD5.cpp:56
llvm::TargetLoweringObjectFile
Definition: TargetLoweringObjectFile.h:43
TargetMachine.h
llvm::LanaiTargetMachine::isMachineVerifierClean
bool isMachineVerifierClean() const override
Returns true if the target is expected to pass all machine verifier checks.
Definition: LanaiTargetMachine.h:50
llvm::LanaiTargetMachine::getObjFileLowering
TargetLoweringObjectFile * getObjFileLowering() const override
Definition: LanaiTargetMachine.h:46
llvm::TargetPassConfig
Target-Independent Code Generator Pass Configuration Options.
Definition: TargetPassConfig.h:84
llvm::LanaiTargetMachine::getTargetTransformInfo
TargetTransformInfo getTargetTransformInfo(const Function &F) override
Get a TargetTransformInfo implementation for the target.
Definition: LanaiTargetMachine.cpp:71
llvm::TargetMachine::TargetTriple
Triple TargetTriple
Triple string, CPU name, and target feature strings the TargetMachine instance is created with.
Definition: TargetMachine.h:96
llvm::EngineKind::JIT
@ JIT
Definition: ExecutionEngine.h:525
llvm::TargetMachine::OptLevel
CodeGenOpt::Level OptLevel
Definition: TargetMachine.h:102
llvm::TargetMachine::Options
TargetOptions Options
Definition: TargetMachine.h:115
llvm::LanaiTargetMachine::LanaiTargetMachine
LanaiTargetMachine(const Target &TheTarget, const Triple &TargetTriple, StringRef Cpu, StringRef FeatureString, const TargetOptions &Options, Optional< Reloc::Model > RelocationModel, Optional< CodeModel::Model > CodeModel, CodeGenOpt::Level OptLevel, bool JIT)
Definition: LanaiTargetMachine.cpp:54
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:58
llvm::LanaiSubtarget
Definition: LanaiSubtarget.h:29
llvm::CodeGenOpt::Level
Level
Definition: CodeGen.h:52
LanaiISelLowering.h
llvm::LLVMTargetMachine
This class describes a target machine that is implemented with the LLVM target-independent code gener...
Definition: TargetMachine.h:385
llvm::LanaiTargetMachine
Definition: LanaiTargetMachine.h:24
llvm::LanaiTargetMachine::getSubtargetImpl
const LanaiSubtarget * getSubtargetImpl(const llvm::Function &) const override
Virtual method implemented by subclasses that returns a reference to that target's TargetSubtargetInf...
Definition: LanaiTargetMachine.h:37
llvm::legacy::PassManagerBase
PassManagerBase - An abstract interface to allow code to add passes to a pass manager without having ...
Definition: LegacyPassManager.h:39
LanaiInstrInfo.h
LanaiSubtarget.h