@@ -21,7 +21,7 @@ class ZeroDefaultingView : public MaskView {
21
21
ElemSelect ZeroInsert;
22
22
23
23
public:
24
- ZeroDefaultingView (MaskView &BaseMV, CustomDAG &CDAG)
24
+ ZeroDefaultingView (MaskView &BaseMV, VECustomDAG &CDAG)
25
25
: BaseMV(BaseMV), ConstZeroV(CDAG.getConstant(0 , MVT::i32 )),
26
26
ZeroInsert (ConstZeroV) {}
27
27
};
@@ -30,7 +30,7 @@ class ZeroDefaultingView : public MaskView {
30
30
// or vector registers
31
31
class VRegView final : public ZeroDefaultingView {
32
32
public:
33
- VRegView (CustomDAG &CDAG, MaskView &BitMV)
33
+ VRegView (VECustomDAG &CDAG, MaskView &BitMV)
34
34
: ZeroDefaultingView(BitMV, CDAG) {}
35
35
36
36
~VRegView () {}
@@ -74,7 +74,7 @@ class VRegView final : public ZeroDefaultingView {
74
74
75
75
class BitMaskView final : public ZeroDefaultingView {
76
76
public:
77
- BitMaskView (MaskView &BitMV, CustomDAG &CDAG)
77
+ BitMaskView (MaskView &BitMV, VECustomDAG &CDAG)
78
78
: ZeroDefaultingView(BitMV, CDAG) {}
79
79
~BitMaskView () {}
80
80
@@ -231,7 +231,7 @@ static bool AnalyzeReversal(BitMaskView &BitMV, unsigned DestPartBase,
231
231
232
232
// match a 64 bit segment, mapping out all source bits
233
233
// FIXME this implies knowledge about the underlying object structure
234
- MaskShuffleAnalysis::MaskShuffleAnalysis (MaskView &MV, CustomDAG &CDAG)
234
+ MaskShuffleAnalysis::MaskShuffleAnalysis (MaskView &MV, VECustomDAG &CDAG)
235
235
: MV(MV) {
236
236
// This view only reflects insertions of actual i1 bits (from other mask
237
237
// registers, or MVT::i32 constants). Insertion of SX register will be masked out.
@@ -290,7 +290,7 @@ MaskShuffleAnalysis::MaskShuffleAnalysis(MaskView &MV, CustomDAG &CDAG)
290
290
}
291
291
292
292
SDValue MaskShuffleAnalysis::synthesize (SDValue Passthru, BitSelect &BSel,
293
- SDValue SXV, CustomDAG &CDAG) const {
293
+ SDValue SXV, VECustomDAG &CDAG) const {
294
294
const uint64_t AllSetMask = (uint64_t )-1 ;
295
295
296
296
// match full register copies
@@ -353,7 +353,7 @@ bool MaskShuffleAnalysis::analyzeVectorSources(bool &AllTrue) const {
353
353
}
354
354
355
355
// materialize the code to synthesize this operation
356
- SDValue MaskShuffleAnalysis::synthesize (CustomDAG &CDAG, EVT LegalMaskVT) {
356
+ SDValue MaskShuffleAnalysis::synthesize (VECustomDAG &CDAG, EVT LegalMaskVT) {
357
357
Packing PackFlag =
358
358
isPackedType (LegalMaskVT) ? Packing::Dense : Packing::Normal;
359
359
@@ -504,7 +504,7 @@ struct ScalarTransferOp final : public AbstractShuffleOp {
504
504
virtual ~ScalarTransferOp () {}
505
505
506
506
// transfer all insert positions to their destination
507
- virtual SDValue synthesize (MaskView &MV, CustomDAG &CDAG,
507
+ virtual SDValue synthesize (MaskView &MV, VECustomDAG &CDAG,
508
508
SDValue PartialV) override {
509
509
SDValue AccuV = PartialV;
510
510
@@ -584,7 +584,7 @@ struct VMVShuffleOp final : public AbstractShuffleOp {
584
584
unsigned getAVL () const { return DestStartPos + SubVectorLength; }
585
585
586
586
// transfer all insert positions to their destination
587
- SDValue synthesize (MaskView &MV, CustomDAG &CDAG, SDValue PartialV) override {
587
+ SDValue synthesize (MaskView &MV, VECustomDAG &CDAG, SDValue PartialV) override {
588
588
// noop VMV
589
589
if (ShiftAmount == 0 && PartialV->isUndef ())
590
590
return SrcVector;
@@ -737,7 +737,7 @@ struct PatternShuffleOp final : public AbstractShuffleOp {
737
737
}
738
738
739
739
// transfer all insert positions to their destination
740
- SDValue synthesize (MaskView &MV, CustomDAG &CDAG, SDValue PartialV) override {
740
+ SDValue synthesize (MaskView &MV, VECustomDAG &CDAG, SDValue PartialV) override {
741
741
EVT LegalResVT =
742
742
PartialV.getValueType (); // LegalizeVectorType(Op.getValueType(),
743
743
// Op, DAG, Mode);
@@ -902,7 +902,7 @@ struct BroadcastOp final : public AbstractShuffleOp {
902
902
903
903
~BroadcastOp () {}
904
904
905
- SDValue synthesize (MaskView &MV, CustomDAG &CDAG, SDValue PartialV) override {
905
+ SDValue synthesize (MaskView &MV, VECustomDAG &CDAG, SDValue PartialV) override {
906
906
SDValue ScalarSrcV;
907
907
if (SourceElem.isElemInsert ()) {
908
908
ScalarSrcV = SourceElem.V ;
@@ -996,7 +996,7 @@ struct ConstantElemOp final : public AbstractShuffleOp {
996
996
ConstantElemOp (Constant *VecConstant) : VecConstant(VecConstant) {}
997
997
~ConstantElemOp () {}
998
998
999
- SDValue synthesize (MaskView &MV, CustomDAG &CDAG, SDValue PartialV) override {
999
+ SDValue synthesize (MaskView &MV, VECustomDAG &CDAG, SDValue PartialV) override {
1000
1000
EVT LegalResVT = PartialV.getValueType ();
1001
1001
const EVT PtrVT = MVT::i64 ;
1002
1002
// const unsigned LegalNumElems = LegalResVT.getVectorNumElements();
@@ -1113,7 +1113,7 @@ struct GatherShuffleOp final : public AbstractShuffleOp {
1113
1113
1114
1114
~GatherShuffleOp () {}
1115
1115
1116
- SDValue synthesize (MaskView &MV, CustomDAG &CDAG, SDValue PartialV) override {
1116
+ SDValue synthesize (MaskView &MV, VECustomDAG &CDAG, SDValue PartialV) override {
1117
1117
// Spill the requires elements of \p SrcVectorV to the stack
1118
1118
EVT LegalizedSrcVT =
1119
1119
CDAG.legalizeVectorType (SrcVectorV, VVPExpansionMode::ToNextWidth);
@@ -1326,7 +1326,7 @@ raw_ostream &ShuffleAnalysis::print(raw_ostream &out) const {
1326
1326
return out;
1327
1327
}
1328
1328
1329
- SDValue ShuffleAnalysis::synthesize (CustomDAG &CDAG, EVT LegalResultVT) {
1329
+ SDValue ShuffleAnalysis::synthesize (VECustomDAG &CDAG, EVT LegalResultVT) {
1330
1330
LLVM_DEBUG (dbgs () << " Synthesized shuffle sequence:\n " ; print (dbgs ()));
1331
1331
1332
1332
SDValue AccuV = CDAG.getUndef (LegalResultVT);
0 commit comments