1 //===-- SystemZSelectionDAGInfo.h - SystemZ 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 SystemZ subclass for SelectionDAGTargetInfo. 10 // 11 //===----------------------------------------------------------------------===// 12 13 #ifndef LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZSELECTIONDAGINFO_H 14 #define LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZSELECTIONDAGINFO_H 15 16 #include "llvm/CodeGen/SelectionDAGTargetInfo.h" 17 18 namespace llvm { 19 20 class SystemZSelectionDAGInfo : public SelectionDAGTargetInfo { 21 public: 22 explicit SystemZSelectionDAGInfo() = default; 23 24 bool isTargetMemoryOpcode(unsigned Opcode) const override; 25 26 bool isTargetStrictFPOpcode(unsigned Opcode) const override; 27 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; 34 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; 40 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; 46 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; 51 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; 56 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; 62 63 std::pair<SDValue, SDValue> 64 EmitTargetCodeForStrlen(SelectionDAG &DAG, const SDLoc &DL, SDValue Chain, 65 SDValue Src, 66 MachinePointerInfo SrcPtrInfo) const override; 67 68 std::pair<SDValue, SDValue> 69 EmitTargetCodeForStrnlen(SelectionDAG &DAG, const SDLoc &DL, SDValue Chain, 70 SDValue Src, SDValue MaxLength, 71 MachinePointerInfo SrcPtrInfo) const override; 72 }; 73 74 } // end namespace llvm 75 76 #endif 77