This is an archive of the discontinued LLVM Phabricator instance.

[Msan, NewPM] Reduce size of msan binaries
ClosedPublic

Authored by vitalybuka on Feb 10 2021, 4:02 AM.

Details

Summary

EarlyCSEPass called after msan redices code size by about 10%.
Similar optimization exists for legacy pass manager in
addGeneralOptsForMemorySanitizer.

Diff Detail

Event Timeline

vitalybuka requested review of this revision.Feb 10 2021, 4:02 AM
vitalybuka created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 10 2021, 4:02 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
eugenis accepted this revision.Feb 11 2021, 1:37 PM

LGTM, please add a TODO for more passes

clang/lib/CodeGen/BackendUtil.cpp
1336

I did not know that MSan does not add the extra optimization passes in the new pass manager (see addGeneralOptsForMemorySanitizer). If I remember correctly, it used to give ~10% or more speedup on spec2006.

This revision is now accepted and ready to land.Feb 11 2021, 1:37 PM
This revision was landed with ongoing or failed builds.Feb 11 2021, 4:07 PM
This revision was automatically updated to reflect the committed changes.