This is an archive of the discontinued LLVM Phabricator instance.

[FuncSpec] Respect MaxConstantsThreshold
ClosedPublic

Authored by SjoerdMeijer on Dec 10 2021, 4:01 AM.

Details

Summary

This is a follow up of D115458 and splits off the function change.

This truncates the worklist to 'MaxConstantsThreshold' candidates if the MaxConstantsThreshold was exceeded. It changes the behaviour of option -func-specialization-max-constants. Before it didn't specialise at all when this threshold was exceeded, but now it specialises up to MaxConstantsThreshold candidates from the sorted worklist.

Diff Detail

Event Timeline

SjoerdMeijer created this revision.Dec 10 2021, 4:01 AM
SjoerdMeijer requested review of this revision.Dec 10 2021, 4:01 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 10 2021, 4:01 AM
ChuanqiXu accepted this revision.Dec 15 2021, 2:35 AM
This revision is now accepted and ready to land.Dec 15 2021, 2:35 AM
snehasish accepted this revision.Dec 15 2021, 8:53 AM

lgtm.

FYI in case you were not aware - if you have a dependent patch you can "Edit Related Revision > Edit Parent Revision" to ensure that the CI picks up the parent patch.

lgtm.

FYI in case you were not aware - if you have a dependent patch you can "Edit Related Revision > Edit Parent Revision" to ensure that the CI picks up the parent patch.

Ok, thanks! Also for the reviews of this patch and the other.

Just to let you know my plans in case you're interested. I am going to pick this up further and will be working on function specialisation some more. I am going to add some more tests, will work on some of the limitations, look at compile times which are actually good when it triggers but it's a bit too high when it doesn't, and start looking in supporting this with ThinLTO. So yes, to be continued. :-)

This revision was landed with ongoing or failed builds.Dec 17 2021, 1:46 AM
This revision was automatically updated to reflect the committed changes.