xref: /llvm-project/llvm/lib/Target/WebAssembly/WebAssemblySelectionDAGInfo.h (revision 9ae92d70561bcc95a7f818920238e764253d9758)
1 //=- WebAssemblySelectionDAGInfo.h - WebAssembly SelectionDAG Info -*- 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 defines the WebAssembly subclass for
11 /// SelectionDAGTargetInfo.
12 ///
13 //===----------------------------------------------------------------------===//
14 
15 #ifndef LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYSELECTIONDAGINFO_H
16 #define LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYSELECTIONDAGINFO_H
17 
18 #include "llvm/CodeGen/SelectionDAGTargetInfo.h"
19 
20 namespace llvm {
21 
22 class WebAssemblySelectionDAGInfo final : public SelectionDAGTargetInfo {
23 public:
24   ~WebAssemblySelectionDAGInfo() override;
25 
26   bool isTargetMemoryOpcode(unsigned Opcode) const override;
27 
28   SDValue EmitTargetCodeForMemcpy(SelectionDAG &DAG, const SDLoc &dl,
29                                   SDValue Chain, SDValue Op1, SDValue Op2,
30                                   SDValue Op3, Align Alignment, bool isVolatile,
31                                   bool AlwaysInline,
32                                   MachinePointerInfo DstPtrInfo,
33                                   MachinePointerInfo SrcPtrInfo) const override;
34   SDValue
35   EmitTargetCodeForMemmove(SelectionDAG &DAG, const SDLoc &dl, SDValue Chain,
36                            SDValue Op1, SDValue Op2, SDValue Op3,
37                            Align Alignment, bool isVolatile,
38                            MachinePointerInfo DstPtrInfo,
39                            MachinePointerInfo SrcPtrInfo) const override;
40   SDValue EmitTargetCodeForMemset(SelectionDAG &DAG, const SDLoc &DL,
41                                   SDValue Chain, SDValue Op1, SDValue Op2,
42                                   SDValue Op3, Align Alignment, bool IsVolatile,
43                                   bool AlwaysInline,
44                                   MachinePointerInfo DstPtrInfo) const override;
45 };
46 
47 } // end namespace llvm
48 
49 #endif
50