[PATCH] D91059: [LoopVectorizer] NFCI: Calculate register usage based on TLI.getTypeLegalizationCost.
Sander de Smalen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 9 07:21:16 PST 2020
sdesmalen added inline comments.
================
Comment at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:297
+ unsigned getRegUsageForType(Type *Ty) {
+ return getTLI()->getTypeLegalizationCost(DL, Ty).first;
+ }
----------------
SjoerdMeijer wrote:
> If it's only about this, perhaps better not to create yet another TTI hook? Perhaps just query `getTypeLegalizationCost` directly in the LV?
I wasn't sure if this was by design, but `TLI` is currently not a member of the LoopVectorizer. I'm happy to add it, but I thought it had to go through TTI so that target lowering is abstracted from the more high-level loop-vectorization pass.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91059/new/
https://reviews.llvm.org/D91059
More information about the llvm-commits
mailing list