@@ -33,9 +33,11 @@ namespace llvm {
33
33
class raw_ostream ;
34
34
class Value ;
35
35
class VPDef ;
36
+ struct VPDoubleValueDef ;
36
37
class VPSlotTracker ;
37
38
class VPUser ;
38
39
class VPRecipeBase ;
40
+ class VPInterleaveRecipe ;
39
41
40
42
// This is the base class of the VPlan Def/Use graph, used for modeling the data
41
43
// flow into, within and out of the VPlan. VPValues can stand for live-ins
@@ -44,12 +46,15 @@ class VPRecipeBase;
44
46
class VPValue {
45
47
friend class VPBuilder ;
46
48
friend class VPDef ;
49
+ friend struct VPDoubleValueDef ;
47
50
friend class VPInstruction ;
51
+ friend class VPInterleaveRecipe ;
48
52
friend struct VPlanTransforms ;
49
53
friend class VPBasicBlock ;
50
54
friend class VPInterleavedAccessInfo ;
51
55
friend class VPSlotTracker ;
52
56
friend class VPRecipeBase ;
57
+ friend class VPlan ;
53
58
54
59
const unsigned char SubclassID; // /< Subclass identifier (for isa/dyn_cast).
55
60
@@ -65,6 +70,13 @@ class VPValue {
65
70
66
71
VPValue (const unsigned char SC, Value *UV = nullptr , VPDef *Def = nullptr );
67
72
73
+ // / Create a live-in VPValue.
74
+ VPValue (Value *UV = nullptr ) : VPValue(VPValueSC, UV, nullptr ) {}
75
+ // / Create a VPValue for a \p Def which is a subclass of VPValue.
76
+ VPValue (VPDef *Def, Value *UV = nullptr ) : VPValue(VPVRecipeSC, UV, Def) {}
77
+ // / Create a VPValue for a \p Def which defines multiple values.
78
+ VPValue (Value *UV, VPDef *Def) : VPValue(VPValueSC, UV, Def) {}
79
+
68
80
// DESIGN PRINCIPLE: Access to the underlying IR must be strictly limited to
69
81
// the front-end and back-end of VPlan so that the middle-end is as
70
82
// independent as possible of the underlying IR. We grant access to the
@@ -84,12 +96,6 @@ class VPValue {
84
96
VPVRecipeSC // / A VPValue sub-class that is a VPRecipeBase.
85
97
};
86
98
87
- // / Create a live-in VPValue.
88
- VPValue (Value *UV = nullptr ) : VPValue(VPValueSC, UV, nullptr ) {}
89
- // / Create a VPValue for a \p Def which is a subclass of VPValue.
90
- VPValue (VPDef *Def, Value *UV = nullptr ) : VPValue(VPVRecipeSC, UV, Def) {}
91
- // / Create a VPValue for a \p Def which defines multiple values.
92
- VPValue (Value *UV, VPDef *Def) : VPValue(VPValueSC, UV, Def) {}
93
99
VPValue (const VPValue &) = delete ;
94
100
VPValue &operator =(const VPValue &) = delete ;
95
101
0 commit comments