@@ -54,12 +54,10 @@ namespace IGC {
5454 // Copy Ctor
5555 CVariable (const CVariable& V)
5656 {
57- // the only differences
58- m_alias = nullptr ;
59- m_aliasOffset = 0 ;
60- // everything else is the same
6157 m_immediateValue = V.m_immediateValue ;
58+ m_alias = nullptr ;
6259 m_nbElement = V.m_nbElement ;
60+ m_aliasOffset = 0 ;
6361 m_numberOfInstance = V.m_numberOfInstance ;
6462 m_type = V.m_type ;
6563 m_varType = V.m_varType ;
@@ -70,11 +68,10 @@ namespace IGC {
7068 m_uniformVector = V.m_uniformVector ;
7169 m_undef = V.m_undef ;
7270 m_isUnpacked = V.m_isUnpacked ;
73- visaGenVariable[0 ] = V.visaGenVariable [0 ];
74- visaGenVariable[1 ] = V.visaGenVariable [1 ];
7571 }
7672
77- e_alignment GetAlign () const {
73+ e_alignment GetAlign () const
74+ {
7875 assert (!m_isImmediate && " Calling GetAlign() on an immediate returns undefined result" );
7976 return m_align;
8077 }
@@ -83,9 +80,9 @@ namespace IGC {
8380 uint16_t GetNumberElement () const { return m_nbElement; }
8481 bool IsUniform () const { return m_uniform; }
8582
86- uint GetSize () const { return m_nbElement * CEncoder::GetCISADataTypeSize (m_type); }
83+ uint GetSize () { return m_nbElement * CEncoder::GetCISADataTypeSize (m_type); }
8784
88- uint GetElemSize () const { return CEncoder::GetCISADataTypeSize (m_type); }
85+ uint GetElemSize () { return CEncoder::GetCISADataTypeSize (m_type); }
8986 CVariable* GetAlias () { return m_alias; }
9087 uint16_t GetAliasOffset () const { return m_aliasOffset; }
9188 VISA_Type GetType () const { return m_type; }
@@ -103,19 +100,20 @@ namespace IGC {
103100 bool IsVectorUniform () const { return m_uniformVector; }
104101 uint8_t GetNumberInstance () const { return m_numberOfInstance; }
105102 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+ {
107105 e_alignment align = GetAlign ();
108106 if (requiredAlign == EALIGN_GRF)
109107 return align == EALIGN_GRF || align == EALIGN_2GRF;
110108 return align == requiredAlign;
111109 }
112110
113111 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 ; }
116114 void ResolveAlias ();
117115
118- // two pointers wide
116+ // 4 bytes
119117 union {
120118 VISA_GenVar* visaGenVariable[2 ];
121119 VISA_SurfaceVar* visaSurfVariable;
@@ -148,7 +146,7 @@ namespace IGC {
148146 // 8 bytes
149147 uint64_t m_immediateValue;
150148
151- // 4 or 8 sizeof pointer
149+ // 4 bytes - pointer
152150 CVariable* m_alias;
153151
154152 // 2 bytes types
0 commit comments