[PATCH] D127966: [LV] Move LoopVersioning creation to LVP::execute.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 27 03:16:51 PDT 2022


fhahn marked an inline comment as done.
fhahn added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:7587
+  // Only use noalias metadata when using memory checks guaranteeing no overlap
+  // across all iterations.
+  const LoopAccessInfo *LAI = ILV.Legal->getLAI();
----------------
Ayal wrote:
> Above comment still holds, given that here it's not past an `if (!MemCheckBlock)` early-exit?
> 
> C/Should it move to appear before BestVPlan.prepareToExecute(), but presumably must appear after ILV.createVectorizedLoopSkeleton()?
> Above comment still holds, given that here it's not past an if (!MemCheckBlock) early-exit?

The earlier version unnecessarily created LoopVersioning, I updated the code to only create it if there are *any* checks. This should be similar to the earlier exit in the original code and avoid unnecessary work.

> C/Should it move to appear before BestVPlan.prepareToExecute(), but presumably must appear after ILV.createVectorizedLoopSkeleton()?
I moved the code up.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127966



More information about the llvm-commits mailing list