Skip to content

Commit 1bacc51

Browse files
Apply suggestions from code review
Co-authored-by: Ellis Hoag <[email protected]>
1 parent 34b6b9b commit 1bacc51

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

llvm/lib/CodeGen/MachineFunction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1347,7 +1347,7 @@ unsigned MachineJumpTableInfo::createJumpTableIndex(
13471347
void MachineJumpTableInfo::updateJumpTableHotness(size_t JTI,
13481348
DataHotness Hotness) {
13491349
assert(JTI < JumpTables.size() && "Invalid JTI!");
1350-
// Note record the largest hotness is important for mergable data (constant
1350+
// Note: recording the largest hotness is important for mergable data (constant
13511351
// pools). Even if jump table instances are not merged, record the largest
13521352
// value seen fwiw.
13531353
JumpTables[JTI].Hotness = std::max(JumpTables[JTI].Hotness, Hotness);

llvm/lib/CodeGen/StaticDataSplitter.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,7 @@ bool StaticDataSplitter::splitJumpTablesWithProfiles(
9797
if (JTI == -1)
9898
continue;
9999

100-
bool AllBlocksCold = true;
101-
102-
if (!PSI->isColdBlock(&MBB, MBFI))
103-
AllBlocksCold = false;
100+
bool AllBlocksCold = PSI->isColdBlock(&MBB, MBFI);
104101

105102
for (const MachineBasicBlock *MBB : MJTI.getJumpTables()[JTI].MBBs)
106103
if (!PSI->isColdBlock(MBB, MBFI))

0 commit comments

Comments
 (0)