[all-commits] [llvm/llvm-project] 150681: [PowerPC] Prevent the optimizer from producing wid...

Amy Kwan via All-commits all-commits at lists.llvm.org
Thu Nov 25 10:35:59 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 150681f2f3220ee6e00377cdcc0c97ee0abc63ba
      https://github.com/llvm/llvm-project/commit/150681f2f3220ee6e00377cdcc0c97ee0abc63ba
  Author: Amy Kwan <amy.kwan1 at ibm.com>
  Date:   2021-11-25 (Thu, 25 Nov 2021)

  Changed paths:
    M llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
    M llvm/lib/Target/PowerPC/PPCTargetTransformInfo.h
    A llvm/test/Transforms/PGOProfile/ppc-prevent-mma-types.ll

  Log Message:
  -----------
  [PowerPC] Prevent the optimizer from producing wide vector types in IR.

This patch prevents the optimizer from producing wide vectors in the IR,
specifically the MMA types (v256i1, v512i1). The idea is that on Power, we only
want to be producing these types only if the vector_pair and vector_quad types
are used specifically.

To prevent the optimizer from producing these types in the IR,
vectorCostAdjustmentFactor() is updated to return an instruction cost factor or
an invalid instruction cost if the current type is that of an MMA type. An
invalid instruction cost returned by this function signifies to other cost
computing functions to return the maximum instruction cost to inform the
optimizer that producing these types within the IR is expensive, and should not
be produced in the first place.

This issue was first seen in the test case included within this patch.

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




More information about the All-commits mailing list