1 //- WebAssemblyISelLowering.h - WebAssembly DAG Lowering Interface -*- C++ -*-//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
11 /// \brief This file defines the interfaces that WebAssembly uses to lower LLVM
12 /// code into a selection DAG.
14 //===----------------------------------------------------------------------===//
16 #ifndef LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYISELLOWERING_H
17 #define LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYISELLOWERING_H
19 #include "llvm/Target/TargetLowering.h"
23 namespace WebAssemblyISD {
26 FIRST_NUMBER = ISD::BUILTIN_OP_END,
28 // add memory opcodes starting at ISD::FIRST_TARGET_MEMORY_OPCODE here...
31 } // end namespace WebAssemblyISD
33 class WebAssemblySubtarget;
34 class WebAssemblyTargetMachine;
36 class WebAssemblyTargetLowering final : public TargetLowering {
38 WebAssemblyTargetLowering(const TargetMachine &TM,
39 const WebAssemblySubtarget &STI);
42 /// Keep a pointer to the WebAssemblySubtarget around so that we can make the
43 /// right decision when generating code for different targets.
44 const WebAssemblySubtarget *Subtarget;
47 } // end namespace llvm