[PATCH] D147964: [VPlan] Introduce new entry block to VPlan for early SCEV expansion.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 2 15:55:08 PDT 2023


fhahn updated this revision to Diff 518893.
fhahn added a comment.
Herald added a subscriber: zzheng.

Add VPlan printing of preheader block and update most printing tests. I also updated the initial VPlan construction to use getOrExpandSCEVRecipe to avoid introducing unncessary VPExpandSCEVRecipes. As a consequence some places needed to be updated to specifically requests Part & Lane 0 to handle live-ins properly in VPTransformState::get.

I also updated the code to always place VPExpandSCEVRecipes in the preheader. The only workaround needed for the epilogue vector loop is re-using the trip count expanded for the main loop, because  otherwise dominance is broken when used during skeleton creation/fixup.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D147964

Files:
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
  llvm/lib/Transforms/Vectorize/VPlan.cpp
  llvm/lib/Transforms/Vectorize/VPlan.h
  llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
  llvm/test/Transforms/LoopVectorize/AArch64/epilog-vectorization-widen-inductions.ll
  llvm/test/Transforms/LoopVectorize/X86/conversion-cost.ll
  llvm/test/Transforms/LoopVectorize/X86/epilog-vectorization-inductions.ll
  llvm/test/Transforms/LoopVectorize/X86/gather_scatter.ll
  llvm/test/Transforms/LoopVectorize/create-induction-resume.ll
  llvm/test/Transforms/LoopVectorize/first-order-recurrence-sink-replicate-region.ll
  llvm/test/Transforms/LoopVectorize/first-order-recurrence.ll
  llvm/test/Transforms/LoopVectorize/pointer-induction-unroll.ll
  llvm/test/Transforms/LoopVectorize/pointer-induction.ll
  llvm/test/Transforms/LoopVectorize/pr58811-scev-expansion.ll
  llvm/test/Transforms/LoopVectorize/vplan-printing-outer-loop.ll
  llvm/test/Transforms/LoopVectorize/vplan-sink-scalars-and-merge-vf1.ll
  llvm/test/Transforms/LoopVectorize/vplan-sink-scalars-and-merge.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147964.518893.patch
Type: text/x-patch
Size: 72764 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230502/e4107af8/attachment.bin>


More information about the llvm-commits mailing list