[PATCH] D67148: [LoopVectorize][PowerPC] Estimate int and float register pressure separately in loop-vectorize
Zixuan Wu (Zeson) via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 16 20:23:27 PDT 2019
wuzish marked an inline comment as done.
wuzish added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:7768
// interleaving.
- if (!TTI->getNumberOfRegisters(true) && TTI->getMaxInterleaveFactor(1) < 2)
+ if (!TTI->getNumberOfRegisters(TargetTransformInfo::GenericVectorRC) && TTI->getMaxInterleaveFactor(1) < 2)
return false;
----------------
hfinkel wrote:
> wuzish wrote:
> > hfinkel wrote:
> > > I think that we can just make a separate function for this:
> > >
> > > TTI->hasVectorRegisters()
> > >
> > > (and then use that here and in the SLP vectorizer).
> > I think it's could be like `TTI->getRegisterClassForType(F.getType(), true)` above
> But above, F.getType() gives back the right scalar type because F is the LSR::Formula. Here F in the function, right? I don't think it makes sense to ask for the register class of the function type.
Yes. And above case would return nullptr, so we need care about this situation. And here we can left type to be nullptr as default value argument.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67148/new/
https://reviews.llvm.org/D67148
More information about the llvm-commits
mailing list