This is an archive of the discontinued LLVM Phabricator instance.

[BOLT] Mark option values of --split-functions deprecated
ClosedPublic

Authored by FPar on Jun 24 2022, 2:17 PM.

Details

Summary

The SplitFunctions pass does not distinguish between various splitting
modes anymore. This change updates the command line interface to
reflect this behavior by deprecating values passed to the
--split-function option.

Diff Detail

Event Timeline

FPar created this revision.Jun 24 2022, 2:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 24 2022, 2:17 PM
Herald added a subscriber: ayermolo. · View Herald Transcript
FPar requested review of this revision.Jun 24 2022, 2:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 24 2022, 2:17 PM
Amir added inline comments.Jun 24 2022, 2:42 PM
bolt/lib/Passes/SplitFunctions.cpp
35

Non-boolean values are deprecated, but would they still be accepted?
Also, to make that warning stand out, please use WithColor::warning() (see example use in D126722).

FPar updated this revision to Diff 439911.Jun 24 2022, 3:45 PM

Output warning to WithColor::warning()

FPar added inline comments.Jun 24 2022, 3:48 PM
bolt/lib/Passes/SplitFunctions.cpp
35

Yes, this patch does not change the behavior when passing "2" or "3" to -split-functions. The only visible change is the warning being emitted.

rafauler accepted this revision.Jun 24 2022, 3:55 PM

That's awesome, thanks

You might want to wait if other reviewers have any more comments

This revision is now accepted and ready to land.Jun 24 2022, 3:55 PM
maksfb added inline comments.Jun 24 2022, 4:33 PM
bolt/lib/Passes/SplitFunctions.cpp
35

We discussed the WithColor::warning() change offline and agreed it's a good idea to have it, but it has to be done in a consistent manner for all BOLT output. It's fine to keep errs() for now.

FPar updated this revision to Diff 439928.Jun 24 2022, 4:43 PM

Revert WithColor::warning() to errs()

FPar marked 2 inline comments as done.Jun 24 2022, 4:44 PM
This revision was automatically updated to reflect the committed changes.