[all-commits] [llvm/llvm-project] bfefde: [LoopInterhcange] Handle movement of reduction phi...

CongzheUalberta via All-commits all-commits at lists.llvm.org
Mon May 31 13:30:33 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bfefde22b670359eddd7843573b63dc4326f33c1
      https://github.com/llvm/llvm-project/commit/bfefde22b670359eddd7843573b63dc4326f33c1
  Author: Congzhe Cao <congzhe.cao at huawei.com>
  Date:   2021-05-31 (Mon, 31 May 2021)

  Changed paths:
    M llvm/lib/Transforms/Scalar/LoopInterchange.cpp
    A llvm/test/Transforms/LoopInterchange/pr43326.ll
    A llvm/test/Transforms/LoopInterchange/pr48212.ll

  Log Message:
  -----------
  [LoopInterhcange] Handle movement of reduction phis appropriately

This patch fixes pr43326 and pr48212.

Currently when we move reduction phis to the right place,
loop interchange assumes the first phi in loop headers is
an induction phi, skips the first phi and assumes the rest
of phis are candidate reduction phis to move. However, it
may not always be the case.

This patch loops over all phis in loop headers and considers
a phi node as a candidate reduction phi to move only when it
is indeed a reduction phi across outer and inner loop.

Reviewed By: Whitney

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




More information about the All-commits mailing list