[all-commits] [llvm/llvm-project] ede7c2: [VPlan] Create header & latch blocks for skeleton ...

Florian Hahn via All-commits all-commits at lists.llvm.org
Wed Dec 22 04:45:51 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ede7c2438f39e8901a6479f180255ad0f5f36d32
      https://github.com/llvm/llvm-project/commit/ede7c2438f39e8901a6479f180255ad0f5f36d32
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2021-12-22 (Wed, 22 Dec 2021)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
    M llvm/lib/Transforms/Vectorize/VPlan.h
    M llvm/test/Transforms/LoopVectorize/reduction-order.ll
    M llvm/test/Transforms/LoopVectorize/select-reduction.ll

  Log Message:
  -----------
  [VPlan] Create header & latch blocks for skeleton up front (NFC).

By creating the header and latch blocks up front and adding blocks and
recipes in between those 2 blocks we ensure that the entry and exits of
the plan remain valid throughout construction.

In order to avoid test changes and keep printing of the plans the same,
we use the new header block instead of creating a new block on the first
iteration of the loop traversing the original loop.

We also fold the latch into its predecessor.

This is a follow up to a post-commit suggestion in D114586.

Reviewed By: Ayal

Differential Revision: https://reviews.llvm.org/D115793




More information about the All-commits mailing list