Skip to content

Conversation

@rastogishubham
Copy link

@rastogishubham rastogishubham commented Sep 21, 2022

Relocation Addends are stored as DW_FORM_addr in a compile unit, we pay a cost when storing relocation addends in the form of storing the offset and the size of the addend as well. We can reduce the cost of these addends by simply storing all DW_FORM_addr's in the DebugInfoDistinctDataRef instead of storing the addends.

@rastogishubham rastogishubham force-pushed the FormAddrMove branch 2 times, most recently from 937fd50 to 3083971 Compare October 3, 2022 16:56
@rastogishubham rastogishubham changed the title Move DW_FORM_addr to the FixupsRef and do not zero out and copy addends for debug info section Move DW_FORM_addr to the DebugInfoDistinctDataRef and do not zero out and copy addends for debug info section Oct 3, 2022
@rastogishubham
Copy link
Author

@swift-ci please test

@rastogishubham
Copy link
Author

@swift-ci please test

// unresolved, this is done to improve deduplication with MCCAS. The fixup
// will be applied later when the object file is being written out.
if (!IsResolved) {
if (!IsResolved && Fragment->getParent()->getName() != "__debug_info") {

Choose a reason for hiding this comment

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

Since this is non-MachO-specific code, we need to do something more generic than check fort the Mach-O section name here.

Copy link
Author

Choose a reason for hiding this comment

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

I thought the CAS was only supported for MachO, we do not want to zero out the addends for a MachO debug info section right?

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.

2 participants