LLVM 22.0.0git
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#define GET_SDNODE_ENUM
19#include "SystemZGenSDNodeInfo.inc"
20
21namespace llvm {
22namespace SystemZISD {
23
24enum NodeType : unsigned {
25 // Set the condition code from a boolean value in operand 0.
26 // Operand 1 is a mask of all condition-code values that may result of this
27 // operation, operand 2 is a mask of condition-code values that may result
28 // if the boolean is true.
29 // Note that this operation is always optimized away, we will never
30 // generate any code for it.
31 GET_CCMASK = GENERATED_OPCODE_END,
32};
33
34// Return true if OPCODE is some kind of PC-relative address.
35inline bool isPCREL(unsigned Opcode) {
36 return Opcode == PCREL_WRAPPER || Opcode == PCREL_OFFSET;
37}
38
39} // namespace SystemZISD
40
42public:
44
45 const char *getTargetNodeName(unsigned Opcode) const override;
46
48 SDValue Chain, SDValue Dst, SDValue Src,
49 SDValue Size, Align Alignment,
50 bool IsVolatile, bool AlwaysInline,
51 MachinePointerInfo DstPtrInfo,
52 MachinePointerInfo SrcPtrInfo) const override;
53
55 SDValue Chain, SDValue Dst, SDValue Byte,
56 SDValue Size, Align Alignment,
57 bool IsVolatile, bool AlwaysInline,
58 MachinePointerInfo DstPtrInfo) const override;
59
60 std::pair<SDValue, SDValue>
62 SDValue Src1, SDValue Src2, SDValue Size,
63 const CallInst *CI) const override;
64
65 std::pair<SDValue, SDValue>
67 SDValue Src, SDValue Char, SDValue Length,
68 MachinePointerInfo SrcPtrInfo) const override;
69
70 std::pair<SDValue, SDValue> EmitTargetCodeForStrcpy(
71 SelectionDAG &DAG, const SDLoc &DL, SDValue Chain, SDValue Dest,
72 SDValue Src, MachinePointerInfo DestPtrInfo,
73 MachinePointerInfo SrcPtrInfo, bool isStpcpy) const override;
74
75 std::pair<SDValue, SDValue>
77 SDValue Src1, SDValue Src2,
78 MachinePointerInfo Op1PtrInfo,
79 MachinePointerInfo Op2PtrInfo) const override;
80
81 std::pair<SDValue, SDValue>
83 SDValue Src, const CallInst *CI) const override;
84
85 std::pair<SDValue, SDValue>
87 SDValue Src, SDValue MaxLength,
88 MachinePointerInfo SrcPtrInfo) const override;
89};
90
91} // end namespace llvm
92
93#endif
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
This class represents a function call, abstracting a target machine's calling convention.
Wrapper class for IR location info (IR ordering and DebugLoc) to be passed into SDNode creation funct...
Unlike LLVM values, Selection DAG nodes may return multiple values as the result of a computation.
SelectionDAGGenTargetInfo(const SDNodeInfo &GenNodeInfo)
This is used to represent a portion of an LLVM function in a low-level Data Dependence DAG representa...
const char * getTargetNodeName(unsigned Opcode) const override
Returns the name of the given target-specific opcode, suitable for debug printing.
SDValue EmitTargetCodeForMemset(SelectionDAG &DAG, const SDLoc &DL, SDValue Chain, SDValue Dst, SDValue Byte, SDValue Size, Align Alignment, bool IsVolatile, bool AlwaysInline, MachinePointerInfo DstPtrInfo) const override
Emit target-specific code that performs a memset.
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.
std::pair< SDValue, SDValue > EmitTargetCodeForMemcmp(SelectionDAG &DAG, const SDLoc &DL, SDValue Chain, SDValue Src1, SDValue Src2, SDValue Size, const CallInst *CI) const override
Emit target-specific code that performs a memcmp/bcmp, in cases where that is faster than a libcall.
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.
std::pair< SDValue, SDValue > EmitTargetCodeForStrnlen(SelectionDAG &DAG, const SDLoc &DL, SDValue Chain, SDValue Src, SDValue MaxLength, MachinePointerInfo SrcPtrInfo) const override
std::pair< SDValue, SDValue > EmitTargetCodeForStrlen(SelectionDAG &DAG, const SDLoc &DL, SDValue Chain, SDValue Src, const CallInst *CI) 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...
SDValue EmitTargetCodeForMemcpy(SelectionDAG &DAG, const SDLoc &DL, SDValue Chain, SDValue Dst, SDValue Src, SDValue Size, Align Alignment, bool IsVolatile, bool AlwaysInline, MachinePointerInfo DstPtrInfo, MachinePointerInfo SrcPtrInfo) const override
Emit target-specific code that performs a memcpy.
bool isPCREL(unsigned Opcode)
This is an optimization pass for GlobalISel generic memory operations.
@ Length
Definition DWP.cpp:532
This struct is a compact representation of a valid (non-zero power of two) alignment.
Definition Alignment.h:39
This class contains a discriminated union of information about pointers in memory operands,...