1 //===-- SystemZSelectionDAGInfo.h - SystemZ SelectionDAG Info ---*- 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 // This file defines the SystemZ subclass for TargetSelectionDAGInfo.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZSELECTIONDAGINFO_H
15 #define LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZSELECTIONDAGINFO_H
16 
17 #include "llvm/Target/TargetSelectionDAGInfo.h"
18 
19 namespace llvm {
20 
21 class SystemZTargetMachine;
22 
23 class SystemZSelectionDAGInfo : public TargetSelectionDAGInfo {
24 public:
25   explicit SystemZSelectionDAGInfo() = default;
26 
27   SDValue EmitTargetCodeForMemcpy(SelectionDAG &DAG, SDLoc DL, SDValue Chain,
28                                   SDValue Dst, SDValue Src,
29                                   SDValue Size, unsigned Align,
30                                   bool IsVolatile, bool AlwaysInline,
31                                   MachinePointerInfo DstPtrInfo,
32                                   MachinePointerInfo SrcPtrInfo) const override;
33 
34   SDValue EmitTargetCodeForMemset(SelectionDAG &DAG, SDLoc DL,
35                                   SDValue Chain, SDValue Dst, SDValue Byte,
36                                   SDValue Size, unsigned Align, bool IsVolatile,
37                                   MachinePointerInfo DstPtrInfo) const override;
38 
39   std::pair<SDValue, SDValue>
40   EmitTargetCodeForMemcmp(SelectionDAG &DAG, SDLoc DL, SDValue Chain,
41                           SDValue Src1, SDValue Src2, SDValue Size,
42                           MachinePointerInfo Op1PtrInfo,
43                           MachinePointerInfo Op2PtrInfo) const override;
44 
45   std::pair<SDValue, SDValue>
46   EmitTargetCodeForMemchr(SelectionDAG &DAG, SDLoc DL, SDValue Chain,
47                           SDValue Src, SDValue Char, SDValue Length,
48                           MachinePointerInfo SrcPtrInfo) const override;
49 
50   std::pair<SDValue, SDValue>
51   EmitTargetCodeForStrcpy(SelectionDAG &DAG, SDLoc DL, SDValue Chain,
52                           SDValue Dest, SDValue Src,
53                           MachinePointerInfo DestPtrInfo,
54                           MachinePointerInfo SrcPtrInfo,
55                           bool isStpcpy) const override;
56 
57   std::pair<SDValue, SDValue>
58   EmitTargetCodeForStrcmp(SelectionDAG &DAG, SDLoc DL, SDValue Chain,
59                           SDValue Src1, SDValue Src2,
60                           MachinePointerInfo Op1PtrInfo,
61                           MachinePointerInfo Op2PtrInfo) const override;
62 
63   std::pair<SDValue, SDValue>
64   EmitTargetCodeForStrlen(SelectionDAG &DAG, SDLoc DL, SDValue Chain,
65                           SDValue Src,
66                           MachinePointerInfo SrcPtrInfo) const override;
67 
68   std::pair<SDValue, SDValue>
69   EmitTargetCodeForStrnlen(SelectionDAG &DAG, SDLoc DL, SDValue Chain,
70                            SDValue Src, SDValue MaxLength,
71                            MachinePointerInfo SrcPtrInfo) const override;
72 };
73 
74 } // end namespace llvm
75 
76 #endif
77