Extend SILoadStoreOptimizer to merge tbuffer loads and stores.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 40467 Build 40575: arc lint + arc unit
Event Timeline
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
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.
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.