LLVM  8.0.0svn
WebAssemblyTargetMachine.h
Go to the documentation of this file.
1 // WebAssemblyTargetMachine.h - Define TargetMachine for WebAssembly -*- 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 /// \file
11 /// This file declares the WebAssembly-specific subclass of
12 /// TargetMachine.
13 ///
14 //===----------------------------------------------------------------------===//
15 
16 #ifndef LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYTARGETMACHINE_H
17 #define LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYTARGETMACHINE_H
18 
19 #include "WebAssemblySubtarget.h"
21 
22 namespace llvm {
23 
25  std::unique_ptr<TargetLoweringObjectFile> TLOF;
27 
28 public:
29  WebAssemblyTargetMachine(const Target &T, const Triple &TT, StringRef CPU,
30  StringRef FS, const TargetOptions &Options,
33  bool JIT);
34 
35  ~WebAssemblyTargetMachine() override;
36  const WebAssemblySubtarget *
37  getSubtargetImpl(const Function &F) const override;
38 
39  // Pass Pipeline Configuration
41 
43  return TLOF.get();
44  }
45 
47 
48  bool usesPhysRegsForPEI() const override { return false; }
49 };
50 
51 } // end namespace llvm
52 
53 #endif
This class represents lattice values for constants.
Definition: AllocatorList.h:24
F(f)
Target-Independent Code Generator Pass Configuration Options.
bool usesPhysRegsForPEI() const override
True if the target uses physical regs at Prolog/Epilog insertion time.
TargetLoweringObjectFile * getObjFileLowering() const override
This class describes a target machine that is implemented with the LLVM target-independent code gener...
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:44
This file declares the WebAssembly-specific subclass of TargetSubtarget.
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 ...
TargetPassConfig * createPassConfig(PassManagerBase &PM) override
Create a pass configuration object to be used by addPassToEmitX methods for generating a pipeline of ...
StringMap - This is an unconventional map that is specialized for handling keys that are "strings"...
Definition: StringMap.h:220
Target - Wrapper for Target specific information.
TargetTransformInfo getTargetTransformInfo(const Function &F) override
Get a TargetTransformInfo implementation for the target.
TargetOptions Options
Definition: TargetMachine.h:97
WebAssemblyTargetMachine(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Optional< Reloc::Model > RM, Optional< CodeModel::Model > CM, CodeGenOpt::Level OL, bool JIT)
Create an WebAssembly architecture model.
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49
const WebAssemblySubtarget * getSubtargetImpl(const Function &F) const override
Virtual method implemented by subclasses that returns a reference to that target&#39;s TargetSubtargetInf...