1 //===-- SystemZSelectionDAGInfo.h - SystemZ SelectionDAG Info ---*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 // This file defines the SystemZ subclass for SelectionDAGTargetInfo.
11 //===----------------------------------------------------------------------===//
13 #ifndef LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZSELECTIONDAGINFO_H
14 #define LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZSELECTIONDAGINFO_H
16 #include "llvm/CodeGen/SelectionDAGTargetInfo.h"
20 class SystemZSelectionDAGInfo
: public SelectionDAGTargetInfo
{
22 explicit SystemZSelectionDAGInfo() = default;
24 bool isTargetMemoryOpcode(unsigned Opcode
) const override
;
26 bool isTargetStrictFPOpcode(unsigned Opcode
) const override
;
28 SDValue
EmitTargetCodeForMemcpy(SelectionDAG
&DAG
, const SDLoc
&DL
,
29 SDValue Chain
, SDValue Dst
, SDValue Src
,
30 SDValue Size
, Align Alignment
,
31 bool IsVolatile
, bool AlwaysInline
,
32 MachinePointerInfo DstPtrInfo
,
33 MachinePointerInfo SrcPtrInfo
) const override
;
35 SDValue
EmitTargetCodeForMemset(SelectionDAG
&DAG
, const SDLoc
&DL
,
36 SDValue Chain
, SDValue Dst
, SDValue Byte
,
37 SDValue Size
, Align Alignment
,
38 bool IsVolatile
, bool AlwaysInline
,
39 MachinePointerInfo DstPtrInfo
) const override
;
41 std::pair
<SDValue
, SDValue
>
42 EmitTargetCodeForMemcmp(SelectionDAG
&DAG
, const SDLoc
&DL
, SDValue Chain
,
43 SDValue Src1
, SDValue Src2
, SDValue Size
,
44 MachinePointerInfo Op1PtrInfo
,
45 MachinePointerInfo Op2PtrInfo
) const override
;
47 std::pair
<SDValue
, SDValue
>
48 EmitTargetCodeForMemchr(SelectionDAG
&DAG
, const SDLoc
&DL
, SDValue Chain
,
49 SDValue Src
, SDValue Char
, SDValue Length
,
50 MachinePointerInfo SrcPtrInfo
) const override
;
52 std::pair
<SDValue
, SDValue
> EmitTargetCodeForStrcpy(
53 SelectionDAG
&DAG
, const SDLoc
&DL
, SDValue Chain
, SDValue Dest
,
54 SDValue Src
, MachinePointerInfo DestPtrInfo
,
55 MachinePointerInfo SrcPtrInfo
, bool isStpcpy
) const override
;
57 std::pair
<SDValue
, SDValue
>
58 EmitTargetCodeForStrcmp(SelectionDAG
&DAG
, const SDLoc
&DL
, SDValue Chain
,
59 SDValue Src1
, SDValue Src2
,
60 MachinePointerInfo Op1PtrInfo
,
61 MachinePointerInfo Op2PtrInfo
) const override
;
63 std::pair
<SDValue
, SDValue
>
64 EmitTargetCodeForStrlen(SelectionDAG
&DAG
, const SDLoc
&DL
, SDValue Chain
,
66 MachinePointerInfo SrcPtrInfo
) const override
;
68 std::pair
<SDValue
, SDValue
>
69 EmitTargetCodeForStrnlen(SelectionDAG
&DAG
, const SDLoc
&DL
, SDValue Chain
,
70 SDValue Src
, SDValue MaxLength
,
71 MachinePointerInfo SrcPtrInfo
) const override
;
74 } // end namespace llvm