This is an archive of the discontinued LLVM Phabricator instance.

[FuncSpec] Fix missed opportunities for function specialisation
ClosedPublic

Authored by chill on Oct 13 2022, 4:34 AM.

Details

Summary

When collecting the possible constant arguments to
specialise a function the compiler will abandon the search
on the first argument that is for some reason unsuitable as
a specialisation constant. Thus, depending on the traversal
order of the functions and call sites, the compiler can end
up with a different set of possible constants, hence with
different set of specialisations.

With this patch, the compiler will skip unsuitable
constants, but nevertheless will continue searching for
more.

Diff Detail

Event Timeline

chill created this revision.Oct 13 2022, 4:34 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 13 2022, 4:34 AM
chill requested review of this revision.Oct 13 2022, 4:34 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 13 2022, 4:34 AM
ChuanqiXu accepted this revision.Oct 13 2022, 7:07 PM

LGTM. Thanks!

This revision is now accepted and ready to land.Oct 13 2022, 7:07 PM
chill updated this revision to Diff 467735.Oct 14 2022, 4:07 AM