This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Increase MVE gather/scatter cost by MVECostFactor.
ClosedPublic

Authored by dmgreen on Aug 24 2020, 4:14 AM.

Details

Summary

MVE Gather scatter codegeneration is looking a lot better than it used to, but still has some issues. The instructions we currently model as 1 cycle per element, which although is potentially an over-estimation, is a bit low for some cases. Increasing the cost by the MVECostFactor brings them in-line with our other instruction costs. This will have the effect of only generating then when the extra benefit is more likely to overcome some of the issues. Notably in running out of registers and vectorizing loops that could otherwise be SLP vectorized.

In the short-term whilst we look at other ways of dealing with those more directly, we can increase the costs of gathers to make them more likely to be beneficial.

Diff Detail

Event Timeline

dmgreen created this revision.Aug 24 2020, 4:14 AM
dmgreen requested review of this revision.Aug 24 2020, 4:14 AM
samparker accepted this revision.Aug 25 2020, 12:21 AM

Sounds good.

This revision is now accepted and ready to land.Aug 25 2020, 12:21 AM
This revision was automatically updated to reflect the committed changes.