[all-commits] [llvm/llvm-project] 3d9abf: Consolidate all IR logic for getting the identity ...

Philip Reames via All-commits all-commits at lists.llvm.org
Wed Sep 4 08:23:52 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3d9abfc9f841b13825e3d03cfba272f5eeab9a3b
      https://github.com/llvm/llvm-project/commit/3d9abfc9f841b13825e3d03cfba272f5eeab9a3b
  Author: Philip Reames <preames at rivosinc.com>
  Date:   2024-09-04 (Wed, 04 Sep 2024)

  Changed paths:
    M llvm/include/llvm/Analysis/IVDescriptors.h
    M llvm/include/llvm/Transforms/Utils/LoopUtils.h
    M llvm/lib/Analysis/IVDescriptors.cpp
    M llvm/lib/CodeGen/ExpandVectorPredication.cpp
    M llvm/lib/Transforms/Utils/LoopUtils.cpp
    M llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
    M llvm/unittests/Analysis/IVDescriptorsTest.cpp

  Log Message:
  -----------
  Consolidate all IR logic for getting the identity value of a reduction [nfc]

This change merges the three different places (at the IR layer) for
finding the identity value of a reduction into a single copy.  This
depends on several prior commits which fix ommissions and bugs in
the distinct copies, but this patch itself should be fully
non-functional.

As the new comments and naming try to make clear, the identity value
is a property of the @llvm.vector.reduce.* intrinsic, not of e.g.
the recurrence descriptor.  (We still provide an interface for
clients using recurrence descriptors, but the implementation simply
translates to the intrinsic which each corresponds to.)

As a note, the getIntrinsicIdentity API does not support fminnum/fmaxnum
or fminimum/fmaximum which is why we still need manual logic (but at
least only one copy of manual logic) for those cases.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list