Skip to content

[BOLT] Fix comparison function for Linux ORC entries #79921

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

Merged
merged 1 commit into from
Jan 30, 2024

Conversation

maksfb
Copy link
Contributor

@maksfb maksfb commented Jan 30, 2024

Fix ORC entry comparison function to cover a case with multiple terminator entries matching at the same IP.

Fix ORC entry comparison function to cover a case with multiple
terminator entries matching at the same IP.
@maksfb maksfb added the BOLT label Jan 30, 2024
@maksfb maksfb requested a review from aaupov January 30, 2024 00:46
@@ -95,7 +95,7 @@ class LinuxKernelRewriter final : public MetadataRewriter {
return 1;
if (IP > Other.IP)
return 0;
return ORC == NullORC;
return ORC == NullORC && Other.ORC != NullORC;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it important to have an ordering for NullORC entries? Should we order NullORC entries by some sequential id?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No need, they are all the same.

@maksfb maksfb merged commit 0fc791c into llvm:main Jan 30, 2024
@maksfb maksfb deleted the gh-fix-orc branch February 1, 2024 01:00
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.

2 participants