[PATCH] D149889: [TTI] Use users of GEP to guess access type in getGEPCost
Luke Lau via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 17 05:38:30 PDT 2023
luke added inline comments.
================
Comment at: llvm/include/llvm/Analysis/TargetTransformInfo.h:286
/// Estimate the cost of a GEP operation when lowered.
InstructionCost
----------------
asb wrote:
> Perhaps it's worth expanding the doc comment to explain how AccessTypes may be used? e.g. "Callers may pass in the access type of users of the GEP in order to allow a more accurate cost, for instance on targets where the legal addressing modes are different for different types."
>
> Of course personal tastes on the amount of doc comments to provide can vary....
It definitely needs some documentation, thanks for pointing that out. The usage of AccessTypes can be quite subtle when it comes to users that aren't loads/stores
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