Skip to content

Commit 72cd7c1

Browse files
DianaChenpszymich
authored andcommitted
IGA: Fix Operand initialized list (NFC)
Fix Operand initialized list to avoid -Werror=reorder error (cherry picked from commit 9a6a542)
1 parent 07ec480 commit 72cd7c1

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

visa/iga/IGALibrary/IR/Operand.hpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,17 @@ class Operand {
2727
};
2828

2929
Operand()
30-
: m_kind(Kind::INVALID), m_lblBlock(nullptr), m_type(Type::INVALID),
31-
m_regOpSrcMod(SrcModifier::NONE) {}
30+
: m_regOpSrcMod(SrcModifier::NONE) {}
3231

3332
// direct destination constructor (for constants etc)
3433
Operand(DstModifier dstMod, RegName rType, const RegRef &reg,
35-
const Region::Horz &rgnHz, Type type)
36-
: m_lblBlock(nullptr) {
34+
const Region::Horz &rgnHz, Type type) {
3735
setDirectDestination(dstMod, rType, reg, rgnHz, type);
3836
}
3937

4038
// direct source constructor (for constants etc)
4139
Operand(SrcModifier srcMod, RegName rType, const RegRef &reg,
42-
const Region &rgn, Type type)
43-
: m_lblBlock(nullptr) {
40+
const Region &rgn, Type type) {
4441
setDirectSource(srcMod, rType, reg, rgn, type);
4542
}
4643

@@ -152,7 +149,7 @@ class Operand {
152149
}
153150

154151
private:
155-
Operand::Kind m_kind;
152+
Operand::Kind m_kind = Kind::INVALID;
156153

157154
// direct/indirect register information
158155
union {
@@ -183,7 +180,7 @@ class Operand {
183180
Block *m_lblBlock = nullptr;
184181

185182
// the operand type (e.g. :d, :f, etc...)
186-
Type m_type;
183+
Type m_type = Type::INVALID;
187184

188185
public:
189186
// useful constants (reusable operands to streamline codegen)

0 commit comments

Comments
 (0)