LLVM  3.7.0
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 /// \brief 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,
33 
34  ~WebAssemblyTargetMachine() override;
35  const WebAssemblySubtarget *
36  getSubtargetImpl(const Function &F) const override;
37 
38  // Pass Pipeline Configuration
39  TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
40 
42  return TLOF.get();
43  }
44 
45  /// \brief Get the TargetIRAnalysis for this target.
47 };
48 
49 } // end namespace llvm
50 
51 #endif
Analysis pass providing the TargetTransformInfo.
TargetIRAnalysis getTargetIRAnalysis() override
Get the TargetIRAnalysis for this target.
F(f)
WebAssemblyTargetMachine(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL)
Create an WebAssembly architecture model.
Target-Independent Code Generator Pass Configuration Options.
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.
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:214
Target - Wrapper for Target specific information.
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:40
const WebAssemblySubtarget * getSubtargetImpl(const Function &F) const override
Virtual method implemented by subclasses that returns a reference to that target's TargetSubtargetInf...