This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Don't aggressively unroll vector remainder loops
ClosedPublic

Authored by dmgreen on Oct 23 2020, 9:16 AM.

Details

Summary

We already do not unroll loops with vector instructions under MVE, but that does not include the remainder loops that the vectorizer produces. These remainder loops will be rarely executed and are not worth unrolling, as the trip count is likely to be low if they get executed at all. Luckily they get llvm.loop.isvectorized to make recognizing them simpler.

We have wanted to do this for a while but hit issues with low overhead loops being reverted due to difficult registry allocation. With recent changes that seems to be less of an issue now.

Diff Detail

Event Timeline

dmgreen created this revision.Oct 23 2020, 9:16 AM
dmgreen requested review of this revision.Oct 23 2020, 9:16 AM
SjoerdMeijer accepted this revision.Oct 26 2020, 1:00 AM

Yeah, looks very reasonable.

This revision is now accepted and ready to land.Oct 26 2020, 1:00 AM
This revision was automatically updated to reflect the committed changes.