[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
Mon May 15 09:10:55 PDT 2023
luke added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/LICM.cpp:1346-1354
+ // Account for only the users that are inside CurLoop.
+ SmallVector<Type *> AccessTypes;
+ for (const Value *V : GEP->users()) {
+ auto *I = cast<Instruction>(V);
+ if (CurLoop->contains(I))
+ AccessTypes.push_back(I->getAccessType());
+ }
----------------
@nikic I kept the O(N) behaviour here because it looks like we're already iterating through all the users below. But this area seems sensitive. Do we want O(1) behaviour in this block too?
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