This is an archive of the discontinued LLVM Phabricator instance.

[BOLT][DWARF] Fix handling of GCed CU function
ClosedPublic

Authored by ayermolo on May 31 2023, 3:32 PM.

Details

Summary

A CU can have only one function so CU will have low_pc/high_pc. If this funciton
is GCed by LLD low_pc will become 0x0, and BOLT can't map this to output. We
kind of were getting away with it in monolithic DWARF, but with split DWARF
there is only skeleton CU, so we end up with rnglist with header and array, but
no body. This caused LLDB to report an error.

Diff Detail

Event Timeline

ayermolo created this revision.May 31 2023, 3:32 PM
Herald added a reviewer: Amir. · View Herald Transcript
Herald added a reviewer: maksfb. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
ayermolo requested review of this revision.May 31 2023, 3:32 PM
Herald added a project: Restricted Project. · View Herald Transcript
ayermolo edited the summary of this revision. (Show Details)May 31 2023, 3:32 PM
ayermolo updated this revision to Diff 527216.May 31 2023, 3:34 PM

removed some code that snuck in

ayermolo updated this revision to Diff 527230.May 31 2023, 4:28 PM

fixed tests

maksfb accepted this revision.Jun 1 2023, 11:55 AM
This revision is now accepted and ready to land.Jun 1 2023, 11:55 AM
This revision was automatically updated to reflect the committed changes.