[PATCH] D92177: [NFC][InstructionCost] Refactor LoopVectorizationCostModel::selectVectorizationFactor

Christopher Tetreault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 30 09:58:43 PST 2020


ctetreau added a comment.

I don't think you needs these pairs. If you check validity of the InstructionCost in the for loop, and break or continue if it's invalid, then you can just use a scalar value as it did before. (I commented as such on D92178 <https://reviews.llvm.org/D92178>)

Since this patch just adds the pair, you should be able to abandon it (unless I'm missing something)



================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:5414
-  unsigned Width = 1;
-  LLVM_DEBUG(dbgs() << "LV: Scalar loop costs: " << (int)ScalarCost << ".\n");
 
----------------
david-arm wrote:
> ctetreau wrote:
> > Why was this removed?
> Not sure which line you're referring to here - the debug line is still there I think?
ahh, I see it now. The diff has it in all-red, but it looks like you just shuffled some lines.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92177/new/

https://reviews.llvm.org/D92177



More information about the llvm-commits mailing list