This is an archive of the discontinued LLVM Phabricator instance.

Mark PassBuilder::addPass() as minsize
ClosedPublic

Authored by aeubanks on Sep 29 2021, 3:27 PM.

Details

Summary

PassBuilder.cpp is the slowest LLVM file to compile (if only building X86).
This makes PassBuilder.o a little faster to compile and a little smaller
as well.

These methods are not performance critical at all but are instantiated many times.

83M -> 72M instructions according to perf stat.

Diff Detail

Event Timeline

aeubanks created this revision.Sep 29 2021, 3:27 PM
aeubanks requested review of this revision.Sep 29 2021, 3:27 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 29 2021, 3:27 PM
rnk added a comment.Sep 30 2021, 9:15 AM

Surely this won't compile with MSVC, though?

aeubanks updated this revision to Diff 376284.Sep 30 2021, 10:49 AM

make more portable

aeubanks edited the summary of this revision. (Show Details)Sep 30 2021, 10:50 AM
aeubanks edited the summary of this revision. (Show Details)
rnk accepted this revision.Oct 5 2021, 8:08 PM

lgtm

It feels a little bit like a micro-optimization, but it's worth 12%.

This revision is now accepted and ready to land.Oct 5 2021, 8:08 PM
This revision was automatically updated to reflect the committed changes.