This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU][SILoadStoreOptimizer] Merge TBUFFER loads/stores
ClosedPublic

Authored by piotr on Nov 4 2019, 2:42 AM.

Details

Summary

Extend SILoadStoreOptimizer to merge tbuffer loads and stores.

Diff Detail

Event Timeline

piotr created this revision.Nov 4 2019, 2:42 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 4 2019, 2:42 AM

I would like to once again voice the opinion that all of these complex merges should have been done in an IR pass before all of the addressing mode types made it more complicated

piotr added a comment.Nov 7 2019, 5:44 AM

I investigated briefly the possibility of extending LoadStoreVectorizer, but using that pass looked tricky because, among other things, the intrinsics which I want to handle here are not instances of LoadInst for which that pass is well-suited. In fact, extending the si-load-store-opt pass seemed simpler. This patch adds support for MTBUF instructions (analogous to the existing MUBUF) and handles querying of buffer formats.

nhaehnle accepted this revision.Nov 20 2019, 12:42 AM

LGTM.

As a general rule, I think we should avoid unrelated whitespace changes, of which this patch has a few, because it can make merging/cherry-picking/rebasing/blaming more confusing. If you're using clang-format, a good way to achieve this is to pipe the output of git show -U0, git diff -U0 or similar into clang-format-diff -p1. It's acceptable here though.

This revision is now accepted and ready to land.Nov 20 2019, 12:42 AM
This revision was automatically updated to reflect the committed changes.