LLVM  9.0.0svn
WebAssemblyTargetMachine.h
Go to the documentation of this file.
1 // WebAssemblyTargetMachine.h - Define TargetMachine for WebAssembly -*- 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 /// \file
10 /// This file declares the WebAssembly-specific subclass of
11 /// TargetMachine.
12 ///
13 //===----------------------------------------------------------------------===//
14 
15 #ifndef LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYTARGETMACHINE_H
16 #define LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYTARGETMACHINE_H
17 
18 #include "WebAssemblySubtarget.h"
20 
21 namespace llvm {
22 
24  std::unique_ptr<TargetLoweringObjectFile> TLOF;
26 
27 public:
28  WebAssemblyTargetMachine(const Target &T, const Triple &TT, StringRef CPU,
29  StringRef FS, const TargetOptions &Options,
32  bool JIT);
33 
34  ~WebAssemblyTargetMachine() override;
35  const WebAssemblySubtarget *
36  getSubtargetImpl(const Function &F) const override;
37 
38  // Pass Pipeline Configuration
40 
42  return TLOF.get();
43  }
44 
46 
47  bool usesPhysRegsForPEI() const override { return false; }
48 };
49 
50 } // end namespace llvm
51 
52 #endif
This class represents lattice values for constants.
Definition: AllocatorList.h:23
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:43
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:219
Target - Wrapper for Target specific information.
TargetTransformInfo getTargetTransformInfo(const Function &F) override
Get a TargetTransformInfo implementation for the target.
TargetOptions Options
Definition: TargetMachine.h:96
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:48
const WebAssemblySubtarget * getSubtargetImpl(const Function &F) const override
Virtual method implemented by subclasses that returns a reference to that target&#39;s TargetSubtargetInf...