This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Add caching to the gather/scatter to strided load/store conversion.
ClosedPublic

Authored by craig.topper on May 10 2022, 10:09 AM.

Details

Summary

If we have multiple gather/scatter instructions using the same the
same strided address we would scalarize it multiple times. I guess
a later pass cleans this up, but I don't know if that's guaranteed.

This patch adds a cache to remember the scalarization we already
created for a previous gather/scatter.

Diff Detail

Event Timeline

craig.topper created this revision.May 10 2022, 10:09 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 10 2022, 10:09 AM
craig.topper requested review of this revision.May 10 2022, 10:09 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 10 2022, 10:09 AM
frasercrmck accepted this revision.May 11 2022, 3:00 AM

LGTM

llvm/lib/Target/RISCV/RISCVGatherScatterLowering.cpp
40

Maybe a comment explaining what's being mapped here?

This revision is now accepted and ready to land.May 11 2022, 3:00 AM
This revision was landed with ongoing or failed builds.May 11 2022, 11:47 AM
This revision was automatically updated to reflect the committed changes.