[PATCH] D126885: [SLP]Cost for a constant buildvector.

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 23 09:57:41 PDT 2022


reames added a comment.

In D126885#3735736 <https://reviews.llvm.org/D126885#3735736>, @RKSimon wrote:

> Refactoring OperandValueKind/Properties from enums into a single properties list has come up several times (IIRC KnownNeverZero/KnownNeverNegative properties and even KnownBits/SignBits/Min+Max have been mentioned as useful for some cases).
>
> TBH just merging them as an initial cleanup (and improving TargetTransformInfo::getOperandInfo) would be worth it and would make it easier for future changes.

Given this has come up many times, I went ahead and did it.  Changes to wrap both existing properties enum in a class have been plumbed through all of TTI and client code.  If we want to add new properties, it should be pretty straight forward to do so.

I'm still not sure this is the right direction overall - as opposed to costing the actual constant value - but I'm still toying with ideas here.  One thing I did notice is that basically only X86 costs immediate operands with the current approach.  So this really isn't "existing targets do X"; it's "most targets ignore this issue, and X86 does X".


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126885



More information about the llvm-commits mailing list