This is an archive of the discontinued LLVM Phabricator instance.

[LoopUnroll] allow customization of threshold for new-pm
AbandonedPublic

Authored by wenju on Apr 24 2022, 7:58 PM.

Details

Summary

Legacy createLoopUnrollPass provides threshold parameter. This patch
brings the support to new-pm LoopUnrollPass.

Our downstream uses LoopUnroll pass with small threshold for fine tuning, so we want the support for new pm.

Diff Detail

Event Timeline

wenju created this revision.Apr 24 2022, 7:58 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 24 2022, 7:58 PM
wenju requested review of this revision.Apr 24 2022, 7:58 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 24 2022, 7:58 PM
fhahn added a subscriber: fhahn.Apr 25 2022, 1:14 AM

Do you have any plans to add a user of the new Threshold option upstream

wenju added a comment.Apr 25 2022, 1:38 AM

Do you have any plans to add a user of the new Threshold option upstream

I don't have this plan. createLoopUnrollPass in standard pipeline uses default threshold parameter.

Can you just have getUnrollingPreferences override the UP.Threshold for your target? Or is it that you want a specific run of the unroll pass to have a lower threshold than other runs?

wenju added a comment.Apr 25 2022, 2:34 AM

Can you just have getUnrollingPreferences override the UP.Threshold for your target?

Thanks for the suggestion.

Or is it that you want a specific run of the unroll pass to have a lower threshold than other runs?

Yes, our pipeline contains several calls of LoopUnroll pass with different thresholds, so I think getUnrollingPreferences or overriding command line option wouldn't work.

wenju updated this revision to Diff 427513.May 5 2022, 7:40 PM
wenju added reviewers: dmgreen, fhahn.

rebase

wenju abandoned this revision.Aug 22 2022, 1:31 AM