Skip to content

Commit 84e20cb

Browse files
committed
[TableGen] Minor cleanup in CodeGenRegBank::getConcatSubRegIndex. NFC
Mark a variable const. Capitalize a variable name. I'm going to add HwMode support to this code and wanted to clean it up a bit beforehand.
1 parent 2f6b1b4 commit 84e20cb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

llvm/utils/TableGen/CodeGenRegisters.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1400,11 +1400,11 @@ CodeGenSubRegIndex *CodeGenRegBank::getConcatSubRegIndex(
14001400
// None exists, synthesize one.
14011401
std::string Name = Parts.front()->getName();
14021402
// Determine whether all parts are contiguous.
1403-
bool isContinuous = true;
1403+
bool IsContinuous = true;
14041404
unsigned Size = Parts.front()->Size;
14051405
unsigned LastOffset = Parts.front()->Offset;
14061406
unsigned LastSize = Parts.front()->Size;
1407-
unsigned UnknownSize = (uint16_t)-1;
1407+
const unsigned UnknownSize = (uint16_t)-1;
14081408
for (unsigned i = 1, e = Parts.size(); i != e; ++i) {
14091409
Name += '_';
14101410
Name += Parts[i]->getName();
@@ -1413,13 +1413,13 @@ CodeGenSubRegIndex *CodeGenRegBank::getConcatSubRegIndex(
14131413
else
14141414
Size += Parts[i]->Size;
14151415
if (LastSize == UnknownSize || Parts[i]->Offset != (LastOffset + LastSize))
1416-
isContinuous = false;
1416+
IsContinuous = false;
14171417
LastOffset = Parts[i]->Offset;
14181418
LastSize = Parts[i]->Size;
14191419
}
14201420
Idx = createSubRegIndex(Name, Parts.front()->getNamespace());
14211421
Idx->Size = Size;
1422-
Idx->Offset = isContinuous ? Parts.front()->Offset : -1;
1422+
Idx->Offset = IsContinuous ? Parts.front()->Offset : -1;
14231423
Idx->ConcatenationOf.assign(Parts.begin(), Parts.end());
14241424
return Idx;
14251425
}

0 commit comments

Comments
 (0)