Skip to content

Commit d8d4d6d

Browse files
smilczekigcbot
authored andcommitted
Minor fixes and refactors
This commit aims to make minor refactors throughout the codebase to help with code maintenance.
1 parent 3afd57f commit d8d4d6d

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

visa/SpillManagerGMRF.h

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ class SpillManagerGRF {
601601
unsigned latestImplicitVarIdCount_;
602602
const LivenessAnalysis *lvInfo_;
603603
const LiveRangeVec *lrInfo_;
604-
const LR_LIST *spilledLRs_;
604+
const LR_LIST *spilledLRs_ = nullptr;
605605
LSLR_LIST *spilledLSLRs_;
606606
unsigned spillRangeCount_ = 0;
607607
unsigned fillRangeCount_ = 0;
@@ -615,21 +615,20 @@ class SpillManagerGRF {
615615
bool doSpillSpaceCompression;
616616

617617
bool failSafeSpill_;
618-
unsigned spillRegStart_;
619-
unsigned indrSpillRegStart_;
620-
unsigned spillRegOffset_;
618+
unsigned spillRegStart_ = 0;
619+
unsigned indrSpillRegStart_ = 0;
620+
unsigned spillRegOffset_ = 0;
621621
LSLR_LIST activeLR_;
622622
std::unordered_set<G4_DstRegRegion *> noRMWNeeded;
623623

624-
const Interference *spillIntf_;
624+
const Interference *spillIntf_ = nullptr;
625625

626626
// CISA instruction id of current instruction
627627
G4_INST *curInst;
628628

629629
int globalScratchOffset;
630630

631631
const bool useScratchMsg_;
632-
bool avoidDstSrcOverlap_;
633632
// spilled declares that represent a scalar immediate (created due to encoding
634633
// restrictions) We rematerialize the immediate value instead of spill/fill
635634
// them. Map stores type used on dst that defined the immediate.

visa/iga/IGALibrary/Backend/Messages/MessageDecoder.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,11 +229,11 @@ struct MessageDecoder {
229229
///////////////////////////////////////////////////////////////////////////
230230
// the most generic setter
231231
void
232-
setScatterGatherOpX(std::string msgSym, std::string msgImpl, SendOp op,
233-
AddrType addrType, SendDesc surfaceId, CacheOpt l1,
234-
CacheOpt l3, int addrSize, int bitsPerElemReg,
232+
setScatterGatherOpX(const std::string& msgSym, const std::string& msgImpl, const SendOp& op,
233+
const AddrType& addrType, const SendDesc& surfaceId, const CacheOpt& l1,
234+
const CacheOpt& l3, int addrSize, int bitsPerElemReg,
235235
int bitsPerElemMem, int elemsPerAddr, int simd,
236-
MessageInfo::Attr extraAttrs = MessageInfo::Attr::NONE) {
236+
const MessageInfo::Attr& extraAttrs = MessageInfo::Attr::NONE) {
237237
MessageInfo &mi = result.info;
238238
mi.symbol = msgSym;
239239
mi.description = msgImpl;

visa/iga/IGALibrary/Backend/Native/Field.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ static inline bool IsDst(OpIx IX) {
278278
}
279279
static inline int ToSrcIndex(OpIx IX) {
280280
IGA_ASSERT(!IsDst(IX), "ToSrcIndex(OpIx) on dst index");
281-
return ((IX & 0xF0) >> 4) - 1;
281+
return ((IX & 0x30) >> 4) - 1;
282282
}
283283
static inline int ToFieldOperandArrayIndex(OpIx IX) {
284284
return (IX & OpIx::OP_IX_MASK);

0 commit comments

Comments
 (0)