LLVM: lib/Target/VE/VECustomDAG.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14#ifndef LLVM_LIB_TARGET_VE_VECUSTOMDAG_H
15#define LLVM_LIB_TARGET_VE_VECUSTOMDAG_H
16
17#include "VE.h"
21
22namespace llvm {
23
24std::optional getVVPOpcode(unsigned Opcode);
25
29
31
33
35
37
39
41
43
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74std::optional getAVLPos(unsigned);
75
76
78
79
81
82
83std::optional getMaskPos(unsigned);
84
86
87
88
90
91
92
93
94
96
98
100
102
104
106
108
110
112
113
114
116
117
118
123
124
126
127
129
134
141
145
146public:
148
150
152
154
155
157 std::optional Flags = std::nullopt) const {
158 auto N = DAG.getNode(OC, DL, VTL, OpV);
159 if (Flags)
160 N->setFlags(*Flags);
161 return N;
162 }
163
165 std::optional Flags = std::nullopt) const {
166 auto N = DAG.getNode(OC, DL, ResVT, OpV);
167 if (Flags)
168 N->setFlags(*Flags);
169 return N;
170 }
171
173 std::optional Flags = std::nullopt) const {
174 auto N = DAG.getNode(OC, DL, ResVT, OpV);
175 if (Flags)
176 N->setFlags(*Flags);
177 return N;
178 }
179
181
182
183
187
188
189
192
193
195 return DAG.getMergeValues(Values, DL);
196 }
197
199 bool IsOpaque = false) const;
200
204
205
209
210
219};
220
221}
222
223#endif
This file describes how to lower LLVM code to machine code.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Wrapper class for IR location info (IR ordering and DebugLoc) to be passed into SDNode creation funct...
Represents one node in the SelectionDAG.
Unlike LLVM values, Selection DAG nodes may return multiple values as the result of a computation.
This is used to represent a portion of an LLVM function in a low-level Data Dependence DAG representa...
Definition VECustomDAG.h:142
SDValue getSplitPtrOffset(SDValue Ptr, SDValue ByteStride, PackElem Part) const
SDValue getNode(unsigned OC, ArrayRef< EVT > ResVT, ArrayRef< SDValue > OpV, std::optional< SDNodeFlags > Flags=std::nullopt) const
Definition VECustomDAG.h:164
VECustomDAG(SelectionDAG &DAG, SDValue WhereOp)
Definition VECustomDAG.h:151
SDValue getMergeValues(ArrayRef< SDValue > Values) const
} Packing
Definition VECustomDAG.h:194
SDValue getBroadcast(EVT ResultVT, SDValue Scalar, SDValue AVL) const
SDValue getConstantMask(Packing Packing, bool AllTrue) const
VECustomDAG(SelectionDAG &DAG, SDLoc DL)
Definition VECustomDAG.h:149
SDValue getGatherScatterAddress(SDValue BasePtr, SDValue Scale, SDValue Index, SDValue Mask, SDValue AVL) const
SDValue getMaskBroadcast(EVT ResultVT, SDValue Scalar, SDValue AVL) const
SDValue getLegalReductionOpVVP(unsigned VVPOpcode, EVT ResVT, SDValue StartV, SDValue VectorV, SDValue Mask, SDValue AVL, SDNodeFlags Flags) const
} getNode
SDValue getNode(unsigned OC, SDVTList VTL, ArrayRef< SDValue > OpV, std::optional< SDNodeFlags > Flags=std::nullopt) const
getNode {
Definition VECustomDAG.h:156
VECustomDAG(SelectionDAG &DAG, const SDNode *WhereN)
Definition VECustomDAG.h:153
SDValue annotateLegalAVL(SDValue AVL) const
SDValue getUnpack(EVT DestVT, SDValue Vec, PackElem Part, SDValue AVL) const
} Legalizing getNode
SDValue getUNDEF(EVT VT) const
Definition VECustomDAG.h:180
SelectionDAG * getDAG() const
Definition VECustomDAG.h:147
SDValue getPack(EVT DestVT, SDValue LoVec, SDValue HiVec, SDValue AVL) const
EVT getVectorVT(EVT ElemVT, unsigned NumElems) const
Definition VECustomDAG.h:216
SDValue getConstant(uint64_t Val, EVT VT, bool IsTarget=false, bool IsOpaque=false) const
SDValue getSplitPtrStride(SDValue PackStride) const
VETargetMasks getTargetSplitMask(SDValue RawMask, SDValue RawAVL, PackElem Part) const
SDValue getNode(unsigned OC, EVT ResVT, ArrayRef< SDValue > OpV, std::optional< SDNodeFlags > Flags=std::nullopt) const
Definition VECustomDAG.h:172
This is an optimization pass for GlobalISel generic memory operations.
bool isVVPReductionOp(unsigned Opcode)
bool isPackedVectorType(EVT SomeVT)
bool supportsPackedMode(unsigned Opcode, EVT IdiomVT)
std::optional< int > getAVLPos(unsigned Opc)
The VE backend uses a two-staged process to lower and legalize vector instructions:
SDValue getGatherScatterScale(SDValue Op)
SDValue getStoredValue(SDValue Op)
bool isVVPBinaryOp(unsigned VVPOpcode)
std::optional< EVT > getIdiomaticVectorType(SDNode *Op)
} AVL Functions
SDValue getNodeChain(SDValue Op)
Node Properties {.
Packing
} Node Properties
Definition VECustomDAG.h:119
@ Normal
Definition VECustomDAG.h:120
@ Dense
Definition VECustomDAG.h:121
bool isMaskArithmetic(SDValue Op)
SDValue getNodeAVL(SDValue Op)
} Node Properties
bool isMaskType(EVT SomeVT)
bool isLegalAVL(SDValue AVL)
MVT splitVectorType(MVT VT)
SDValue getNodePassthru(SDValue Op)
PackElem
Definition VECustomDAG.h:130
@ Hi
Definition VECustomDAG.h:132
@ Lo
Definition VECustomDAG.h:131
bool maySafelyIgnoreMask(SDValue Op)
bool isVVPOrVEC(unsigned Opcode)
MVT getLegalVectorType(Packing P, MVT ElemVT)
SDValue getMemoryPtr(SDValue Op)
std::optional< int > getMaskPos(unsigned Opc)
bool isPackingSupportOpcode(unsigned Opc)
std::pair< SDValue, bool > getAnnotatedNodeAVL(SDValue Op)
DWARFExpression::Operation Op
bool hasReductionStartParam(unsigned OPC)
SDValue getGatherScatterIndex(SDValue Op)
Packing getTypePacking(EVT VT)
unsigned getScalarReductionOpcode(unsigned VVPOC, bool IsMask)
std::optional< unsigned > getVVPOpcode(unsigned Opcode)
bool isVVPUnaryOp(unsigned VVPOpcode)
SDValue getNodeMask(SDValue Op)
SDValue getLoadStoreStride(SDValue Op, VECustomDAG &CDAG)
static EVT getVectorVT(LLVMContext &Context, EVT VT, unsigned NumElements, bool IsScalable=false)
Returns the EVT that represents a vector NumElements in length, where each element is of type VT.
These are IR-level optimization flags that may be propagated to SDNodes.
This represents a list of ValueType's that has been intern'd by a SelectionDAG.
Definition VECustomDAG.h:135
SDValue AVL
Definition VECustomDAG.h:137
VETargetMasks(SDValue Mask=SDValue(), SDValue AVL=SDValue())
Definition VECustomDAG.h:138
SDValue Mask
Definition VECustomDAG.h:136