[PATCH] D113900: [PowerPC] Prevent the optimizer from producing wide vector types in IR.

Amy Kwan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 20 08:34:35 PST 2021


amyk updated this revision to Diff 388704.
amyk added a comment.

Discussed on refactoring this approach with Nemanja and Lei outside of this review. 
The suggestion was to instead, transform the `vectorCostAdjustment()` function to return a cost adjustment 
factor to be multiplied by rather than the newly computed cost.

This enables us to place code to check for the MMA types within `vectorCostAdjustment()` and call the function
first in all of the instruction cost functions, while allowing us to exit early if we happen to find an MMA type.
Moreover, since many functions rely on `vectorCostAdjustment()` for cost computation anyway, it reduces the 
chances of missing the opportunity to return the maximum instruction cost when an MMA type is found. 
Essentially, we want to guarantee that every instruction cost function can return a maximum instruction cost for 
the MMA types and this change can assist in this goal.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113900

Files:
  llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
  llvm/lib/Target/PowerPC/PPCTargetTransformInfo.h
  llvm/test/Transforms/PGOProfile/ppc-prevent-mma-types.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113900.388704.patch
Type: text/x-patch
Size: 19119 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211120/4d3a754c/attachment.bin>


More information about the llvm-commits mailing list