Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BOLT][DWARF] Fix out of order rangelists/loclists #81645

Merged
merged 1 commit into from
Feb 14, 2024

Conversation

ayermolo
Copy link
Contributor

@ayermolo ayermolo commented Feb 13, 2024

GCC can generate rangelists/loclists that are out of order. Fixed so that we don't assert, and instead generate partially optimized list. Through most code paths we do sort rnglists/loclists, but not for loclist for a path where BOLT does not modify a function. Although it's nice to have lists sorted, this implementation shouldn't rely on it.
This also fixes an issue if we partially capture a list we would write out *end_of_list in helper function. So tools won't see the rest of the addresses being written out.

GCC can generate rangelists/loclists that are out of order. Fixed so that we
don't assert, and instead generate partially optimized list.
Copy link
Member

@dcci dcci left a comment

Choose a reason for hiding this comment

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

Should we file a bug to GCC so that they can always generate something that's ordered?

@dcci
Copy link
Member

dcci commented Feb 14, 2024

Should we file a bug to GCC so that they can always generate something that's ordered?

Nevermind, this is not technically a bug.

@ayermolo ayermolo merged commit c9e8e91 into llvm:main Feb 14, 2024
8 checks passed
@ayermolo ayermolo deleted the outOfOrder2 branch February 14, 2024 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants