LLVM  10.0.0svn
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 "LanaiFrameLowering.h"
17 #include "LanaiISelLowering.h"
18 #include "LanaiInstrInfo.h"
19 #include "LanaiSelectionDAGInfo.h"
20 #include "LanaiSubtarget.h"
23 
24 namespace llvm {
25 class formatted_raw_ostream;
26 
28  LanaiSubtarget Subtarget;
29  std::unique_ptr<TargetLoweringObjectFile> TLOF;
30 
31 public:
33  StringRef Cpu, StringRef FeatureString,
34  const TargetOptions &Options,
35  Optional<Reloc::Model> RelocationModel,
38 
39  const LanaiSubtarget *
40  getSubtargetImpl(const llvm::Function & /*Fn*/) const override {
41  return &Subtarget;
42  }
43 
45 
46  // Pass Pipeline Configuration
47  TargetPassConfig *createPassConfig(PassManagerBase &pass_manager) override;
48 
50  return TLOF.get();
51  }
52 
53  bool isMachineVerifierClean() const override {
54  return false;
55  }
56 };
57 } // namespace llvm
58 
59 #endif // LLVM_LIB_TARGET_LANAI_LANAITARGETMACHINE_H
This class represents lattice values for constants.
Definition: AllocatorList.h:23
Triple TargetTriple
Triple string, CPU name, and target feature strings the TargetMachine instance is created with...
Definition: TargetMachine.h:84
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)
F(f)
TargetPassConfig * createPassConfig(PassManagerBase &pass_manager) override
Create a pass configuration object to be used by addPassToEmitX methods for generating a pipeline of ...
CodeGenOpt::Level OptLevel
Definition: TargetMachine.h:90
TargetLoweringObjectFile * getObjFileLowering() const override
Target-Independent Code Generator Pass Configuration Options.
const LanaiSubtarget * getSubtargetImpl(const llvm::Function &) const override
Virtual method implemented by subclasses that returns a reference to that target&#39;s TargetSubtargetInf...
This class describes a target machine that is implemented with the LLVM target-independent code gener...
TargetTransformInfo getTargetTransformInfo(const Function &F) override
Get a TargetTransformInfo implementation for the target.
const Target & TheTarget
The Target that this machine was created for.
Definition: TargetMachine.h:72
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:43
bool isMachineVerifierClean() const override
Returns true if the target is expected to pass all machine verifier checks.
This pass provides access to the codegen interfaces that are needed for IR-level transformations.
PassManagerBase - An abstract interface to allow code to add passes to a pass manager without having ...
Target - Wrapper for Target specific information.
TargetOptions Options
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:48