Skip to content

Conversation

@mingmingl-llvm
Copy link
Contributor

This is a split of #125756

// Returns true iff any jump table is hot-cold categorized.
bool splitJumpTables(MachineFunction &MF);
void updateStats(bool ProfileAvailable, const MachineJumpTableInfo *MJTI);
void updateJumpTableStats(bool ProfileAvailable,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

document the methods?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

if (ProfileAvailable)
Changed |= partitionStaticDataWithProfiles(MF);

updateStats(ProfileAvailable, MF.getJumpTableInfo());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this be moved up before the partition? With that, an early return can be used when profile is not available.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I revised the change to have updateStatsWithoutProfiles and updateStatsWithProfiles, and moved updateStatsWithoutProfiles up.

@mingmingl-llvm mingmingl-llvm merged commit 5f247e7 into main Feb 5, 2025
8 checks passed
@mingmingl-llvm mingmingl-llvm deleted the users/mingmingl-llvm/spr/refactor branch February 5, 2025 01:49
Icohedron pushed a commit to Icohedron/llvm-project that referenced this pull request Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants