This is an archive of the discontinued LLVM Phabricator instance.

[LV] Add option to tune the cost model, NFC
ClosedPublic

Authored by Allen on Jun 6 2023, 3:14 AM.

Details

Summary

For Neon, the default nonconst stride cost is conservative,
and it is a local variable, which is not convenience to
to tune the loop vectorize.
So I try to use a option, which is similar to SVEGatherOverhead brought in D115143.

Diff Detail

Event Timeline

Allen created this revision.Jun 6 2023, 3:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 6 2023, 3:14 AM
Allen requested review of this revision.Jun 6 2023, 3:14 AM
dmgreen accepted this revision.Jun 6 2023, 4:14 AM

Sounds OK to me. Feel free to add an option for MaxMergeDistance too if it is useful.

This revision is now accepted and ready to land.Jun 6 2023, 4:14 AM
fhahn added a subscriber: fhahn.Jun 6 2023, 4:29 AM

Could you please add a test for the flag?

Allen updated this revision to Diff 529135.Jun 6 2023, 7:44 PM

Add a test for -neon-nonconst-stride-overhead=5

Allen added a comment.Jun 7 2023, 6:45 AM

Could you please add a test for the flag?

Done, thanks

This revision was automatically updated to reflect the committed changes.