This is an archive of the discontinued LLVM Phabricator instance.

[Assignment Tracking] Initialise maps with exact required number of entries
ClosedPublic

Authored by Orlando on Feb 21 2023, 7:09 AM.

Details

Summary

The required size is known - the Join map in both cases gets an entry for each variable from both input maps (union). This avoids the unnecessary cost of repeatedly growing the map.

This improves ReleaseLTO-g compile time for CTMark projects by an average of around 0.2%.

Diff Detail

Unit TestsFailed

Event Timeline

Orlando created this revision.Feb 21 2023, 7:09 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 21 2023, 7:09 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
Orlando requested review of this revision.Feb 21 2023, 7:09 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 21 2023, 7:09 AM
scott.linder accepted this revision.Feb 21 2023, 10:28 AM
This revision is now accepted and ready to land.Feb 21 2023, 10:28 AM

Thanks!

I made a mistake saying the exact size is known. This is actually the lower bound of the Join map size, since it is possible that the maps _both_ contain unique variables. I'll update the summary and description before landing.

This revision was landed with ongoing or failed builds.Feb 22 2023, 11:44 PM
This revision was automatically updated to reflect the committed changes.