[PATCH] D63948: [SLP] Limit compilation time of look-ahead operand reordering heuristic.
Alexey Bataev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 1 12:41:42 PDT 2019
ABataev added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:921
+ for (unsigned OpIdx1 = 0,
+ NumOperands1 = std::min(I1->getNumOperands(),
+ LookAheadOperandsBudget.getValue());
----------------
vporpo wrote:
> ABataev wrote:
> > vporpo wrote:
> > > ABataev wrote:
> > > > Do you really need this limit?
> > > Yes, because it could be a call /phi instruction with many operands.
> > Does this really the cause of the problems? It would be good to see some additional investigation if this is really required.
> This can cause problems if you have a look-ahead depth > 2. Consider the case where you have chains of phis or calls. You can spend a lot of time visiting all their operands.
> Though I agree, restricting the uses is more important.
I would suggest investigating if this is really required. Most probably, users lookup budget should be enough. If the second change is really required, I would suggest to prepare it as a separate patch.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63948/new/
https://reviews.llvm.org/D63948
More information about the llvm-commits
mailing list