@@ -54,12 +54,10 @@ namespace IGC {
54
54
// Copy Ctor
55
55
CVariable (const CVariable& V)
56
56
{
57
- // the only differences
58
- m_alias = nullptr ;
59
- m_aliasOffset = 0 ;
60
- // everything else is the same
61
57
m_immediateValue = V.m_immediateValue ;
58
+ m_alias = nullptr ;
62
59
m_nbElement = V.m_nbElement ;
60
+ m_aliasOffset = 0 ;
63
61
m_numberOfInstance = V.m_numberOfInstance ;
64
62
m_type = V.m_type ;
65
63
m_varType = V.m_varType ;
@@ -70,11 +68,10 @@ namespace IGC {
70
68
m_uniformVector = V.m_uniformVector ;
71
69
m_undef = V.m_undef ;
72
70
m_isUnpacked = V.m_isUnpacked ;
73
- visaGenVariable[0 ] = V.visaGenVariable [0 ];
74
- visaGenVariable[1 ] = V.visaGenVariable [1 ];
75
71
}
76
72
77
- e_alignment GetAlign () const {
73
+ e_alignment GetAlign () const
74
+ {
78
75
assert (!m_isImmediate && " Calling GetAlign() on an immediate returns undefined result" );
79
76
return m_align;
80
77
}
@@ -83,9 +80,9 @@ namespace IGC {
83
80
uint16_t GetNumberElement () const { return m_nbElement; }
84
81
bool IsUniform () const { return m_uniform; }
85
82
86
- uint GetSize () const { return m_nbElement * CEncoder::GetCISADataTypeSize (m_type); }
83
+ uint GetSize () { return m_nbElement * CEncoder::GetCISADataTypeSize (m_type); }
87
84
88
- uint GetElemSize () const { return CEncoder::GetCISADataTypeSize (m_type); }
85
+ uint GetElemSize () { return CEncoder::GetCISADataTypeSize (m_type); }
89
86
CVariable* GetAlias () { return m_alias; }
90
87
uint16_t GetAliasOffset () const { return m_aliasOffset; }
91
88
VISA_Type GetType () const { return m_type; }
@@ -103,19 +100,20 @@ namespace IGC {
103
100
bool IsVectorUniform () const { return m_uniformVector; }
104
101
uint8_t GetNumberInstance () const { return m_numberOfInstance; }
105
102
bool IsUndef () const { return m_undef; }
106
- bool IsGRFAligned (e_alignment requiredAlign = EALIGN_GRF) const {
103
+ bool IsGRFAligned (e_alignment requiredAlign = EALIGN_GRF) const
104
+ {
107
105
e_alignment align = GetAlign ();
108
106
if (requiredAlign == EALIGN_GRF)
109
107
return align == EALIGN_GRF || align == EALIGN_2GRF;
110
108
return align == requiredAlign;
111
109
}
112
110
113
111
void setisUnpacked () { m_isUnpacked = true ; }
114
- bool isUnpacked () const { return m_isUnpacked; }
115
- uint8_t getOffsetMultiplier () const { return (m_isUnpacked) ? 2 : 1 ; }
112
+ bool isUnpacked () { return m_isUnpacked; }
113
+ uint8_t getOffsetMultiplier () { return (m_isUnpacked) ? 2 : 1 ; }
116
114
void ResolveAlias ();
117
115
118
- // two pointers wide
116
+ // 4 bytes
119
117
union {
120
118
VISA_GenVar* visaGenVariable[2 ];
121
119
VISA_SurfaceVar* visaSurfVariable;
@@ -148,7 +146,7 @@ namespace IGC {
148
146
// 8 bytes
149
147
uint64_t m_immediateValue;
150
148
151
- // 4 or 8 sizeof pointer
149
+ // 4 bytes - pointer
152
150
CVariable* m_alias;
153
151
154
152
// 2 bytes types
0 commit comments