1//===-- AArch64SelectionDAGInfo.h - AArch64 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// This file defines the AArch64 subclass for SelectionDAGTargetInfo.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_LIB_TARGET_AARCH64_AARCH64SELECTIONDAGINFO_H
14#define LLVM_LIB_TARGET_AARCH64_AARCH64SELECTIONDAGINFO_H
15
16#include "llvm/CodeGen/SelectionDAGTargetInfo.h"
17#include "llvm/IR/RuntimeLibcalls.h"
18
19#define GET_SDNODE_ENUM
20#include "AArch64GenSDNodeInfo.inc"
21#undef GET_SDNODE_ENUM
22
23namespace llvm {
24
25class AArch64SelectionDAGInfo : public SelectionDAGGenTargetInfo {
26public:
27 AArch64SelectionDAGInfo();
28
29 void verifyTargetNode(const SelectionDAG &DAG,
30 const SDNode *N) const override;
31
32 SDValue EmitMOPS(unsigned Opcode, SelectionDAG &DAG, const SDLoc &DL,
33 SDValue Chain, SDValue Dst, SDValue SrcOrValue, SDValue Size,
34 Align DstAlign, Align SrcAlign, bool isVolatile,
35 MachinePointerInfo DstPtrInfo,
36 MachinePointerInfo SrcPtrInfo) const;
37
38 SDValue EmitTargetCodeForMemcpy(SelectionDAG &DAG, const SDLoc &dl,
39 SDValue Chain, SDValue Dst, SDValue Src,
40 SDValue Size, Align DstAlign, Align SrcAlign,
41 bool isVolatile, bool AlwaysInline,
42 bool &IsTailCall,
43 MachinePointerInfo DstPtrInfo,
44 MachinePointerInfo SrcPtrInfo) const override;
45 SDValue EmitTargetCodeForMemset(SelectionDAG &DAG, const SDLoc &dl,
46 SDValue Chain, SDValue Dst, SDValue Src,
47 SDValue Size, Align Alignment,
48 bool isVolatile, bool AlwaysInline,
49 bool &IsTailCall,
50 MachinePointerInfo DstPtrInfo) const override;
51 SDValue
52 EmitTargetCodeForMemmove(SelectionDAG &DAG, const SDLoc &dl, SDValue Chain,
53 SDValue Dst, SDValue Src, SDValue Size,
54 Align DstAlign, Align SrcAlign, bool isVolatile,
55 bool &IsTailCall, MachinePointerInfo DstPtrInfo,
56 MachinePointerInfo SrcPtrInfo) const override;
57
58 std::pair<SDValue, SDValue>
59 EmitTargetCodeForMemchr(SelectionDAG &DAG, const SDLoc &dl, SDValue Chain,
60 SDValue Src, SDValue Char, SDValue Length,
61 MachinePointerInfo SrcPtrInfo) const override;
62
63 SDValue EmitTargetCodeForSetTag(SelectionDAG &DAG, const SDLoc &dl,
64 SDValue Chain, SDValue Op1, SDValue Op2,
65 MachinePointerInfo DstPtrInfo,
66 bool ZeroData) const override;
67
68 SDValue EmitStreamingCompatibleMemLibCall(SelectionDAG &DAG, const SDLoc &DL,
69 SDValue Chain, SDValue Op0,
70 SDValue Op1, SDValue Size,
71 RTLIB::Libcall LC,
72 bool &IsTailCall) const;
73};
74} // namespace llvm
75
76#endif
77