This is an archive of the discontinued LLVM Phabricator instance.

[NFC][FuncSpec] Update the description of function specialization.
ClosedPublic

Authored by labrinea on Aug 24 2023, 4:02 AM.

Details

Summary

The code has changed significantly over time making the description outdated.
In this patch I am re-writing the description with an emphasis to the cost model,
where most of the changes have happened.

Diff Detail

Event Timeline

labrinea created this revision.Aug 24 2023, 4:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 24 2023, 4:02 AM
labrinea requested review of this revision.Aug 24 2023, 4:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 24 2023, 4:02 AM
ChuanqiXu accepted this revision.Aug 24 2023, 7:17 PM

LGTM basically. Thanks.

llvm/include/llvm/Transforms/IPO/FunctionSpecialization.h
23–25

This is asked several times before. And it is indeed a little bit odd since inlining can cover function specialization abstractly. And we considered this when designing the cost model. What I wanted is to add a post-inlining function specialization pass which can be more aggressive on literal constants. Maybe it is worth to add this as a TODO? This is not required.

This revision is now accepted and ready to land.Aug 24 2023, 7:17 PM
This revision was landed with ongoing or failed builds.Aug 26 2023, 3:26 AM
This revision was automatically updated to reflect the committed changes.