LLVM  8.0.1
LanaiTargetMachine.h
Go to the documentation of this file.
1 //===-- LanaiTargetMachine.h - Define TargetMachine for Lanai --- C++ ---===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file declares the Lanai specific subclass of TargetMachine.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_LIB_TARGET_LANAI_LANAITARGETMACHINE_H
15 #define LLVM_LIB_TARGET_LANAI_LANAITARGETMACHINE_H
16 
17 #include "LanaiFrameLowering.h"
18 #include "LanaiISelLowering.h"
19 #include "LanaiInstrInfo.h"
20 #include "LanaiSelectionDAGInfo.h"
21 #include "LanaiSubtarget.h"
24 
25 namespace llvm {
26 class formatted_raw_ostream;
27 
29  LanaiSubtarget Subtarget;
30  std::unique_ptr<TargetLoweringObjectFile> TLOF;
31 
32 public:
34  StringRef Cpu, StringRef FeatureString,
35  const TargetOptions &Options,
36  Optional<Reloc::Model> RelocationModel,
39 
40  const LanaiSubtarget *
41  getSubtargetImpl(const llvm::Function & /*Fn*/) const override {
42  return &Subtarget;
43  }
44 
46 
47  // Pass Pipeline Configuration
48  TargetPassConfig *createPassConfig(PassManagerBase &pass_manager) override;
49 
51  return TLOF.get();
52  }
53 
54  bool isMachineVerifierClean() const override {
55  return false;
56  }
57 };
58 } // namespace llvm
59 
60 #endif // LLVM_LIB_TARGET_LANAI_LANAITARGETMACHINE_H
This class represents lattice values for constants.
Definition: AllocatorList.h:24
Triple TargetTriple
Triple string, CPU name, and target feature strings the TargetMachine instance is created with...
Definition: TargetMachine.h:78
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:84
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:66
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:44
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
Definition: TargetMachine.h:97
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49