[PATCH] D149889: [TTI] Use users of GEP to guess access type in getGEPCost
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 21 11:16:52 PDT 2023
reames added a comment.
A macro comment on the approach here. I think you're trying to do too much in a single change, and that makes it very hard to review.
I would advise doing the following:
- Remove the array of users API. Instead, pass a single optional access type.
- In TTIImpl, get the access type of the *sole user*. If there isn't a sole user, *do not pass one*.
- As a first step, use the access type in the legal addressing mode if available, and *otherwise the pointee type*. This is slightly wrong, but is wrong in the "it's very close to what we used to do" kinda of way which will reduce test deltas significantly. You can change this behavior in a follow up change if profitable.
- Add tests *via cost model* which demonstrate the change above. You should be able to (on RISCV) demonstrate the difference between access type of vector vs scalar.
- All of the other changes in this review - i.e. everything in lib/Transform - should be independent changes structured after the above.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149889/new/
https://reviews.llvm.org/D149889
More information about the llvm-commits
mailing list