This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Distribute reductions based on ascending load offset
ClosedPublic

Authored by dmgreen on Jul 22 2021, 9:14 AM.

Details

Summary

This distributes reductions based on the relative offset of loads, if one is found from their operands. Given chains of reductions this will then sort them in ascending load order, which in turn can help simple prefetches latch on to increasing strides more easily.

Diff Detail

Event Timeline

dmgreen created this revision.Jul 22 2021, 9:14 AM
dmgreen requested review of this revision.Jul 22 2021, 9:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 22 2021, 9:14 AM
samtebbs accepted this revision.Jul 27 2021, 9:19 AM

Very nice idea and looks good to me other than an possible change I thought of.

llvm/lib/Target/ARM/ARMISelLowering.cpp
13160

Do you think there's a way to combine the checking if each operand is before the other one into a single call? Perhaps IsKnownLoadBefore could be renamed to something like GetFirstLoad, return true if one is before the other and take X and N0 as reference arguments? It might have a performance benefit over running the check twice but may be unnecessary. Your call.

This revision is now accepted and ready to land.Jul 27 2021, 9:19 AM
This revision was landed with ongoing or failed builds.Jul 30 2021, 11:50 AM
This revision was automatically updated to reflect the committed changes.