This is an archive of the discontinued LLVM Phabricator instance.

[BOLT] Remove old layout from function layout
ClosedPublic

Authored by FPar on Aug 8 2022, 10:13 AM.

Details

Summary

To track whether a function's new layout is different from its old
layout when updating it, the old layout would be kept around in memory
indefinitely (if the new layout is different). This was used only for
debugging/logging purposes. This patch forces the caller of function
layout's update method to copy the old layout into a temporary if they
need it by removing the old layout fields.

Diff Detail

Event Timeline

FPar created this revision.Aug 8 2022, 10:13 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 8 2022, 10:13 AM
Herald added a subscriber: ayermolo. · View Herald Transcript
FPar requested review of this revision.Aug 8 2022, 10:13 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 8 2022, 10:13 AM
FPar updated this revision to Diff 450861.Aug 8 2022, 10:17 AM

clang-format

FPar updated this revision to Diff 453106.Aug 16 2022, 1:06 PM

Cleanup

rafauler accepted this revision.Aug 16 2022, 3:00 PM

Nice cleanup, thanks! LGTM

This revision is now accepted and ready to land.Aug 16 2022, 3:00 PM

Because this diff involves reduction in RSS, you might want to measure that to claim reduced memory footprint wins.

FPar added a comment.Aug 17 2022, 10:19 AM

Because this diff involves reduction in RSS, you might want to measure that to claim reduced memory footprint wins.

It does not have to seem any impact on max RSS.

This revision was automatically updated to reflect the committed changes.