-
Notifications
You must be signed in to change notification settings - Fork 12k
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] Deduplicate equal offsets in BAT #76905
[BOLT] Deduplicate equal offsets in BAT #76905
Conversation
Created using spr 1.3.4 [skip ci]
Created using spr 1.3.4
✅ With the latest revision this PR passed the C/C++ code formatter. |
Created using spr 1.3.4 [skip ci]
Created using spr 1.3.4
Created using spr 1.3.4 [skip ci]
Created using spr 1.3.4 [skip ci]
Created using spr 1.3.4 [skip ci]
Created using spr 1.3.4 [skip ci]
Created using spr 1.3.4
Created using spr 1.3.4 [skip ci]
Created using spr 1.3.4
} | ||
if (BEBitMask) | ||
delete BEBitMask; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make this automatically memory managed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. I can keep APInt uninitialized if it's not used.
if (OutputOffset == InputOffset) | ||
++EqualOffsets; | ||
else | ||
break; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to stop here at the first offset that's different?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's by design. The idea is that if OutputOffset==InputOffset, only emit one of them. It's expected that if offsets start to diverge at some point, they're not reconverging.
Created using spr 1.3.4 [skip ci]
Created using spr 1.3.4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG
Encode BRANCHENTRY bits as bitmask for deduplicated entries.
Reduces BAT section size:
Test Plan: Updated bolt/test/X86/bolt-address-translation.test