LLVM  10.0.0svn
SystemZSelectionDAGInfo.h
Go to the documentation of this file.
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 
17 
18 namespace llvm {
19 
20 class SystemZTargetMachine;
21 
23 public:
24  explicit SystemZSelectionDAGInfo() = default;
25 
27  SDValue Chain, SDValue Dst, SDValue Src,
28  SDValue Size, unsigned Align, bool IsVolatile,
29  bool AlwaysInline,
30  MachinePointerInfo DstPtrInfo,
31  MachinePointerInfo SrcPtrInfo) const override;
32 
34  SDValue Chain, SDValue Dst, SDValue Byte,
35  SDValue Size, unsigned Align, bool IsVolatile,
36  MachinePointerInfo DstPtrInfo) const override;
37 
38  std::pair<SDValue, SDValue>
39  EmitTargetCodeForMemcmp(SelectionDAG &DAG, const SDLoc &DL, SDValue Chain,
40  SDValue Src1, SDValue Src2, SDValue Size,
41  MachinePointerInfo Op1PtrInfo,
42  MachinePointerInfo Op2PtrInfo) const override;
43 
44  std::pair<SDValue, SDValue>
45  EmitTargetCodeForMemchr(SelectionDAG &DAG, const SDLoc &DL, SDValue Chain,
46  SDValue Src, SDValue Char, SDValue Length,
47  MachinePointerInfo SrcPtrInfo) const override;
48 
49  std::pair<SDValue, SDValue> EmitTargetCodeForStrcpy(
50  SelectionDAG &DAG, const SDLoc &DL, SDValue Chain, SDValue Dest,
51  SDValue Src, MachinePointerInfo DestPtrInfo,
52  MachinePointerInfo SrcPtrInfo, bool isStpcpy) const override;
53 
54  std::pair<SDValue, SDValue>
55  EmitTargetCodeForStrcmp(SelectionDAG &DAG, const SDLoc &DL, SDValue Chain,
56  SDValue Src1, SDValue Src2,
57  MachinePointerInfo Op1PtrInfo,
58  MachinePointerInfo Op2PtrInfo) const override;
59 
60  std::pair<SDValue, SDValue>
61  EmitTargetCodeForStrlen(SelectionDAG &DAG, const SDLoc &DL, SDValue Chain,
62  SDValue Src,
63  MachinePointerInfo SrcPtrInfo) const override;
64 
65  std::pair<SDValue, SDValue>
66  EmitTargetCodeForStrnlen(SelectionDAG &DAG, const SDLoc &DL, SDValue Chain,
67  SDValue Src, SDValue MaxLength,
68  MachinePointerInfo SrcPtrInfo) const override;
69 };
70 
71 } // end namespace llvm
72 
73 #endif
constexpr char Align[]
Key for Kernel::Arg::Metadata::mAlign.
This class represents lattice values for constants.
Definition: AllocatorList.h:23
constexpr char IsVolatile[]
Key for Kernel::Arg::Metadata::mIsVolatile.
std::pair< SDValue, SDValue > EmitTargetCodeForMemchr(SelectionDAG &DAG, const SDLoc &DL, SDValue Chain, SDValue Src, SDValue Char, SDValue Length, MachinePointerInfo SrcPtrInfo) const override
Emit target-specific code that performs a memchr, in cases where that is faster than a libcall...
SDValue EmitTargetCodeForMemset(SelectionDAG &DAG, const SDLoc &DL, SDValue Chain, SDValue Dst, SDValue Byte, SDValue Size, unsigned Align, bool IsVolatile, MachinePointerInfo DstPtrInfo) const override
Emit target-specific code that performs a memset.
std::pair< SDValue, SDValue > EmitTargetCodeForMemcmp(SelectionDAG &DAG, const SDLoc &DL, SDValue Chain, SDValue Src1, SDValue Src2, SDValue Size, MachinePointerInfo Op1PtrInfo, MachinePointerInfo Op2PtrInfo) const override
Emit target-specific code that performs a memcmp, in cases where that is faster than a libcall...
SDValue EmitTargetCodeForMemcpy(SelectionDAG &DAG, const SDLoc &DL, SDValue Chain, SDValue Dst, SDValue Src, SDValue Size, unsigned Align, bool IsVolatile, bool AlwaysInline, MachinePointerInfo DstPtrInfo, MachinePointerInfo SrcPtrInfo) const override
Emit target-specific code that performs a memcpy.
Targets can subclass this to parameterize the SelectionDAG lowering and instruction selection process...
This class contains a discriminated union of information about pointers in memory operands...
This is used to represent a portion of an LLVM function in a low-level Data Dependence DAG representa...
Definition: SelectionDAG.h:221
std::pair< SDValue, SDValue > EmitTargetCodeForStrcmp(SelectionDAG &DAG, const SDLoc &DL, SDValue Chain, SDValue Src1, SDValue Src2, MachinePointerInfo Op1PtrInfo, MachinePointerInfo Op2PtrInfo) const override
Emit target-specific code that performs a strcmp, in cases where that is faster than a libcall...
Wrapper class for IR location info (IR ordering and DebugLoc) to be passed into SDNode creation funct...
uint32_t Size
Definition: Profile.cpp:46
std::pair< SDValue, SDValue > EmitTargetCodeForStrnlen(SelectionDAG &DAG, const SDLoc &DL, SDValue Chain, SDValue Src, SDValue MaxLength, MachinePointerInfo SrcPtrInfo) const override
std::pair< SDValue, SDValue > EmitTargetCodeForStrcpy(SelectionDAG &DAG, const SDLoc &DL, SDValue Chain, SDValue Dest, SDValue Src, MachinePointerInfo DestPtrInfo, MachinePointerInfo SrcPtrInfo, bool isStpcpy) const override
Emit target-specific code that performs a strcpy or stpcpy, in cases where that is faster than a libc...
std::pair< SDValue, SDValue > EmitTargetCodeForStrlen(SelectionDAG &DAG, const SDLoc &DL, SDValue Chain, SDValue Src, MachinePointerInfo SrcPtrInfo) const override
Unlike LLVM values, Selection DAG nodes may return multiple values as the result of a computation...